{"_id":"@material/auto-init","_rev":"1754-00e9e162bd59d71e729f7de8e85f3da1","name":"@material/auto-init","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","dist-tags":{"next":"4.0.0-alpha.0","nightly":"12.0.0-nightly.778a0e8a.0","latest":"14.0.0","canary":"15.0.0-canary.423edc3dc.0"},"versions":{"0.1.1":{"name":"@material/auto-init","version":"0.1.1","license":"Apache-2.0","_id":"@material/auto-init@0.1.1","maintainers":[{"name":"material","email":"traviskaufman+npm@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"16a5c37061be71bdcb7b5abc30f6e9785d58c777","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.1.1.tgz","integrity":"sha512-icION8TWjG1IjLwKhrmwkpmxHKogJE9qHVoLnJ4O4XSs3T7v1K1vgIWrC4fYldlfXxqgNQMfmyglzHh6E+BULg==","signatures":[{"sig":"MEQCIDSOQyfKutcJKHFu06ReBv5ZJrlBJ+N3x0hWGlsLnewkAiBTDj8V7XhcHQiYhYtq6mJ0gXIp8kKJzx3ApPgACu+yyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"16a5c37061be71bdcb7b5abc30f6e9785d58c777","scripts":{},"_npmUser":{"name":"material","email":"traviskaufman+npm@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"3.10.9","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"7.1.0","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.1.1.tgz_1481824175158_0.7523449703585356","host":"packages-18-east.internal.npmjs.com"}},"0.1.2":{"name":"@material/auto-init","version":"0.1.2","license":"Apache-2.0","_id":"@material/auto-init@0.1.2","maintainers":[{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"cristobalchao","email":"cchao87@gmail.com"},{"name":"ljepsen3541","email":"ljepsen3541@gmail.com"},{"name":"material-admin","email":"traviskaufman+npm@google.com"},{"name":"sgomes","email":"mail@sgomes.io"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a6d5f88efff08c087e53f55c2cdfbb22ce6f4901","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.1.2.tgz","integrity":"sha512-p3yVj8yH0sAp2qblhBpsk6X8lkgOZPcNqCfRHrmHzoXgK2CULzFI8C2oAdJQjxzxf+Bq+8vnISBVsdWepnli8A==","signatures":[{"sig":"MEUCIHnml/Sv5p/9Mt2f16gg+LXS+VjmCNhs1UCMX3amHjdwAiEA7Uffq6zIj4xVNw1ciMokVYd25bsP3e6NaHwRFMZ28J0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"a6d5f88efff08c087e53f55c2cdfbb22ce6f4901","scripts":{},"_npmUser":{"name":"yeelan0319","email":"yiranmao@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"3.10.10","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"7.2.1","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.1.2.tgz_1494865555953_0.5341382503975183","host":"packages-18-east.internal.npmjs.com"}},"0.1.3":{"name":"@material/auto-init","version":"0.1.3","license":"Apache-2.0","_id":"@material/auto-init@0.1.3","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"cristobalchao","email":"cchao87@gmail.com"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"},{"name":"sgomes","email":"mail@sgomes.io"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"11f92ebb40067268238448391a542505b1932190","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.1.3.tgz","integrity":"sha512-+MlLBrO5zos/poHdEW6CoscwZe+m3OGsmTX4NxrFRaGMCpq0Wa4IZxmzACfN5ybIJX1qAnopVGHRKewzIYLcOw==","signatures":[{"sig":"MEUCIDaGvL/XtsBuf2nqB5HrU5j3BRTIb08IqqkmIGFMNwNVAiEAjj2gvJRQRP3gXCxfPMe2+66gHf5+m13MSir5+BuCzIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"11f92ebb40067268238448391a542505b1932190","scripts":{},"_npmUser":{"name":"acdvorak","email":"acdvorak@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"4.2.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"7.10.1","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.1.3.tgz_1502138904011_0.10152043378911912","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"@material/auto-init","version":"0.1.4","license":"Apache-2.0","_id":"@material/auto-init@0.1.4","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"cristobalchao","email":"cchao87@gmail.com"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"},{"name":"sgomes","email":"mail@sgomes.io"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"46dd5579be93f61050bc4948c7f182420a96d5f4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.1.4.tgz","integrity":"sha512-pyq6hTVrYo/Z/yU3vCAaIpo7C9As/Inj49kt7tRPLsCQ5MDhhMTjCZFmqldDss88XQ1QR2gjNoSh7lNkwRlu7A==","signatures":[{"sig":"MEQCIDXypATaSXtZDeMY90ajsrOGOOHgtzutf2cOcywc8dB5AiBQCflFMWSfvBIGR+U4l9dYaY716cR27T7HyYz+oOLSig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.3.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.1.4","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.1.4.tgz_1503585998592_0.46122176526114345","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@material/auto-init","version":"0.2.0","license":"Apache-2.0","_id":"@material/auto-init@0.2.0","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f6f6ef139c8aa4b5630df887b52d674342a5c93b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.2.0.tgz","integrity":"sha512-ltn1u1XH/K6mvRqXJMADp2WjreuyI+23qc1inH4HuZNDky1zvnmK1iuoOXtRXNpwQ5A3ds6qcCoCrD6JD5Y5fg==","signatures":[{"sig":"MEQCIDehruD/L+/gnpCXgC9OgKpTgFBEf5XPo+OeDSGRp9LnAiBeO1fHcblxpePbXdIkdApaY0jNxCvOmf3rT+ON0a6W4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.3.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"6.9.2","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.2.0.tgz_1505759733426_0.23031617072410882","host":"s3://npm-registry-packages"}},"0.24.0":{"name":"@material/auto-init","version":"0.24.0","license":"Apache-2.0","_id":"@material/auto-init@0.24.0","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"45b40c6939acf3940dfdb6648210c76e49d3f0f2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.24.0.tgz","integrity":"sha512-RPT9zZYUfxv/hnnZpSs4OSPVSLc8ZEN2wJfGe0ZMky8ZlOQeJCYzJMKt8l41YAQGeU1GIyEbN4jbgeZMNccnRA==","signatures":[{"sig":"MEYCIQDjfjJh/LWFDTEW5FlhXVJ3nCd0N+86FPylGMI1sdsn6wIhAJKi+fPym2csJubew2oxYc+9q/Pq0h+99gQ02dSKTvYi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"lynnjepsen","email":"lynnjepsen@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.3.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.4.0","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.24.0.tgz_1509390677327_0.8507016694638878","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@material/auto-init","version":"0.25.0","license":"Apache-2.0","_id":"@material/auto-init@0.25.0","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"yeelan0319","email":"yiranmao@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"traviskaufman","email":"travis.kaufman@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4e1bd1e3d1ca05fd937130dd1f17f5ce2f4584a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.25.0.tgz","integrity":"sha512-5nZOslGcZUczKXfMPBze5fgAb3OAmoeGxm3h6x3QLZP7FMXgyRpofH6AGw5oDIiXmvSM8r2+sduwW9OfgMlTMA==","signatures":[{"sig":"MEUCIQDq9IZDF99s1n/jaJiW7qmetQQ/Qn7B265caDb7OPAfRgIgYMU0tWv5HH+33gmZ4ZJ7rZUjjLWDqCnhJDk4ijEK5i0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.5.1","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"6.9.2","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.25.0.tgz_1510603338821_0.6174155457410961","host":"s3://npm-registry-packages"}},"0.29.0":{"name":"@material/auto-init","version":"0.29.0","license":"Apache-2.0","_id":"@material/auto-init@0.29.0","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fbf7457e934a954b52c5d7b600266230a656660f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.29.0.tgz","integrity":"sha512-pAN2YwtGKVo3JRLo0tQDugMkRmaNMfg4I1+3JehWJeJOUat6Z3Icq3Wr2uLNVpcPlsBCoLGVHYeW9FtZ0aQbwQ==","signatures":[{"sig":"MEYCIQCFR5rnQL0tXjF3jJ9/8MtL+aLRiaiBKz+wjmu5hyfwWAIhAOowxRoWpW7OExvjxfzV51+O3kg0OqSG+pnnC7tDWg9/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"bonniez","email":"bonniez@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.6.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.7.0","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.29.0.tgz_1516645854067_0.9356293915770948","host":"s3://npm-registry-packages"}},"0.30.0":{"name":"@material/auto-init","version":"0.30.0","license":"Apache-2.0","_id":"@material/auto-init@0.30.0","maintainers":[{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"67efedd9d5c42486013072a190909b11ce242a7e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.30.0.tgz","integrity":"sha512-xHlSkVHIyaTORGJxO/qZ4q95DJKv6aELrCDemfVl3vSd/PHCu3njc3FRY1n/0Pnfdj/otF1DRNhSHaWSainR1g==","signatures":[{"sig":"MEUCIQDXT3Jf2t8QafIaOennJgp6FbL3BdlLgX0T4db5Mf4vEQIgI2ZwUrA2wyZwyE1tJN3ttpFcw9hgs11yL7ekqkKlEm0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.3.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.1.4","_npmOperationalInternal":{"tmp":"tmp/auto-init-0.30.0.tgz_1517868128564_0.6609963972587138","host":"s3://npm-registry-packages"}},"0.32.0":{"name":"@material/auto-init","version":"0.32.0","license":"Apache-2.0","_id":"@material/auto-init@0.32.0","maintainers":[{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad9ac459f9ae68e937ebc662778c2dab0b67d2d6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.32.0.tgz","fileCount":5,"integrity":"sha512-yodqrTC/MjGt/dM4jiouWJuT8XRpthxicV/If/qUJUeznTkzHMvHp4hWJBcEiyjfryxvzTEoKOl5X8k/gx1GAw==","signatures":[{"sig":"MEUCIFv7bw0cL1w9s16x2sFuB55L1/Whr4Mik4Xsv+2Cu7IyAiEAmTGxib8L6D7JDKGzwgyGDyVYD2647P133CfZY4wcMEI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18297},"main":"index.js","_npmUser":{"name":"patrickrodee","email":"prodee@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.5.1","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_0.32.0_1520287719813_0.39921933751090144","host":"s3://npm-registry-packages"}},"0.34.0":{"name":"@material/auto-init","version":"0.34.0","license":"Apache-2.0","_id":"@material/auto-init@0.34.0","maintainers":[{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a97d8b00f91832984583c10fb508983fb2f3ed47","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.34.0.tgz","fileCount":5,"integrity":"sha512-3434gdmM3NEbGUD9Viu+zzLFr2IDILfUZXxZtxgezF68zGxblr6FEnyV9aOL6PKc+CimHxixeDKK13e63IC2hw==","signatures":[{"sig":"MEQCIEJV5W+D44KQ4TbHK3Yb2OgKZqSD1GRI0kMKsw4THYrHAiAK4CrCxtNZgizGgFFw/DQnUCXiKuc5EU26CYe5gLP2ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18116},"main":"index.js","_npmUser":{"name":"acdvorak","email":"acdvorak@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.6.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_0.34.0_1522705909144_0.4908193002737635","host":"s3://npm-registry-packages"}},"0.35.0":{"name":"@material/auto-init","version":"0.35.0","license":"Apache-2.0","_id":"@material/auto-init@0.35.0","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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e837ebf4720aeb017c92f6c29d27a0b45d47833e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.35.0.tgz","fileCount":5,"integrity":"sha512-mrd6pZqPNdkuD78VwYhbgCrMob3Ws1rFttYunME+IcJzLeJWOtLLGe4xZe0kYrJJ6e0AZAEA+azLyokOwPQ3Fw==","signatures":[{"sig":"MEQCID2WiDXjbI6W/wRnnVDtl/PLMrxioeTj6u9jfVJbwLWXAiBOuzFCCrl+D12tc+OBKPyxY8h8OdTZ5bHrVcKJ+Oz2ww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3mC9CRA9TVsSAnZWagAAVgAP/1LCsm6+6PKGOhJwqWLG\nOmiAQe1p2MeWipR9Wv4wg/1s3q86FJe+A5M3Z4RjQc0qU/HxPbCFppsT9k7f\nX1xRwu+p6A9/E+jT8ojzJ2gMQOG3Lu+7tl9kGr/TRxaobZFDPFzlpGo3IFlo\nRMhYcG2iBkxphvNGM+x6xrx7Oe018zoWMbvJdmy3g+f/XD+SoFm1JEUWPeKM\nMH2kinGKXlRawWwnAbz1kIzp1ZGgJBVfPrxCkFSqbsWZI+MUTN8f6EEBEG1u\n1X4/1ldnSDQb2vJ8nczjXSiVc3x+wKwf+sXnoMKG2NX8RhPlT7J3OoKAJB+X\nwZrTNbhegvUIbEB+yqJC0Cg57dlsIuPKwi/FaAXormII5njEVxSzpr0GaYVJ\nh4yZX91O8AzC2cm2C2SkuKbyfzYUsqOLCYHH2K+ws2nydRRRtzdVI3du9xG2\n3tSjXf2/GlOZlbaYFAUofs5U1A4SSf86xBxwrJc6PCmmhmKy/UVf33gS/I8e\ntaaiejNE8u6JZJuNxD8ImYAyNoueaYt2y36f5z85k+AOStZwhl5jx5KxVL3a\n16RCBKCpYxzgtOCGRHkrZ8PLVrAsyrisJCGdtEDYDo041Q4RdjCfOncEWCiM\nDyH70ZsINMvqWQ5yTHHrZkKGV55ziEAMWxICiIcAAqjnKwXuwfPSntYbyofO\niVjI\r\n=M1dE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","_npmUser":{"name":"bonniez","email":"bonniez@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"5.6.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.7.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_0.35.0_1524523196109_0.13679149015658387","host":"s3://npm-registry-packages"}},"0.38.0":{"name":"@material/auto-init","version":"0.38.0","license":"Apache-2.0","_id":"@material/auto-init@0.38.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0cff255825a030acdaece8518fc2fd2e67b5ab54","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.38.0.tgz","fileCount":5,"integrity":"sha512-s3p5ww4BhCI/ySUulV0TxlAUg9R4PMcFYNGa7Kx4SUoD8k+rai61pgFiJW16YfWbtaI+wCQ25zDFB7Ek3bdpuw==","signatures":[{"sig":"MEUCIE3wOE1dcNCHyXsfRzvsxXhkwoA99sj2q6gBhDhB1UEdAiEAiczaIedL+KB5i7o2BMgXJPbh1ywCrCmNIG+xeS7OTcw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbX0V9CRA9TVsSAnZWagAAy8IP/1TLoQo1uQyOAbghfM31\nU+Bxwh5iJHDgKX+Uff0KbIqWsIW5SbwJ/OS81RlAZQVbh5/qrnp0PFN96b1K\nEj/LWpBZgsRoHVG4Nfq4ZEzI+xkbgmMqxESf/HRz0uZ13mVzQtx/9JbxZG2q\nQ1K3kzMavmx2KkdUBo45ZF2QN7EfJ1yKcNhjKStAirRgrM73xfWHCRWjphxP\nNUiRG1tIhRt55mrNoF03/EXRCXBewuSK/UpLPB+xI3K4j+OVg82wslc1roF0\nxkhsewcFgnoIbSEK8Bgcg8T30vxErQBt7AJCvb0TqAaM7hxJNog42A0lIH6P\n3c7tOtuGQ6FfHgvFWyTqFEdmvSpLUTpGMemvdSL83/Hjszt8i4H/i038pZUk\n05FN2LBMD6/z8s2FgooUMy1qHruBUrGCiJIrvKvhMwLTSXkG0oZS5IQ40ZW/\nqAK006j1AaxKgPaU6bzM6JtqRQXxuFF/rZlLRDeTldVKcyuK1G/EZbrdWV8g\nrGAROAioMhwidmdPpuFfOsVOhxZPDFF4Jn/D4r/s8umNA4lUL7is4TaVWwxP\nfbpglwpD4byHsFis+i0FzGvkZBBnd/87gp5ceOF1Icb7JtFcqUlnX5GdlJYb\ns3n2oVelp4SZCyWYaijrLY5AJ2UNQxRUzZf6SW5yzERdU8C1OeE+dDo1xHZ4\nkwMa\r\n=Ronl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"acdvorak","email":"acdvorak@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.2.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"9.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_0.38.0_1532970365098_0.2562643199897816","host":"s3://npm-registry-packages"}},"0.39.0":{"name":"@material/auto-init","version":"0.39.0","license":"MIT","_id":"@material/auto-init@0.39.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9bf4af107ca18e1bd782a9ee12ace65c5b9b6399","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.39.0.tgz","fileCount":5,"integrity":"sha512-rh/YbGupzHiY9b3V/KFBzoEKcBCY8KDXQZNnNFZwP3fwDaaU6pSbVwg5jKfR6QfrQZF7AetdCYJj0p5UKDcvnA==","signatures":[{"sig":"MEQCIH9UW11ZxgN8+d9cITR4WJLLHctc3tfE6F7apL9iZd33AiAd7UFw5DyGxABf9Pt/I7gAMwgeAiZvYJplPk8kIE8fJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhDdsCRA9TVsSAnZWagAA65cP+gNRniLDraRvxdDJq2Ez\n2UkxBdxx1w8CU5RRqFhs92R0OP+r16r+UFMZKiRnAnLjXI+0UZOHWNriRZpo\n8VddgNet3WNhvwN9e1bCY7RpPLbD1tHjmB5MA4N5JhsHPnl51VVyhL7cit+6\nFdasl1++yCoctSvHYjkvBR0DwsUwgimjfvm1DfmXed4tWoQXsQfqVUnlXhZW\nv2RNO1s4XS9ez5aY72uUggrTCbCN4hPyMvtieBjNfFFWH/O7dEYKPt5HnGVn\nGYpODQLQWmmvGlyNof6DqXByA8O8Nm61dn60Iwz2IGNHnOLTN6BMQJcKc2UM\nQ0cYnln0VmFzknjdLzkkrljyf7P4TA/TB4uzNYHLysJ/AdBJiUmTbGvojvk0\nb/WgUzzCDDPCLi1xKItnJFIWtgxhbLGSyf1dXMkzkHE1F+iPrZU88hm2tv3g\nMIu3nHmvio9Bg3XjE/9B2/ptb19naG1glBRIaUUD6mEq88uhzmCgNUa0f2be\nvW6binU+8A0lt/GRtDnfYY5inAQY8zY01W4tDgvA9D7gTiET8e8M1T9ModYc\nfj6eSJECOeAA7uEzFfwi2qIpMlhaPssyS37OzwO/65iwvHmpgUFk2ZLL6/sH\nT6/yRjdN56u3awaOqJTkqTgP1dVNE9OYG9lP6Hiwv2tBFhQdLkGzym7nOHuQ\nQbbw\r\n=Z/ov\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"williamernest","email":"williamernest@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.3.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"9.4.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_0.39.0_1535391595985_0.7128206143728129","host":"s3://npm-registry-packages"}},"0.41.0":{"name":"@material/auto-init","version":"0.41.0","license":"MIT","_id":"@material/auto-init@0.41.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8a59bb0b83e0f51ead9508074f9a29b2b6a20eec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-0.41.0.tgz","fileCount":5,"integrity":"sha512-jp6L8MpYu7DudgDfA8iTyD9BwQrYPEDsIJGbqzN9vcCBl5FoBatkB8pcFXKr+1mRBk7T1Qmf6+H5nDtxyXjHEQ==","signatures":[{"sig":"MEYCIQCcMZolPr4O/zYFLmXdirNI9L3eS9WwtINGXjZJl6zwygIhAPSZXiZAVD7OOFGe+ao8q4XSDHfpDeVvYIU8AWeMg0Xg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb12vMCRA9TVsSAnZWagAA85kP/2FF6mmHQG6HClS+KyQQ\ndDR6fkVQXytZbVY99uYJjgU7nT5wThIoaM5bJTSCJtvGvO2dd5KaL/HWzQs1\nq7+2JrKz/Au2OOMrcaKC+LKs5TV4mWWd3ZC4ghJWL6xRvu789ulgxBCuXElx\nMRhpNbGzM/c4VlyuO1A4T2+DZgRym4hkqPf8EhBt5gDeyPRbTkVOfqxQfNtZ\nx2Pp2sZ72kfG0XNiPS6YZBSATnX4MtNnNsqh8qvTSKHCA7edZkXDhhwDrX8X\nvnDicD8bOLntj072e3vFiLyUgMHFg7JbA5KotP7leqtpLeqZz6qiVJU4SpdF\nc1PKgo66sOHsPv7HF1BbcEYzWzI54J2pVNYxvV1RPOM5FsoaA2D1AnkXUdOW\nBIM2YZsgjT2k72WX5uGGzGuRvsHUoGPts4sJrdOdUqrVzgtrtMlHNZbAjhFs\nXHalUDyq4CYbnL/gbpse16bdx7oKxy+3RDR4+HSciIKKQZOK4z3dEjSluhX3\nS8IQGZe8aWZX3LAdxVqn9pAdCb3OIUKOjsVl5ePN8rcOorayzoIWW7I3CnKh\nv3qRIKQQ4FtThwJ5DOWpbBq58lwEMkMw0VQ3OadgMVaGqdv1vQlJFvzBKW5Y\nrcdMeYW34CuNaW0UWVDoJTQVqTThTIH3n6kl1E2e6F+uQ9vzEoLFGxT2GVZP\nqB/m\r\n=c8g7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","_npmUser":{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.4.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"_nodeVersion":"8.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_0.41.0_1540844491866_0.663243635427341","host":"s3://npm-registry-packages"}},"1.0.0-0":{"name":"@material/auto-init","version":"1.0.0-0","license":"MIT","_id":"@material/auto-init@1.0.0-0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d9f1463a5e5066265c16b683fe923a4d003da51","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-1.0.0-0.tgz","fileCount":10,"integrity":"sha512-ABIew0LOQv+/Fnezu0vUQBjB1iJUyBwIANQOEIJeUspigzn4vjTk8nk64ceb11zzlEBKYV/EpqT2G/pEtmiUzw==","signatures":[{"sig":"MEQCIHjxEjWbU/OfYd5BmUyKOHwO5Tp02N0w6bep58FVFtv3AiA8UBWqlD7d4zU/mZIg2fRdQGDBIOgBeaw3mfE6PYRwKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdyRTCRA9TVsSAnZWagAAzdcQAI1e3XQm1QrdQgmMMKl+\n/9WkMlIymB+2NhulcvbnhIg2aJ2zTxhU7fWplRINzb8zcgsc09ZEORNVM6Xw\nayrqVFR5ImejKB8DE0K3PiWg1XIZqxY9uk/avHSJaqZ2ORiJBC8qGDdFAK4R\nvHPhV0oGZFb0uKXi9xHCcbvQ8e6EEW9V99zHX6oAjv7koyfGK9x02FfXObC3\nEvqBppFC3Om88tlNowBF+dJZ5M+/EyM0ne1wyN2rgV1MHYNZtkv4bugTDOpZ\nuVWTDE69h0UNT8dLMX6VVTXxwpsIusfIcjoFsiXpQWX5Mb1Gz9PAUtcsa00P\nvHOrN4xRuelvsmhQpTfOWvDhAnuu9b3hVI9V2lmUShuGh4sRj/1VUJcLtZh9\n9wc3KncUXcZSgqg7qMQOJAHRJlVLqnhocSWmIL96HI+sNQ6CFS/zv3vt8uc4\njpFrt0/RtVtE2HOLltX11OT6aBWbHjrNDT8I+ZxKW0OgTCFiUaBPfJSib/8m\n0338da5LOVpsNNpa8BBQgOjpYJSXZ7E8Iavq97jC+3Kuz3BQDLvD1tGZWU21\n6cpYKOyERlmX1n7QxMiN87d6+h1eQbO/7t0kAHUwySzTiE+Tin0v67oY/2HZ\njF42CwHnxPmBsIUa/9pjXgDcbM3tonCdBBceatrMEO6+UBOIoIi5YyZ1nMd2\nsVwn\r\n=exsE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","_npmUser":{"name":"acdvorak","email":"acdvorak@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.8.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.14.2","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_1.0.0-0_1551311954738_0.4060536446934544","host":"s3://npm-registry-packages"}},"1.0.0-1":{"name":"@material/auto-init","version":"1.0.0-1","license":"MIT","_id":"@material/auto-init@1.0.0-1","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"405e2e101c8a0e877901f9c532fd210dbc792d28","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-1.0.0-1.tgz","fileCount":10,"integrity":"sha512-vzU0fiYKyWBJmkN94Kz9sRKzmeC8P7I3Fn7Kw2uHVKZMYDwU9xcSBz63C4LUG8pzut78+OXPm0BWX1SvHPbYHQ==","signatures":[{"sig":"MEUCIQDPghZNqx96JEfrbLiV0AvbN4BwrWv+2Mpmtzwi5dmd2gIgEBsVsquJNOanoRBoLKkIbVI4hiPGkPDEs3nFwjWCxuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfbW1CRA9TVsSAnZWagAAXfEP/RA5etpN7jwnWBhTScSm\nnc3J3RYR/fewop7o2nK8XmrZAcnGlWNHz09sfI9vyPTYzYV2RwDUYhG2E4JY\nM5/Y4AESgB3EPh2swzREAGlCoy6yfk4PcmfyyY/j1NF3yQXsEVayH4+9RNIs\npjuoKDkhvsd7ZCc/J3j24uVFDEBq5VDn0gRbWj0SbCR1jG0ieZGpUptOgBU3\n6tFJLPz9bWIpQGtMbGSq8U5UQM+C5nEqE0I4TR3sp44+v8SDZcKz5t/pAUXh\nUeF4gfEGxazVaeXMv79WwPVVW14c0r02/MvCNa1tmBjm14FTBnwlvSvXYc4Z\nhAXMGGRdMIdtUHIHtdBUjDxJIHTkdaV8C4/SGp8cGbYcYx2g29HedkRNZjDa\nYDUnA/3w84nucULOeykxVeIAr6fxiqWxN9q5gyGRhmkODNH930wHG4HlpleK\nwTvEScpcIKSB0SsWndFFYL5G3wiuHv+/8CWHU6SMxs3D2dtn49tvZqhNEK9i\nEJJbqn/6l5/pFya72rOL3NHTH2c/c15aOC5iSEVfXpgqSL8MYSiB9Cr0UO8W\nd5ccWKe4E45y//5zQUZu6oc3JM0DsfH5zVpKgTPPiPKU0Eb57dxpzaojHfLK\ncprIYWW1xtM0FqfLmnCqTIq+o0SWgOBxxHobdvgEr/W1uqUQ2y3YVDhfUr+X\nsR1M\r\n=up7J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","_npmUser":{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.7.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.9.0","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0-1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_1.0.0-1_1551742388582_0.3743176921546749","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@material/auto-init","version":"1.0.0","license":"MIT","_id":"@material/auto-init@1.0.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0431b03f1bd533f57c4532657e236fe47711f3ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-1.0.0.tgz","fileCount":10,"integrity":"sha512-xlWEjjyQquXMi9xz3RH7HW/5dsLGkVYQnm1WCYw2a6JIpIlipkkLEzBNc//agiQongIBbLndL07gO7WQeSohNA==","signatures":[{"sig":"MEUCIHiPqrLDy13D1r51MntnhHyiAriakRbB8+YUtifQ9Hn5AiEAw0jWyN7TdllMgm8dXbpaWuRTSbpZoJ10FJ7R/irTdPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgDaqCRA9TVsSAnZWagAA9bkQAIb03+4qwOfqkGPdmGKx\n2LIruwL6VDoOeKTYIHYpQHX4ZFhlwPCsadmEeiu7qqPxx4xtHiJJvwyIk6ei\n14jos3/s0sl2rUlwuEaSNrLjgStYcUXR3gjf/lMcB0N64bpP/fdBZBmGQuc/\nYs6vSUK9LTWEE2EQP7iBN+6x3no4IvVVAotdYQsTxDR8fdu22WJy6+R+SzrW\nSIjliLvClD8/kCO+3vVZV8o51HBCJlkLthTQU/P23Vy9B9dFAdVEBhi8g6j8\nI4OFi/9yWSvs3cqDTH8MECcGNKVrTfCdxPHatXTSjUQDk/FN6cU6DrsvGu6h\nNA9TgVuuFYNkLzjUoVHl8pI6aQK7Mb5rN5d5PU3F7yUL+wsUTftPuLWnaIH2\nxpG6k54gTZW7mEeC5xRgIb21cEDO72oqwjmfkUPc7+06LSUlLSxUMImOOjDX\nCm6d0ZjtDQZOtDKCa0y1leAMkB/weuMzSBPISrO2gVNOPBgceoMOXMBkPYBC\nUa2wHHUQksaEWrhWaN4ZA4sl/PeOOIANsx/VuRexMLSWV2c9FJYdE+UcxE19\nI+TGkOuV8Z8LegZ9/J/fSYuulOTm5oyISX4M/QA8+egPJYNSqbLfFX23dZ9q\nmUaN9qcK1r9Hl4huOkCJ3WH7iHvgtDlcVBAl7CLJfudzfqA19WKhpSInQfSa\n/tyX\r\n=EsaU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","_npmUser":{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.7.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.9.0","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_1.0.0_1551906474041_0.5243641112913822","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@material/auto-init","version":"2.3.0","license":"MIT","_id":"@material/auto-init@2.3.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3d32507675939ab0d7c9f05b075805ed24d22095","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-2.3.0.tgz","fileCount":13,"integrity":"sha512-WFlX3xdZjp/gWZiY0+poFjO12fl8t8C9M82kkQLb6WaUkoQ1YHeV2xQSDLY4IvwcKXb70IpcU3Tqgh+aoiHC0w==","signatures":[{"sig":"MEQCIB6/ou3HKer6EMbaTENn4oh1x1mqY1MImzGYt6R+RwzBAiAN5DRiBUttl5I1PCvk0S5l3vm7qyEvWzVs/7g0PmXTNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7abXCRA9TVsSAnZWagAAmkYP/2ALUPhR73ElXeGhXakD\nMg13k5MnMiSwkeFZhvg4Wl0BQAh1PE8O1D8MsP4NebIq7ZlQat7oiVuFpTZH\nYZcUDab6wZII5jmFZ+5LOkTAysaJw87+vnlTksjsW2WYjnas9eQGxyQkeqj4\nrBMaDO0ssKZHtoqxZS+/LWNsy2xQRc1V/g7QPUiWCogbrkHQ8dptGUM6gzmO\nzmHcwnWL/Xn/gW4otzLYrPY0i5u3arevmlYSrg+2p7yW0DbO/UH2ai1WE1s7\ncMjN9FqFORuyGlkqX601lhhk3Gp4E34xQ+TACbrlybEh24jvp5LyTR4PYPFA\njDyoQ6K0zRFxT9CXvHP0dhp90Tqv4QEcpUfLWMd6O7sLMmEPrrREAJLLy7PW\n7qlnKkujBmtYWqf5nlL1iY2tHkfjkJNStyUVEYvC8wLTgO9rMalqaz7h7MOw\n/oU2PF+NNLcZG09HnWibSSsCWr/tvS2giaqLMGtOX43tw8Mfs2Fpm0AdN6Sk\nJ5DEetu503MqG6hHYCltfGEBj2LoAnkuBjkt2x3cArnIlwDQDqcIVOTroG+B\n3ev9GP75K72/Aeg4+XcGcXi4EiZh/ig/T6wpzEZP6wzR6Jf5nA03yRknQqGM\nVmqyTp1d4jgd5us1/pSeq68pArht46BrrkakBtDVuGLFaTz1Zi9mPXBe7HnT\nwSb9\r\n=l/X+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","_npmUser":{"name":"moog16","email":"mattgoo@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.8.0","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.13.0","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_2.3.0_1559078614760_0.48675643857628903","host":"s3://npm-registry-packages"}},"3.0.0-alpha.0":{"name":"@material/auto-init","version":"3.0.0-alpha.0","license":"MIT","_id":"@material/auto-init@3.0.0-alpha.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"492374fc1e94ce53fdc1812671f1977d5df23d9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-3.0.0-alpha.0.tgz","fileCount":14,"integrity":"sha512-oNbf4sBdd/hNQMOpqjteFqCJH72iebI+0dfZYp2hVX2gWXWn30WoUk538KyqOjblGQhFpdf13he3crcaZEstbA==","signatures":[{"sig":"MEUCIQC8QqNqXyfSvNFOy2vYmyv5h5dF6pzyoi4KajXBcGo65gIgSVEi2yzqVPDKpEI/bSD5WUzeMFTznhiHTWXKZE0wkYI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAHpJCRA9TVsSAnZWagAAWBQQAKKmVx905xrrVT1ga7JN\nK5Rzrctu7miNhbkc+YXk3iD7ySgHPHLiL78J2mq487ArqWxa6JsDWNKou09h\nq/WwoU4VpRQ0IdMsIRkVXaZXeGqe0SGqaamhk6uK6kJy2mGH4DaC7ZYeu0q/\nH+P1vG4fG9zrXl7QXTF3mw4mgkm/tfGXAt4z8igolzXGSgFoXsUA+93oAHBo\nbGHxayHyZ9B0CdRWKNaZdgav+fbuBnD9ErehyuoMjqNd/R4UBnKspwqYfPyd\nRmz0C1OHhBIPzaHu9vk/Y8nWkjKYuNT4ewhCgT8oxsTMbBzJ6QAnkGbwZpY1\nWLQ5AjL44v6bcbGKk2BAWGQpTyLtG9fx7rk7pcTk+m65UkG14YXeXW/xzou2\n8buWjTuYn62MXPsXUEPwNe5GDm608uE+leK579pKW49Wx2TuJxscj4y9I9nl\nNnElvdT/axyJTeSq/EuG6aGYI8/UfVcbv8Lxudffltgede9mgZM2/kSFrjRw\niXUDj/MQTruW9isrkkt5ONK1Zq8JrXxR1AU3/DuYtaaBkG/m0RCE3U4N8l6m\ni4ou4Ng4/hVbWB/mJFItXPCCwbQaLe7CdX/k9hU3jFraFO5wnJp9XvrHnJvk\nhkJHFkcUwpvcv8OVM3MdSRfog8weVSkAeP8jBESyPgg/utyxEkqRrsgHu+sf\n56ey\r\n=tlZO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"094e507fcfb488303e5adec97f7f985b30e8567e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v11.9.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"11.9.0","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_3.0.0-alpha.0_1560312393190_0.987722464224531","host":"s3://npm-registry-packages"}},"3.0.0-alpha.1":{"name":"@material/auto-init","version":"3.0.0-alpha.1","license":"MIT","_id":"@material/auto-init@3.0.0-alpha.1","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"da83880ede602d245c4fa79f01bf406e037232fb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-3.0.0-alpha.1.tgz","fileCount":14,"integrity":"sha512-glHtSOPSptTzFK3GqCYwV2hoCu1KQnHYBIh0Aq396xTgoYL5Mhfx/t/6fjp1lWf85/XDqaaf+iWze1XdZZKGOA==","signatures":[{"sig":"MEQCIGr3PrRD1Nav8CsMQwgNVnTHj0DhwsCkq7zdJ0z2WT2/AiACyF7gFV3R+B43UypG2ruC40mDqcqG7IhpOkaO7rqmtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAUwlCRA9TVsSAnZWagAAgJgP/3m+4H+uTYQrClXf350q\nTpzEFUU99J84ghOtr7EJbFQwwkIKTBVRlThb+tfuijzYJH6sVbLCLn/C0MBJ\nz4hD8HTPWs5NffIqmU4qGZDCMo7qVBo1pcHSVONK8tzzEjD+G3ynCut/x4As\nkobb42YWKfRTMMPh9JhJNWbhIrtFj3Nw1eD2YNURlgn7nLh/qu2yQkcaB1q1\nOle4rt9Sev/UyfXY4HI0lmZmNetrcyC8mCEb0K9Qp7VafkM68L4WsLaxnIgH\npcS4gVX38oenOUXsE2GDqq8Q8qFzjAvtzGdYJbfzCB8bpxDVlzzDoFCA+kKq\nufM9T5zDstM6Jq+oq5g05VB3XEzG3ndtzq46CdnOlBBicP3+LyYASy/duCTN\n4QJB50U1rNck1w0ibhLTEtdzog0oCKSw57hDu+kpKe0r2xK9oCT0q9Aekyre\n4u9riFzf7vmOCwOSY9nRcIUplpAv5gq2KPyl+lxG9cDA7d0y6et+F3HrXbuW\n7xPwg4qHOKFu9U8R35crT5zEaprfg4QbfE11nSmuVWaeEC6UUd2FrHqz3N5s\nVsGbzIylfvEWGPAwSLAgjOt/FBP8yhlY3UoOrUqGzuSPIqrrYJrGUTK30SeR\nEAXSw+o75doKsst9ZGpTun3Nm9MLDlTXOj3XQ12kTiEFmVuLmAtGuhwJ2MFQ\nx6K6\r\n=pMza\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dae97b98c21bb93075a9688cf1f9076a4fe5a85d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v11.9.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"11.9.0","dependencies":{"tslib":"^1.9.3","@material/base":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_3.0.0-alpha.1_1560366117127_0.5371070188716947","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@material/auto-init","version":"3.0.0","license":"MIT","_id":"@material/auto-init@3.0.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2047a717761d9c2aec73174c98ef5f6fb6f59d9e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-3.0.0.tgz","fileCount":15,"integrity":"sha512-svfoUupWj0oZkPbviLifhfcRWdFDuHmOYdJz5p3nXQteTCZxSQILw6hu5y8IoV9YEwD+QosHu5elpgM6kfE8wA==","signatures":[{"sig":"MEYCIQC06ZbcAUy83PsnLn1oSccUxmfk8e22788imofjR4ZIegIhAN1blDqdXhW8Nqyi/+JGzWlp7Y1qMHcarTrruk+AYaQ2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEp/kCRA9TVsSAnZWagAAMYcP+gMDUDisuvbfOIk05T02\nd+3yHj+ZJJm+urSuYZcmCr5q5NxjSQyAobn/wq7mZdfOJLVtObjmD5/h105d\nKmyjSXl9pR5kTwPqZ+QQOXR6nd+afrhsdjYDXhPWen6ghZwMSQook3+BdGKC\n56s+XFTan7nHEQV7IpJ+3X1WDZD+gDj98BY8bdAQvlUghSrLhCJejl3BgIW9\nUuCM6P/MA0/lmb+RWbAmV6ubo39SGGbYvaE8X/r9KncPLlDunQSG2tI0/8wZ\noeeqYN2o4VMWIy3+P7wfecwNiGmcZjQApyjyvgTCyW6VNOnVSZrTun2tRXd+\nmH7O7eHXajTfjRaPWMtdXYg9qPQx5zrzevtzc9vsKZfIS3DAOycOhE4X+Q7e\n84Us2CTHviDOAka3A9Xc3ELtvvAGCR1g9oL/qMdbOalPoF+OVU6P6VTiY57K\nvgyZ3OybZuOw4cyV8uWDr27z/tv+7EBldgayLIwAc+CAEjkfNHGnQ1hISDCo\nHC8UIq+4hM9ae3uo1JqcwzaOO6vJtDcTvUsIRX/O7JP1xO1lJV/R/zHnsreL\ngaGwLL8897YujZ3lM7go8YWGo6R8133koob9S8mvaLAY8GOdgNBqJRjboSpB\nA+Qn0PimRkYSi1/7RAVNQe7KjdRo5y3jOYvEdeWRCSmu3s9SFbwUzOgZKpDI\nlEnd\r\n=Ietj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"747f6ed544e3a3bb3fde71ceaa51359f2212bfb9","_npmUser":{"name":"moog16","email":"mattgoo@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.13.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.13.0","dependencies":{"tslib":"^1.9.3","@material/base":"^3.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_3.0.0_1561501667573_0.6407403545354113","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@material/auto-init","version":"3.1.0","license":"MIT","_id":"@material/auto-init@3.1.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf2b1dcc12d9c09b1f6182f0ac0dba7c0986883c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-3.1.0.tgz","fileCount":14,"integrity":"sha512-Q0fuycL7JUyody+V9h8Y3mXlchNECOwCWOWwjJutcxeIqmhVJxf5qiJJnXZYrwQMMtUuO2A2DTHdrxCITL2COA==","signatures":[{"sig":"MEUCIQCPU+ofspgiTY/izVkX792CR6dKZSjoDJ8EjBzHgjzyRwIgdO9FhrU+52VeFw3YjmZ9I1tENMslVPhNJsbHSb5VB68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNjJuCRA9TVsSAnZWagAAtWIP/0lalhmg4i++/6PkrA6E\nDXuADM7az2uYYv8Jouyr7DPvkSQzDr7wc1jbMmd3q8Fam8eQey+rBcsddmh8\n/S4ecvu4tDHHwgE7CFQ0daOuz9G91UGgPOyv6Nm3SxoVz/2mEEjffcbKFX3/\nm8QJ1FYYy0Y5d+jLOyaJ3QrpKFt1o9vNVoejgygeEcT/Oy429gL962k6R+Zp\nV9tvku5VlFByfzLugxgFe56qBTgsxpAqC01ISN5RvAAg4u1DKLd7o9RjZGZc\n9AIiDCojQFECxJRe/jZ18JbHqKgCvl0PxLs8vYtIjyZrTb6EUUYkHxQH+C82\nC8s9kf1BHcFrLR7tFOx1tbkPHnpjzoVNFk72JCynaKuOa0DthBZoCr+LSkjV\n+FAeclTUQCqLF/FQ08DvvXhiJGSXQUKUka33PlZn5Pse7coKaxxIQmrBvcGZ\nNmPFln8G7wboPq7YMnU3lGDQjEZ/MPhOP4kCsgESSwIZ2zrA0UAaf/tTFrwZ\n+BLgmTCaXq1HRfsT5DnBExf7sHLgECE11snW8d7IDFqjAEMdUY+gl/jgewqz\n/H3gv3O4Eo7r8I8yYWvD9FXEc9q6n54qcZ1XrGvhepw9dl34aBcapqC1cCwr\nrOAp9oc2BiEcGiSC0Es9REMGh6Nb2n1y2X5ipMAtSwJfEZlZKXU2fzgN+qNK\nCLRr\r\n=G/aI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"6b7e616da1a1ca53df2253f6207642739e13b5dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"8.16.0","dependencies":{"tslib":"^1.9.3","@material/base":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_3.1.0_1563832941213_0.33678386044200903","host":"s3://npm-registry-packages"}},"4.0.0-alpha.0":{"name":"@material/auto-init","version":"4.0.0-alpha.0","license":"MIT","_id":"@material/auto-init@4.0.0-alpha.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3cb209ff6204450424bff58f271008fa72d79a28","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-alpha.0.tgz","fileCount":14,"integrity":"sha512-U/0PLsuR0lA8R229kGzrfBu9NHKVA/+aYJL+ykrsqcVcTv+8ZLuvpLS7PPy7/DPPDRVN4NnIn2TrkdROaITI1w==","signatures":[{"sig":"MEUCIQCQZDEDvW/K2DbJZt7p7uJaGfmotBa08HGDTWcGJv8QPAIgGYalWqhJDyqiYU0KF9s7xGKhmknZI1vjUlltZwGylf4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSz34CRA9TVsSAnZWagAAzigQAIen/Xi3akXS91yXN/fB\nkK3VoofJPvW2NMz7lgtPW2vEz8oZPYMXjlAygyNK9yoj+PIarFFyfxc8GNgA\nxaHQ1Aza1cDyTwd6n12yKQsGFN+U3K/eYI+ezCkPL4uMpfJ0L7BA8G13vxXQ\n1tF0W/K91URkcIrXG+CmSvzMiNTM+8cwqiAVxwmob3ehDn/P6hXhJi3v9VEs\n+C1mljFg0IP4kyH4LIOt1AJqUWr8DqhJynrvPnJcXNFcLIxNk+5mo1jPpUVA\n1DpRndzbTYBOLnJfYFz8wHilhY/Bm1/b1XOwwcKNBmEbZAjTmIelXw7ylXyN\nnRcexNXUpi2kpfLaErOJ7b9r52wrE6Xd6eyoP2vgfvYymzdCljwwoDTRcIku\nPz68GqVBfzcluC2Zklr2S3EpngMv0CVtOzU4G4bSMSaWnfL4yqhlidlxX/0N\nruODbpQ5gS43njSyDby61Rh700o3Phl6BhPj/VFtKAA9xlSSjvpneTzIqitw\n0RToxJCMY1rWJIaR0AZhNQIuQP/uDTnqXYilkZxzvhJMPDtKEEW2MqvqzY5Q\nl42cqMlG7Kx2okXlfpEVaPjgHRlWDwSfP9IZUbJE0YZJ8G4OTokH232qXZej\nSfYDxj5mivvjcg05wKma+xICkCUaDCUaRTbjXQpQ+npXPwA55vUU2r8nUUCj\n/jI5\r\n=E8Ym\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"184b37f65b79a260f2835bd44e422dab2402d937","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"8.16.0","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-alpha.0_1565212151689_0.7802508294884802","host":"s3://npm-registry-packages"}},"4.0.0-canary.0":{"name":"@material/auto-init","version":"4.0.0-canary.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"82664ebff2910e5b68427fe96eb4175bfaafb587","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.0.tgz","fileCount":14,"integrity":"sha512-mVCAYPDOvaDtiO0Wuxdo3dYi8Z3TiF2AYuYhPcb5tWJLO3pqpNkkJg0q+vkIpMRZoWhgh5s3ZO3nncDbq2WQSg==","signatures":[{"sig":"MEUCIQDeOBRhNiR6cbMgUbYZw3rCCovZ/mb3bv8rGGsT9ARQLwIgECcEdGpy2s5hyreZKenRd4JKTf8L8ygxasHL3/REao4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcJERCRA9TVsSAnZWagAAylcQAIhqRKHJWhnPT0WiZsM5\ncuB3k68F6YHSQ/it+SFR9fnTd7+zMw7GBHRMHA/HlAmvUJZPQJPIM4dmz95X\nvWd0hhUlanCK6D8zRyk2kOQkU83fQAgQ/4etIcsZTFDyGltvmv5xoCwklORL\nAukz3IA+soNtG+jq4rh5/tIMLAHhHrV9SmKySYUTzyu3tf01TwGobn0O+xnf\ngsHfRA4uBjnYDO1WAVbvbs/FJf82Alcx8bBp0YfRPGMVXXTIGJg1Vq1k2xq0\nQkWUOWYdX3y3/lkzGexHRNciy6ah6taoE0Cdkx3mgvTzHgD4MsOhvs0FL0y0\nOLauALmhNk0QM/UQu1+hY3T4qBJMXjt1u6/lYYOYpxKUuGJMLo+tV/J7LivX\ny2KwO6SskYhJnbBr1a6v1/RURrbiPe4w06bEB63fcG1GYdXogDjW2zAThqYW\nJZGkknktrtaRvEal7/cqwFnmLb2l9yN8b0BI6s1QVO/jMEeL2C1gQPyrGZP/\ntFPNjr5fgBITleSfYsxzpPzFT5cPTSd2YQpLSWn2c1xpRRtnxUkjAH3J+Buw\nnlfxn/lSEQ5EhKT/8Fw6Ng3XMW0HjgMEwjP0WqSDYqStwibhIUVR/bENWKo9\nfe7lFAZZvDs3anaV+7Y0RtzsuZXSrC3KPhSJBtGHvjoCzvgz9y0ljuAIGz9p\nhgsM\r\n=AO/A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a9e69493144f4246efe28a958126afc2fedebd60","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"8.16.0","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.0_1567658256838_0.4804646030152564","host":"s3://npm-registry-packages"}},"4.0.0-canary.1":{"name":"@material/auto-init","version":"4.0.0-canary.1","license":"MIT","_id":"@material/auto-init@4.0.0-canary.1","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9ccf30875b08856bd0a1415c4dd88779f5952bdc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.1.tgz","fileCount":14,"integrity":"sha512-H/NXdJgmOdxY3BvmKcAoQxlhiNmQ6OhruLRwsoyKHBYqKHZQk3XbxQa+wsVrmVoA9c9PH4wRtZriH7vPKvTzPQ==","signatures":[{"sig":"MEQCICGYJrXHxYrSai7oslH2vjVJrmvQOIMcKGRiGQikTXFYAiAb1W89t459jLBrWL78i4vCG+um6gIJOqiVOE2N/5MMHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddrQSCRA9TVsSAnZWagAA/M8P/2a7Cr/akc0tu69jjGCp\ng1rYP4y6m6kDG9eXy8PMfEAyR4z5o50fVodF39iz8hlrRgGO/OfWn1d2RUcb\n4oho8fgdjZuIBT7DtkEKJLVy9hSiv38ezVlCWhV4x9F7+t5rgob2FGefHyEz\nADEnpKvF5gSOZJ/bGsYP4zcI5C+N4Gf8008OvSlXqMvz6EMMhSympsTo9NHc\ne/3zIoktX1yFCxojWacnXwgxginNjdcNoKZYHLIFt2evULG0vmkWYIaB6xmf\ncJOxNCDloMs3NSFjJFhR1G0D2umT2ltDtazaWLf0l+B9UAgF04KhnU+DUSpU\nO8+U7f9vkPj28IC6izVphVtiJNH2wwq1IoBO72zwVNt/2a7INJfkwz70JMIj\nCZWD+HmuHh+dvXVMVKotecmYyHPt8MAyr3TZXVyB3BXSYr9HjoiMs9dEmVjr\n0NK6oJEzrw9c946mN1NvkKFBvYkC6ZCHexRJ1idqafaAcQ3FBUOgSLfULqI2\npCPa0LF+89FQj0gPKvu/k74FOFeGK468PtDRusShmFufJOOHCIvs0P4S8AKH\nglkhoHv3Sfa6Qw0xhq/Mh6vNorrcSVpRYwuooM0m2jQ/T3QV+1Jp1CllAnsL\nDHXtLnj8ZTUs7zu/8XJcvE0WYTQWRlec1HzL6+S2F63zRdbZClhTEkcuxHvH\nvKR+\r\n=QcEt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"edc72a4d7d6a61d61620fd05a80e2491e518bccf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"8.16.0","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.1_1568060433788_0.22483855769873928","host":"s3://npm-registry-packages"}},"4.0.0-canary.79d881baf.0":{"name":"@material/auto-init","version":"4.0.0-canary.79d881baf.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.79d881baf.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ca147741714ebdfd2e87b1b21327675c71de902","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.79d881baf.0.tgz","fileCount":14,"integrity":"sha512-ZUGZHq5ij9LD1+JFEyViy1g30p1E6NlzSc0htYrDqamLDHBUgjkrzZBUcTnA1q0wCMWy+bzYsF/wjCzUx+hBew==","signatures":[{"sig":"MEYCIQC+6DD7q0MFg5Y4gIFbZnvvIIyeEeTUJmsbAmyqJELQOQIhANJAWgk1Ipt0/nwUu9YzKjP2jYxb7RpArpixS1Zszeru","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdev0fCRA9TVsSAnZWagAA+VAP/i4uEk9yKjpIxLGjsyPQ\nrSqY9LUcBELD0c+HUywmGFFt6NaYNKiqxNzIVE1Grb/VJ4DufJjQeJivnsNQ\nLJpEz7C7jRAOhAIRN3D7h7XxG3bzOJJ4DRv9pjnoBUHy2yz41ymFg8IQj/CR\n9dOsDgtPLJYxzq/1JecJNibBoBxd7BrH9++YIUl2tza6g7y8+N1Kc698ZkGI\n/Hd3xyYIQ34GNbRtNGXA68SXN94sEEK72UD7d5emEmmOa203R4o/JVrQ+j/R\n9fQqxgOqfVJMOmdbRZHDdLokl9hcL7aTU4Ymp7uiyPVHekL47NR/fp7CD+6I\noQdJR/ifLuqZDSZ1cupPrUNwcV7EL+I0K0YrkjRECLXQxY4jNiAq4dDpVlGU\ntLHwBY717KR8XUCi0Qz8KxNRN/32pitf8MkqCaQVcKdkUoPwQ5elE8E9SBrE\nRAJjA02KXaZiKm2KommPSTxP5TF7awZvCZDPCNEFDtkPLFKM2ImcnAQxhLUt\ncEL7WtNmfDU55S8/Lzh9ZSLq95yg2qykaduOuKNyeboCeewPLZWOBsOVWyo7\ni6Lm10S/MY5rdbYymPfsvk6P6QdF2GpJnZdKd6Saj/j26yVY/bYovs5mCIVj\nmVJEwtO2FRLdH37jL0BVWqLuuCHeqUcXx9hr5sYdzp+k624gwIuEI+TFBp56\nZzrY\r\n=jITz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"756806a2389389441b5b3c130de02948130d96b9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v12.10.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"12.10.0","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.79d881baf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.79d881baf.0_1568341278590_0.17935975021886197","host":"s3://npm-registry-packages"}},"4.0.0-canary.e851d4f40.0":{"name":"@material/auto-init","version":"4.0.0-canary.e851d4f40.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.e851d4f40.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b2ad33c8f643f192001d84bccce8cc12ae906055","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.e851d4f40.0.tgz","fileCount":14,"integrity":"sha512-zupNS1FsaRavOiGH7I4qWQBpqC+G8mbglWoyfMQFbvBpWwTYi6O1uC/w/SZSYFtLMfxv3RZYsr/BFsNUUxE3Mw==","signatures":[{"sig":"MEUCIQC8U01PxFGgy8Q4Ddirhpq4MN75ZCf7bsxNBCzXl/BINQIgLMV3O6+jq1OOOb23mWIG5Bp2CoIUN/ZOGob7MeVVQv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdexXlCRA9TVsSAnZWagAAh+AQAILpJiZ+WQdGuL2A3kCs\n3VP+20vc+ZurmD8OjbUnX9ctQwBHYnnfCb2yGklnHx36fQCqG3E3fZadS/x9\nZ4EPdLDvoSOgz+m5xM9fV/Hhbp/lNBU3OEK+L8A9bW9tdI+GAqsPkoF50g5q\nPDKl0VOY42BvERwfLl1NH9+zcr/Hcq2ONJEBu8TThd5Qf8h+KL7EzV2xigfW\noPjEQkF+fCaBdOSZ+aiNP2H48d3dX4kSCSu1kC9wIhUyks9cRSKtCbkwGUv3\naYvCT4NUj8wCfpLdUa0U8Henmy6traaQXNwjcoMEDs6lKfdzYmUzzCv2Lllq\nPR8KVyyIz9qw63DpVMrYDdIpdBSnLTxYPR5ElxcGeamnJ4tE21uTJnhCkx01\n0GSGc71uBi1YFDVnWCnOkZC9mI22+qEeIFTuW0+kjVRN0/dyn5FOhoRuzIcg\nCGwhBA6PjjIyTrsuKRj3LFDwrBBHpMGijlo9CC6TjyO7jY3O39ufhEzQNmE8\nlY/OlBKaCBbvw3yETe+jLdeQRQTchwECV/pVU/H4du8IQjT6FzO7Ts6dQfzY\nveZPyXixg+twIcrd7KYRgiVNUnLLdqU4zZvecbB1s+gqMx8Eh7sQqx7ovNEe\nWxqCNfIvxxXlsG9dJAnfymbHFR+cQb4cIsB2AsEoEjytIcoLxoF5Ve6/9hB5\n3d7s\r\n=Cevd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"353401bd143fdc2b4a85abf330176228e21dfe13","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v12.10.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"12.10.0","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.e851d4f40.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.e851d4f40.0_1568347620671_0.40826598308398365","host":"s3://npm-registry-packages"}},"4.0.0-canary.905884690.0":{"name":"@material/auto-init","version":"4.0.0-canary.905884690.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.905884690.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"77599eade03ca4aa09fa5ff03e9859a3612bfe7e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.905884690.0.tgz","fileCount":14,"integrity":"sha512-aKoemxaRdQsvYVxsIqWoy7d/UsOx8AIpFmZJadIIqkIrtVLqjitUN3bk9ApGrpPt+RlZBiymKqAGJjGOspMJxw==","signatures":[{"sig":"MEYCIQCDnACrOV/Mtusw/v3DxpHYQQP/2wzLv8WSYP3olbXJFAIhAL3mZ81ajYbP+NstM20gDaWlSM9siWLXo6lzrmZwYv3M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgB8wCRA9TVsSAnZWagAA/GEQAJn+YXqBHrWY9pGNlKD+\nQ+/awC5V4Zf6bcOpF77nNtd8XnBxoKeYgvDhODAxWTw2ymQrktvwq9Ig7fqs\nlMKZmiyrrAvbLLyk+SsjyzYyNCEPrpz5yrqB6Im1UoNPghsfkKmNPsw0S0h8\nzB3G4i+LExEaDPbLY2hAW+/HmvDTI0fhe7aehYgGloyCyv1I/Uul84DnvZf1\nX69mV20Q/xB+bqLI5jmT5D7hwgSQ6UF4DL+XG5GVU2xv91fkld6oi4/6fm3x\nBD7KHq6mtVkQ0P0y38NlzYOUXNKSdK8ku8ys3xO6VECMv6xj1600sLBWxYLE\nrP3ZcWi3UO4bVxLcl36Q9PzAulvgI9f+0T5+U/JhS4u23z7/i4AoY+3Cdn8H\nRE7jittdRv0xb5nViKZNkiOk9NtADKPPxnWRiGpHHDETpoMsKeqgyB+e3Z+q\nq2W3YD85hIf1+AP5wTrN48kZTVq07/80zR5MZF+CtCDd2miWwbrm7ibU9S6P\nqpJiF0vNFsMqNNbzIkVW2ZHh5KjL7duZ8V1Zdw0AvtfOHZqrIn3AMcsiyvie\n/cHXlkQrm780YBHqQRnSUP3Z5Aj2jZ7e6yruI+Tkjsqg+HIqKcStnJoxKKHE\nZW1jaVlbFWgBuBmDLvPnIXn21PUDIfCQGUhSxSdkKUqdHIHnnEuE/So2vbuL\nkOon\r\n=Kqxr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"df7fbf65943b1227b1bf145a2774abe7710b1e30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.905884690.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.905884690.0_1568677680221_0.0994982791052863","host":"s3://npm-registry-packages"}},"4.0.0-canary.199534d61.0":{"name":"@material/auto-init","version":"4.0.0-canary.199534d61.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.199534d61.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"528277437bce47e871c1526e8ab7e3cb6b0b00bb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.199534d61.0.tgz","fileCount":14,"integrity":"sha512-N/gUye0IMF9p9Mo4sItbJ0ZxBLqFEDSS4f2EplsG61l4EIsVjIYMiVpoF7dFoeKqJZPxwiTaguZVMcclpjCUbQ==","signatures":[{"sig":"MEQCIHhEu8J5kyOSlZ8GzaXifO55IM2CgWv7HUB6SCmddPbZAiAWH/SBO5IDKTRgtCfzWb2QWf1Or6cDHLAXiq0Fm3JGQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjlubCRA9TVsSAnZWagAAYLAQAIToK8yLj3TclICv1sh7\n4qAGSpKSJ5bZglbl5YchYh26OTX0RafmhNJIILgA2/t52uUPv1LTmJxg4tGt\nadDVIRMDsUIpYGazRJRgamUFyvVzHO607nRLaoTg6bnVrQniOivkK9IbkX1m\nPIjU6VTHmNr9MAV6QLo6O+UlP9WmeKK9ST7TGLgNGV1xkUng/7OJJkkaXkfd\nLxbrsNt+V66sz58pBzuaMRTiQfsVOyn8AchxENN3WGGWChMSd55NpaoUi7p2\nKIhHDs0MeBFyZQGjvGaXtapHN7aRTOUGVwEuZ/Cse+FTVekI09PV5I9FIqZ6\nprt9hIX5GxhHTC5ZWcBu8x8f9rrMWE5bgNckPGSXa2q+o9JIBluUuff96EQU\nO+FR62fR2/9Sj6ysMvpHhhTEVmlsuYoCdk4rBCIpCNnyvGCIaMMPmPFCuX42\n/MVvfVKFSj/q6avCoFfGcGlMA5npnM48RBB9nOLF4yYCmEnij/4u1nEwXhLI\nJgxFiH60syWpt+C1kC2PL5Hnl5gKON1fZH4QC4Z95zcJTYVdLgwxrJ1Dnke8\nz7VTaU8+Y9HbRaQvvmS0OqcAv+hZQ2oOi0h60t5imrXZYjFrzGzX0qVoEpT+\nEMfpf7ONtBFpeZR2u2P/iaSfTIoyhtRxIab7MB+VOA0dYLQIE94DNq35T8aY\nWtHX\r\n=Jp5H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c35810420b70c99e38a1438e1fd44e4bb84e21be","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.199534d61.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.199534d61.0_1569610650690_0.964059960146407","host":"s3://npm-registry-packages"}},"4.0.0-canary.22d7ad2fb.0":{"name":"@material/auto-init","version":"4.0.0-canary.22d7ad2fb.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.22d7ad2fb.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c2c16e1c37595317a9e258b1e5e54c75b825419c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.22d7ad2fb.0.tgz","fileCount":14,"integrity":"sha512-eDpFkczvLZQZ06Iv4fxBqfiIn3l5aH9gNDrxCusQt1dZKsSpKX6usvqJSxumvE0HFiGp2+KUyA/WqjzzOJu7Fg==","signatures":[{"sig":"MEQCICPPPasRuPmAWtxmxQjA2PhGoi68gQ6GDgl1AmOz6kKOAiAI+rzqg9dtmmMdpWdmogmBYPxKX4J07PziEd/TiEwfRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdphZ+CRA9TVsSAnZWagAAcJsP/3EHQh5h0+Exd+Bjywwa\nwr2UkhypZmGBPwVjymOhVTr4h7cWrFjYpRDiyw9+15adJ5tO0ljuub1Klji6\noQU4ZChnkmMej8UDlMM2oD2jSOtflp2EA2MJthPflzETJ12hSaOVwt0gDIIq\n2JeQHLoD0LTvQ9F3fkPnX9yure4bL8NiDQZxGFkDzXN/veqdr+j7svRQ9giZ\nO9JR/OauEsimHHItjklleI5yCKqN+aE83oDFO1ZO5rDrdLB0s5rXO+PeQ9hB\nECwkMDSHZ6+k4Tlxi6RO+5QnilNofOzOEDH28HVWhIjxFJ5vHhYpLVDLbjRo\nwtwkqek/0pJIKBNPPSiUPw2FadxG1KJRXCoGo3bhBJZYfqbozzddquBug9K9\nKr7bM8VpwIoVOWtrt7ek8uYwCDS26xilmGNjlk1jyY+eK2iNTZhTViJ2aS0n\nGBsrGp8diZK7uKm+IHVh5ed4j9WTf5CbHuuXE8LDuwug95bLcvEtIEtn7wDC\n6kRdhYLwJ9KBq1p42M2JaFnz3ItrwZNfUOIaDkA2AtyHpe+fdWI4gZ2TCh5G\nWfBq07Czfqs2Zg3HrMCTKJC+lm0sPqQsGtU9qA2PgP6neH3m+3v+XGn9+h36\noKnF6QixOtmjaa/dnK+HfLQaXhxmjQv+4IsctnCzQFFjMCPMd1jFnYhq8aKQ\nE53J\r\n=QkBK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bdc05bd56f8cbc11face1f0f2787fdb17f450fe3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0-canary.22d7ad2fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.22d7ad2fb.0_1571165821306_0.2682683311790828","host":"s3://npm-registry-packages"}},"4.0.0-canary.735147131.0":{"name":"@material/auto-init","version":"4.0.0-canary.735147131.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.735147131.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"972bc85b19067acf4a0cb0e4038a0a0ce98a6c6d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.735147131.0.tgz","fileCount":14,"integrity":"sha512-/MEhWqFLnZ0tcvtJIIV1KXv9AhGSGgsBWAG7z6e5iNRvkr2EKCSga+mI4iUY8ZQtvFRp8ibTauiF+ZyjG0/U6g==","signatures":[{"sig":"MEYCIQDwNVQnQexr5sr6E+NYI8p8cHhVSfXE3TmKMNAJ9g4McAIhAJT6paGhbYUBoSSl2064Pe/5baaV41T07xtpeRlu4clN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpnEMCRA9TVsSAnZWagAAGSwP/0xLUWytpzvHvDaf9PgD\nlukrzNQT/9MeFOiadiI032aI7s1ubqzQnVkEqdXa+/wBMdOwiXBBoJrVECgV\nJgSfXYwGP2mJuImk5tMDdTUbwsyGSgRg4ncos9k7ds4lBltGFX/kowXVfNcG\nnAF1JVprxk5mS5OlSpGZeSpPVgLeRPSRXD0L+U9LJSj3FKuQpJZNUlqOrAKP\n57XkYprfEKmrpfnlWjq44Kes5j/CFwe8y/9wfG/Q2joo2qwvIvp2t/9EcyUv\n4fZEjkwsmUTusuu/7g9SEDYnVXNWDKmchXbm+t8YZunksxvdMxi7vKF61qfA\nhjTzjOEP0kTNOmVtSIaGSNcg5/TmKRX+n4XuDUMbPJYqc9f5ueLlMChDnsFq\nbQPzVIkcrM/UE8V5ErWDr/XUj25sF04NSLYu/W8dM+Xfl2LrE7UfQhG3n1oU\nDBhbm6i7q8WwbKZMzEaBU4qFUxJS4zIxGNwsyXztT0Ad5j6YvwhzKAxLi2MJ\nP0/6pX4cCXFseC+YPk2N/1EoaUMMwAJ4OFUc4QRMdbFZBP8USYcfikT1g+Mc\n7ivqDGeh6Ftl+7D1bwS8ZoCrNY4gNcMFz2Y65czosKVPH8sX1bBymx5wTn0w\nZLCRNGqMlNnr6Psbq/ZMNWkTpj9hl84hw2fhhNiIFM3xShL05DTtMu/jbVUf\nmo5h\r\n=1nMP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7bebbe119e39bd973d398066f5601862aface5d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.735147131.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.735147131.0_1571189003922_0.004267889686463855","host":"s3://npm-registry-packages"}},"4.0.0-canary.062ade5c0.0":{"name":"@material/auto-init","version":"4.0.0-canary.062ade5c0.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.062ade5c0.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d83431a910481304939d3f4b500c4cbc77a18c75","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.062ade5c0.0.tgz","fileCount":14,"integrity":"sha512-EglqDCr1eIFx6YKT2x7v4SBtvnZ/yuRdsFc4aq2xgi+BUId3QdRIt2ome/5npmyQYHTlM0E2qQqHOay5/j7udw==","signatures":[{"sig":"MEUCIEkIMF9htVK6QqCz5ORohezhvCHWcEXiznrjAbIicMbYAiEAifg1x6x30ClbS615AuCHMB8JuOxg62sCGWY5O3vgAMw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp71gCRA9TVsSAnZWagAAyr4P/A6RCP0lTwW/awE1IC+r\nq31GUpvbBpfzPXC1GuLSFHOzJe8NKETAtCIWq8FiI2c9n46hy4oK+2+PdL5H\nTV2CajKs3iQsXPdyIONE0KN0nxtCPiYkxrPZxYwFfJIGCiyU7RCvuuYwspr6\nShFiujuQS1QwqgrcK1eEj68gBpn7PznM6ZnzvlmlwIiThuNeVFF2WfsqjiTr\neLqIBNGZqvNXDOvNfdtTuTt1+xLeUKG7EBsb6fJIQQcWHx2P8+OQnHeuA5DO\nHSJlEltWniPFppmMUGBXtlKicbaXmJkxPq+I6w1SOK73deIrPtc1ePYMudA4\nMDOznFyphU1gJHhOjtrwPtlBQpdUX+XEiqL3GADVZeF7pFUJd/9/0url0duf\ni18mbmYbB5RZ78048xNo9RtT/HyKVQ1UxRo6HlNcg3VIasuvCZwMw/FmLUjt\nUiANDr+Oj38WUhknzqE4f4KWFJFNqD33q09XxJ6qhU0jvK4QVhtmrjVhY2jO\n6lKsGRu0C0Inz1zz5n04xGfJ6Gl7lpn8OrPkiFXX759ZLxji1yrd/Ph+ijqd\nsWBlzDCX9ymOJbWAWgiZNWrRNwP9WAvSBUw9JcK5E7JTKBA9bR6LYJcnHqku\nKLjF+y13dHljQ7J/AjoNZjeTU+pS8qxMZzz3GbXdQqPsW8gWk03W+J7W7S6x\niJL1\r\n=NyHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e2025b4ba4d9837dcc1063934417df1eefaf29ec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.062ade5c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.062ade5c0.0_1571274079485_0.8406887129187781","host":"s3://npm-registry-packages"}},"4.0.0-canary.774ad4f8.0":{"name":"@material/auto-init","version":"4.0.0-canary.774ad4f8.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.774ad4f8.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"46c3ccfad4a8e1bb6e1a8aff277be159a7bd6846","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.774ad4f8.0.tgz","fileCount":14,"integrity":"sha512-2Rbsu6N8bkFN4Bt9oGdEGIPsQ4mhavKoNBjymByUZ2Qkh+fwrFmCpYi1kGFM7f6EmnQLDnw5G0xClEddkd/SZg==","signatures":[{"sig":"MEUCIBfqMQJHQi09HOmGtWyqOFhxAe/mLRGnT6BSUqsGdcu8AiEAzV9pJJbKOQp4rpHgCdVihtxwkFTjF+y5bDUlfYYFdKM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp+g2CRA9TVsSAnZWagAAOaAQAJn0wZak59sivWnOSIJ7\nnrxCmhdY41MWqUX0nK7IoaT+TlUOjVDPzOWPDGuImJ5t3JHo8r2Q50n1KejC\nli0jf1zCu6k9QWTL4juo9f6A833f0Bye0ohnIUb6I3Z6zEff8mtYQQ84laqy\nB120CnNvdKdhbkd4iZNGBJJd2r7SwJMlbjzqBkBVzBXz6Wm/czMG5fOK26Bd\ncC9k5vW1wBcrzl0cgZXxg5SjPZpTbmSRSXkGwZrnq1K93amAJE/ooJU5s2wX\nRr9VIN+Id3AsF9zAu2g9HNJxmaCrIYquty01ZsyzJPi1AbAe8CuSuiZ2a+ZV\nnMVgUPuqXJL3vcQDx9/EEwQcy8kKQBTxfvfVb0QE3QX04FjSbxyGsSKQftec\neW87Agi/0QLpEpMdWG1zK8GkipFwpZTwssZ7rJDGvMe3ztHg57Humi0gSoxO\nPRT4WQtvOr58C+BVHrHFp5ZTAcGBxLKls+Eu1iqxC1pgMAKSEjD/5T8gJsxg\nDqAQPnQWifigPup37wll6YdLSBswlZV5+QigySYGIkkpZ1PbNXx4A7qpWkaC\nunMKCqts+waG8a0DR0T5Kx7rVXbIQlbwFQyvaAv1sEINq35bGWWx4soXsjhZ\nNkFVWtYLRQHPpPbx8HgR/xGMpl0v1l+mxBuT3Ac584Fl5IM4s8oUyaIRYtS2\neMiG\r\n=GKac\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"66607256fd6f9e4fe92319b094d8476583109bac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.774ad4f8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.774ad4f8.0_1571285046020_0.6599715041889473","host":"s3://npm-registry-packages"}},"4.0.0-canary.5916d18c.0":{"name":"@material/auto-init","version":"4.0.0-canary.5916d18c.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.5916d18c.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ea4c4ca81216357ec75a4195f1cdb16fb285831b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.5916d18c.0.tgz","fileCount":14,"integrity":"sha512-Pr+WEE6MEyhUtf40jVUvspqt83lmKP4MuIF2O4rdYBsThMyjJ9JyV9q5y7w2lLFHMayZeX08RqJtoOyp8nV9pQ==","signatures":[{"sig":"MEQCIFc3fftJx22aQCLrTc+ww7gM9zucpbo0GkKltAkDx3aZAiA7m/wuYM8YxKyW7WM7hACPX5G5dYKsBcjhwfOkrJ5iBg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqhuvCRA9TVsSAnZWagAADywQAIhFoaHnBNzqqL/5jAY3\n5XhhUXgfQPoPdw4PESpzS7dB+cZiCl34HHPTWxgkM8JLMMCQVfwkDsudmfiu\ne+mgLRYPfcrGdRSnNYLcXxqE1Zhq+aoOs64RLtAxuPmIu+1iWZuui48RDSuI\npltyYwTxO9iiWMg/YkrN+H2n8VZNDYnS/iI1j3c5yYyXUBgVOkMaxW0DDoTp\niLE0dgH3ku4UBIzFVIOZCGqUuibWsyTC5q4qGvdG56QjQ6en0a4HytK+QxIp\nU5ClC52CojZQKQ2gtNKr8LEkOVTdazGXOPZXBTw6Q18fM2bii+xGNyyCVK9Y\np5YhFMKs+cFZ67DZUStepJonOMJ2b6glLdh82CGV74QRslzid9rPLBypJxmJ\n/wJidDoQb80c3j1wGcdbzLnLTZWSIYZQiXCvsD8cRE9BQdGvKtrd2C5kmgps\nPzPKBnDeDF7VGYRXcLE0kQkvNBf5DaL0cXDkDUuUEAxg0rfKTx7edtro1Y8O\nLECFVQkVaJ7yKs7kKy/7Ok2iQRUYpXwkams2+Mkboxb3MmRRB2WEHmJMs2g4\nRb3TjMPESnZ7/Dj9thWk8CItFoVpCvzcyW8e2BUr4l97Ow4K4z9PDpiYUMa6\nY1+/S5fbRNVlE+Zqa8EqG3jGr405UG/GRrrJzkBQu1oymd8d9hEHTGNi8dAP\nh7C0\r\n=GE46\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e3338b891c5ab3207ef8340a75490415e30e313a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.5916d18c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.5916d18c.0_1571429294576_0.3032285810758262","host":"s3://npm-registry-packages"}},"4.0.0-canary.d4141c95.0":{"name":"@material/auto-init","version":"4.0.0-canary.d4141c95.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.d4141c95.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"abfa1dbc9d27c45e9c821a38a4ab77468015938a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.d4141c95.0.tgz","fileCount":14,"integrity":"sha512-pdBIt36STxjTT0b6HPD2PGt6Fn/CW5nPW04J4cSz7z47h36evlREuGjgWTqvRawuxRmJAluWZw162eZHgby84A==","signatures":[{"sig":"MEYCIQCkZe3ZxDtg0pisKsTYezP8jmg3QNrIJCbpYsaPZCDOLQIhAMKswGD1ZgwBeCOflzNs96DRp1EMRrlxwo6VEg0V2jOU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsQB2CRA9TVsSAnZWagAAWzcP/jSiQWx2z7zuw1jMjWHM\nOc9bFf2W8pJ0sRQU0FedcddYyiXGZX+m4RA6aANFI6p41unbTNiqvLyOzRh+\nhwDfMbUAoZSnSECTGRmJJtbGhCyAiG0oVXwzGugiEMto+pvM9VwntSrghTF3\nF7jjTPqAssxo7l+yYlHBM/iLfmngDM/Fbp3cjTnF2q/2AeM5HWQ64vQjhzbp\ncmu4jnwEF9upS37IhJINyIyILcLSX59ifeSkghyhRD3tSCJDzBIXMnzyZFwh\nORSdjWvBqIhbk9qdRPodLZDTAAKfcNjvi1mdMVrpbNqHUVPaYY26yu0Mr43I\n2T2ZuvnW1Q9xFZKCzFLtOMLpioUo/aHAdXVrFMII4GA03TSICE6URY7c6oKa\nkQSTBTgnwqUi2I7KczGGQmlFM77tEDcfDWv+YqdxM9obPj2WsHGfXZu6Z0Y/\npsahDmrm+yvcQoNRBZHH8WBx8/kaEpxE8wXKsmG1frGr2rq5+YRIiNrZvfKC\nshEttSEMLdCkX0tVgTBB9SPDikNS15H0LZvGBvYRVOPIEZ10h68WfXahRBn/\nrYLZlJgMf3m1F80jQYT7pg+ypQb0CYYq0hKbjUgBJU3fveHs6fEQo3WRT566\nzKKTyEtgS9w5fA8ORdCXQXNO5hwrakm7DZy1caU3EFdGt+cWMhUYxIgQGHaR\nzqjR\r\n=LuPP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"10ba5eadec617b7fd2711c838dbbff788d6f209b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.d4141c95.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.d4141c95.0_1571881078096_0.3275771080469436","host":"s3://npm-registry-packages"}},"4.0.0-canary.2b878b3e.0":{"name":"@material/auto-init","version":"4.0.0-canary.2b878b3e.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.2b878b3e.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3077bf704d038fbb7614ab5566de15700f0c17ae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.2b878b3e.0.tgz","fileCount":14,"integrity":"sha512-o5t2u9AICZqH0VcIk+UZaj/3byL2bywFNZibqxfiVz1JCPOZXJBqTt2JoSFGEAgdEoaL10G5I+p0PQli/2uZHw==","signatures":[{"sig":"MEUCIQDFwp/FR3mpgHxED9IeQ2gAjEMzlNsCwELi3sAAG6P7RwIgd7qa6yT4BRoO5bPKxi8381ns7QBfPhDG8IY5kYalhk8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdslmQCRA9TVsSAnZWagAAJvcQAJu022hu+Uf4bnCLQUqi\nRDABFbJw3z912644Z30/L08ZXBFJXlbB9nhZ4kInlIDq+XkCXOYGZ0wTAeuA\nlB4eku4M+rlOI8kDz6f8WIiBkX6gN6K5iBTvcUflvDD7zmgMGJRX7vLqpGAm\niDsorlEaxHjIfzEToOF5WfcVFjpaqcxL15tPj9k7EX9fMH7MOTy72Vym5Lzk\njUn6Zo5ewj7EJOYHHJp6BvzBzbDpC5XTU2DdGogkzKo6sRFaUjFE85E7k3xW\nQak1JkVfFeutRF+3JPukxNsy5IUssbxEk30iAfVU0Dz0uQg3c6bSJkFqYQ7Z\nYbyv4DlwJV9i4gkFCkpUGULdJQ1L7GlUANGlMyS+xKklsa77+PZ9zN1q9b8E\nPvG43LpNcIlck1yQRJ291SCNvRzYH4H935nX9OByHUvk0Jwzn9DBOhBauOJ7\nZTCaHHnxmdngzFy/gaMzNMIE3yyKH/syNwdJvF4czQbIE8lPnWjt3SA8nyEf\na8PrBDDLIl91NCQkydxl4FiboxIZqGRhxnlaC7y09CnArpt5Vbafvyf1dQsp\n/+2kbiQFnhsbPBC1amhxwhDia8wETpAFQgeRa2LRHpG8ZtjzF90AyBp7c/vy\nJuyMaVuYBAKH+XfIxO+e1T3Z/ItMJzNsHB0HUbbQa+muBkvE663W0IUW8lMa\nEhVS\r\n=CBH2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"29ace6a085b0e37c6546b4613abba6356aa82430","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.2b878b3e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.2b878b3e.0_1571969423802_0.8319709252001222","host":"s3://npm-registry-packages"}},"4.0.0-canary.b06c0efe.0":{"name":"@material/auto-init","version":"4.0.0-canary.b06c0efe.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.b06c0efe.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f76a1cc4502c40e4188e42f5f4a7fb666532f82c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.b06c0efe.0.tgz","fileCount":14,"integrity":"sha512-9uvJprgXCYWChC0cgpHF+pGYdT279CrdRgaenUpA/5MM03MlbUMxOkTDk4gsDH87yTfCxEd9N7slLIybCLLuKA==","signatures":[{"sig":"MEYCIQDfxUsDQE42hmrs+bk4x2g+SKc2Z9TFyo18st2EwgNkjAIhAIutZpuhyxhy7/K9yp41/Rci/D1z9lNBfBaCNXT8hfWG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds6K7CRA9TVsSAnZWagAAt0kQAIAA+wAdhU1xLElFFXVa\newZXYgdwu18AJHl1UvfIid3zW9Fu/+sXfhJejzWYEXixNHkHAF1O8FOIvw14\nNuNBPeffrYqJ8k8pPWvnFzHqWPD1y6o4jPbdWqng+5bSYF9jaopUR4+CWW5j\nNNbLKnFJOw66o9iTey/c+Wm+95FGEEA0hjp3jijo3VsdaXuNISL472jXC/VL\nOQK6Sa9dedCZb7vNIWEU1eEMp/DJMuFQbjkDn0x/UUdQNELUJCN3P+cSbwx3\nTiw68er4vhzEa9g2CjIfiMJUa3tuDpWnhVE0tgyhNWFae+7lcPSn37gCD5gB\nobLJ0mKkLtyiH++ui2BVhuRpY+TuCmgh+D+rraJrkvv3wPAuXNEmsvop1pCR\npYA71YtxL4tDlF4Z+NsvssfP/lXCR7pglsgnex5J/ISeG1VJHFL0OTZ2z2VM\n5DodcCdpqf/q3A+goP7odYV1qOCsu8uPAUaqh+k3oP6i4f8g0sqRxcPrY6Ez\nhltc8NGHVS5eobEJqMUUkMOEo4V9N/XsoKOkOhnInDQ6PYRtBB+N1IjN9CUn\n6KwhUqqDg5nrv8CayfylFjyW/KexegFIAVVaqGe+AnHVLz3VvfbWR1jrdsYl\nG2IJuSIrRxSkWGpwhSRz3G+1wrU2X4auJ1CMibvEoEnvFHmhHzzBl/BZu3L1\nQ7DD\r\n=LDaW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"023500a209a10669d135ecd0a8f00995f84b135b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.b06c0efe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.b06c0efe.0_1572053691342_0.5425463022520667","host":"s3://npm-registry-packages"}},"4.0.0-canary.01628efa.0":{"name":"@material/auto-init","version":"4.0.0-canary.01628efa.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.01628efa.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"63347e709a540e7a4c6f44e0387f01f5c96d873d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.01628efa.0.tgz","fileCount":14,"integrity":"sha512-TD/SHspNj0QkN/Iji5qsjXrAX8vlM24pEJug7Z7PyzZDwbgoZsaUf4KgnOejdTAIoBtwDe7cVU9jjg/RDoer6A==","signatures":[{"sig":"MEUCIQDKRXrYS8ypaJe1otZrLiCusYYClVZ1Hr3xlMW6yLB1/QIgZcx+EeAEzs7LIWaKB29BxBKz65dF3jSXbZdEG5+7hVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt4GiCRA9TVsSAnZWagAAbHQP/RfI2dLZzkw6/nqEA1dG\nNs2e0SItFkI53qaOPMx11Mb+qEZ4k5dH+8Na+1fDACpfDf3domIlSrhBw6Gd\nsFluUKSWhg1LoDiANqAlaT+0AmWT1ScT+taI/q9MfJ7kJ/OcHXHANYn3M/dW\n1w7ZyaW88djW0UObwEWcn85miMdKmzXA2N81dQftguPsaUU9QfOloORKRvl7\n0tYs62QwQ5Jkcgik4Jq0sKeYlULlP48X0wI+1mm9ZrGh5KQ7qiqkA97hEvJ+\n/xvwogdrR/u2wh4eq8Et0fb3SomZhf5+V9UDFvrZuvnRjGe102tWumsV9LvS\n4w4PaXwu7VZyf1aQemxbkgvoJvnaYW8vCp/2vaehTaZ//31SwEtHG+jeUO+d\ne1vA1ADJATRLolPiBG7xSf/9fuDHz//YuYdzwvZZkvEgoO3Fr1l2c4AnctUq\nCcVC+vV+hj3XYGH6tZoyKy+0ddVkUrF25nnsf4F+24phVKNwUg+ZSAz/Wsv7\nZ4WSr+1/AXoHuo1Zs0WfgdUtQxL8zuRFGVarZpaEvfh5Kryxu2C1Jsf+lERq\nBZnxJX7Xd3FRkUxh965Q5NWU2nMh3TGQNLBQWh/hfFvrQQAYjwXA1zTZeWVL\nmm0Oewn0C1nQzHF50ecu1rs2OIDaoKa2pOgC4w+12QirLKdMCCit4no0/haS\nc1Bx\r\n=RX2Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d736a6d7c49f31b52dc64101effcb7cb18ca6cc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.01628efa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.01628efa.0_1572307361471_0.3594265094514284","host":"s3://npm-registry-packages"}},"4.0.0-canary.b5c6d66b.0":{"name":"@material/auto-init","version":"4.0.0-canary.b5c6d66b.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.b5c6d66b.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4296fe36facce36a660da7b7b9c6653f7369162c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.b5c6d66b.0.tgz","fileCount":14,"integrity":"sha512-s+OQc1lssxuu+I4QFng8HCKKJSl1pCkXyZtCSJTyy/PftJwEcDDi59KVxPSCcaCx+s5F5LhxrB3UVK5arG96Fw==","signatures":[{"sig":"MEUCIQDPxYLA4YNgOcLaosoiO2yx4PO6clzejgncqR6qia1QcAIgS0Am8lbacJAylzqqsp4gK5JAM/8opnt/Oi63yEFXJz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduH1GCRA9TVsSAnZWagAA2D0P/iry69rD0cMsS9aTbcfg\ncZm27JPUE+Lrv2/X7Hpr+80z6xNlRwiOfrNRFCleTyELGx6PHbBL+05gyme+\nuvOru91FYvDt9a9oO6akzuxq6uCgJqsE3Mg4bgvZNlSXn9+jdFl0kjaUBn5e\naGZ62cyvdoOZrN0/NsHxAhWq/wn1whsVPHODDJaUxJQAGjFIIGGkhJ0szHW+\nqMBTglda7pFTAEpPbIBDQgNX9Lcw7oDZoSc/5wFPYJCVqkR0cihEcZHd6PWm\nNDJ4dV6r+1n8BDWCiAun5E94xeN3kaRyeCWsoWl3g1HUOt3v+l3gR2AGOnBS\nXTOYrO1gzkY4WAMnTz+IjM/RZ72bmdEXke5UTQ8Bjc1ppyHFOJ7EOIuBakAR\nbS2r29bFaEq7faS2OJMpO0IkDy8QhjeKz2HkGcSAiZTgjB6NUOB+qzP8gKTA\nNVTT/qUYna1loQ6NFfFnjfytRrbJJUGn4U5aCgD3hHnr54smeiriR/MJgkJ5\nq+28LhkRzrSH2FuorZ3B13IqTBFjVwJtr7Ob/O9A9ImwxYf2oRAwYlSj15i9\nyJIBPMrhjSsa8sQPic2tT9EYPhGGIKelFW6e0dA6ff+E5WggLRJUe902T/q1\n5Rob/ItaUCKnrwbBHp1GfW84/Y6uXnEwMz9rEI6UA+bVBeZVc9hi8H/kCOm7\nxmlS\r\n=PHen\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a29efb24799035b1ee49295daebf1ae46a92b529","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.b5c6d66b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.b5c6d66b.0_1572371781660_0.22598517001037832","host":"s3://npm-registry-packages"}},"4.0.0-canary.cdf858ea.0":{"name":"@material/auto-init","version":"4.0.0-canary.cdf858ea.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.cdf858ea.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c80429e036d3dd853998bc244504651987d661e8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.cdf858ea.0.tgz","fileCount":14,"integrity":"sha512-f0M3W/4IMnouz6xZgu6bZ1Hz083FgwBFzBH6SugTbXWcXf94Dwub/8zIn714aZRpxxB5YL0NbEEjGUquVbOQsQ==","signatures":[{"sig":"MEQCIBgGU+HA+xcXaJgIMzdtTZYdhsiDe+h5QKYJIcHRBitxAiAPvl0ejNrvkcYZi22P+6xLo7qwTq+ZKvdt6nPMQBRbIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvHJJCRA9TVsSAnZWagAAONoQAISwWVeK7TN9Gwhj4gRP\n7OwS5UORoJM9tw+0nmu5LF1hrpuOvL0l56x6dLWQEPjx0rYvSQ9JXk2ovQzl\nCAncfEN57x49EFJlQc5s/eBt+nyvSz0ONCdNfT3M0Z2hDXTWlvQFtRejR8ss\n23te1y/yfNoc/ieCP93ospolihAnQ1Mmthv56FLAKBRP9hM/HDtqMaRrOWC/\njtGre5+SSokpuPPI1gcoI/HZbUkq2OWesRFirxCx2H/P2icdAz/wZrqi/oqL\nlV5iavRCZkcF4pBp6lkQibxCUtEM9uzsi0icnIVKKCczJDD0ZuBWVwFrWnoR\nKYWRMMJZt/sOuHZVVzkSB2vIRCCnd9P2LQs3ODOdIhszn8G35O8Re1LvzP8g\nfu+r9hbJGIZtLn20qoaiFXjJfygg7HPHpht64AWf9sJtHIbiy1meL4Po4PA9\nJmB1CTi3mZ0Z/9XANCZHcjfznUMvujh3rkHTJQsId8rZCNRdpadOHRi+gwff\na5u21FK25NIzKxzQBHCArhkZmBYaEwqzpUnNdjCBIwKlIXjFH3fHKiSyyiO2\nFPrLRbli56dhxApTNQYFZtPP5YJFyXAPzZcZDBtroyN0od+28xCk8mA34K9P\nUFhixi08BE//iSfZx6VFzaxzY0hR+ylvErECZIh5YwMl3L1ytiMgTf/EdVKM\nkNmg\r\n=5YvI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"436b9be1155a7b7c0fd4aefe795809bcebe8dfda","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.cdf858ea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.cdf858ea.0_1572631113353_0.6118593877729219","host":"s3://npm-registry-packages"}},"4.0.0-canary.719b57e1.0":{"name":"@material/auto-init","version":"4.0.0-canary.719b57e1.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.719b57e1.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"557c4f647c5960addcb1d67be9650d8fa131e2ef","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.719b57e1.0.tgz","fileCount":14,"integrity":"sha512-DLyKMVQZp8Ts7zbkxHZJ3YzqzMiqGdWGpq51P4WADi1tcsa6REdEsl8ExZm7ZinIlPzab0I31SThyRsfH32kgw==","signatures":[{"sig":"MEQCIGGgMQzEh+hIQiTrsIBc7997FRR1ZlA9cQ6VpamQbugBAiA4YANpHi6KFWnIp4rDm0qf7GkaD8DcwhjjGAtrCYKACg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvI8JCRA9TVsSAnZWagAAvLoP/jjWOdB9YfQZskWfTINr\nr5HBoHDR73JfvyFdd9nwI5jlKWSPSafcAHvZFkBvkEbMzDXk8CRZuNyMqzxp\nM00UB1lvhUHlGOf5wAM+LnbpoRYphwCHSDq0HWsndnYDt7aH4jz/fa7DzUEG\neQ7ckQ7Gnjkefptodwb7QIDWazNv4vJ+CxK4zHs8j3nDBzsW9xKPOlk/7hxn\nTu1YdWW2+P5dieRi5vsi80oQhhgxfeIuB59H5dWZ7tHF5jsI9vFMETqbpP2z\npY0s3qiHL9RxNNTEQz62j5uCxzjV5BNY9Xdvbngi46Yq8l/mCw+VmAZ/XFhP\n6SoIr6IHnFbB7dtE0IZcKGWFiXcXTzm8KghcoV+TL6l1lwEwfZz4ZVQVYqxa\ndCrZpUwXNMVWI9PMsWQLrOpIb6W7COV0dNBkfEJbmBbUHXMZSuMSyUfuKaq8\naAiFhNbyGg9Rv4W6NTNtsemSaCqY0w51LF5FzHeJrMIXUesqPooaa2PfRuIT\nonC5bGK0jLWbKir9mYU+gzvvBIGzBZhL/+BsXzGUZXhMD4bs8rHcXW+riAaA\nwAgD8aFw+7+53WFqWh7Cf01i+l55IMZZ/acY3g7/adtTOM7WpszC1d4Ibg0d\nwYFd8ughuauz4/mxmLMyDxhd5CZ9td8K3fatn5gjn6daJxT0KrPd8CGtMXsj\ncPiL\r\n=awT7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4184aa06e4862418697a150eaf45a13500e1c4ff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.719b57e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.719b57e1.0_1572638473315_0.55759157199797","host":"s3://npm-registry-packages"}},"4.0.0-canary.97cbbdc2.0":{"name":"@material/auto-init","version":"4.0.0-canary.97cbbdc2.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.97cbbdc2.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"29c9ccf170d97274aeef7bb444b43c1d3e2e445b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.97cbbdc2.0.tgz","fileCount":14,"integrity":"sha512-j8a13KjEPaoWQKRLvkTZcuwbPEffmiefu+Qb0dA+h66NZUmDObY7+snpb/TwHKL7gZiW+evz/UU3+cFWLXH5Lw==","signatures":[{"sig":"MEQCIEtg/S83UR2srzQCbbi6IWQjept0MzyLuBwSwQrg/Lt+AiAEOSeJPe0O9g5WhErcB0n/b0Cr+Ugk7tYDVO7iEs++8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvJWCCRA9TVsSAnZWagAAAAsQAJSpru/8ytw37fxXepXS\nzR1GWWFRGvbMBef/JGDTNhCTp/DbnFkpAfA4d4ceCBiGSkAN+FS8YlvgQPoE\nHlmyaxWrAaelwi+ndrwZGY0bct1RPyUOTjqeIJJ0rKBMb6Jfgbig90bngawI\naWQS8BH260J5TuQEIvSDXUjR514MK19FtedDiDCJzRZLAtPrgFHjzu/malNq\nBhhwX0STQT6JUY9yYP3kyvt6yPS3g5JSkSTJkjPLpjJ3Nz/dlIcn/EBescm/\n+FA6klUtIJKok31dEC8UYPIfVwA8A3fqaSO1dY4enAED6iGklRrgSYCo5cFE\nKmm90lCpI8TnldsxUlEUNL0hYTPfLXyZ2Fl4VcLHCrl4EAYdggBDOZtG+elm\nlXRxmlSDj2mlmJn2lTx3Ck2ifSo8auzGyJU60wB1ThmSUjCMSvowHH7sftuu\n3yAnmJiz30YGLLG3Bn70FoP4vETScy7VJPQxhk0ZpWCjiraDSaLH5YIxbqkw\nGVppsINJUc0lxu8JKzxZsZSf/dD2wmVHdG2qkhwAnDBPFa417nT3zCwqTbEj\n8vSGmi0wEXfjzVtcQ2hFgdwPlSgzUYjvsq53kOejr6NmeNbR4Zhznd+0ibtt\n6iLU+6rWumys2HQavK5ZIGOe42z/puxfcJxTkZPcBxwn/ptC1vdqTbzTeSYA\nO6nh\r\n=HrgM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"49d37bbcdfa0f5872581945f58c03e62abb97090","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.97cbbdc2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.97cbbdc2.0_1572640129757_0.4027889683210357","host":"s3://npm-registry-packages"}},"4.0.0-canary.8e36b3b7.0":{"name":"@material/auto-init","version":"4.0.0-canary.8e36b3b7.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.8e36b3b7.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f9efd1aeb9f7c7abd12017a88f30ef0592c05753","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.8e36b3b7.0.tgz","fileCount":14,"integrity":"sha512-ymAGP208MHcH62MI6ITb9t1VNzY8odfGCBzXayaQlceV7U31mfQ0kwZ5Fg5cJHsSM0xnOhGyzcyV9Fa1V4Xehg==","signatures":[{"sig":"MEYCIQCszEKzULB5ViPyv3Izq3rfLHdK8VeZHw/OMW1ZTH/HtQIhAPTpv63f8d/0noMoGqJS+K9xuUDtusiw96C8gFP77eP8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvJ0DCRA9TVsSAnZWagAA8BwQAIoQAVTfh3uvUbffq8Bc\nb4bqjW/hLRbAZ1aj6Nll6qzpxSj+i1sWVPS90wGtdzqRvjQR0Xc09JV6QClx\nxXWEVMIMsm37GnAfuw/QfhsFZmBq4Vx0lSS7nRDiQhcSka/ly1PvmRoQU208\nojgVkXIYc/mISrq8oHjy7dYoA7ovy9xSHRDVTmbWbWBlv6wYR16TjSG4qTnA\ngigauOpQ88tFsqjSN0bFcXxbZsE/9cpIdGjE3FvXQac8gEF00CDVDOFPHDs7\nkp9yAqu37v5G0ibV5dzDCwNh+l+v96Lt5FSsoVK0/ie9veyhZZ9/j1oUy3G+\nm9O+zKzYintH7rvC1UXJboJEuj7lKPJtvs/jl7rl+CmqCfwLPW5bE4kpH/CR\nk6bXLZyOvdIxGYG754OLlBM1M5q0+jXHMZn+5+Vr+IZS73gQDeHfqkB3CsjK\nF0d6MeCAOIN99GWe420zChIworCp9G1jz6Z+rd+05/Aih8VRM3jrrDt+wU0A\ni6UYShpn02TWUIbB2gQYxhAcLcTADnteZvnikk7fUImZnzVaDpWbS7KbDH1S\njPjYyPO0tBFDOSZt/6IzprAZNPyffx0pfE3YuYalUmh/KxTLoPRuWm5j55g+\npfQsoGksbK0YVV6937UBRi78QKCYf2kAoaMZ+xhYMiNCpIMYKwEn4B5hQQ4c\npNJQ\r\n=re9K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"62f51968b94685823af7942f779c63658f2b0350","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.8e36b3b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.8e36b3b7.0_1572642051475_0.528576190108847","host":"s3://npm-registry-packages"}},"4.0.0-canary.62d3a09b.0":{"name":"@material/auto-init","version":"4.0.0-canary.62d3a09b.0","license":"MIT","_id":"@material/auto-init@4.0.0-canary.62d3a09b.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a94a5192a4c163f4aa635dcaddaf473afa7cab08","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0-canary.62d3a09b.0.tgz","fileCount":14,"integrity":"sha512-5kogdEGg3gA460uHqoZOTFhpLXpZhwyqbqBoATb7EggxWxQEIGDIShVG+rUXf/t3IAWXm8GIrIt1dl3Ma0jrrw==","signatures":[{"sig":"MEUCIArwuAtV6eLy1p0e3ERLHztoJckSU1zBlKkHCfFogp1mAiEAjueYjc+vxFpH95D7QRs997tC984Zb35MEJUeHrV1s8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvJ9DCRA9TVsSAnZWagAAs8UP/0aeWT4Y/BRJECIM3Icr\nrdOk/QW7NB7bcKlxOb/jPLQPZ+sSpd8IxhDgunJTQSdq5gv6BcWqjgESffFw\n6qgJVges5thDbzk7R2GAaT4WKNhnJ4ih3z+IRb9E7ZbAzSahUR9QnKyL3Scn\n2h4OCSWBp1mREhmvtP/8sPBwEMEtMN6iAcnVs4R8qLrkLBQi22vB0/rwaQFY\ns8mcIRvxqvEiTz6sI8hWZ0xFkBtUlaRxjgOEIoeufmPxDnoDlBBXAtOjSvLr\nlbxGg0wSBWljNbo69dUsaNrpu2THSNLzAgfjoEbFp65y3ykU8EXPgPuhNUvj\nssxG7yTKLqVJ/g9H9TiG8uo/qvxWlKam073Li3MtpZwA4xD5OTmR4c4UcDHU\ng7ZwadXbAj9LqhuLgzAoo/lJVWPvYgYy3IeSGwgHlXJA9hgezRrpYPrrmlnT\nWTPcY1Lf7XZxMb1pY2vEiRd6tVhmX1NKj93wjRhDiKDLqq57HfrfWvUfmUUf\nbU4d+ZXm584sTb1HWjQod0vWBtjlgjRlky6dHzJqEdaF4RkD4KuhkRYxPIx6\n+u3BnLHE+CW9kFr+AGD/Tfn8e8VBNNX5HFfs0sCOjAAefoqeDoCSHerOJEa9\nmtjWrKZgKzxP68XCD5LLccDmtPeyGQ+lHW0fhl+2gDFMn8xrbs1hxoKwwWTt\nKJZ+\r\n=vmY3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e00a9686a58b0fd5ec957d4008b6674dafd4dad2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"4.0.0-canary.62d3a09b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0-canary.62d3a09b.0_1572642626748_0.9761356069999656","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@material/auto-init","version":"4.0.0","license":"MIT","_id":"@material/auto-init@4.0.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4c3505154610525960e46b81e3ed0b3bcdaafd81","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-4.0.0.tgz","fileCount":14,"integrity":"sha512-B5hCY24cTrK25in2bAhLgsZry0lR6El0y+uxL+2spqGF1Novz/G5UJu3v9z5cycc7DZhZg9wZQvF6tmagtNaog==","signatures":[{"sig":"MEQCIFTSXWey9WRcZoiTbPiOtQAGqKRM1xuT43w6Pzl9lF1/AiALw7tnhZr+nemIHmP7MBQTfz8VE19R77vjh5N2GsWkgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvcbSCRA9TVsSAnZWagAA9vQQAIdKJkL/dfA/vZJ45ylb\nJoBeK/n0Cewxgylr6PeiR6b+a1QYNQk92fkzUInzyp475krqezuZcFCMRmT3\nj0yINWAD9qh3HqvAKdadkHi/AsK5mvkLVn6Kq8yHdNN3kUQihEwCRjCPTmYz\nooD+4d1rRu05+T1KzFMM4oDAd71yLXB5LxNdTaz4SfQGlgiMKMI/8HZ9q3Cl\n2knruEyP84jUiJuhVhEmraems/Kp+FOtqGY8o94H4m3YvtzCr59gLqW4PhRT\nVLmK5hS1KGC/6bqUexkK3Yc9HkklDhz7oYhP2va2Zx8FRAaRkxCZJulRYoxD\nM4NsQ+D1HAkfV66+1HaeeoCVRYHBJIXYNANUCtFM4wlLWah84NsuNwsm+lbK\n+Gf10tWNnGn+VfL0d1MA0Wnvpjv7X4qNGp4ClXa2NIQp28ZVnsCHJoM7JXXI\nXwUEdg+7T1oSTwJEhkXpe1+f5Yj/P69E5+C8Ef/QGv2lJBoQSTlcvplRoHmN\n86ep+3//BqW0QcnZqvSKni9Xx62F4c0ydXJjo25tqgS9H6lluZ3VC+2L7+Kr\nv0jl+Yqnoeiwx/HUUjAjus17n0PLPG5RIfg7np4+p7hdJhmFiG/f/BU1u9/I\nqMom9h8Rs9rfHNMzxeZWlAYn6YIZnkcPU5fZiAcgASc80SM0LFJBiTTlgAxh\niY0o\r\n=iZpV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"8fcbb009cd3b5cc004b302613dd55ab4b5d6ef72","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"^4.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_4.0.0_1572718289607_0.6586549647574196","host":"s3://npm-registry-packages"}},"5.0.0-canary.b5eb51e94.0":{"name":"@material/auto-init","version":"5.0.0-canary.b5eb51e94.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b5eb51e94.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5beffaec520fe15c46b016cd6f94be1c16422026","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b5eb51e94.0.tgz","fileCount":14,"integrity":"sha512-Bi1VlsQmJW+h4uW0OjGUZa//TuHKyOVpYrvYSGv/17ctLK4lxEjXlQU7L97dlsPEUGdbr9DsmuIXhxhFAe4gpA==","signatures":[{"sig":"MEYCIQDu789xGMwdOW9vHW0AG1/dc/oqD2LWx9aWt5Mpg8lb+AIhAJscFr4KMe9NiTi9A3LDB6tB0kzqivsBtd2uGAe4kqOM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxGNxCRA9TVsSAnZWagAA3zMP/1aenaRGPPzlmJUVtpD4\nSXOTb8ZwjOdV4h6xHxBmtL1VJmgx87U76PDi0ogNQTevPhkkmPOx2T7Ud6NZ\nZGsci/iHLwM+ZKMYfiHAsDLrpJojvpzpGEL7db9MkiHA2gqvdH+nWukHpjef\nr1Xo1PQZFzdvCFkHzW6CWqmQs+RlSGa6Imd3a8kHqYPqSnrVAfSmGczIYoNU\ngxJZi721fnZ+xVG72smRVpTH+7rXXJufPJXWdu3tIsP+JuukG258XmYKknxX\nj2wTXmgxg3PKWRoEYywibHIF8PjaLCjKpSX6olJOy3sj7ARBj/5MWxr7CLQr\nJzT7Q2x2irO+g0EMgzdhngMZzWWdS40IHkHpwEO9lOp22P3Ni4rEiym5NEBQ\n11siQIB3HeBeXRdixLAkAh8UxK9/A/9gcktmUIJR+QFY/H8sBmMcG7KRXsrW\niYOzUz+AuGY2rjfu4jnKAzjdj+djz9PZBHls6czttRiq7pnSS03vtbRDpz01\n9lI04qVrdbkGHXFyDs5qyKPZzaTQ8NxVxaq4fWJqU/yuiw7vkNIG19rFpqvJ\ntIhMPTW3phARh/EIHpxtM//96OKf+kGqVVHSB3khNBcezcwt/SwoMkQktwer\noDYiMeBQrpRJ591NYifO7VDLOTyjDaT2i5vN3vpZz4OSfdEO5HB5i+cDsKuj\nhLOd\r\n=w4YR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7e8d43f563cf6b162c2aed47d2a006564994e4d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b5eb51e94.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b5eb51e94.0_1573151600629_0.5590306450306919","host":"s3://npm-registry-packages"}},"5.0.0-canary.58500806e.0":{"name":"@material/auto-init","version":"5.0.0-canary.58500806e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.58500806e.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"443c98c00708454b701a8a84a93e04691f4746fb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.58500806e.0.tgz","fileCount":14,"integrity":"sha512-kBlLkpzqpPPgJgyDT6Dlp6lqcDFqQ14LSv2ckXoMmfZ//QQV4jkInd5EBdccf4wDrshT5zEkZpwN8D8R60nKKw==","signatures":[{"sig":"MEUCIQCdWBI/xGbumj7wezqzI1fi9UPyeSboxjYDNG7EpiVk/wIgBXCEq5qvGbiWrK1e/Eq9OAdHV+yjUQK5umVFBAgSXUo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxYs6CRA9TVsSAnZWagAAPCQP/jqhpanP5x/lD6C74T/d\ne5cjvb1gO4gtPTp7BwVsPnA6lhh/ff6d3SuhEnkjhAMGqePKSdOQl/w9FA73\n/kyieIvHE8VLJNBQ9a47dknYBqXmNT17BhC6osV0ymHAM4VlDIw+wsuqEF5x\nuq779+3/ydfp3+xnel6ToVSQm4JD4lv9+bTqM1QF1FT1JlIHAVMLBQC1Ftnu\ncm3gJb38Hknf7Oh/aqAXYw0a2rkFT/NDRNJDdmiIBGOW7Lu/wQN0i6N5vWlv\nf6xHBEdWwxxRQ1z2WXJ3v829b0n0P5gcxdYmvHb73ztWAg7wkglcddJmUK82\nqKaH9cLxXv7BZf01vG6+qm8rj281YCyRHFDyaz/EjJYv2mdrSGcbTlT0kxWC\n6n4pTRZ2AVIaeqpUbinQ7nR52VRhzKxb+2/gKk4KE9JWUNTZzbfEu2nZn7gv\nErdDWm2qUBm++HNUq4kDSdqYQi0c2f1D5bxXT0CmstTgep69o7ZGLj2LCZj/\naTiuddFP4Yd7igrb8VyxvsXNC3AGR5Q0FJ4jOM0+/lqS9PiGxILtxu1TcybM\n3eXCmH0sqVKo/4eTYjr0CDyk+PoCt7s3sGSSbIFzf4RVEp5f8IkP96UM3I9f\nJKEXJ7+0BxSM9QYPOWa9ZG6Iz2Vu6AewD1RtEd7eJJYb4BA3l9j+hJDfZGea\nM8VD\r\n=plrP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b155f26dba1f11e3c9d7d0fe036cca6da8b37a3c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.58500806e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.58500806e.0_1573227322215_0.05644672052088029","host":"s3://npm-registry-packages"}},"5.0.0-canary.66299b646.0":{"name":"@material/auto-init","version":"5.0.0-canary.66299b646.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.66299b646.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db7f6784d3d00cb2872fc6e60cc94d21be2f484a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.66299b646.0.tgz","fileCount":14,"integrity":"sha512-SBklgL9NG64HFoKXlATt5pqucFr3QS0+Djkxz2U0OueN/H3BiWUCVGdNCBnOeTL6W1bXJbEqwzHGR/VbJGJf2w==","signatures":[{"sig":"MEQCIF4DiUE60n6vAcT3JIjyI7a+Nyg6zRwL09R3ZZ0+OQMNAiB42op1AcWQENckbBPUgUqol34laaZhaUMEER2780O/uA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxdEVCRA9TVsSAnZWagAA67kP/jQq/O04j/YZolVHpUCG\nOu6v4WK2GdhVIw8FvM1M30+ZgL9kXzCKfZZZa9h2ju0/GbgPyBYQTuErJe5l\nLLPErU4LplaJanW9Os4UPHA9EuMCjfYaSuBLyVbkRAnxV6Exuc/q4Bx6x2+o\nnm7/JnVbgThtE91BBmdBsdBM+FIfJy8SdIWWsmgQxhnz036tHDFGHhigXVl4\nd0af9Afutd/4pq3lx4010wM1m7H33fZGyY+ji+QPUPo+OH67QdFBu4rPK2+D\nJ49KwslyvD4l1BmUv6aAjckOVElG8xL+BXb6XsfW2LUUuZ0MUBuGl/ffi4CX\npK9xeU19Fx72JmqWr/TGFeLu5h39OqJI7o9mjhF5drQLTjCfb9fzmUhVZXc3\nB9FupaZ6UYvX4GpvFafyxUqnA1ITmm00jitFTLQIrGcrTRkmsB0Z8mks7xl3\nCw/t0xZYttKm2dKG2KgcOrxTlTmxQ+s6Yx/ocBqgOBCAWTOGPFTHiJN9hDV0\nnEEe3W7tx+uBG9QlAHNd4TqfJoShXorbM5LNovy3k3ITZp/XB2pAXJoAjDki\nJwGhNrBGWJ/mDxbPzCbnJEOig0dA0Sf1J54oAMIVTzcah1p0Wh0w9w1fLtEn\nR4B8lvXxWQ2nz8n7cYtOMGB/8lCEdrwOoYT5Erpx4RVg8xbDxEIwL7vww0rh\nyzLM\r\n=Jxg9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4bcc7c183ed18cfdcbaf564e317231824ea91b6b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.66299b646.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.66299b646.0_1573245204739_0.21098519743151933","host":"s3://npm-registry-packages"}},"5.0.0-canary.821871e04.0":{"name":"@material/auto-init","version":"5.0.0-canary.821871e04.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.821871e04.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ff95ae7369b92a9ea772a4cfb3f35824270820c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.821871e04.0.tgz","fileCount":14,"integrity":"sha512-oVPoNnaFnI1+pY2enzq8bhfsilkOWz3FsVs5nYOJD97lnywQyFCn7OopWgIELWZHWqpGrYU9bxiFjK/6nF1c0Q==","signatures":[{"sig":"MEYCIQCCBYwVMD6iUnhRUxA9A+VJn+seZcVBjUvpNAtUMs91zAIhAIRpg5qYknQbs9yCBj6KWdgv/uv3JWE9YI74gH26MoMr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxd3aCRA9TVsSAnZWagAA1jwP/04L+2heuOQiFwd98+ll\nrXw0xJBvAXv9TWnMG+UAW5/hj7beXZeIcHMtUpexn0pMl02kKZ80NbGQgJjJ\nKBlraXXKpSlTHET8CA2B+IQDo6ea5B8z3SN2cBGqHyWGWF7d0bfXrgMu3OPm\nmGWcOONGdfDphYoVyL3UG0BYRAwJWFlGbhGWo6SxBsofPFOyAOYwRv57Ye/a\nzDtWyd2gnYm6TDO6e+RtBTtEO/6OUDGQGTvUlgcwXQTfuGnGc7HLDCEDE2/h\n9p01tJwbuImti+WJBaqOxqGZG4uP7+rywpV+XaOUM1FHWTvdqaF1AZSHNBGg\nIFtvOz50hsBTpt86VNpegl3e+eVYzUCNdmaHPwcoI0qcNgctjWCmv62zsSfZ\ni84KYXv//Y/9UAvgrG2+UO6ArdS6bf1pu3qUf9WyCPBjCIUTT2+5/8ZnXmkj\nNrq5QlkzUN/UGZc4b01RxgjCuBFHV3Pg9JuY9GMZKAWTjOpN80q2O/Bq52oi\ndouvXWy/FA5vdQJ4K10ssxaPVnBGdahXtGMI2TALjkrOnkjDBu+vNgMKwf9Z\njZyXAbORndL1rAoqDcYd/ylR4ppLOCHLSRJLNoIuwhngc/hDwEQ65LyiTuTw\nBo9P9pByTmu1PZmgrADPc7fjSy1ghXnVZLlk3Q8D8tMRJD4jBoHBzfseVJt+\nqVZe\r\n=yVvP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20a91d4645dd0fd2db7a61459d752f390e050899","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.821871e04.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.821871e04.0_1573248473952_0.42190784264272674","host":"s3://npm-registry-packages"}},"5.0.0-canary.491fddc31.0":{"name":"@material/auto-init","version":"5.0.0-canary.491fddc31.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.491fddc31.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"82b0608a3a012e62bbf693bbb6c06478f753ccbf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.491fddc31.0.tgz","fileCount":14,"integrity":"sha512-EJrCEGmsGDdfN9IAaZDwxYRgNranqmb20jc8jXWEsIcS6ur5urposc8EdgFruJE4pYVX4jncU2IVe8RSgBh66w==","signatures":[{"sig":"MEQCIAIZTl6/8/a9eY/aqNWFzP8Dxl2DHFhnMt1/PDio22/dAiA04zoHNFp2H1VgdU9yhZxyvWfM727hsqPGgEtcFIZglA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxeb+CRA9TVsSAnZWagAAuPkQAI0P1PArYSlrdqWnNey8\nGeifMn4f09zT1dWgeusS9tpUdvlc7BZ90plvRYGxq2pjAinl6NgZvDVSXNL4\nniHjUgHxPLDWfH6qIYn64VW+3QPzdzTMlv2eQw1+L1i9RDzW5zpeU+3d5jJc\nDe+m8samo/szV466j9vRFesMjwsfJd/Epmw0Egn9mvPYScWDa0Zxmta1FqUj\nS+6BN4/T2tklZtD0k5aGdCiZ+ApSq9jJpfcDaKWXu/FfIEclCm7hpMOtHlEJ\nmZjqnHDB5sECqjM9CCjkwRFTtvbT7bP3ESdE+ax38Mr0zEoGiSyX20CJWcWZ\n/izwXLxr6zlMaDkzZe4MRbZdApe11Ih9q+Uu31lyOMNMQWERBRR8eQPx1uz/\n+zs++ylxt5vZflGz+zJlqz+nerUT2v2Puesvg19EInLV+i+I6ttMez2ojgr7\nkVWwBGv19PpxM3/vVbbXWuhq2iFBVn0mCRnX2a2V5mjMF9mnNwe1sXz5WlGT\netoCu7NFGGyIpZ9b5C8bWeDZiL3rba18DCS/MYWKSi7KyLGUXaEF0eetSzb2\nEOHSxI9wnJQjk8e+7YFyzS0abaxqLrFZqxk29PQ8fgpuIoZP0jv+KqrAdJDO\nrgfGOgYRMHIdT2abmHo43dnsDILYzbZl3Jnu6ll1IiYooRrxMi1XLoqPsm/s\nxhaY\r\n=PayR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36ec62985e32e24263ca2d444e04a01d98ba02eb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.491fddc31.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.491fddc31.0_1573250814514_0.538458996703167","host":"s3://npm-registry-packages"}},"5.0.0-canary.b0cecf145.0":{"name":"@material/auto-init","version":"5.0.0-canary.b0cecf145.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b0cecf145.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c2c4f0e97d449ce649920431164ce3c1a07002d8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b0cecf145.0.tgz","fileCount":14,"integrity":"sha512-pmHCh0kYeJfNc0ZW9HCu7L/BxQ7pwt+8iyAd9TqmiHFpJ7vYLLJvN5cn89F5JzAMcc+424E300uBQroJR/GF0A==","signatures":[{"sig":"MEQCIFNBwwP5eFXFlSVDVPvwrAOLrNXWqPkteW1UTlREzEHEAiAUCsnnwHxmQPdotz6OHyds67PXX4fIMz+ZamenmGlNQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxwh/CRA9TVsSAnZWagAA5QMP/1duNxlPNGI2iryATd9S\nozo6BfKizOahRj1MVHCSNLZsmC3v/QhbUiiA1FP2gRWkMPv/TFKVgdgDaLGv\nYV2hCXz1hlBEI2eISeiKj3SBvem/t0k3y7RQCwA9jvG0FPOPljRi4srQoWgC\n7HLQkokXr4Shprok+VtVYEmS12oxok8SYJtTcZKyxljWYXH9LDaBLRs1nU9Y\n+KoYlYf/BlMrkryYqFaD1WXN8JqvYpXlA4rdMBPIYWhVpAUEk32JRRNcE1XY\nIB63tZGX8BGLeb1SC6DdKacZTje3FebnYbRCoGqBJCi+TpxwP3Yvi4pPJYJV\nlL4UmpyLgT8EsOVP0bd/cP6UI0AoFa4csUQq6KzJoRl9CSisspnfgkJD+FQK\nWOzKueWE0kVN13GOi80wFUo6sUJhJ5WZbNi6YwUeh/uxJjSxndz/Qe/xUaDC\n0VT50ld8jkPbOeH2kHgO1cc/NaKmyd780/eb80whhVHI+iTpMMACVLJ43BLf\nAalI8HDZTBVTewBRXfZUT/oGxSQ6NAgatkxgQKMlCm7NzRu/gUHF2LgflAJc\nVW6TW11SngjLHMT+qTLRgSsiL3Mtm1xm5dZeBTYf/0Y37d/kUYTsZgdlegrj\nxqRT4vqWCyjo4uHizoWCS36GJC7gVQ6xULsFZrvn8blEDNFJPCjbS9n7QyH7\n256S\r\n=OW3x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c20143ddd0d46da106e793fe5b768b628d433923","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b0cecf145.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b0cecf145.0_1573324927153_0.8076884810201614","host":"s3://npm-registry-packages"}},"5.0.0-canary.afe0dd1bc.0":{"name":"@material/auto-init","version":"5.0.0-canary.afe0dd1bc.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.afe0dd1bc.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0fdccf42989a6afee51a8948632f00fc63d13ed","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.afe0dd1bc.0.tgz","fileCount":14,"integrity":"sha512-vy0rx8gGhIB/8DSLC2ARPU3bBScu0FF3z6VO8s9qbnmNYEvtdqZZH9lHfCVDOmasJq0hTjWw2PpUR8Z880KbeA==","signatures":[{"sig":"MEUCIE13YHUITpF1I+e9NBx9lkSmtjMT79ThPtujqappMzOnAiEA50swu/xZgBZio545ALxJjfxzpJdEFBp0MJnugA4EeJU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyYA1CRA9TVsSAnZWagAA8QsP/0/vOh/SdRD2S9e4jWJQ\naSByK/A8zhWnNQvs+lqB/SYWeakpyD8cq6iXQzmeFT8UjsdFxguBzBH33O/R\nyesRxgBoSlnBUrg/1Dw4Std8j8Pzb7ZtpOEHA4prMTclGH2Ktpoy/eaYiJNx\nULBWcjie5d9ueWM0DbFfidsPOiFSVOXODCg+L3RsmkZ/GVWkqwjUgFhdObV3\nvtgKASTnT2IEnPcEIA29JhVDT4Jisqhml0xsH8j6IPCO2tcWT3z5dVK+ILBm\nsuzkJGYwceZwmyHE9tSwTbtl3GbhNetez+1aT5a9z0YikxxqLqsk4fdsi+Lx\nGRhwZ0wcirZRE8MFxc3EitQfSr8961V/cq8qK/wNg2joyqXXeW2Pi5kX0S1M\nMoRMLZxi30LDRoCL+OMhxjDvaNZ80+YOMVFSaF+ifNf1xQXquZqX9k7hT3BB\n7zFfxU+NG5xkAFnNcgQICQSGehZzuG1+qZ5VaQNwAVdrU+nTyzB3ajLdd610\n6lPuLnJqxnmGDTKxxHLyWgdLlHOtIPIyZg6udyhekPg4YYmsKBHJUhO1qrVz\ni2PvCxTRE3qGkQ8z+PbntBWW1kmyShoKjV09XAzdlWEHh4WcxDFgcoYp+Q2S\nHGbvgruhKoS+5IqCa/ATE6HwoB4V/C6ULAfsuJgAvga9HkFbC1B7i58mLSwx\nEH1o\r\n=h0wU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3bacd69fa765f810b8bf40608eaa3aa2df12bdce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.afe0dd1bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.afe0dd1bc.0_1573486645241_0.5094719169176662","host":"s3://npm-registry-packages"}},"5.0.0-canary.b4cfdc40b.0":{"name":"@material/auto-init","version":"5.0.0-canary.b4cfdc40b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b4cfdc40b.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"76705d78a3389d3e870465a3724e04d234f1bd43","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b4cfdc40b.0.tgz","fileCount":14,"integrity":"sha512-LeKaIx0a5i3EsuC3KrAjc7jP7wPBkcp9DROvwXlVnC6K12s4Ptj6Ya2fQm1jU8ZTte/vcaAuDz4KSopkLIo6iQ==","signatures":[{"sig":"MEQCIG6TqWEAXR31xwiCZr2EpP0nH84YrSbShd8xpnQ/BmE3AiB3nowLQHZ7PaR+TyAJWiX4hpYolRLe/JfCXpcwK7Kqew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzXmRCRA9TVsSAnZWagAAh6QP/3Rf6txFdMC1eiW+jIsv\ndWUn0s1CjxmISQvynO4O0ZylVOn5duy26QPRxneGlPNUNh7Il8PWqiSmn2Yd\ncFSPOe9E9TBpPMQqkrtfNO9HdxZyIVwaFrpFyfkOdp+jYUV0ZLFTmqOnaFzP\n5/3DQUinymsJ3+wg9tB9GmT0pSkYzV1CtVNz8t/STYoouYmHQ17JyRuiYNrA\n6ZcsQfYAZoJD5i5KSDeRdf0DPvHvD9TIhIXPt3+ShQnQcZ/UpOiTMoYgyaGO\nuEs2ThZ3F9ItxuGt2YSY2i2xR4vpKBxAeDgm56ca3Mf+OteGzQUCcGcVnWx7\nsSiEMZ8rHtNAlT2VctT+YgE5HoMUF1W4tG5PY1v2Id1PLJdnLp4j1lSsJOCk\nq0Di5VDeJp5UFFEgIZv4E9+6KtS/yqNpPNXEvyFEzHwNuKSloLAE6gFkzAmW\nP3IWnJrxP51sqDKgeOCQ5QTwAJQp3/MXyWjRNnmtJo3XZko1NwO0eBCf2NAU\nw86bpDuxg6PHkEmiwMAZW18RneF3dElpOLIiTl+VY1bnvRvHZ53KWeYoVg5c\n0tw5yq8jcr5Z+XUQiHsa2MdeV8Ig7vTXrbHv+lLmxUcLXARpI14ej0xSAkIL\ngfHUwCYnOGa7apMmvEPxTzm/CAkfsQ2GDSQYe3PYqoMCcmRZfyBVO0Uyu4v5\nO2WI\r\n=P1tI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2a81ebd1a573a096ffb378bd1ce7bc223a3cb54d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b4cfdc40b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b4cfdc40b.0_1573747088649_0.1773473052322052","host":"s3://npm-registry-packages"}},"5.0.0-canary.525989b5d.0":{"name":"@material/auto-init","version":"5.0.0-canary.525989b5d.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.525989b5d.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0669054ac02cd02ba78b1d4cef5b25a72d3b2ace","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.525989b5d.0.tgz","fileCount":14,"integrity":"sha512-G8Pz7/lZDBPXY2R8fWLgmPcg2VLUF3MJkwT1Aze99wXui/UbBugWuV0oVbS84vCw/xGJW0Fyd2rzPgY+95TWgQ==","signatures":[{"sig":"MEYCIQCow/vm4ceIsj5URmBnwJDModc6ftSODLkG3cwKZdzpXQIhAJT22bi2zbknAeG2vYvt8Ha27HJwVd40p3pivzcymk8Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzeOYCRA9TVsSAnZWagAAfM8P+wZ0xKh7d9k3gg6ZEECZ\n2MnPJhGxmovq/pZhHWJazf1kzhxSbSbhUcGpnajC/v0xpYnixB7Czwwz0U8G\n4WHi/7+iEBNFdwLoc3NVfLBJCxkEqLf6KAK2UGgedDU1FbJTnSIpz06ST0Lb\nuLB02oh7hW258nU79brTwLyRVRZOdvkdyamkzfI2F45F2euRUo+52wf88+Nn\nvDV+DXDYj498JKw+WCDae1LEibXqZ3lRjP54icTARSFrbBAamiVEJzJUikpV\n2P/+5H9p0/npwtGZTFKrH+TcsgDFGUUtg3dsLq2DnPF3g/X5u7A15hdgOgwo\nXsRuo4kCYXoYdoi7o+E4TjwFYazizERUBbcW/52ajISpiBOxFTBlzc5aJh8u\n7RG1Y93JVEHB8GmaR+YByQVQZJYiXiZzHAdVUEGavgBGWbbEceqBxDDZs3Qv\nPKZfpzbnLE5jGCvDYCWlOGjm9VDOrVxEWEDb9pAdnDSAWr3icAYrMgpqWKk0\nriOtKmu6FRxV15xjP+DV46tpaN7paSEIKmCE94wzCxmbL4ojTE+tyAaGMJbz\neOlvzTcxEdHQqhWTTUgDs032T/yU1Cikj9AmiPBnhHFm/mrf3J8fyVf3lf2Q\nTHgQTqI+sTbQxOFuROyVrDSFU53JAESWy2Z3a2xPgkxLj46jFpjQBT04fLMj\nH0h/\r\n=EXiO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2fcf375cfb22882468cdbfe126d349a996b450ad","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.525989b5d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.525989b5d.0_1573774231767_0.5436344399210227","host":"s3://npm-registry-packages"}},"5.0.0-canary.7084b403a.0":{"name":"@material/auto-init","version":"5.0.0-canary.7084b403a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7084b403a.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0c5f38af54de27b056107b664fad30c7d22e0c3d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7084b403a.0.tgz","fileCount":14,"integrity":"sha512-i1Cva/Zm1F/8ZRTk1Kriq8H8UdHJwqsww48vg/gPVXXi09GcuweuhQPmez9jNb/2vIA87iVNh8ltglqmCnzKMQ==","signatures":[{"sig":"MEUCICePRkR/qJM4y5sV3j5YUckxSqmrR1UPzrOaNhz3EUcvAiEAuRSCNcHyUMPMp1Dq7nfQI4C8fx7HbMqpLggBqbbwQYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzfniCRA9TVsSAnZWagAAfRQQAIdUJx3v9FKcMIx59gks\nQBC4B5P8LS4WQxoeZm8o1uYycJjPJRAd5uQ9qdVd2Xr1g4XKmwlJLt/DDn4h\nfYTZC6HZHboO8S6qv5/vlOID9/mTr2oPlv7W8M9ydMyaQyL1a+lFnokzaqaY\nNfctAHFMScEWfzoMRZh2BREWoKm0gFJJukbfTbB9JJUKlKbnwF89hZ67KP1W\nuTxskT5ITQ86SWGUxjLDRxwLGy0SFgXI1tk61m8bV6sEQHdm60nLdPH6/TGD\nrwgNZn9a6CWL5PYV5KlBJh9qA1Bhr0wis2JO5kRjJgErlsJcaHVxYzjhbNA8\nYOd5sF36NXBTSEJpnVBIdDBeepJk23MxlVbG978HaVwCG4c/eq+6WYjU3QEQ\nDNw3/kbxO8Z/VvuAzSqu6/uffe8i0rigg2MQ8kL7NmS2XD0iX0TdyRSbbpEt\n94F1EWczWzyCE8x9wx4430BCuwJeMbbtBdjYdCHce2XPVZf3AW6g550w5p4G\n3UyExk8/NGkoI1fCDi2Hib2w8mKpEo7c6u7NnwxLtbpagrGkpI9+nTE5GBmH\noW58CxlSuJ9QyhKrI5gocdz7sVLFH6sjLjhW2d12tFE71NwEhKm/x2poV1cO\nWq8dNBRXBgdnkseCF6mxbs6Qj/SDvUgBU0HumJtogz2AbZzEPYdiNYljB4y/\ndHBd\r\n=d2mv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6a82bd7664073498cf25876314019948f3295c87","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7084b403a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7084b403a.0_1573779937685_0.2679143702403999","host":"s3://npm-registry-packages"}},"5.0.0-canary.3cbee6dac.0":{"name":"@material/auto-init","version":"5.0.0-canary.3cbee6dac.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3cbee6dac.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"abf0a63f92b73e1c08bfcc3ca71ca213c69d4474","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3cbee6dac.0.tgz","fileCount":14,"integrity":"sha512-926A5RmVQUyvlwvzUlQ7SuQnOIrmx9qWDvwTP1eg0Qv+29LvR2AiZMEJYUlHekmY2CjtPZJZlUB8K6CUpy58zg==","signatures":[{"sig":"MEUCIFzkcTsVt/siwRe+0C+JRpaiSwkC6tHlt9w8EZmuWBweAiEAuZHMZp8st0hZztSg26tNuXixbOKkncujo+/auoQPmkY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzyd+CRA9TVsSAnZWagAAaiEP/RV9osIRnuPaS8I8vr/7\npbhsILh9USkTap7csHZWm3EG6ZcnK/qNt66ev6z5nk8SgyaWjDZUkBpld6jH\nbfVmrxfp+zaN26JSttORKHace8toEdSAStAiKiRH9oghjlybF8LHKzSvOz0Z\nZ5eUZmGFhRfJI3I54VIXsxAcqJmrFda9IQFX7Brw2IoyzMjAZzG3/01N9kjx\ncjYkeWN9sUKWLyJi9nG0uI4P1jvSLKYWRbGDxiHzXGJjACLORhuCdwCpEoID\nw+oVsNwESnh4KSbQOnstYDZPe/SZ7rhWRwhPMr3Goxa2K7lAeirZjoEVnrUw\nmdzfLSxuKROHS6l2nwDJqxcR74IytkrXtpK+kPmuL7SgVtiPG7hYVfNQoNgO\nFGId2+rsnQz9JOxEDoti5gUWTwmZFBqG2HeQ7NQW73CkbZYMLIdvEQWyFpd5\nRe6xE7i7c32NtYxn9KTAbSvRe7xa0vDZQBjD5gdqC15A0YdIaof0FkfPBdBZ\nrs/SLSzM1bpB9MPTNXa7DHoxCMJA8mKU3LvOEUgzQqUe7RjjEaLdlUYo/4ZX\nNN+GzfpzDcAUDZ0WtQsPCAAYNgnn+GQI6L1LqqLkOpSp9Ew5CHoiOlfqjc2b\n3/NGupmGmkH0wG86tf63u9aowGl962hP+1enrndHEJjsQzvbMsELt/GkpqNA\n+7Hu\r\n=Wq6k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5ae37026c572ffe6707702e535533859ddc81a48","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3cbee6dac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3cbee6dac.0_1573857149650_0.6714339898343402","host":"s3://npm-registry-packages"}},"5.0.0-canary.591a6ad44.0":{"name":"@material/auto-init","version":"5.0.0-canary.591a6ad44.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.591a6ad44.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2146e9d7b43fd277aab74dfa9c8aa6145a34ead3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.591a6ad44.0.tgz","fileCount":14,"integrity":"sha512-2mqhOA5rI/ldIhSIRn930vukVRiGNqIqb9afqgIo7z2GN6ziIOHNy2H5209XRiYLRa3TitniPdjWfnRWrNF+9Q==","signatures":[{"sig":"MEQCIApXskL/L9ptQ/fQ0zaaS3KyHXk3FuvCa41cw8+bobP2AiA9zw1gCGoL0e4hIiU/PjZIoMQJ5YVYi2eqhEIyTvRD3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0y28CRA9TVsSAnZWagAA02wP/3vWvwKUjrsNmA0NKcnH\nPL9DRbn/4o1kq+B94IQrEeKG5ym9GCLskZroYt5qA0haqHcdshqsmde9WL1r\nQE3DEjtRUnuNVKOPSVQiMG0kO0eiZpid9AmeysF+o5Xo8+A4ix/jg9cT+C/h\n2ujkWvlv5kOs2R+lKYwGbpvKRkQOSMjvj9NckxMt6paiByaaXw9WLsG5uA5W\ntEDFgTam7x20PioC06513pzaLYVwvKLAKIGp1nXTAdfP27nVmK7EGa8K3K5D\nLbcOCwO/18DU2+WRfIChWhhKtVYpSXfZEmr3GigztpqAg6kw42tllN64vLiP\nsdOTm/RhBlz9biu1lzgrdMHf7rzl9bBJJ6VQQwuPs3v62iK8cw0ldTMPLSQY\nWhLzGn/J9DwZoBIw8U7/44lItbGsoCy5Tyn+Bfz4BjhLoYAD3UmXCLzjUCfW\nTAw/ppo87lBGUzucnlIi9tDjqlSul7jDIFe9jdriHlryBUGHqRsQ9wg+kUk5\nKTpHaFZ5PwKTnR0AmjmXJrBoD6uQd5HOF6fl+9UXn8chNRHQQZnLSGtvRjmL\nWwWw3Ox3fY2l4XFs3zUcMTG/DmFi7PpHVXAPxy2cw6jRAKT9x/paCm/GLQr3\nPlamhAhFOtA8mMqV0TBeUU8O/5P3YbnQqWEADNetpYcj1h/TnoQbpwwotX80\n3kNJ\r\n=+ID3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5469bc1cbdcbb7c9926006be2d2a65c3211c220","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.591a6ad44.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.591a6ad44.0_1574120891975_0.07240618487165662","host":"s3://npm-registry-packages"}},"5.0.0-canary.5729943ba.0":{"name":"@material/auto-init","version":"5.0.0-canary.5729943ba.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5729943ba.0","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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1c6622df8a643320a18c6515a4b3369e37db84b8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5729943ba.0.tgz","fileCount":14,"integrity":"sha512-6dIA8sYAwpwWe/rTe4Jo1Q2U5ym0sBg0SpWzZsxfcY3U1MFSeQGYkkJXrOVSJyxLbSM7lSvcvFcEJsjssBkAxQ==","signatures":[{"sig":"MEYCIQCcpnxwuwMTyts0Cb8Ln1LQglzYQtuzxixztZmgmLxB2AIhAIsCBiLy8WvE/ML6hnvYB54E1wxjiiSNFWcJRDWZdhP4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1MzHCRA9TVsSAnZWagAA3WUQAIgUUaQ2+aWnChQdqmzG\nd2XO3lZCX4WYMkP2/uk0BAnQvU9FoBY99bZhyFjY6lEJiXAD6txtzylS2881\nr6WMA8qlQTQh1mVvn5iz+7BI2UEkhTzpJnuPpiTiouASAoIIXVa812aTmFBh\nr4TmmuEIIKXWcrIne79LWIcyFb8mHqGOvOdDX5sr2Gm0KGMqxwsrK4UxiWaE\nPL5mJLzLM/GRD3JVlM3/mGnu1kk2JtXwyLyOVyxykSx/3hv31hl32mqp7YgZ\nUGn6Y1M/cb71UkaT0t7WrCE/WdOh3DyMWygYdjnT7T0IiK9UkcAN0PyvhCFf\nZH5JU+8afBpyk3ugwTVYNw1WRw5gLVvlenUrxzoBYId/JDfy1JvqgFAhh5zb\n+dpE6qc+FnED00GhaCPwFdpj7mE5LPB5h/mXj/ofIvBiPNyDyIkKGF9HWdUD\nt/F9up1ERL1ztU41oEY9dp+beT5fiq3yGwTvLe14ZZI9vx8YdNt3TwNezZDd\nhcwFSU1uROypDyaKoB+hose8JHr/JnZTVJfBilUdcJMd7L/of4COldx0n7P9\n8uWxExNlSbHk4SP/eLgyiHBdPcLhljXOA+gz5kQjUrBLS6scW1ej8qXpqBQ5\nmuRZinudmYciCJvjG+KSRuUIWaGrrNyow1BH8lY5UrpRmgmzYRGEYEaLvJVQ\nE27V\r\n=mrJz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d49cf0658a3964963bb2b39b2e3a010615c815fe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5729943ba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5729943ba.0_1574227143150_0.5196725613301565","host":"s3://npm-registry-packages"}},"5.0.0-canary.e89750dc7.0":{"name":"@material/auto-init","version":"5.0.0-canary.e89750dc7.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.e89750dc7.0","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":"asyncliz","email":"asyncliz@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a48214753298e1a6bec4cdfc8ca541dd1872ba26","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.e89750dc7.0.tgz","fileCount":14,"integrity":"sha512-RbeTS0G/uCsJkt7uS3tlMhjPYdhcHMFstISVKwA3RRW571aTFHNQTLi3GHzOXiSE8wVop+uAI/DLdfklDrM8dw==","signatures":[{"sig":"MEYCIQCPIyspSXVvC37Aj82Ue1hAx6Im2t2oHWQATqbyglshugIhAJLh0LrQPyQiMrLFaubqUKKkWOQk8JHvFBtzZYFHTUHs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3drYCRA9TVsSAnZWagAAG1MP/3bgBJXwZfnsKl6TWQ9+\ndwbv4xYmz6opeRIcHSDfPS03VRp5P+ekj0IeNV2e8HqaCj+eqTqEm0Yl3blr\nZD1KYVLg8C9oFPjCeTN/FtXm55hQ/CgY5r7Q5hCuS2xJ0uVYAokNjGXFtE6p\nWEtVLJun6yZWi2UdkBgOPRIomoKwNKI/3daqf98WdIXTDLlgVOMnbvn7uhM+\nAqnQRobN7hLNYHB+RETw3GaAm9naYG3lBGmbEvfbf92+7js9h5syea4KjA5K\nQKzvRn5Jt44YXPY2TYlnpDBuiVHigfhc3EgIxguS0AMzakrHCC9hF4+UK4JP\nGeWinqrloGMzA90YHpI2yTT5VQWQnBUsqbw2uKXeZW+9vXIPxf7v2dfFwM7s\n0AIKyu3w3HxLmXb4ZqB8CIPOgxxIRP806KgcRP7ToCsZ5hdM3jYBGJP906aB\nj89w/SENcESzs7konYGTx/9XnqNMeLls6MtisNWKG25E41Hwqto7P8tkJQd8\nrT2C5hHHN/ttOHMTetZPjc4wXvtsZXOZ+FbAfd7eVEI06kE0eaHigKgFmTBI\nVFsieHWdnbZUw1ZNM4b+FBZQDGqKrD9e2N0tfVXIyv1N5TgzmKxXN8pdnfji\nKvwqDF/7wYQ/fV4WGBBrkh7tTkfi2DUsKTHbIbUNoV+dTeGaNTcDFlwaGHmy\naGH0\r\n=pTU/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2a166b3e817207f685f4b112635eeb21f5ef0789","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.e89750dc7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.e89750dc7.0_1574820567721_0.1856447693249892","host":"s3://npm-registry-packages"}},"5.0.0-canary.3e560b33a.0":{"name":"@material/auto-init","version":"5.0.0-canary.3e560b33a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3e560b33a.0","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":"asyncliz","email":"asyncliz@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d24667fb75525da7b63a725383a80c56e0e0ba28","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3e560b33a.0.tgz","fileCount":14,"integrity":"sha512-FFbOdOvO0ciu5m1tixEbvFT2jDiJ5z9q6+l9t93gX7b2KHS3g+KgSP6+IwX4WWW1Qpyh0udibzekHN1XO7p25A==","signatures":[{"sig":"MEUCIQCRgNAP5csszPBhG++qSI6xf878Ck/aT6FCg8kjbRP4iAIgemzI77Z79XegMoJPFivyxoHnNyGU6lcNy4cm3FkBzEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3dsCCRA9TVsSAnZWagAAey0P/jyUN6Uqcs4MUO0wLuAS\nmb1b+Wjpki7vOGaLWS4LoJ+oaeeaI9oXGPAOQMO0u4ilNNPyx+7rqBXsECh3\nY1yadWmnp4tXiiLS2wqlUW5Tgqayve5Id3JbnNzSOxsk7JFaek1yfjU3Kmyk\nmCvH9zm7/aLJB6xC0sYp/HyEYUqR8gGXoFonqApw9B7jxjyy6bC44oGh6gV2\nHxmlNeo/hhrP84tGIX7eQ3/2OcjJLEk8OKs+QclxLfZEwv3gZWoRMwANwxMN\nVTOXqVIRRfBoSnN4s0czN0huT5sn9apDIEiA28AXQEkEbYAhA8r8DhGC9lpD\nQonRnp/bwaX/WvVFphGCPfAUekPtq6MsD9M7ko0L4GuUKNbAqFzj/kCkLK1j\nkBUvjfBPxJQgV0itfbRGKQKkojdWsvdJXPxNDVvJ6esApStSG7s6VZNaEjmS\nAETf23xexmyRQF0y8tBcYjrXjxaHTRtk0mH25Z4bb1IhEgjJ5vGM9x9k7SaV\nVIV/UYJkpMnSdlUaWiGylojklX0tHMiiMuuucqbj01mZuqntJt/pCpxBsVns\n0APmgycuJNf1mqCho5jm+kSr65zXKpMtxTSNAwybVUDsUjkIgBjAOercuqA0\niPKTjS2RgdyMIPILd644EJq+Sm6VysC63Dn2So66Isic1q3jPx08G9slGAQG\nFJay\r\n=fNrG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a86efd68e1e91c0cae784ad70b0e36c13c923dba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3e560b33a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3e560b33a.0_1574820610469_0.27427806540355304","host":"s3://npm-registry-packages"}},"5.0.0-canary.7fd17ce5e.0":{"name":"@material/auto-init","version":"5.0.0-canary.7fd17ce5e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7fd17ce5e.0","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":"asyncliz","email":"asyncliz@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fe16c72dd3474b7cdac50d9820e3300e2c3369e7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7fd17ce5e.0.tgz","fileCount":14,"integrity":"sha512-eMalycWmJrNY/2Y9UvFbRAwyYUpEVa6RUY5QJTEcvv9pSnyoOdCCikI6L/xZAJtulICpSWh6eKumLWuo+7Yxkw==","signatures":[{"sig":"MEQCIDX2H1G2OnqXynHR8dftufYzKeKUI2wnTscZTxXih72xAiAlT/nP4j2VZh47mIPpR13Q6ekPp8C27NcUG0ixtjyUUg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3dsRCRA9TVsSAnZWagAAkfMP/RwmWqhUHZvL4JGw+0gF\nPKE66TU+ml28yCn8lnWuV5Zwl9jTbAy92RCBx86mHRsNHA8UeQyAMp5Jqftc\neJZGw6rUfdw4I5QJFEHO8HHTeKCoNDuCuqt3YJwWbeA2Rn+wv+trmEcJo9oC\nBbh/Z96VCS6SJhGTWyKx9ef9wNj5VcwbKdkQthcqHt8ZpgmfR859s4YvEIPe\nPWqaC+aEWLMCCUTT/wXzyJxJkiqZ1xpDDUmFIKWw0eHcVfu5jL/8KBwQX68n\n3NXiE+/quM/HB2E7jgJT5oEy4keu6hiBEL3qT0rc967r5FRzqxDaxLl4K+1n\nf0PHHkYRaGbXUrfvu2CfvINU7LzJ2tEManpv3XWdoLHt3n5SSEfIolVhfeuw\nsEK/o24UxeUlHY26p3MWNZwrtjH9BahDP0w6XBLWse6NTEnr+NjOc5uw8HYV\nCnYz2JtyV07sAc//EL46zkp886JTe7Sa4zgh8vzdcmHSjHx1MgUTXFJWIyis\nq8IrnPS0y/ATOgR+nkIbRATn33x4nVL79zb/b5/xaUEVCurrr1Y06gqG39oW\nolj+URbXswS1xHoRF5A40cRf4yVcNauzK3zT+WDqB/M6lJ3mQYZC/247Labr\nTHsXR7J78BWS4GAtI8KHuWkUkhwMEGxg1ATNDrBoPHI+yXKUofotVofMyDbF\nUwjo\r\n=UDG+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e798e5bcdab4c998c88b2bde71412b2d38dfb262","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7fd17ce5e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7fd17ce5e.0_1574820624505_0.40146091334539236","host":"s3://npm-registry-packages"}},"5.0.0-canary.ec729683b.0":{"name":"@material/auto-init","version":"5.0.0-canary.ec729683b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ec729683b.0","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":"asyncliz","email":"asyncliz@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"782db1e3a52dc68d8ab741bf61e1013bd87057f2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ec729683b.0.tgz","fileCount":14,"integrity":"sha512-eh3lDyQ3e33/6aDhYu2a7prPfnTHgxMM22QUUn1L3CF1R4kI5D5tGzJzNLODnPGk0CEeFnD8Wp+NvGLJtnfNdg==","signatures":[{"sig":"MEQCIFN2p9qFs57D48azlofCGQQOTeqTrZtzun6eOB7mmQDQAiBak/HtmC5HL/2SxQlPMSmZM4u1TOInembXy+5AHmlWQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3pw3CRA9TVsSAnZWagAA3bgQAJuNo7po/MFSK7w/xXSj\nqRfmd0HHOtGTI8EHj7q8dzSRW2shidwNvbPh/5VKIOs96ro8oXgTJauSILFt\nq2hq/0MCm1OAHkEC1s3/9bPJG8cwIh4PMTh/PeXeR53YS9nFDN7LS7NXmP4y\nZciFe17ejREsJXFcb7RyqfqvsBlxY5fuZb85/gDKV/T/xESgs87/Vn0ELp+/\n0b3bl/S3hitsS62l/LfivBNLO0b/po73foZBpgpB1R868M+3rE9xmwV8p2WH\nS8KA+ynlsQ5Tzkxf58xNiNxZcpAPWiJfTuw7A81Rde2xbNzTO7/qNpFbs8Jd\nB8v0aP8Utbkz6kpiQPxKYTs0i025RTuOnoYrY5XMeTO5XUNhCut1DqOlYxT+\ngp9ja/ouIOS4LjZIw5w4Fq1ZSu2jfXuvbc5wEFxCRviXfzBmzQ7cf+wK0ipW\nqWOH4mCk2n20iIHtBn8yAXsu+l549ypVusX+n1HCsrCkHLISSuZGz72DG0ob\nv0gQNMjK2rm2wk2gQwvnA6tbBKhCAjRw+j8MLyej3tywL/DF8ja3Tys8d50H\n2sCSuE58N3sDjVA9ZS0NHcGIrJoB7n6dIJpOd+PFKp+sKYbkJnl23dVpop7S\nNAM7ioBDAggbEUYRFeWu7Cso7Yxave88Zdo1dwjkDZTIpHTTCoP81xKlpgCK\n+KL6\r\n=wF5d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"919526f37cd7606c0de4cc409ed4c1ead34b60eb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ec729683b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ec729683b.0_1574870070784_0.6540581930822114","host":"s3://npm-registry-packages"}},"5.0.0-canary.b8bc4a26e.0":{"name":"@material/auto-init","version":"5.0.0-canary.b8bc4a26e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b8bc4a26e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"711f5f3cca716978febee2edd113d6acd7b3d1d3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b8bc4a26e.0.tgz","fileCount":14,"integrity":"sha512-QlxldyKUx2sNZJdpY8W+GDzXqbJKqwhAQt37KIKaY+M9kCOjzW1e6UEPGSqquFx1UVb94BomPm6Wun9YBIk0jQ==","signatures":[{"sig":"MEUCIQC6LigaX4edGL8sapoSky4fAkiJWeHhNZp9K+jK/aG+/QIgWqvoDuN2Ilenekz2/6Q9rpploaoBgTZs/C4/5PmxGAk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3suMCRA9TVsSAnZWagAAT7cP/0OAlaElA+/hJdVEcXFc\na1XMcJljnm8Ir0awU+8X3p0I4sCbzDc0hrcUupqLiiHmhBx7ii48ThhMJOWO\n+4D2eL4NSZEVehMlt6xtCw3Yd8LBebvi2sd8P747M/CbWm4CeisMANsmNDq+\nIPjFDRMYwxeTGTdMrY4JPyyH6GPyGDejrKgwuhzJANKeCSd/B6+VK0KyTbmx\nsgl/vjhVkClROAsVvDqMkXNCbsmUv6CKPlBH4aBQK7df86C7bekf7YIyqb1z\nsbcA3K3G9/Nir/+NqW7zHO73P3S5gDzsQDHN/U3upJV9tptWeEKDxnXGvY3P\nswOWsfwIPkX8g6Z8DFJGLB6Qh/FJwEvhkD2AnnC8AFhGWxJdkgumxV03ZOSj\ndofxXUXAC7U2cZTa5z8A0+3Bk7f32nH9YePkI6dzJnYNKM5ZGXVy4Hw97j1d\nzhCFAnvV8uh0HRGV8CcBfnT6IyJTHd2HFI+SSmENOeXEui5sCasWdFhSQp1N\nbKP1GiGAklj3HOoeFhizl+cqkaEkVs3RgbXtJFHzZgNNB2jmvcSMSdPPmUfk\nSTc32A85TY5KllVHj7jowGCJEUjX06rPI14Ou3V7KClloq0AKP1+yxssw3I9\n7GojW1Uy2Mgen5h66gRtGGJ+fupezPK2Gv7FnHhvwvrHj74HHglEXXNTHgsl\nTIeQ\r\n=zQgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d04615df572bbbf2ab2eeb76ea45696d0a40563c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b8bc4a26e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b8bc4a26e.0_1574882187997_0.2602869205991476","host":"s3://npm-registry-packages"}},"5.0.0-canary.f978109c3.0":{"name":"@material/auto-init","version":"5.0.0-canary.f978109c3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f978109c3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f08bbe13303c8b4e1a6ee4224bdd3b1cf4a7b634","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f978109c3.0.tgz","fileCount":14,"integrity":"sha512-aIKc+0uN7df+ijLxMplaJ2OqQcBlJ/TJNeEWRB6XMT70yysui9MjeJw+1tZiugWc/QJIPH+O+aiRHXVrbCyTYQ==","signatures":[{"sig":"MEUCIHPCqqw3D5MH5OytqqN3qqd5KqYTdpyDJUHiKefW89vwAiEA5yatX6Zd4lYLNFSL/HmxdlNNBMBAPZS49vgN1gxn+vI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5US4CRA9TVsSAnZWagAA9jgP/2xXwEnae0ugLbhgtFza\nymZmm309cJ2fGIhYWIj8L/hZfwtYPGGtiuRtTDytE8vA59+mrhYSQ/yIoUks\nkVy/3uaDp9veYLggQ6uc+Mn+ZlYrJIkhPtafoHqmZBKvKXfH6iHrmvXuwzrO\n3cSKN/357tI7bN4M+USxAVDFRaYL0Z4i7J9LqmphdsoVuMgTF2E7q2QpmCko\naWNtGPJjiVEAYJz3lNbcbyOWVvQt+SKDDcmYbZNsQGp8UEsjfmuGyXCHMJHv\ns457Jds9+hacnqszoTMSkm+oIWE1ER1MZyO5Ar97PHA0RVC1fxJzmDN0qztw\ngtB7epvLMMq1fvLWkGNQcEp/aC2gtWUCVhXvYuSAwaEcZyAUC6j8wLR6XzWf\nSvvbTYDBYQL8wRbPG5FPZ2O/V2XpJm54F5xJZItivAmd/gHv6cEO0CGhWsxu\nnbavw0fzsHoipOb0VCE6ToTNHtHXcVdkR48iABvFPdMoNBeNo7Aq7moQDsNT\n/gXIH5ArWOBTv5n/tp87VXCGQQ5kMWolCEHgNtQltqbXDMQRutHQY5F7WIoM\n3sp7Xad+QBElNWK8p8wJ7QffmyVCQKJ+xyVF28rJuJp5GSswy9U711g5LJCw\nns5YSlBVvPDcHzD7KyD7kyaS5mKMh/o3PJKTHbT85os0lI6iKAQWpt0FhJIg\nR7Kz\r\n=p8O7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"27bb2072dd0bc0aec40da3282431f7513467bbd8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f978109c3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f978109c3.0_1575306424003_0.9835728310023386","host":"s3://npm-registry-packages"}},"5.0.0-canary.ad9dfe706.0":{"name":"@material/auto-init","version":"5.0.0-canary.ad9dfe706.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ad9dfe706.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"053d8d8eed581906e6d4fb1c44af440866870831","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ad9dfe706.0.tgz","fileCount":14,"integrity":"sha512-KnF1zj+MoBjVNUU4OPgYEHX284374Xqj52Veigo/KOf+GRZ5sGqESb95XgIKyOIj/WKWC4j2LpQRb8Z5zE0GeA==","signatures":[{"sig":"MEUCIHDQ7Lvlwnf9Em81Np2hIo2sMPVq/1XZsQTuUVPcJRouAiEAh++6/7UA6Wqlvy+LjETdRzfXUxXXLmvFY+scphm3J/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5u0VCRA9TVsSAnZWagAA18cP/jpDLYv8vdYiV7Y+x9LE\nKSA0sSA6QhKwI+ClJ9zPyazeBNL07GVn0ksJxxPoDoLVmz5PUuy2i1D0kaSe\nR/O3k7yCvcXSPVrID2aggNayAEgCwQIy7oaj8U6AexxG1XiMz0+lAzHLnNTh\nCDiIk5mUAsc6ucnQmjpyznQ1GlmNTZwOrDRaZuZFd+7bLyxZR2b1TICkffYz\nKhUDkHZ4z0VWq4pezjlILeIoyqWpubrtq3+M0g5A0Gc7WuiZu7T5F1HGXjM8\nIR6pFI8/nlhELLGzfyr1n4QDhYiFxxmOWQcryA2vmPG8y/ma16sOF6cBlKNn\nltajBl3MtXv5OcIbeAx6r7Wwp9aez11NTSKuTs2+aC0AKQkNiOule1Wp63gV\nEvTEiwFXZafkH5gVDWFskGgN2orHQXt3wMHaQIrBjF55FCTjq2vuO25wM85C\nCMVPRAlpuNJ9pn98nSz8Cqfr3RVlKvLl20iCJjnkH1bp92z39uMCZ5NhlX1S\ntjIMtpKgK9UIyJBX73XyHRbCZymqFU95OIV1Y82I2OP1XUpP3nQWsDjsZ791\nwiKZH8V3Uk2P2ke17sfQWEMufDygQGy6+tLPXb5TkL0TYRIiGDTW9/FheN/r\nBoo0dFsW3/UcCV/LWj9FBcu14MOQ6HXFHIJrk9Wp538Z5E9HKhgwCU308qfZ\nsT3u\r\n=Oo5U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ded1665c7a532bca8466d5bc100026f56ea99715","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ad9dfe706.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ad9dfe706.0_1575415061014_0.7729059899069199","host":"s3://npm-registry-packages"}},"5.0.0-canary.5e45d77f3.0":{"name":"@material/auto-init","version":"5.0.0-canary.5e45d77f3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5e45d77f3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"323d7323fb698dbc9a5531ed8c24c3552cb6a64f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5e45d77f3.0.tgz","fileCount":14,"integrity":"sha512-9nez+TABFx2241oA7QSSqwpa9dF2pG1WVg5PkH57xNclAwNzBb5wyAT93d3ShxyPUmormWH0Qzcv6ZOx3DnZEw==","signatures":[{"sig":"MEQCIAGNUE5dXPrgY1Ifk+SCyCBiSDB4fv977oz0i0/XjWhSAiBflKxa6TgkgL+VJERwXYK88y/yLl3Zty2973qLLqgTxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5u1aCRA9TVsSAnZWagAAETIQAIypQ4a4Dvgu9O5seyMs\nIc/kfkOImZ6y86mfnPWqkafsrPPxA+hu3PA1T9EfIRiwqzB3SyaTZLF0IKdL\n6uHa57I0zkFSBS2I2sQ9GUUW6tgGnDug20RCD+ewzJh5Kmg8ExrHpSUjKn69\n76vGO1Yh+3RNpNg5gUWxkQdPMFCzqhtFzfVP9qGKT6qUuZcjkQMB7PgdpS79\nELHDbDk81q8NTAxXlBpo8b0k8WpDzFPHQx65u5vfb+osqWRrDfJSKi1Ic7uM\nokBzhDuzsfTbjLzjNd3Nh03ohe53wwNUBiTOxqXf8pfnNpNW8Kf59L6mqIZm\nqEjbzESEQ7f5y7N+6665qLV8DbFNoLzY3w5iJRkjQQojNrRNQLSRqOcmM6qO\nFIrRJSDXQZOBWaOyrtopbOBu+XieiUZHRUYeHFDFoL6mazZP86+1UinKk7x2\nvyrZ1HwqA4KrB+lrzuL6sGOSeGupCeUn9WOV2SK2FZfW1VUo0PxPKo9U9GGg\n+wEC0JyAL8dlUvlMkupwWtisBHDG5DSldLZnxHGu0qcA7+r2iPMB0KpZ4qEA\nZZIoRwDR3iIH2UW57qp3yksYzEoLaJlreQ1NzXoOpCq/xJns60EqAbvrycMG\nmlcQKc+ntLhIwW1w+5xqD14asU07LkxlQ082I+OO6y1wYHz/4WyaM7paGqsx\nW2An\r\n=iJny\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7a20a5fb792fe297fffc09187b6dd3859babcd2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5e45d77f3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5e45d77f3.0_1575415130232_0.9028200546386951","host":"s3://npm-registry-packages"}},"5.0.0-canary.d10e8cdf3.0":{"name":"@material/auto-init","version":"5.0.0-canary.d10e8cdf3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d10e8cdf3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7cd00233ac4819ee9984f0d1283c9cc0abb25404","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d10e8cdf3.0.tgz","fileCount":14,"integrity":"sha512-HkT+LbbVw3vBNliUi0AqjpjIcOeLmQkc8/HefkCfCHJvj1GB58ow6T8BAK4aQneqW5BxVbZ5MT/IqSJDWSMLMQ==","signatures":[{"sig":"MEYCIQChuU0fYpFZ+BxBVAMGlRy6N3KvFNg0VHfXsw3w4XsqEQIhAKcEaV2zUq5QmsqDK8GTH0Tjo5VG7C+s/Gu4on1G1nZk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5u2QCRA9TVsSAnZWagAAWp8P/3NjslpHki/2wjks+zVy\nrmYbu/LqXWOn66n9OiK12JgpXz9rCaoNuycwAgiyb6uJxv1SHikTDj2z8sTD\nx+Mvp800/1+aGA9mVjZGpSIYB0rMsi2yu9DXaaPM5GBdWhS8hEHkQnyTuCUl\n/YVXbnhH7Xw5XKK4YxWKb1QdJRMsfwfvv97n0qAPQ6FbhWUcL41SLbeEYMxS\ndEAK8ZNi3NJVZluxjwBPBbY3SCGjeGdbvEPiNk3qjjFjiPNabPp1KCR2dOGo\nIDo4jRbLOP5DYDu4RbhcY5T+Ityk940/s1yiItRECGgW8Qbu3cNMD9iFUcp3\nThuaYagAMxMnaUV4kEMt3edQjeQKuNQfQnsunjk+KnVt7ONjQKOLP4yK0sUg\ne0Y8wwngDmnfokWBC81ZYKqZ8t49UHfvrXgQMh87VBZccPK1lydp+VDsVz6n\naA5nPrStY8DRsSUERmaYAsTlEeVZk+/mh/2gJViHBK8r4V76qySjrkWjQIee\nb7eYZu/jsIXQGqCTWxwYaCuSz3wXhVeGGcCS/T5DU5csazP5o8C/JcI5FIik\nGFNDibPQwWAzORN3goEyf0J+tUjXvpgNLepU/quk96ibN4Y0iJbo2hS56i9l\nBhAUDkGcMDz0ZwWCZHiPG0JQw3yVhEbUHRA7az9fO3/hH3LsS6XZgxH7Kc6s\ncvTa\r\n=7+nr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"855cf0e11682e4f0f44f50292556ce39ae2824a3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d10e8cdf3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d10e8cdf3.0_1575415183700_0.6813727197939399","host":"s3://npm-registry-packages"}},"5.0.0-canary.a5dbd8a2a.0":{"name":"@material/auto-init","version":"5.0.0-canary.a5dbd8a2a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a5dbd8a2a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8964ed68ecf1971e3cb91a83e4c86de50a3f7467","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a5dbd8a2a.0.tgz","fileCount":14,"integrity":"sha512-WyRkhpliYTbSlbzpe4ddVhurPbqa3gj2VGPgGqQk2HOLCGTRfJC7de0/6X/FmamZB+K3wu72XNMIWwgzq77dTw==","signatures":[{"sig":"MEUCIAOW+3h1rE1lQLYpyKOwzmLxxN7Cv+D7qRpB/CeqI+PWAiEAuopG1dE4xGb1q+/LD80mg71prLpJlqoYZFSvfHwGWI0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5vW/CRA9TVsSAnZWagAA/bAP/27tMsoy2ogKUDgzRJZb\nZtLexKvCPKzTqXtqzLCSCZ+IsIXXEb59hrFhuuJvEUmrMipYKi2mqjMfqGBY\nN6Zym2llY2H4ySOrUfxJa87W08EttSgfAr+WF7bhit4XjyEfQEIChYgIGWm5\nk7nsnB0CLg1ruGlAfookke2+MEgzaP17Fw39CrGTlVLFyaxZG38LtC9Hub8u\nMQrEDEkuPikR3fEbnaN1ofBuMs7rl7aDLDawgZLZvzEyAVQWQDdJYDDPz6Ef\nbzVGfcdrqGdVaW/DFsrc0t3SWTdVXbk6R84FErsm4TKpVvuwKujBM76y6WkL\nwcnDv4oa/EUwwnOla/CMhUpvgscIeW2k5p2b3NyzvtexIAYli1JsSDOYXBB1\nEsmg1IY1lRUcs6ya0QK4KgmeuQHU0ulcz71u40wSIcG9qD8sbBhF4J19f2nj\nMdetgYJrw1JwLNl3I/2aDKeIBgvQ9ut4lWV15Siwk3QIGOCiRYCSOjGBS6xz\neRGgtM35RAxzSKVJun8mdbLYWfNmd32dOi3TFBoSL9sHBlp7I1KVjX+1lVSz\nOTGPiVhrLdUcDTWzssvjJBaV+Tqc7iEmJLj0/mh5UL7B03/QsEJ5ATRg0yPV\ngiRfi5LLXxQHoIx8RBBiHC2GhmgEw/pKVXKuOZq/wUtshtrX1ahooAO9EsbE\nKJ7b\r\n=4Rfn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a67c95c393a733414be4fc008baf7637a9509b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a5dbd8a2a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a5dbd8a2a.0_1575417279612_0.9338051452022598","host":"s3://npm-registry-packages"}},"5.0.0-canary.ba879b68b.0":{"name":"@material/auto-init","version":"5.0.0-canary.ba879b68b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ba879b68b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ddc8d2fac7e6df69495686130891565c3dc6686","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ba879b68b.0.tgz","fileCount":14,"integrity":"sha512-e9hQC0OGN0qYVNQGA7U3QwufHsqJVBR+i4iYJqwpX0chVdOQ0Jw2ATVgyKwkhMmll1Vy2uc6c9VscXrn7dZ2mQ==","signatures":[{"sig":"MEQCIEKIjn2b26YSAY5ONFNToob9N2gbgqd3O5fJGrT8MjGZAiALecQltT4518KJR1/Fr+Zp/MTGOto/gpCeiwTdzy7zdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6BV9CRA9TVsSAnZWagAAKV8QAKAWMNIkDgsHdkpx1kjP\nzpN+r/OJ0bshN2eFQZ2NsNVoeTMdkuSBD3sa0VBebLP7t3bhg47rqv9qFUM0\nm/8A9OlXYPl4Mlqrp9Pjd+OZ2/nGYds+QQbFNK5nnZ/XepYsmMjCj+7tvPR2\nUsfuMWBdmcRSBtYKjFxEy9V4ipBhQFovd+AG7MJAFqqNAD5DcxUiOAlX9FFk\nhvKZHBcpzlCrOCnOaK2TsZh+ar4KPyFyCyMg1WAbhlmFTQQqtsOrh0MZTjm5\nNCm8DNsvzouU7HzZ2JBy3cxaE2/zO+WGfTmXxuY5JydwtoU246H1dxf8klqo\nXshl65dZcuHCIXr3uVebl4xhTv9nEKA03s4PtgbRtpkUqTWjryRkOi8O8xFO\nz3oBMxuNiSZLi/Lzk6zOralVpUmAxi/4icXtK4BipIiZCfa3naxURLjB5jPQ\nH7/mp+A0hcKf3ucu5a3W2WlxL75cREKLt9D88AQD0DoBcmfQnk37zz/pzbLs\nS3v7Og1mOo1jTqbKkBHENZWoMKUrtSnFYdD6hmAs98GsPqDyKpsCPWgCT71s\nmj+NPSX+JF1sgwq2KyPsCoJ3sEClkfxWzHxpBxmX0sjua91uS4NdzpZ7+gDx\nfsnVNR0Ckpl+SqUneJOD+aYaGRSrzWBYw9xCCs5uYCJIigqAIPTmEptrNHWQ\nhdso\r\n=h0t/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"83bad042ea5d5cc8b93df88a1d4730099550bc6d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ba879b68b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ba879b68b.0_1575490941383_0.3656328116642322","host":"s3://npm-registry-packages"}},"5.0.0-canary.aa0eba489.0":{"name":"@material/auto-init","version":"5.0.0-canary.aa0eba489.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.aa0eba489.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"98ef6bbcb72adbfb4d73f15b448e1c66458cd7f3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.aa0eba489.0.tgz","fileCount":14,"integrity":"sha512-qCCYOW/BV0L/PsOakV/pNrHAQrjDgc8cQM3RmMLr14Tqe9QStJy7FoQ2RBvYvHSKoOanZSUa3Ou6R9eQCGT+mg==","signatures":[{"sig":"MEUCIBMJGoVTnNZ96e6GSEV3C+lJq9xxmETEy9jP0Yj1Po2+AiEA3LMmnP4XHGkvAdsQvxzIYpI6oVIu3hXymqa4HKf44vg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6bXaCRA9TVsSAnZWagAAA04P/jvG6gjrgCFf+EtS3JRL\npqmlsrr+hC71fcmUCkQj9b5pRfshDiXYqy1AFLfAzMEFbFcCNhdxLxXPGrJD\nNzQYCXrv2jcEP2giHCU9tBjuus2XQOxxubNb9EemdRouyPFn8N27MvhrRSHY\npxcuh1F5mxP2WZeQBtcEk5TJfEEKCtgli5hABjA7hy2nTELJ2MnuIfWObBpX\n/o+DjyWIXpnS5XKupbyLf8Pf040G2tNqLQV8TPYVEqEF5rmSzpchNzEuxP1A\nvoG29Rge1PNpnJbfS4Sj7ZfSdSPpu+lVAD/17oF+K0j1GVlQMLapOW6vDNhG\nECTaOH8Rw8ynbhsbJfeXABIuFykwbkvduHxR7tB78uM5WDaWxEk9aEbl2G83\natT/Gbtp+Q7zOD2mwXDgqj7I0+q1NQkqL8N7KDMpCdaVjz9rpCDJf3F8eMMw\n61p9k2ZZJOc+MqJdShIYlr8qb6BvaqJjwytAP0uhlTtRMn4DBG6F5/YLi4mZ\nLM3ABuC4Di/NePFoW+l9RcOOsm98vr6RjR4ZGE7QnlCBsof0vbmhkvJbewIr\ny6LG7h7u/ExQjvZm1ZU7hXH7XgckU7ljGUPAkpbXfrzPoLpL6AibyVnaJhtn\n966/bC1XcgCIlqVbd6mL3Iaj4MdyBk60sjGAjOlSk9CWU65PH9dDjfbHSh3l\n2VcM\r\n=Fk84\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50ef06854f8319df2975cafcb0b8c94fc399f155","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.aa0eba489.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.aa0eba489.0_1575597530403_0.4981271663071112","host":"s3://npm-registry-packages"}},"5.0.0-canary.cb7b71a86.0":{"name":"@material/auto-init","version":"5.0.0-canary.cb7b71a86.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.cb7b71a86.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b822bddcd75e8932aca676f375be8838325d7302","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.cb7b71a86.0.tgz","fileCount":14,"integrity":"sha512-kFN/nCEvwJ0KZpzAgi7bKFQW9HdGXZXqtiipIZKCFIXaW3YGVGJaH0HH23lDfqQ0lPLqRvrsUoJ2AfD0Q/EWvQ==","signatures":[{"sig":"MEQCIDyVA1uOb4iHMASoDb3FdK7AXMoelWGbHltZpU10/N+TAiA3HllqY1lOnDcP1wCsAEkbRaNNex2BLqeGQFKS1x/IVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6up5CRA9TVsSAnZWagAABFAP/jfUWFOWgKdVGK2PuWoJ\nmwqNV4+TRheGnvh06b/qkmQyJVh5DQRSBaTIL9pkWXVCt8wN+aVdbkk1YiKg\nIsFzyIfTcm3jMm6T/AYq4YCZAj1g3bybZeLzVgGpm4nwIQqs7XouVB89HdMk\ni0U2uJydewgZPHVPp4luEcL3re4UNxYngkvY6uw8DNX2fsoG1cn/SZQSPKva\nxuYO9u8XXakNCMkee1MGj6AG0NFBuo+Q0IGoFhFwVSRgJDM1pZTkTXEHVByD\ny6gsEogK8CShiymG5e2FyRS7jU6R3xKEAqAAC7sHIG9D6UQjVZeltyySZDdL\nmG07QhARMF5sfECAUWPjUh7QWw7yEAouW8ycAKEcSY5e8dJSn93PuioqUlzF\nxEQLaukm6fOFdQcP99JZ08ExngmxjppvOU7gf7uxS54IYz5mwk9A/T3+p/r9\n5e3Z1g1G2KZIognFnKxoYxx5qjB/TEmr8LhkGpCxKac53NdHW5YPIpPWzJUA\nKoK9Rf+t8H5c8zU9/bAaeG6IsLFda+JtfnNSitSuuuiJX/Li1mPwBtnIQfea\n6WTV25jytSNIyrGPK2GN+CDeGNLw8r+4XZXz7AEmg6ao73lGnq/zKp6OwOwS\n854hc+cU6gc/ElXiXTSlfjgykO+wxjq808eDk/q/6X63yES/2a/729r6h7pD\nh9Ct\r\n=DOGE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2866cdc43c0ae69bc09927b490f0805ca21adfcb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.cb7b71a86.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.cb7b71a86.0_1575676537041_0.0018362555401911784","host":"s3://npm-registry-packages"}},"5.0.0-canary.50f110a6c.0":{"name":"@material/auto-init","version":"5.0.0-canary.50f110a6c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.50f110a6c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"01beaffc0351483eff65915eb754ee829af940f0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.50f110a6c.0.tgz","fileCount":14,"integrity":"sha512-9s7Iznqg1Xb80D3NG5C+WUdE3rR2Z92BcUXRnwpymgLWKhT3e0TU02fjx4dAgrt5avNRWx4/+3vmo37BUD2cRg==","signatures":[{"sig":"MEYCIQCnMezsr77y/mT3cUBRc/k6zWngAxrJ/cOqAW31qI0zugIhAM30gQPM425Jg0HragDQpEXK4y47UGhNe06vAOFSC/qv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd787jCRA9TVsSAnZWagAA+mkP/RiiEETbA/8JDGL/MGKK\nmxwARP1rQBqrLGHO2KmsDkMLXEYkDxRMhABkemXJ9FGvzmhq8GJ9akv4s8a9\nxMgav3oaMHg+umxCXrML7RdX7VbNrHvLB/LZwePm2dK4b5+6nJwzHcSy/+4n\nIT8vwGkf8Oeg/EVOw2qrEqckgMpRrKYxQqPzGx48jdjT3jL3+wrin3YvHbe8\nQ8+zRn4uE1I7oaNU1jI5y1DaFclDNpzOgaNBUvYA7BetcrQ3mgTFxzHq0G+k\nBbMNHgXgRz8NSCuHeTDVYZgyShaFcC/llL7qyk8wc0uZQpPI/eaoB7bz2npO\nBPYDw+pAdTh88hrw5s9zvBc6/DLBuRjYvqXNjmkcUIb23Hn2NUEXEWQCYG/H\nFrYhzGPCsQ5P0pr2SZTcbE+YK0qF5H+2dsms+61NGUxaNDznjuZ64011LSfd\nxBxzNphegx1f6UeZXi0CFhcU3S9vLGA0ms1Zukwt0v/hqIs+Ifc78joXjrbD\n5jywlJCKeHkmwhW/LDYr8OqHbgn3nj9ymGVks5tLicFsla3JV4970GfABJ/A\nuH/wOeitA1173W1ZJXUJsp5oP95RFWGMiSmL2KqZiJjqA+kbOj7W5OvwutK9\nwvCVyPb20RHVK5Ik1tUsw5JzX5C33FZIFeKXOJgWf6nJaxSIoNQ3/W4JGyUI\nSsPv\r\n=Hx5f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"84e9b8113e75730b3079c429f751cf857a866b51","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.50f110a6c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.50f110a6c.0_1575997155473_0.45969794944243825","host":"s3://npm-registry-packages"}},"5.0.0-canary.878a08b7c.0":{"name":"@material/auto-init","version":"5.0.0-canary.878a08b7c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.878a08b7c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0c394ae6a9f8e202741de312f172cd60b9025a2b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.878a08b7c.0.tgz","fileCount":14,"integrity":"sha512-iZIpfCR6AuvVnbl2csBJtTLl4k5HGIrQL7HfBykjQViSPE4M+sp4q9j0i322EdIBXeNLAp1lUJs05DhSdGQLQw==","signatures":[{"sig":"MEQCIBJPyGKH24OUX6W5IOzil4UnlLedNUdJgy7n2dcVElZDAiAPNZCcfE983Kh3gyZocM+r+FhTRhH2x2gcsA0/q8dH3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8U6ACRA9TVsSAnZWagAAixsP/RJFUt7tk+lrq0BSJWG5\nbZ5gkGVrWXp1YoLuIYCuzLM9IyIkMBdaBMzyNE13fbyKp1x5CokJVBgLbWhF\nljMMyGxriuvpT43E0VjIP6r6xFJG56ZVBWSx6zBr6T3B2+BBzAi6bIfZJCcw\n8YwEuoYklKAZeAMY+Rlq1D9m7aZws/PoSrBp0EPm2giDea0NfKrcTxkLK13+\nC8ZEUiyiU1wC0cHk4KxSKcRxHwmg5/ulKlIOqkjrPzZvIAGialYMDJHWzKHo\nM6JypHIyfN4GK4mu0eZ9x8Q53uLj3uwLat1J6xMt0OC9VrNlbvM/gEfP8IrL\nfK1XJo28yo+zhqGkaVcLIPk6YTFxuWeWAt+2jY0ITPhd3+b1PwYc3K4P4uHK\nfhUONJ4Wp5iMdKqzGt+P7VCizO/UARjKCX/ZKNbNN11P7dvXW78HvAfZ+lJ+\ni1WLD3cEchw4Xnu2jIozonK4UZnhGT2MvoUXz4aLGB+eLQzvz7HEZPiQLj+v\n7DMeSrgMjGsWYkUx/7d8jjqL8MbTLJrTxgexK5SXUmlTWvHeAY07OUby7aJW\nw8ipSK4t7R1RwC6YD/1dP+Y/n18z55qbW7chZdXReqiTrjgVgXc1BwEXwPx2\nAK4+o/VtKFGajwyeKtg0DS3X+HscwyZoNSONOgxRBbscoY25CLkofIcGhnxR\nfXTx\r\n=cV/b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"13bdf58f09c0e231663da8e8e9856d7a442efad5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.878a08b7c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.878a08b7c.0_1576095359604_0.329390243232103","host":"s3://npm-registry-packages"}},"5.0.0-canary.397905b4e.0":{"name":"@material/auto-init","version":"5.0.0-canary.397905b4e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.397905b4e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a70888d0bf38e71b6502ad796392f3a97a40a51","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.397905b4e.0.tgz","fileCount":14,"integrity":"sha512-eBCbmpjNwGocP4BM2I9zU+cdqYQ/aLujdrKAGcY9aDBy/Y4DdhgwzMKn/+8sn1fDC29VM/xAiDuzRLdF6XrQdg==","signatures":[{"sig":"MEQCIBplGy+16ZKP5wGFkY7uFNGo11ZO8zCVgYvmeqkCYpx+AiBRkAIJFogR1oCx4uQ4rCqmKdgOHDdqlXTZMwAQ4SbLOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8aogCRA9TVsSAnZWagAAUO4P/i2yAjnoxlhPpx6E57m7\nGXRgPD3qaiuSdjyBs+3PQ35FiwdekZrDPFZdnRvFNwn4RSJ5gtzlwjmeUTIk\nC3kI+s02YUr2tfDtNl9ufyi0NbZb6FvtgOgJg8r7o++OhKzfhvRtduiiZdvB\nHEvmo6hs6am5QM95wQ8GZoS3458lH8Rcq/d5iyZeoQF7x74x++/xVww2mJNz\n751AIdju9Q/40wwvTeittnXpFAINJHnfdz/t16wfe0NopWSzPaxX7ss4igMv\nlLmdLFJiCrZWUL5rkdrrEWKRgENIQBCPI1lzwAuADIZUnE1zw6REC5bx0rDv\nILKQip5iJL5YQcJu4GHEY/qWX2zN+4SFBVMBJOw1v9q26Nx6Wp8uOvZ4IB7w\nql2pD7A6xFyohGynOTSDdwmYXl9cek/RZ/j9qjKB+M45gZHcANi3oZBJWB6I\n8xWPi+y+6YY9fCU8kvhE2FTFAJ2ibNe6+MUZIp0HmsNLRgtMZNztVoH5Gp6H\nqm3e8LS1WV3IrW3F73nYfibo0Syiw4jsNfdTne+XJrSxrBwpZv5I9ZmKwGIM\nJaDGAaOZLYQcjqSFIQrACn/2p2HTtqP0MWMtMQqOr//TPelNyrzkVcDNdPC7\ns8/QiOFF+L2fHmcajHbq8hAfq3jr0KtSGz7rbL2tBEb5NGxRAhmJ6Zl/Ox2E\nwXD8\r\n=b7BC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"43ff8b8aaa48d3a31fc6835290f1ea1822301146","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.397905b4e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.397905b4e.0_1576118815840_0.4006856872948772","host":"s3://npm-registry-packages"}},"5.0.0-canary.1fbf5bd1d.0":{"name":"@material/auto-init","version":"5.0.0-canary.1fbf5bd1d.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1fbf5bd1d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8fe37fcc5cdeefab919ea645efd29eccbc419b48","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1fbf5bd1d.0.tgz","fileCount":14,"integrity":"sha512-cSq6ILLZNAxNJoSAuKdZQzTxMb/wylvVsr/hh7Ja3dUgS9RXsD03wnEfNlX3P0jYU80xRB4hVzwJ7CnJYDo6gQ==","signatures":[{"sig":"MEYCIQDjSAlk+tPRdkpRgoIvyQBLCF3jzfBmaz3Q4syWUKXo4QIhAPGC60oA8cOvYYNVVulDB1sHd0gSjClnmQUA6WqZPdoj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8o3wCRA9TVsSAnZWagAA8HgP/jQzMXbMV26haeXDB061\nFkbe2mx2b4+2e/GjmhwBtlrT69ptBjiKuOSKf5JQZKxwnUBQuJtlSYnoYKDa\nsB60ZVCl/qQ8lCke5RyPnR7HSx+Gbz5unRzHT/OOMcAxAwW9u89piLCkwH6J\nD8uIijx+cqY5Ni5OfBVrMHg7er8UQKWbydH2WciHZf7TsOy3qTdrotLj54D8\ns+tIJVpkoLVYK6ufYd/IgZgDyp9IJsb3ytsWHH/Ux6opcbiwWMgTXmXtkROg\nsFqim77OGvX1oXAITP1nMH7398rk9DhG9Ouxb5QBLp79wChUBIvQfryNmwlT\nHW/rJJZxRWvABN0386ApMzQor+nxHU8V0ocAjgAi04uHXWJxRiMIIlhU+FJo\nKP+Ba8l0Znz66bQvZymngO123zE47KGXXM/q7mtpPBvVVVxDwTa58qvnYc4b\nsMpblOlPcfwIPblToVaoDxwGptTxMl3bWzH7rCBujBnRJXZ6PANSpxas6mzy\nRPXsgFZZen26EN+BGrlYef5XjpHARFtegPHPbq3JqYpwsGwotg1QWK8TgDRV\ndL5gHC51aRV/4QeBqIyPPE9w+r3iMS3UynIpwE2hTf7uFYB0GvHNQKVu75nh\n0tEx3dSN9lmUuUDoOjJOdzs5YTYqHSoOXFVIEPqvn1iAmeJcvj//VuJYoU40\n44Ge\r\n=Bgmz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d1aaf5edd2a8bfd34d05df3e3c52dec6affd6812","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1fbf5bd1d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1fbf5bd1d.0_1576177136543_0.08745059499616525","host":"s3://npm-registry-packages"}},"5.0.0-canary.b723dfa78.0":{"name":"@material/auto-init","version":"5.0.0-canary.b723dfa78.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b723dfa78.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"effbd0a2160f3ac94ffa41c773f72c79abc95d09","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b723dfa78.0.tgz","fileCount":14,"integrity":"sha512-8aGNjclM5Rp+rJlIYjYlQXS6JLGAD7zFm8DAChuu/pIzIvohwJYjkZNEBUuw7jazeX0v6TYFXnH1FEC9vrIqsA==","signatures":[{"sig":"MEUCIQDplgvEpXOWbIPvhQZuRVRHBlctlMvTDxz6qlQ4bMv5fgIgL2U+n4hepTW+0Ty37HigzJRs5+8A48GYLbRsCkNPlLI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8p51CRA9TVsSAnZWagAAmaEP/R3ft/kvfqU2FEa5c+Zv\nTHLYAv0YNae/nYaS1zDbyJhazJkYSzuCT8WU1vr5Wy1HzczSwCjpP/25Xiwq\nOryP+rA5sdyPr0X0CunA/SITlqihvzenZbEU4Yi6pfYuhlphL+JniNqwUzRB\nfDds3duvvYtL9YswpQ/H+CMigtpA8EjSjAYtL9rOgZojwzhMgkFOmTwjWati\nJPBxeJmrWj3FvOUIAtL6d//52Ntd4N+1B7yhthicj+VIdF0+01/5397xuzYb\nBkBC05Kbk0mtnjSiaZME/rGsRr24utOfUB5jfYkl0b/OpQud+iKVZ2Q5dIy3\n0R2THWSTJQrXs6iXeGtzC/pXJZ5wM9FXt0Ey5lxniPaY8li2UH4Qtyqoyl17\nlvQ1TcKwEbGbSPijM4pMf+i5otoMC04g7GJPHqwGm8AN/iQopuYvxtT/CABK\nDSo3fTv9/OBAnPUzjLXsQ467SI4mWkeoZivwsm+K84oanxrSTp2AfV32fW7l\n7QwR4RnTuV8zD7uigjKaemidGAPPPYjvW+R0I0Cr1Mv0Upp4cLyEwMA+kq7s\nDWBwzWmVMsLBkFfFeV5i0tj5kGxtF8ydehSU/mFPs7mjB3UJvPNUs/EbTrRD\nX8DyOfJ5Dz+Zc/LJlpVnYLOit2OiE9QgMisljdd42QJsWvkZ1+Y7EFftfFfQ\nBhUv\r\n=HV2G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"643046d4c1ac458ec8eb1623c5951b3c9a17d2d0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b723dfa78.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b723dfa78.0_1576181364811_0.6146090331463265","host":"s3://npm-registry-packages"}},"5.0.0-canary.1c494e567.0":{"name":"@material/auto-init","version":"5.0.0-canary.1c494e567.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1c494e567.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"213f095da51286eb67684f3243bfd00748a10be5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1c494e567.0.tgz","fileCount":14,"integrity":"sha512-Uxszze+Va482BslPgd1numO1X7TitcPGlCfUvmxaOlG7XKsYLNj8gIZt1tgr5MCJtYoUbhsYTZd3OM64eFGcXQ==","signatures":[{"sig":"MEUCIQCN7V5wgbfNZ4EKsvaua0bhuniwbQR6L5HAAMiYaMKXhAIgfx1wg6BIyqkBjj/K4IPBZH/u6LJrtzBAGffs17q3UiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8s75CRA9TVsSAnZWagAASU8P/itb/NO9lLdDg8ZjrCrQ\nLwBzQd/F25KKdJR4oWjti55jn23T/X2MLly647JsoN+AKewC5IaYce6IJdyc\nPodADe9q3X4ABZiDaRKIlgxu+9uDI6udSbjtrOwFl+qrizkSmb3P04ABk3RT\nS2yi/C3MeOSO1Hy0iSH7Bvpvn1Z6EYdrtTiqjzPXt1Awbu4hdgsm0skqKfCb\n2nNTZXl2uajvagIYYpJ1MHFmRdJ2qPTyAOz9IXhcjU4nubo9yCo9/O6PQcZV\nKtuMrqRbVByQTqR6SPs6K4oXpNJMHnKVKl3x62jWpKaVwRSBNrD+CHb7qOvD\nFGTthMp1k3PeDzswFyuhabM2GlFkdejvgoEyASzr/jKPUkuuv5Z9eANKe7zi\nI/o1wVtlfzROwJvtL7nZLoI30KWOCLjrdaRLyOEp8IhjORv+BgIcxyWmAklz\nbtqWC+cqr7r3t6zxg81dW/EHOTuI2iNJXi78dLT7JZF660QXWsFlPr3p7tGz\nspOrH/78rE9Iu7TCJSHfXovC75jT+5uEqtgkZNdZtIRkt9JGds0YbV8chy12\n8SV21gzVqauS1clJ26jyjvwu7E/9l4u+f9YadNozLxydpi9MhnSMDa9kuMxo\nrLpt+6soqmVNIDwNjYPYsjCrz/HXh3CMb2dhfeYl1ORrFdcZ6tBCzndkPnBf\n5H6q\r\n=Gwti\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7e01eeb35d8a54be431b39b46b389f3b26262e7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1c494e567.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1c494e567.0_1576193784980_0.6450582131013001","host":"s3://npm-registry-packages"}},"5.0.0-canary.c9e98a125.0":{"name":"@material/auto-init","version":"5.0.0-canary.c9e98a125.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c9e98a125.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c0fb5fe779e9b49b0f7fcfab2bf39bb1f9315650","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c9e98a125.0.tgz","fileCount":14,"integrity":"sha512-f5ikGIMerlrO6g94QrcdYW+NvYIQrsGtsJd2IkQYcFuHdupzuRzLx+7YzlZ5hohx8Is3vsbgdePqt92SyTefAw==","signatures":[{"sig":"MEUCICejPyeImFRys3xol7n62BiVZVkyr0GoEgkrIRHY2nEjAiEA1I7mRxcyzC5McI62xrpArKGh1KP8mayOG3yfuzfcoJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+RnTCRA9TVsSAnZWagAAr6oP/1fI5yWj6QPgTuGaXr8m\n7DKR09Ku8Q4fW7w9pTIwoLt2XbRp6njKWmxOWy28jqVduiy5m6WHq/5ctTZx\nQea4OS6x4VFauuySKY7KrOnyJuePGPaPtdnvRvhX0q9evvDk+YPPCNl1oCNs\n3yOKQ4rqLRfCcE6hRN6KksR65KEpaU2xYNARrwgjzuL7+ElaaWKG2sY1THla\n57FXAbFHPZ3cw4DinsHCC7d0T1Ba6DXBgQfNfoLt8AvZ7UUUlV0JRm75JlJL\nI+Ek0Y2OvUlzoN9uL/NysA/b6auQrdSagwJ1ZqroN/fMkGOiefUKRSxiscAR\n5+OKI8wtxMeIzYf5q4ccrp5HivBEiKDmsrCoNa0mlhtR6/MAqW4mKGF2Z0eS\n+2dC7AZgrt8uFB0a98zmJU7RkpVEQQMr6FJXJAk5PRSu6tKHRYU3t9eM4+zR\nF5RZswqmtf240uJf0h55v8J/YQFGrQHTZVbhV0AMMUzzvBRX1IgWwsXyBsaX\nttj+28sRTlLlPSLmOfwXitsCrQrzFHO9NJkCONSiUp8mgtrtInN3Jo8ts4xE\nym4bbSojjBg+te2xI6LAB/uPOwkV0RrCFDT5dmdypY2nPLWIO7MFhjWCPCes\n/1DpPjXROqp7bPZsARIPKQF+WZfK326242/vFD7dJ5cDTh5yo0TaNv77s+Pf\nh8Jl\r\n=ELlf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34b4d9d0fdd6b65308344880ca9abcb67a41ec58","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.17.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c9e98a125.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c9e98a125.0_1576606163150_0.25738101491713916","host":"s3://npm-registry-packages"}},"5.0.0-canary.5ffe8f7e3.0":{"name":"@material/auto-init","version":"5.0.0-canary.5ffe8f7e3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5ffe8f7e3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49cce0f1dc9dc3cf5dfb2b5c6a8d033b7ae841b8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5ffe8f7e3.0.tgz","fileCount":14,"integrity":"sha512-v4t1pOqQ+K1Crw76htOMiDUDWh2sBrQZE0/HW/sOhgDRjrKJKX1JTxCCx38Ib4qdKJNSTgig6JMe04qe8ZHtRg==","signatures":[{"sig":"MEYCIQDYGEp0/UdvXfkiXlkJja6qG8urm3HQtZU2NiYq67PxgAIhAN7cHLq0BejL+LbEtdlM7Uf2D9LzzIR0W7fYizG/iZ/8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+VebCRA9TVsSAnZWagAAwp8P/jYmqGo/G76dahoGtbAQ\nNTrxFcZ21ErELvU43LOD4QsjwvsdrCLxzjiz8cEBrcW0NzkmvDlRCvF4UhxY\n4vuwrjmIf+diI9HAsmW717+VmLiUzU6tvdBFqfHcAaJ8EzcYbrUavtCRB/CQ\n0zA+YJUmVw8PTZGfC1KwpCR4cBcGKAUKPizxMaQpS1FFjLM+ZF26hJ+5/4V1\nKKZDUwEJwNRVvDOFlaIe4LfjGUvd4oslYlRAFiJPIK1sVyVrVAskCQn5TMXh\nyVr6cz+ECCm3mWCuD171ljjRxqTS3s33PoKV3qiEKdXoG0HdE4yxRz4uPtA3\nxEoRrBYMwSU+6uKa3GUSVX+GCA5jAynrMMllxDoW4MJM4HERh7Ny3t/ynwHo\nDjWnbLUsbSG8dSV9YDKZfTN2DKy4hTV+/K+p8GWVxtP0smCLDufepuKV7Oc8\nTE+C4S0aushORVBOZ2yqvXd0QRL7zmOmNgBe4LFT0bNTfAFcQHQIs7Nrioj3\nYyErOgYLJA9HiGgkRk1t7HZ6eEnrRchdmRfIajbSqqvcojD/NK/fN0TKEfsc\nLSd9zeGvuyXjY+ueelHAlNkCyBbD8+zb0shomHgjfmDe6dDGmDewOuq57Iyj\nnbaTSZS4EXwImeL2EnNCo7PhP1uJo+AbKjJpPCUZhEH4yK3rv06rnZ92WbBw\nIsQ/\r\n=kAqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"21e7c11057bb3bfef94ff10e24676b9da6f427b4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5ffe8f7e3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5ffe8f7e3.0_1576621979098_0.2748631771478145","host":"s3://npm-registry-packages"}},"5.0.0-canary.47949b08e.0":{"name":"@material/auto-init","version":"5.0.0-canary.47949b08e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.47949b08e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6685ecd1db5e609ebb2618e5efc6acaf2a26de5e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.47949b08e.0.tgz","fileCount":14,"integrity":"sha512-GLcxFE41svCE2v0An0MdKGoCaL1/T8y4wIZnxJReEVJcmJRblujTaa9/Weq+F45KrQXspHS41EzoJrAwr1BaSA==","signatures":[{"sig":"MEQCIHSQTOtOitxtTzSU/Uv9KwnjB/QIHUHiLuM0kH81YrmbAiAtJ7RBVXAjmLHPP+E0SFnE+CvYri/M4ReTp21N3p5TWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+mR+CRA9TVsSAnZWagAAoNQP/1thaBSqVYCK1M7OLr6N\ngtrmqF/25PLYLW6Y5PRlQ32YMtwljP13DVV8rVHse0/4tcEbFnosdSaBoK8K\nQcxV3H/3RcGaic9z+8LvU5RDVo6UIIKt7M71bTQD9yppfJe7x3n5CT0Sj7WT\neU7g6yKjufWQ+9DU2fS3ATN4wnWfLwBoOJZtDCivCCY1WYrI89qC99Q+peCF\nAtpcWk/x0HrEYwPwgIwsRoewnYOibaW4p5tyQn0R5PsJcRoj1faSd1XFNVaJ\nPA6OYf7qZap1FLQDOzNpFfbVzlBeW53NP/n2n74a+lSpLTPQvEbx5WiTgyxJ\nzphGSbcyRlVBuzMhM/xbEkUv74I0aiYUoyjdUw/JUb4Bs8TmtOuTu33fH3qv\n1BtWgrMuaLGV/E/1c0nLYkVeIWSogfrvSynqSlQnjaL+wGxmGLLv6DmZriao\nIGeqZOZdP4JsJh2mXLx/sMb9BrPk3h6r1GG47Q6P+/NsrLiT2g5qIrXXilC8\n3KemuGTlvi6ov7CEzWGbb4gPypdhtuD8hUm9vHavNdvjwR6K5b/m/K+RVcKg\nehFcXaA9qJ2i1wTicFHQmw+Znw5cPWNYHDSeaGKuc4+HPbUY+0OjqgBW8Pzz\n1uNHQ3U6uLFmEB9p07wzNTT2S9Uf2mQTCPdhltuWxlRvKtjcNiqxPJzufgsM\n4IiI\r\n=h7Uh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc8ea470b79b9134800af9e8866b99949c575024","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.47949b08e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.47949b08e.0_1576690814557_0.2646442607531414","host":"s3://npm-registry-packages"}},"5.0.0-canary.b240bcc1b.0":{"name":"@material/auto-init","version":"5.0.0-canary.b240bcc1b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b240bcc1b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"09685e498abd65fa872580351dc04e164e755f19","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b240bcc1b.0.tgz","fileCount":14,"integrity":"sha512-yCpKgYDWsgAJQ8Ngq7Os2qgHq66dEAc6Srpqwhri7cP2RP9B4V2d5dzXUqTqC7hIQUbVPwuX9TnwJ+ZEkUfVLg==","signatures":[{"sig":"MEYCIQCfTaXdN8MW0jWH0RiIWCynFn2PuZcLIPUkoH3jgilbxAIhAN1vQ5SCBBueNMxIvb/d935Ro8MG3+8fxN7zLLGV7zQZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+nsHCRA9TVsSAnZWagAAZnsQAKN+EBmgEoVRYzA/kcGn\n45wiXZlxl/SBJed1BbZuyVU+qjnYrPFSK3JzGbTprf8oEjw87xMLzYrC6rKS\nEzb6n2ipih2cMgODdsQY7Ysj2d+v0IVyUYn68AElhf7tdcFhUvZubqgI6+sH\ncO+xgqjzPWIKH0ljm7H8C8GPk9bUd1BW1wjE58JBeRHKxXfZzF6eDK4kMO7p\nwqKA/b/y0O19quk6ODL6fzypKREGLWiAy+NzKLnSi5uQtnmn7GtKGT5Ib3nQ\nC0CtzStrXlURDL4ut2p1Zm9kuzEhjcOTf55hJQryNwKc683wOFcxQnYGF9qI\nj/zOd6haPzXE/Kgg3AU3xjuJ0RFKXPgE6xoTwMYBEX8rvcZGVvsYuPjx2iiF\nYm1McBxNTMpTYYAQ91ShkXWrWdR3+sZoE0SwDDYQ/knTpVJPTQznRx0s7Hox\ngYxPcEDysTthwf5LNLVdPKHGxgIdafgjYhTI4XBW7ULow4KL7ai2wl65b79N\nkcirqIxvAtV8afXgroNLLmbrrIfEQSPlFddzPeVNoxjT9bGH1CojksgBbE4b\nibGX98qvh8lgFJQ6ArTusIU1Mjnrk+cDSnFuMSC1hV2ec1mhymkpvJq1nSQi\ngFaLZt52LJPN55MHdm0r1uVJ+qJEUEBjf8Gd+y3Is3kgOJAB/pajB9vaZAVi\njGFm\r\n=+h7z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9915c413ced383747e1ca7f2069e170e38517b46","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b240bcc1b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b240bcc1b.0_1576696583302_0.9006078854356365","host":"s3://npm-registry-packages"}},"5.0.0-canary.391674a26.0":{"name":"@material/auto-init","version":"5.0.0-canary.391674a26.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.391674a26.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d7c9876140fa500d0c6a1d3c6e6f157022481e4d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.391674a26.0.tgz","fileCount":14,"integrity":"sha512-920Q2s9HaeZvsIPuhU7qwEg6c5pzkMJy9+dZYo1Gp+D/0dRPpa8XOgzJim3P1cnH0/Q5VqfehQHL49dGmLNxCg==","signatures":[{"sig":"MEUCIQCr6b9Ff6FuMpJP55XChw9B3BZRvhjnmWiVtKAJM7NYMAIgBQFyiYSActON0aIfp+2jJiYCUcksH1C2uS8MKPF6hZQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+nsSCRA9TVsSAnZWagAAYT0P/3k1wQwpU6uaM7oin+1t\n2ESHKuSj0p38tCZ/0T1qI+IECw0CtYKwZLZlVSNfTblc0GUuj5LD+yN7vBWH\n0/11NqqVH+zlIZ9X8j6lYzALQ2XD42qgJ4llIOCUgJb8TRu3OKFHJQO/7Se/\niOF0J3D2/Gk4hLyMI3u/Mmg8KeZGuiiBSwEXOVeXgHM/iDp9NoPdkWPPisJT\n+QayxQ9HL/0AiRrFpu4OAf+kRti4oEQMkdXqR+7TmL7/UR1saWakfR5qSias\naV275/esHPeUxcoo6bqzbglsKg3D5Bp6+LrTA02VZYDu2nTAVDtXJd93p80g\nMJc0HFrRb4d8Glg9kuXKZrmHdewI7fVzPqeq8GxHUneF1pu4Ev8+aC5z4L3x\nGXgXVBGiKOXroYjWMJdAIXEnKf/OFDs3crxLSdrRO2PB+9D87ofE4WDVSYRw\n7plJW9vgoH1pHeIUAxTfPRDs/3UIW3ZXsHOgWajeoEI4CTIHmU6ir84jNtAE\nsBN1oh1tKBUiBB6o/Qt7rxmMz30qXWup2iRyIfvKrjDABDqKCmnlWZqnJn7+\nJJL7F7WQZcUu2xl73fbm2U7uycyjiHtzl1A3w+dt5a8vpWIPr2JNI2DbGWWc\nkplBzYLB4FIvgDvp6ODHyvsb2qmJAG3MqKmeWu3Y/0pUDmrkSRR3u4PLcnmx\njiss\r\n=HRCp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aa67ddaa5956be1096b1d442788cd4a5565d7598","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.391674a26.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.391674a26.0_1576696594119_0.14920758309734072","host":"s3://npm-registry-packages"}},"5.0.0-canary.c4837746c.0":{"name":"@material/auto-init","version":"5.0.0-canary.c4837746c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c4837746c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fc6a79283ec0dbe1f56763c07814b922c49ef61d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c4837746c.0.tgz","fileCount":14,"integrity":"sha512-i4sg//fxJ3AyF1PJhkpF93xK5++uxdqIwrT7vNMh4qQwSZ3n+LrO3xQVnOjT8/zB1UvvNiV9ReZBKOrTu5gArw==","signatures":[{"sig":"MEUCIQC2SLH3zbC8Lpqx9TfvPXuds/KEa/hZ1zyyd3QFtxt5hAIgYIsEmLBmRcHtRjL1ZFBzjqLiPowB2XQFP3Z/UTQ/jnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+n9GCRA9TVsSAnZWagAAkV8P/Rg/IpU2wuVdgS//R+qB\nrs1nQ4juGHssp7f+eZOTb7zadOAZW6kJ9ya/RM+XhU/sKBFuCBU0+9YUaKIH\noc+LqdaiR7YFpCN5r258IvGQQTy0JTKAi1308HL4AtcxjVNoFRVnWhkzzKAU\nJS8NEqxVcb+7PqOBgseHbZBpnplW5NgnaG/zRFncBeanZ5a0O9pua5n/3q/k\nSmpgRgOs6sP9NofI8bXTl380nhvE/rxO+HEuuevgRyPxtFLlGftYfTCiYGdv\nZ9w8SU312KbUP9uP12AS1WH/VQa7WVX0tm+r6gTbKmCY12toh8jTI+fFhSdg\nDNvp9qEurmmWLIzGFhroat7U5v/7vdhDxWshk28uQ5MYUUapnK7d/Xu5T679\nnyIbvAD8MYM5tTEGFPZvLOP0vKUFohouBfdKywi7Jv80cixJO3HcUwGznpJa\n9pJV8yQT2BQnJ/xJInRNRM1pF1NZeS7G0j7eK/vDsP3kPeqH0de4kYoOtVeP\nSDazQtQyVUUCAcMEzCAat5S/U+i9jBA9SC6UKP7gVg7mErAngwkg7M1JoI/6\nISdd2FXO00+F1xrBthg2smIjqCMA457SEH6JVde4pHmXa8ZfGeL7YOZgQM4J\nkUDyMwxVW3kwV0MyjuKBHS7NrrQX+2IN9wc3wGKiLcLybEkLcfmF8+DijZen\n46EN\r\n=3rUk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"44ccab29aa0b806ec249d5f5117ac9f5d82fc7ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c4837746c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c4837746c.0_1576697670292_0.28545530166566757","host":"s3://npm-registry-packages"}},"5.0.0-canary.e41a70425.0":{"name":"@material/auto-init","version":"5.0.0-canary.e41a70425.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.e41a70425.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04d0706b4904f586b0b906caf8acf6094672736e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.e41a70425.0.tgz","fileCount":14,"integrity":"sha512-sEMzO8g4VgRxnZH5XyS+ySyVEZFgrpbcZGu+hdV/0XV4Wk7dij0l2uFZeTXuyxeV8quGpD6mnmcTHTZhg61pMA==","signatures":[{"sig":"MEUCIQCJBeeN/s343vPB7iD8Ft6eBWE5lCSKax3YClLMxxxODwIgbdvWbscZn+RLDUpdet6A6hDNx/LcrP1ZBP8rdYa8uG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+rQSCRA9TVsSAnZWagAABJ4P/18cDF/e0OiHInZ2V6Lh\npFUnwa4V695oU0Zmc14Xo3VbHUj4RJ6cWL035NvUjffNHNIhk9faujOAIHpG\n88OJa7qIWm2s3WPWpKiLfq0rOgJsgawhooTuuINc4CgFFVKsW/C6urudIras\nxaDHQ2Adhp9P8PkTwadyJ4O3Hcr2Bth9LMeBiR3Of7jYbhcHbBB2iFfwtl84\nraGKWS2oU2zsTdEteClKVPZztNgooUWO99sek1ebE0/ncr9M/dIsoKope3SE\nWJzqjNeweM8IRYUPCJPQGFjX5PE2XAgKhXOn2TUs0cBsKAzgXQAY57jsFqHa\ncFIHhM3sljdOzgyeKFEaIrsl42m0wtfUzqh7ce2nSaYs8GpoS9f6kPHLbGBM\nC0gBMOgmq2wDhxumpHNunUrmHoKlo5FS7KXVChtVASSTb9WyijA2rpRTMHxI\n26NjQcUhNbtmllQ7Cp3MUUc1tejqP4jB/HZsROP9mLEV7TlEAimkhH6l1AVr\nJZOpl7WuyORu/NqUYLOYpom9Vot9T/3PiVqikIcbNO4hdrA/MmkO6KKJRdsP\n4Id603tp7DQPVYoF846Az8zFWQn1UDZKCpbZ6YuqCFaTIQ8MovJ9ePffLvkq\nanLeREm/e5Vt+iqEY1W+ofs2YsS41ZfKjoq0010Fm9e5XyIRAcDj9cMrbnLz\nV1qj\r\n=NTaI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e938a63bb3297bc73cdf8f1f206885e2ec84a6c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.e41a70425.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.e41a70425.0_1576711186208_0.02675783078753291","host":"s3://npm-registry-packages"}},"5.0.0-canary.bac43eb43.0":{"name":"@material/auto-init","version":"5.0.0-canary.bac43eb43.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.bac43eb43.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c01742de892c1231f229f550b1391c8ae4102660","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.bac43eb43.0.tgz","fileCount":14,"integrity":"sha512-B+WLCMn/GyrWmipiOvLt1x1z/BGjf7WumLr6W6a/hxTZAvDZL93fngm/0Xe7oLuRP2c7Z9hjTgdiqN7ezdmNxw==","signatures":[{"sig":"MEUCIEY2jBSkXzamrQfzvFVGIAw4Z4iHArl7rlS7Y2oQ1T/1AiEA+l8ig46RjQDOq3DD151JVRCTrV5Pl4L8wOh8LLIoFVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+rT5CRA9TVsSAnZWagAAELwP/3VCqR+za927+SN6iPt4\ne4pOn/uaPmmUpcqJJ5hou9h+I/KB/tfvS0z8oyh+RlN8iJpKGnuC3VzhGpWG\nBZ3zAN13OX4Zmqa9wKJUmhs8AZ8ehKGRtZgZeHNDmhhmfoJfZvquwwmjGFXf\nxdlTc23eMIfLR9B2IQZMewMRSE5WtWGntw1ID4mpUKb32TX4YixI8mp9RLaD\nAvhXOkVPF1GZ6ke4RseptW6znSeyFYJ4COzEmK1TUo5fl5+vy17zzevjPPha\nshpuRllmstYYZ4aitZH7ipmJ8WHwthhMmq2f6hkgx9fqvE8ML+5329gl1eZS\nralBmUrT8CMNVGySBFyXf/XrM6JxoUn82qQzxBGGqwHRWI2WmYAwAkJws0Xl\nVWBm907tjF0qvHSCZrADKSZxEQPdgyrwDRqcWM26i2Htk4+KJV344HfEpno0\nMs31FjSK7pSoMVFeiGgh+DkPmpdbHXzPqTSG9hVg420NSs5wwoRGPOuFcLZg\ndPXZRBIDy0dxr2rzwefG55tcMwYLWvWWrAxVXUyMUHJ9ArXgUNvTLQGQVoKu\nZf/sH5QnY2oMFL5lu8UvIZC8Jp7vnsTXlOM/mYHdlqNPoB0I4gLhz8+wY37L\nYNxObfh7rWO8p4Rqlc03PHMtOLea+jiwRznCW/S+9fiqJKQG6mVTwk2Qa66i\npo4I\r\n=Drjq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7035dfa39edc06f1b58f72c5e285bd2998747232","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.bac43eb43.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.bac43eb43.0_1576711416665_0.11664706192692154","host":"s3://npm-registry-packages"}},"5.0.0-canary.2e491de55.0":{"name":"@material/auto-init","version":"5.0.0-canary.2e491de55.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.2e491de55.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf14fe798df3d69c39a9d5cb4ff1adcf75cedcd1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.2e491de55.0.tgz","fileCount":14,"integrity":"sha512-kWE1bji+jEh0C4Kf+vND+A3Jhnp81vC+wzImXFaIEyVRFErMGk+5QyKqCBwQb3cS3pTTWv4FFeswdl5/c7tJdQ==","signatures":[{"sig":"MEUCIAHIGv/t8k28r/nhkVxnNNrhXf8p2mMaX8z8EItxdjBQAiEAr5F37u+RBq7Chd2joUlb5kqyqGSr2F6uFHnTv0m9w2U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+1WyCRA9TVsSAnZWagAAhK0P/RRy/UkLua68AvtteBr5\nWh2kC3XGq4E4pOAVWSwmpKsQbjMNxCN0fr2uHiahhB5cNJSuIfA+LMyz6e9W\nxn2UZH/OWJykP2x+o+ig1KAHY0Dgw5pw9frUQRxVBljApUqQ3+7XCo0OmBup\nNTJaqd8p3XH+qnTq7CU+0l0gveEifrWcZFLw+yGskCh0qqP4pjp55HEwpbyR\n8Gpx4hMCdEbDIARBcpKulSOi7s6/MpNmJdj8rkPJLzCrrnO8/uCv1zdwaGlN\nIigpxCs9qWsIeQ8ojPPSJ7yY7KxakK4ZiSVLcw9E9ZBtILjCybAx1Iva+6IR\njMl+n+7gYRt7SSO6pCgu0HNXaIEhtjLGRGJv0gl1sFnUgKT4crgHtsE964kk\ndtVqeopbhCmzCqm21YWNmKuDeJIaDtPzNFkf8IT0+oy5RyoxxsblE5Y8SEnM\nU3LpPASOdjBHm+SO8arkJigaSZGZQCBtpQvhUPmGdQgNrHfb/Hvub5ckWFOy\nCnIAvTo2xLa8jDFrK/7Mw7OmXOyy6JX0AEQg969mnsKXlRDugLnqr9gQupiA\nJxw7NveM4voIdhcJoIJt8y63fpUA6t82gKF88NqzGxrA0w+tNXD9oUsNf72d\nt5SzRZSMTWlPhjzs+ARVii2Yzhdaj+O4PJMROM44zhSt3E9NxlcxR+/tr5xj\n44ol\r\n=/o6f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"731b98f2f9caf1251d3a82a3abe09828a92eb434","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.2e491de55.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.2e491de55.0_1576752562024_0.5595867346098535","host":"s3://npm-registry-packages"}},"5.0.0-canary.ae101c144.0":{"name":"@material/auto-init","version":"5.0.0-canary.ae101c144.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ae101c144.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95078727e4cff271bde6920544a90132622967a6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ae101c144.0.tgz","fileCount":14,"integrity":"sha512-IYABLlZawRdFls+B1ke1ycR5xpclxQqJupyEnSBJ5x1uxStXQ027tdmM6R1LT6WUeFj6rvW7EcN1dHLValwWkg==","signatures":[{"sig":"MEYCIQCDSUUe/ZcLMW7F/MCHApoceVO9jHorgsQCxvFTseQiFQIhAM3ENXAESG9MxDwf0G1GGlxgXeMWfj2eKkT0EYULKPRl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+6Q4CRA9TVsSAnZWagAACVMP/iF9fzvNsYrH6TK1W6Jr\nCLbhUpYn0uNW0VXxoMahM0cabg74wRjLkdYo5WovVbegh46ED5ySqKcFuFY8\n+OXf63GWEgpmYyjh8FxrGDgB6A6X3HBBjiHFzrEEsY7QUTJwVNGtGtVu5aFn\n20p+pckgHw15uxtD1JHnPd1+79kU6Y2IVC9+2aaC0gQs1HNWiRopOUCdk6uu\nYi2meEacQpWte2P97AfbnbNoenVp9qWk3LhywXGyhSMoFe97pyPkLZWEP80B\nn78KN0BGscNzUcgpfca44UNsm3z9D/tWeXwi44sEVqXlXtfN5RZZJDg3hzPx\nLpB6znl91qnsdKR0dunUeW3UX/OhzPM0mnzw//617AlBKWN0hUlRtc9JCDPX\nJ8RKEBmjGHhC3K9UgkCSeONhLAMN+6BNq862sPgx7aNyUEFweoJOWEJj6S5n\n+Ss0Ht0VX5SawyZz5qVeVvmw+lhrnH1mmfZcpYCnXguiHUYQORKNnUaflZQj\nUMVTen+vQEyFV30U8O6pVYws6hc7D0SsrLu3T4J2JWChbSMROu39/8qNBjXt\ns7B0g4bzhkj8eR68/0xj7rI1fpUkNpBQyRiFhoMVUf/pKdP/pvTBy5qYxnRl\nHe0lFA/5bN0xpQVMU7xniE3f3R1UM1lpUsimnIRzgMD8jtK9uLcM8/fTv0O2\ne8Pj\r\n=a197\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d11f348d85fc15df510c3e33822ce23f44ee661c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ae101c144.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ae101c144.0_1576772663519_0.23400312511939325","host":"s3://npm-registry-packages"}},"5.0.0-canary.a51c31f26.0":{"name":"@material/auto-init","version":"5.0.0-canary.a51c31f26.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a51c31f26.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"81c4fbb1ac37bdaf1d310d73b2743f090bd0acb1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a51c31f26.0.tgz","fileCount":14,"integrity":"sha512-rYCIIp+klZT0sFZg10a+Tqit40oK9hyadxStoxTlhTUYQCR+CmAmmHrVv4hSEGUP0oQnKtvnfuovVzLpj4suMg==","signatures":[{"sig":"MEUCIAJSgxBjN62XRyfKS5Tqd4KQhC2JtiH1a9rwx9Zbms0VAiEAxaEM+A8bmz49MjqR+poUomjf2Nfs7F+ybqDgsWSJdwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+6/VCRA9TVsSAnZWagAA1EkP/jz49yxEXOxD9pflsmF2\nLXw6z/4B+xxR/3Wy3qPGDOpQizUQhVqNohjw0syaRXt96K/WFobYoE9UEAFu\ndZtL3EkTlaJMYuNEYV/eMmLtHzIgjZnDEwe8GpSXY+a87SJ5trAFlD5ida3m\nkjs95rJQeqdIX5lHdD6/4s+424cEIUyQrY1OwqHl5oJH41iL2auMkvGpYBpM\nJIaouelo3NvTdLmIJD9qnhAQh9hpxNNVXb5yHY1OMAEmyMeV0pjkZrdUdbXd\n/muT5fTWy3EXDtc+K9OoL+qRIX40JyYbg1ToR8w56sWVeULhkZcaA3Hth1+V\nGSJ4K9ilMdyNQ/Qbh/dHPeOa02najPHghz31geIwiBjovVLNHhmSrHGUz5MZ\nv/ZQYpuBtahuJObIQNC9gylgp3LQIdmVi5CO15ONIyMNZio/62DSS6O8gpDh\nCBCZhEp9w6wyAaB28RM5S1lXGw6te4GiH5s4EyqFK0W5qq4wmU1LHrb8wGTF\nDqH8wxW0ZCiTNg2QKELdP1jTRDxfzLYZ4Uii7WyDqsz3CCUYtFEdkCP3MmQj\n098BYpeLKc3vnT8IfhS8xRZP4/Zc7LmmmyHjgejwwxBxuu6VXmJPXzWXGWIj\nOwfVgpSNHDzApfsLIhyVwoqnnRon3lYI/IiN8Je+BKjmNNmnkFhG2UkW/BSg\nuNUC\r\n=PJZh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e2dd52b70a7e3cd011647222c15955dd4535cd6d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a51c31f26.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a51c31f26.0_1576775637539_0.9479321676596959","host":"s3://npm-registry-packages"}},"5.0.0-canary.21fc4e13b.0":{"name":"@material/auto-init","version":"5.0.0-canary.21fc4e13b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.21fc4e13b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3c572f39a7a9affe3770f815f4134070a986d942","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.21fc4e13b.0.tgz","fileCount":14,"integrity":"sha512-ddqiNgBkmBHltCvWkRGPlpybv0NEEczr/eu90oOCFaeSxHerXLwvE7Zqsxe48al0QVlce8ld2YTyV75tnIY6Zg==","signatures":[{"sig":"MEUCIHB431h+XmmVgYMlQhTfRwIg1HgVmWsmYthBmEt9cCxVAiEAmTRmncsaGaZWT1cv1BKNVvBWbyAlnWoiObnTD8aowhI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd++sYCRA9TVsSAnZWagAAeskP/2j1Kn/3yHQ9lHOY2lG2\nqKZqchpbF+B/L8+mkmftRvNVtX0QEv5LpWBShcYeha1C2ulqbUNk85LVibbq\n453mOvofrG+d9kzdryxQ9535VZf4EAaYT1NHgbMpLk4AiA9XGRO7wlmkdeoN\n9/aKpzvrPNWcgJuxyZgigLVcDR0ZbEM8afvE+sNqo96CMnWJiu7A4ViLM5jK\n7JN3Mym7n2Od69J3FqwOYq3uOT1PH2vBof6yD08KKiUXbmV+svxszS0azPln\n6/EvycYrrmab8YI3yBBuSLbq4tthXq5/aw9o68KG8dRqP4NN6/5QsT09D03g\nPevyNV9HOYdr9jXDCT6ls/dqjEBm9vIghI/Tn4ALSQdTSyTDmlDTIZDv2lFT\nfFxI2WbCbT5lP1KZUOVhwOZwfnVjVjRUJH0uQTIOGWwMYg3hjy6CFw6/Q546\nVODTNd32X3zv9gzfiFqLjYZ7SrUBM1Vt8bxf7mvcFQi6Pkt0tiU/fOuOnnAb\ndTEmQuQwiovFQw8GGARJHP+W2dQVh1x9u4xug/A/InFS42CPEXYr3PPQo+92\nRgtai5CU6SRuK+HAjGjfKaqUDZvFjTtKLZCLb77qDva5jxwjS4tAP4gcZit/\nMgB+yVpzLvkMKRZCP9vL19kAZFFvKsROS8GqqyTvEBfKUeI8A+8TNjEwbwRn\nlSYY\r\n=my/x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ca71d599c2aed234cb9376ced1aadb512b071fb8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.21fc4e13b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.21fc4e13b.0_1576790807734_0.4360108391949029","host":"s3://npm-registry-packages"}},"5.0.0-canary.d2ae6e17d.0":{"name":"@material/auto-init","version":"5.0.0-canary.d2ae6e17d.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d2ae6e17d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"43d9db8d917d3377885dbdbe130456b3c46c6f89","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d2ae6e17d.0.tgz","fileCount":14,"integrity":"sha512-wvWHltvLkwoYB0unKrKpwKggt8d14AT+g+cxjHpG1xAWe4K8S+As+ZN8/jXaR7GJ/IravQlEmaqkQrfCPGqgfQ==","signatures":[{"sig":"MEQCIC+O3JAn2QPWxutTOSLehES3Kln3gka64qE6B15BnPY/AiAxwH0/TpXSLyiWDW+hcPAUgZHb3GPvPHgc4cZvTji68A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+/h4CRA9TVsSAnZWagAACF8QAJLsQKWWUbI4Y9ZqnxJp\nuQSL1I/BC8IKcYhNAEZ/YtpZDnhwOcvN1RgQiEeMATfUWs9aJ7kUGeADoZUR\nmEwuwDoT+OM+Gc5xJfOxoaUoklHMHZQn5LbaHZ0C0d3KXH/jBnViY3si3wul\n6ha/EiqYfhBmz0onX/5cOLxitxjaq8DuZ9y1n5rDNniZXSo7VHC5FsFriA9Y\n5xgmI9pxCqjOQAxeOXbutXTY4G/ZlKBwf8rbXwE7rmhGQbHRCZeoUQo3UcuE\nOjla/iqO2ErG8tWU+ZgNROdyAv2RrIb1e/vNPbRmprXa8YSywvFolBCYjjEO\n9Mkog4W+JtZzyZdeALftSWIamUv56MpDAoR0qdy8ONJwPJ+NAFu5ZCJYHybp\n/aYaNqG7nJiH5meUkHAE3DSEoSNvIlIEXYv7DuzVeNS/n51PV4MVFm9bu/RL\nqINwxG62BgsMGLtzELQlrG3ue57kkr++zPMSklfXtQJtROmh2rYIt0qQTHw4\nIgptySvtyTN2Q+zpGriWVY3r3U+bXbKzLsm0kM6cHp9wftolbXhYUFqVL9Gb\ne4ROBgJB9KLV+KuQcq44sX0xhHlP/bQtzJNzsnTZiemh+bTiuk2O5vZUOqzu\n5bYUnvSJycJRw+Fs5CNHKDQCxuB4wfRqRF1Zxp4eHXzL1WACkx5SNYOfwNb+\nP9Km\r\n=h2FQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aeb622d14d533f70c26396fb7db6c8bc48eaf8e5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d2ae6e17d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d2ae6e17d.0_1576794231707_0.7112183166192034","host":"s3://npm-registry-packages"}},"5.0.0-canary.ba30399ad.0":{"name":"@material/auto-init","version":"5.0.0-canary.ba30399ad.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ba30399ad.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08a7c3fbe9e0bab9bb273f38a8bee4cbc728e4b1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ba30399ad.0.tgz","fileCount":14,"integrity":"sha512-MzGx6qJOERhS/cO9N8l6NRE5Iy2x+YVn5JyJoB/JhMPt6LRIF2GTVgA6Tyd//PtWBHRUfqn5/IhxL5UDA1CrIA==","signatures":[{"sig":"MEQCIDwntDteVTLkp4lEtBvwAQa5F/JIpqxIX0ZW3iduaBwDAiBDHGU/QGQr/1FuZXCrchE6JioekT8RvYks/nDn5n3OUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/B9BCRA9TVsSAnZWagAATAcP/1e5XSlNwTEd009NjuHK\nzirl2S98efdUeXqQVuZD97qhtcmU6fULIlr+7eM5afRREqJQT0CC8vz7KF6h\nUSHd864sBbOudUwYDrm+qlawzq365uFtzqggff8bH+hSYHiNHusWcq3qIm4V\nkbf9T3W6tKrfSgzI099mrG8WXQTC41gPCQU1T8VoiLf4u47fkNn18QvK3S1u\nORU1CFrXsAPUfNsQDTZh28TlXjtkAelnOgQH7OHTkJcs2Ktd9WaC4gBdpIkX\nv+pjEM08j0uv9JUh6AMXDOd9LzqxlH1qfapCvdnt0+O1kGB09zVmGX296aGN\nJDmV/AOUYzJ2JmknEzECxmuL5GaQi7USDTA3rKcfAgp+7Wd/bSDGpPsRdQVx\noK/8Sq0OTjoL0nzzX+D6aE6gX5zmCDVLj+VooAoTwCCGgr+n9tRFbMgwfKLy\nZaAPv16qbajQLw3g5zuq2f5Bon2fFop6FeIDpPrKoSCvcCgGec4sXIzy4gei\nH7Byd1pJDiiQ17W155tfZke6ABFq4dG4Pi64h5ELYGFrM/aoXcMOroPesJnI\nMTdo9FSM6KPGXtMdRiFylqHqF6gy9d4+OB6Y5PhHiSjDZHx3bwkoHTtwV8Ve\nTOl4Mt8HWPar/YNCd4h0ME3v+GmzFNnpLbkNUkxUuaoaj/2dND5wwIQbDRa8\n2X1/\r\n=53GE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"75ab7f122d8d469963211d9f9591a84602711f72","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ba30399ad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ba30399ad.0_1576804161124_0.9271028814563522","host":"s3://npm-registry-packages"}},"5.0.0-canary.a08ccec35.0":{"name":"@material/auto-init","version":"5.0.0-canary.a08ccec35.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a08ccec35.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b15015be9e4a368d1aaea3ccbcfee7e15ac34cb1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a08ccec35.0.tgz","fileCount":14,"integrity":"sha512-XKanogpUCCQ1Hc3RbKJZCuwjA8U09hmC6jOulTfSaKiLRrDB7eSa0BKo6Npbzx9Fi2pwRWco+dIVF5IB3+Kxfw==","signatures":[{"sig":"MEYCIQD8FW2M9vJUaswcdf1HNnjEf+QqA9Yjb5c7AwzC1zCteQIhANrP0LQFl5or0W6h8N1/B/dKp7Lse3urBHJjkA2xMn0j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/ViiCRA9TVsSAnZWagAALr0P/11tqA7WDLxE9mpzoJM1\ndQloRy7+/cchmQpDmWJolKxV4mLYdRWgghjbNHSt2zDFgtUfGAlAiSNDJ5RE\nuSLr0WSwCTFIfbGtIz2uqzrBUYxgMy0drIdsY2lK88BoSnDH5IqSZTGRpGnE\nDURroHCyxIUrYGQSbsIIzB0sjScxUSkEMaizGLPKEyhIN1RxnCmiZjQ/u2ig\nXgZRNqU+nkDywrokjAwZk3HhpJ0QNZg2hCiAG5r1F4ZIogNsHnIm9KMjT7Yq\n7FbOQqnTOafr83u3P4Fc70o5xl+HyMplU6tL8RQy1ku4FDFHykaK5125mJuh\nAosHT0d3cQ+dVAT6x5vZVnEoTQvhHsNb4k0cDTWaB4XxRFj3Ch1pBVx1ZJKl\nGWS23kOGbL18Ty98eB4kJNtVsi0eX/Ax2KyeYsHiyOolykK0CyPDwzN6tTJ7\n4ew5WQOjlji4a+eDskmW+HnZ36AxGXD7GaKWBhRL8GX950/oqSVOy9gMHn6M\noBHd4cvwRox3091Y328NVk38CyXomBmedPxxFlmmTmcTvf1G/6l3ASk5AytB\nCmh8uXIxxwgTVp5kMTo/vtfJh46w5LG9tjTp3kqi8XZvx2ojS5M3EMWTnLa5\n1NfE26uSQJXS6L3/v5YDhFLh66c+ENxDb4pDkNPb6eCSO6jA3CzUGEHXtMdI\n8NCh\r\n=rwsx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"121f2cfbbcf425b2c92760a0fcf0301dafb14636","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a08ccec35.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a08ccec35.0_1576884385885_0.2227336624107732","host":"s3://npm-registry-packages"}},"5.0.0-canary.a2f75105e.0":{"name":"@material/auto-init","version":"5.0.0-canary.a2f75105e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a2f75105e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a8f308d52c19ba6431d74c1196e770fa78e9065d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a2f75105e.0.tgz","fileCount":14,"integrity":"sha512-7qkH66ydCRm3Fl2CwSdzENjYEOtFUGSU8vJOiIZwOsvBrNnvI7oyoITwPgeijTjwV0Qt4YXFHtv7Hg9jgzEsKQ==","signatures":[{"sig":"MEYCIQDAy1Alq5AzTY3X10l828v+5Xp45sNEu+mRSGpM0MPtqAIhALdWUuJ2G9ClCb4xflkHzCrwIwgSnfWi1Srye7pEnIQv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeARnECRA9TVsSAnZWagAAzCkP/iFqMU9krVaCTfGp830G\nrmcCl+Tu3jQ/pX9sntRdLtA/uawwWgPjS4KEE/o8dBLd7J6HlhjnDgjFZBS1\ns3hPrvS8EmN+dsjWygjx+Y0ZclxOkBZFZN4MrfFipD4tR+PCMGltgK8sVIvV\nBJGtG9q2jtT+PSSUrovCPl9rgE3S3NmMQY+7vqzZnVnID1SkBXhHwAS166kt\n8ltO19tDq6uofx6Tda82j8fHSU4qCE71whXR1F0JeFI94LRxEG3R0+K1sfzq\njK2JL1nPC185JhOdkcbY6175aQdaIQ8S0at8Yh08tsmFyXSH7Jo0c/UvAr/B\ngNJqgNhLbMmmC1/pQXIcZty43U7k7epO0vr+Bhs0r3p7nzSIw9/8p75dX6k1\nlHCW7Go+kmQ0m1QhyaNcpqo2zeObdLSR4EwW6dkzNCG9jGvjUazKLCuaCYd+\nxkcxVCPN/pKQnr3oy/rbNZqHHPneIea32IU9am+VcHPs9cxXzV/7hiJxhy5D\naoCu5T9vyUVHe1TPBR/WuBioR5Hc7Vo4AQnw1D1v1K6grHQid2/yMhMVmArq\nkuORIoyslcJ2+FxZ1ChJAYgXFBPNoo0X1OwxNvGd6YVHMGXkJSl9mXdOf5NO\nMEcb0qmBG9WutalE5lcpK0og5HXoJ976vFZnEScnqyA61D9UcSyK9i0RJGEA\nYi/X\r\n=B34+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7b2f4b595ae59e3e680ef1151ab400a3855144d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a2f75105e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a2f75105e.0_1577130435953_0.974669766906433","host":"s3://npm-registry-packages"}},"5.0.0-canary.c054a24c7.0":{"name":"@material/auto-init","version":"5.0.0-canary.c054a24c7.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c054a24c7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e1208f66526033e0409d887b08f61fc9d29f8cc5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c054a24c7.0.tgz","fileCount":14,"integrity":"sha512-v5vOF2/lxlEwdckBnMFuv2Xpqi3C3cdG7c9g0g15Y7JFI3Co6vza09yely/tZlm5GVocm5qINHHhiFqEbh7rvA==","signatures":[{"sig":"MEUCIDVxqyOFiPZnc0eSrqXq8vxzkjs50X4yXy1oC5H6tuw8AiEAibVDAig9whduhOkHIuV7dg+mKzxDO10mpfJpA1Y23SI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeATZyCRA9TVsSAnZWagAA+boP/iDUvdY3fpZgVLTER5Sk\nZqMl/r+GkzpZaS9fC5CvEVjMdmdhVF7Fa+4FHJHC+BIgG0DY0PshE9Q0bL5i\nGs7KRiihCgrgX957gFIK08S6r0VduUCW+S0m6Fq4VvvzU1j8eMSBwJFHQzOT\nDSEDsLWIrwVZcumiQ1CoCKJK3nUgmauDvC/yddIyFwfcnN8NgkkkpnjYBkoJ\nimXLRuqBx5tLD1WkFu5CT2DYfbkrcB6z8KHxHZ1z8IJF+r78nuXTHKp1VfW+\nMaFi2w7kPwOBt5w0ncGt1n+OujK07tHcaZ4wVA5MpiyIFNxp04KsPn3eHQ3a\nJTE2ohe3n9GlPv5ORxoXL7pcXGP/PJE0+SneIts+BiJuPC3KMrsbAZ2g8Ow9\nownG1EB5ZcIsU0ipFFKp0QSImmqaW9Ce75n1dIDxMcRGJ0OCuFF3LoUfAaOv\nDkCdKrHktmVdUDsZUMaHOMB3coyv8/UApJ4LvdzAVXOsJqBa9IfMxan7W6cP\nQQ1VH0pXe7Vtx7HvyA61Nwcwiqnlily79xxP5Z8p5u/6j/cKYZBBvUxh2aia\nJ5HPs9d+E5OjAizZmXQRp6KWZYkENb1e+334PtA6mFBiTYNYrU/s9ZwB1Iwo\n+8nKVg/7dGs9lQGVGj2nXinDg6MrkdkTXlLdZFX0osRvMmXeZbRUG0TrcpwZ\ntvOA\r\n=i/Bo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4e2a3c12859a131938df8918a9f43b9146056488","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c054a24c7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c054a24c7.0_1577137777553_0.21259185459322238","host":"s3://npm-registry-packages"}},"5.0.0-canary.c6808c51c.0":{"name":"@material/auto-init","version":"5.0.0-canary.c6808c51c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c6808c51c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7f2c2872c6e9f2161aaa9ade43034cb8ae9ebe04","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c6808c51c.0.tgz","fileCount":14,"integrity":"sha512-i/Qtf5EWYibWYKNs/IKFC8fjwBVPRhP8Qf0ils0Xb2alaFrVXbCgh06EFzi/185IKN4ce6Kb9BK7zJ/WHBJuvQ==","signatures":[{"sig":"MEUCIEnK6wKsIm/5/ZC2Ke9SgFuWYkHUmRsOfYFSC2N3J7fNAiEAk2oiP8ZP2zG6nceXI60JbSuPojjP7LN4ah27VmwBYN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeATeLCRA9TVsSAnZWagAAj1wP+wcNjOmXGigb0nzVu4Vl\nQp4smMo/FGZpxYAeLXI991Y+wMJWQRiI7y73tLLHFJv/AQMe68wovL/xPOgB\nvW4hgymQSvWs+B8+rI1yH4jHWzCx9CdlLHKYm9HM15Ow82eWBKXhBNfBQ7nG\nss7c+cvGHRLfCf3QsebtTA+1naLB1z5Jxgf9xTYgTnRy4wQp37opFtljqFIr\nVjnbECoryrEpEYfn7azZ6XDGYF5STxapivZWUbPJ+rhMux3aLRVEkd+rcWkh\nNbm9jJ9i2Ba05McX3UWJql101c0yw2JAoFzzEszYgfAekSLIqrJ89haciMcb\nWzzzwG/kl6BbVGIP8giJyt60ZI9G3SPsXCwHgJnbjH8xP8+D+CmDu6uuFaR5\nZkWZZo5dO8Wx7akyLQ7rMBjrVIsCJeiHp8hvBbFuAnyr95OC/cq7U7/dd/Lt\nvgEZR5JWVrUXmD5NaYXHr5LW0vPkEie0s90p2rHCy2w2WBmSeWuMKOrzhAa+\nnbF6r4Oa5JcB5VBHxaDOuws6V3/oAPUUFd0ntGegqQaj3FDCkrP8rY6PH6Zm\nPBS0i62QHBpS9g91QbaEF7tdmTC5OlKx0rJVHLZm12QHF3E6mBXv4Hpz3DGJ\n9ePcEI+OzdTEPZaaxXaRl+S9hjn42PPgCfLHRb8shRVJLdYvRKaS8FzrvDf/\n4yxX\r\n=zP+k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"02ee460be616b30da3c6d5daa7eddbc5f29d2500","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c6808c51c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c6808c51c.0_1577138059529_0.7412094180950424","host":"s3://npm-registry-packages"}},"5.0.0-canary.7bce9cf77.0":{"name":"@material/auto-init","version":"5.0.0-canary.7bce9cf77.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7bce9cf77.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c740d71e8f5b9a0c85805f4d91b1e6e8679c4939","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7bce9cf77.0.tgz","fileCount":14,"integrity":"sha512-C76lZRGFdZoD1imgyCYtzN66nHZbAdn2AwQlWGfxzie7NUx+WlkOrmVq1/TPYWpwzk+r+G8w/5SCnejszbYcpA==","signatures":[{"sig":"MEQCIDzagWWe1weEO7JhTc4wQdNmPsxQ8HbGDwPv6vQl+hsYAiBIpuPGGXXDebPmhjgRfvApNDJptIgOmZ35AzfJ17W4Jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBP+5CRA9TVsSAnZWagAAtG0P/2+WiJps64TW6uyIFSqP\n6f1X2Xv5rl74LfC0C0fr0R2DwLIQhZE+UYew/mSyZm6Ue/VtnEd7Mu2u0iqX\n+t+aTtZvHXg/ImiZkhr2kMOL8Wa2QwRdaHjPCYUMT4/RzaWO6lZ8Xr6JST15\nzk4q0VrY/NeK4KI1HO4LBpYnByoyiJF69WslFujePi4HJUY4o8aWPi7TjPEP\nxM9OeMVZyBWXWtN+zdx9WVgCHuDViuU0zNI5pkEqfw4F/W18/TtNaf1ADstz\nlKHilRpudM55XAqhJq+s6GPR5svleoapjGL6QSQM2eQO4PSiBVQOdvhCOQ8i\n/ubFMpwzgR2BLWSwgyU9Hbtof6lCP/ZbegKUgbgkkchEAY0Ks9RBAkJNS4F7\nwFvyiT51jEuPCKPiSMNjJXSsg394Eq6+4bqK1/dSQ4S/bcU+m7jr309PqoMU\n5pIhzePxjPuWIX6b1Sc551r/as7X3vyJ6I76bQvAfgEXLu3d9mpfpuuzWF5r\nEIpQoV2Pi1WqifKwOsHVsNWCjLh7XhxRnvlAh1d6Fzy7hfDgoVSDiHswK3e8\nTSlUSkVlYFU3Xko0en18fHz4AmpynHgK2zk+maBflp53TYWUs6V4utpgKWwA\nJlNcWGbg04cGPjbWe3TvbBUIgMgWFwe3lSYd4Ip4Gn31VFk2ce6Tt3Qu5CgQ\ni0uM\r\n=VYp5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f5c1996d2328a53d1fc5cffe847b04aad48432d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7bce9cf77.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7bce9cf77.0_1577385912549_0.25494685337155","host":"s3://npm-registry-packages"}},"5.0.0-canary.c92f038c3.0":{"name":"@material/auto-init","version":"5.0.0-canary.c92f038c3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c92f038c3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b5005d833fa3dc914da337696ed4d446ff2b97e8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c92f038c3.0.tgz","fileCount":14,"integrity":"sha512-eC6sN2d7uQ3XpI+toQD8js532IHUP0svsM6YvSWV84j862HN+zvESrn7GT2QHw6WzSEOkp1JoEWw4jZ2Ev8aTw==","signatures":[{"sig":"MEUCIQDM6iVPaJfPG2rWdbVABJB1ghSAjerI6JFblWLkM8XqjAIgex2bPylRjWQGTC4QWxuoIsuLuxGZDezVLR/Y712SicU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCnQLCRA9TVsSAnZWagAAIyMQAJTdonzeP3l1r71ffbhN\nD6+ox81KG2xfMlCGZQ9NWnlnYDkUKys5ReXvZmadjem1jrRkPyB7JiYlzNgN\nzscbUM0cH3jxvGDMS+/s28xvfb4ON6zm2iDNMXUjA+x88D0E7z5f26ApQ2b9\n1NXFLW4lr6fvKC7INgSZJujlAxZchxYm6WhjrFeNCK6P2dAqEYYV6clOrVxC\n8U+zuTjzGk/ZHh9LTxMae/YhQrUJbPB9gOBCsiP7yyDpf/kZIuRDZlzpHjCE\ntSr/LVjYkTOys89xKC0N2XMci5SZMjfl8DmnhpD4DlV+lGTg1rJeBOA7+QkT\nvpNA0WTdqWuWVrtDiWWtyL4RWZB7a0hdVkx/xchLTyURZykmAFCSGJvhBfLh\n1/xXtTYYEVqc8Ha1nqnY3/mMZ/UCSjePCKsb5ig72v/Jp99PKv+Hx1ofI+2i\n24kKW34PVpuqXd0pF6fzjbQb6BmkW336AH9I4k7UUqBevAcsGPw4suDnpluX\ncJvOdfMHfQlDEX4ZnPPdDHnpmKZmIyn/64x8HGMNCD4AP0ZSV7PMEfhWU9Af\nj7U26pxtiACIr8vawAjOHnKWRFc6rnxkNRKtNUh8qT1/zvascps8C6Ts/qi2\n8ni013dGCSSDHtTEehDBSEFIu6lSnnmmaOlS9L3IPhmQjQn9lUguE7r1eQWg\nEzka\r\n=jbNf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"823f4f89b39f86d10ed69fa8a943c050c2d83a6f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c92f038c3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c92f038c3.0_1577743371089_0.37560033462510023","host":"s3://npm-registry-packages"}},"5.0.0-canary.1f1ac7558.0":{"name":"@material/auto-init","version":"5.0.0-canary.1f1ac7558.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1f1ac7558.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"739e7d1b311c9f3588a3cacb348c80e7b6a19809","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1f1ac7558.0.tgz","fileCount":14,"integrity":"sha512-D0EWFdjLW+qhrIVcYt1kon1AZOy5shlarTUA5OnbRIfiPtO1i8FS+G3vNTB3DtOAG55BsgeBEIr5DjBPfO/Bog==","signatures":[{"sig":"MEUCIBd1iDd4BjHR+tk3nSG0Pe7aO3tHwlFNW+l5jzySQLn2AiEAzZlPyyFdHPKjBb7CyNL5X283VZxcT1vMcSo5NWOmFNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDlhiCRA9TVsSAnZWagAAQ24P+wUeTHTZCjt8ao7WfiLc\n2zri4HyqbwKajEcaPS3i/ua5iyKUs/CWssJ4JYmJCJAZMJp8lH28Tu9MRxmW\nme02Jfgbj+0uuV9oqY+2qJqlfC8gwhHjBrlZ5/mumEdKTrcqj/VdFl1Eufg3\n26Vo/nRK+n2dnUYId56YY5FgaBG5RlLLOsTvD/5RB4tz+v1aOmgdaS9l6omy\nOrS1pp1TEp8QGbIYzvglqEC+RIWiLJs3wRpEh70yJ8ez8Ui8zmqg3Bu3/JQI\nd3D8ZYN+9SNNXF6ImU+npnyJ860OCh3DAmd0Q9EeRJKmI0lPZkpE9vCGMXMp\nUndcqy/avK48LtpyKZPjWl1n9e4fyQZCdfbprKlfgBsWpBsbXE8hHKOkdttQ\nGN1a4eCh+oqyhAmK8XPfJ9/zdkrJjqt95EkbNG5Wiu++TIOmTbVv3whSzvxP\nRnWpiSzqYweqV1V8Cyn63t6S0DInWW0+dkpRcdO9XsKNdKNBw6M2ptuFEkCt\nRq7hAuGBczUtBc6KE/vVmXbgXFvTF1ZPRxVTZzlXTySSdKjAoa8QCKo1w5pI\nUwhsCNd5Yqfilvih8LKMgEBU4Xp7r8ASCZ+SpXkUPX+wRWewiGRKy34pUjH4\n9zuVWS8nxCEjQIwGag9zy5kman8bzMClFypPKxWvcjrSo4Lhxo4VwYOHxMNe\nsSgk\r\n=CoK6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"698a9278145ef0b4e06e9c33d51051b9650c5b11","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1f1ac7558.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1f1ac7558.0_1577998434263_0.009463324147200192","host":"s3://npm-registry-packages"}},"5.0.0-canary.ec26e799c.0":{"name":"@material/auto-init","version":"5.0.0-canary.ec26e799c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ec26e799c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d08d5b1290fe38923e0c148954fa24992ac1584e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ec26e799c.0.tgz","fileCount":14,"integrity":"sha512-OXPQ0UFJO4i20jBvIbBB8IBITHKqur4whupuU/UkQhKgl4045ke+sBKqtPFrLjbP9f6JUxSJY84bzr4F1BOHCg==","signatures":[{"sig":"MEUCIBMo5JjaMG5R/LZzUP5es4OSu6mpugLLscMB5xN2ABP8AiEAthOvFlebDNUhoR5T+ik0XmtHotaBYCN+7lmKSCkkGco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDmOqCRA9TVsSAnZWagAA+SEP/itFrWY3+HfOZhTU18sQ\nn7qIdmXKuegIMEXrdEH2JOxdfUpJLTJtmPQx2blb+T0ffVmCY+Z2Gzu/b8l1\nV/7GUg3FZ8roUx8nI7u9RNg+ffF41icozuKU3Z+K+ZNtR9HF4Pz7adcB7zYQ\nHtJu/0fUFv4RHTVBlBhSH/FeMNmQYMqF0kQbDBEn9kRAdssdS9tYtDgGZ3p8\na5wUbsM0PikxxNZ72oeE2zzy/6Mj86AiAae+tIJTB/zJVeCrH82sVTzsnIlk\nUQrEqOlbOsJkJTn2Ws4Ic9/98nAh5V2vwZnPke76jat1d1M3zfzIJM5n31oN\nB7H01wZGLNEb7rJ7fdXhf2ut60flX1BszJrM1Hbm+iUEZRkYwiH5BQL28OA2\nkB8bKFCxZGcxSDuHutHbAkQfU/zyXlaCFP6EhqT4xt5PNadxuo20Hgux2/K+\nBIeK8pQlxnwJFFPVnOvSkXNgkqtXWPQfHVAEVKCCeWq5Y5jrbWx3AE/e+JnE\n6qeCxbxhB1lY0Q1KMyCq3CbNwDDylDJalLhHh2R9V2HBVNMdh9I/RHUVaKs5\ne5wt7UqSLkiSJSTCMHaQH2Hb3EdTGtx/HSMJRd3xXu9RTh3we+tVKXBz60Yj\n0MQxRVfJTJWOGk8fj5Rv5EEm7a/i/Do9sIkz1vRK+a46KYt9pvTrcKXGpoFK\nRpld\r\n=l3jk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"813829c13087aa9fccac08bcbdda0ffddacaebeb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ec26e799c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ec26e799c.0_1578001322291_0.33911923379726083","host":"s3://npm-registry-packages"}},"5.0.0-canary.0a40ced40.0":{"name":"@material/auto-init","version":"5.0.0-canary.0a40ced40.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.0a40ced40.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e05df5674b53d230d2aeb01845d56e1fdf45649a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.0a40ced40.0.tgz","fileCount":14,"integrity":"sha512-A8CJ/15P+YevJXmx6gZCRnAaXmKjKwkUorgH5IX/XG0xcRH1mloXouFcGgz8eIBJBeifI5qa7VXzu6IPDzD1wg==","signatures":[{"sig":"MEQCIByy2tTK05okXC8+sZ+rtWme9goBBuFfp9K1YohHrmmJAiBK4tW8vZsEllu1FMymkH3yl077ROsJ9gBZJRCKzgfQrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeD3UtCRA9TVsSAnZWagAA0cQP/2u2FlhklBLoPIrUkhHq\n/tjoZS55x3a02J6xKmh5fDWDeKA18YyzWz1yj92LOhash7FGotIkXGw4yWHD\n5C6TOWFADjbean+SNjQOvTVW6VAyKqL5eUKvSK7mNXGVJ7QjpfSrbuq+Sww1\nWLtn+16PLpeUmjt4zdeBG6e9l3Hnlvn2p1A5OPAeinT9f7DopYRq6NF/sY7v\n2KkKPhEfTMNTf8F1oK7xjvCczNCsG2LghtUg1RKmjDJkGgPV9qrigowUUbXP\nbJ+0e6fYAm/VaI+TvKfYEKeBp8c/LRry6+FD62DyWgBdbnOQnripnG9skNpO\n/pbaqdjXPXWJRiDGFY0oU98AF3NfaA9bjxHuAZs9qK+qu2PKKtMrYAniCb/9\naAFoi2089WxkedvsNLwkNHYbgxgphJTHZPWk3hF/t2WIcTKSmV3p5j69NRcw\nQz6pR3wJ5ZSyMQpwe6aiyIgGZB+bz6DG9RZd/7IFRAy8yforYBzolbwArbRB\naxYqKM150VZK1Y9hgAXdSX0L7ArmMq3o3SB7D/hmYWdTk1Ra4vCXbBRTx8HQ\neqifLACSNzhaDXQ4PFj9i538HEGBGLOK/be5FKEjnvSAljPop9WOvfyIJoFZ\n7+5yaJprLBGu/X4t+aW3DQ8pulhvP1uWNN6a+yflRob1UVtz3jYcVnwO3uk7\nh8M0\r\n=JvVu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dcddd5ac583b29d0fffe1a54b6f634f6b90fa44c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.0a40ced40.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.0a40ced40.0_1578071341044_0.4505856698699515","host":"s3://npm-registry-packages"}},"5.0.0-canary.3adf84899.0":{"name":"@material/auto-init","version":"5.0.0-canary.3adf84899.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3adf84899.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a1630bbaa20a24c6c9ee80cf51f92e23e8003b6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3adf84899.0.tgz","fileCount":14,"integrity":"sha512-lf964Nobkx2kjTDBIqV1Nw6gZtvtu+ioHM/hP0Pogs6+HSONkLqADT/nccYGLc0Qo8US5rTjLk3sMingsIxUcw==","signatures":[{"sig":"MEUCIBNHWFGhKP/I8uzmUvsYBc0CPhmSth1tQKJSOiDhXLDpAiEAvMF+bCjJKqmBZz80x/Rd3H1DMNRx6fiQop+T0nVL8qA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeD4ZKCRA9TVsSAnZWagAASFwP/RaDIGEgyOAQpHPHAkTo\nw60UidITAQqzQNXpqO9oIX21aVxRDVtrKowCcp9PDOTnBKbJJaDElPsFssv7\nXlxdWwQlsZr7krV5v+rtpzn0NwCM1+N7N3RSC8HTTEI3Paiq6WAhFwdEQq9K\nIYXfKvns5tIvJfSn2ht6/GbGz+AH9roz4epsIOwn6E8Xmcd14BPODCBi9pUE\nYuZOynWGc43ldjuofzDd3WRXrbDSSByetaDroVQ4OCo6IY9qY2lePwlU+rvS\nL7TX6SOn5EnxbqQG48iCMQTVezHGcDMeFEv/KHCg2Fx22/0lvob8D8rL58q6\nB8YwEFc01HOv3QeYzgmLEaLKCtso3uHYyJnanxGm5rDDzo/pycqLlSGV2VRV\n6sc7yPvOBZqcBO3ykZYKvobw+IAokZa4ML/IsOCz/PufOwnCVpaq1AzohNON\n6gdpA+XXfoBkBaLbKmPUnt+CaCPxF+Jn0ude8tYVfbCtngdKS/n9QoXzlYh6\n/tjmvrlc0GDVS5xDvbiCYTSZKWQGgGdO/4P4WyxP2DQimP8cZ9FWq6WXLu5+\nKkiNKBDpuDWoUDrtqvkfTUNN9OHC5Nt7wgnn34/1wLi2V9dzuQSBtOl77yWU\nWeqHqEujIK3vBvG/Rz344EUm57kzccrOX8uwU6evPyBmhr3aJUj26olz7k5r\nOlh6\r\n=UKaE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f20ea5e081bb781aeb0d66d6db6a0ea7a0f5619","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3adf84899.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3adf84899.0_1578075721634_0.7142985640129538","host":"s3://npm-registry-packages"}},"5.0.0-canary.0d42ee650.0":{"name":"@material/auto-init","version":"5.0.0-canary.0d42ee650.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.0d42ee650.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ec84abf97a7429829653d7e2ce6f28a8f01fa0c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.0d42ee650.0.tgz","fileCount":14,"integrity":"sha512-P08xGMdVyuyJKBBmaK40puiQRhWeZ/MWDgBSPEzq4wmQW/d04OKb4cEOSV+k/vs40ziWrGwxu6je8pTpg+cquQ==","signatures":[{"sig":"MEYCIQDzeSpe/4xBkcf1p4PU4fX09LGJa3TSDsE7/Cp7xj07mAIhAPtTuQ7iLKfX7jxT2fsH6YFP9adIvyA2ogkvV54CVTHY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeD7PnCRA9TVsSAnZWagAAuPEP/1ulZTWutrNXPJeDQ2b3\na1ZqgARVS1Qp7AzwWDaJlkrDDTsQTLk1uT8QW3gVqmvhis2ceDRj29ykqIsW\nF2aMq3/M6zLcwoqXt+oCUTFOYsKXEJ3mVji4tgOzAhK0UEG7VDxtCCKV2LLV\nukFX+ufqAhx8I1CWNzkUq180DhpEiEmGns4xVXERhNhLxykfW7TQ8fcPVEqe\n3KxjN/GV4BVFIpijSXnDJvQrblH/oibxcC/4TP0MXCv7EkEreOC+XXuv5Shv\ns/sxirS/nSulfTFNAC7cvtGjuJPLzcCraaaDENmPyn8dIqeKTCoug4z9t1Ry\nKj6NScvvYjYyZXuRmEwuAItHXdxR8McEJnKriDLwfIp6QV2td5M6KkDb9hHc\nPuvD9Exb+zldf0w0p3tFN1b/C3S8qy104+ZO/kOB4UxS8gexf8xUtmI7X0Ro\nZXjHJtsDb4kBKIZrDrsUG/N9Iqera3Q0Uev3HVAbUgXDXPu982Gl0QvLGXUJ\nR8BiNVdfDkAZOPWVqOaL3nuK3Pvja3ysWXop80ak4dZaltgJad0XoeSrcfxK\nnxJMkAx+KuLWR9Vy7orrBA0JoEdQqoE6+8XpszlRS//vujSd5cdM4lk+7JP6\nhxJrlRl39EnxyS1nnAjZWJoD3l8mVyXinN6sw/eh+jUIHtXrBWl1BwOiGjaY\nd3GN\r\n=+sb+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"184f253632333982c2b642e450e6e98c9703fe85","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.0d42ee650.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.0d42ee650.0_1578087399159_0.053064617419732896","host":"s3://npm-registry-packages"}},"5.0.0-canary.7be9e4a04.0":{"name":"@material/auto-init","version":"5.0.0-canary.7be9e4a04.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7be9e4a04.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b3325e9f45b2a94adcc0833eb5e0c4ea36d09675","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7be9e4a04.0.tgz","fileCount":14,"integrity":"sha512-uXbbWvdze6Vu2xnA6eyVUX/HLOpQsuwp9Uag4F9LUQOkf9ZnBIczwc/aqxuRMqxdlPJjW+UpcIxDYoNttdqIwA==","signatures":[{"sig":"MEQCIAiUHGiM+mv5Ii+GEqjGYU0lCTYzQTT+7xvGhcV6EwG7AiBE8JPwwcm5GgP0qkvDXPty9Jezv6TKNuB/e1GvfK/gBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE2iACRA9TVsSAnZWagAAeoMP/06BvNwNbH0/2BkB1Utn\nSSQ7AFdE7G1aLA22Amkudfn7573GnYWI8WkToE4qi9hgcmRJc572hcJEdwMR\npFimXpgXrUIHUSkgzFWrre9gSX/JVZnt2MfKzn/2Ktkd1oE33tP0Ao5j4roB\ncRylZ5rYzCtT2Bb5FaemXN/Ota/8Ppv53u+IlNJzpvb8aMP/szuGtXx5ty32\nDa0RC675Yvlj5cvreZHcd5n5A966yae/17W6whbWTz/Fj03EcP4VOZIOGxLp\n8imy4nwnxSx+QIcrZUihGNJbsT1PRmmEJ/1/BH8ky2Kk8iZFWBPXZVLDz6jR\nRZBukbyxNG4LoYbhFPrZVYXa0xKuqIY6VSNj4pFytGiCVMCtceB0CKZNYueE\nHnW4fPHhLRAOYIbU/WJQrlvCalabKt9+VeudKrmbDkVeo+BHqRDFYPA+kE4K\nOzY733OLAFwWNTt6lY2pLWUuuj+NeXFXm9p+axM7oOH7jUimt7OE+4cpvsgV\nE8wgMFqXLCYgQ6ces5dxp/0XCznhdzStqgMqscJYVx5zkgzt1u55phmc3G5b\n6haQXTVLHILjnVYJuTSgTxxRZNsA101tJl9saULyp/RwtmfnK7ZuixorgYxU\nDJXMmhyUtJEcXnFhX80RpvO+eEQprbehGyOCLTA7Ih1nuhdtbaE6KPCCTiTz\nX90B\r\n=0hzI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ddc1335b46dfbc2c77bc767ace9e68247f9f9db8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7be9e4a04.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7be9e4a04.0_1578330239716_0.009761535512134767","host":"s3://npm-registry-packages"}},"5.0.0-canary.847dd1ada.0":{"name":"@material/auto-init","version":"5.0.0-canary.847dd1ada.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.847dd1ada.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b760641b09bfd551927085d80b6ce3dde6b12757","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.847dd1ada.0.tgz","fileCount":14,"integrity":"sha512-U0LIdJeFUZ8MUvxhE3hRh3X3k5WSXkRppNfLhdoUYmpkAl982wKuDrmcoyrXst3XVcHcbZ2HIHr6fNTOJ/7fmQ==","signatures":[{"sig":"MEUCIQCS4Ps8Q8yT/re5U9xEx067CZ5znhpe+UIsdgShx2nKLQIgFYDlFaqQm1AESXYCok2GNdaOatqcUd+tokcxKGRcHgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE4nBCRA9TVsSAnZWagAAbWcQAIIFnSnTZvXYAQLXLU1k\nYy8n69mCNQBAhZGYMHA+ah6dhSAFJ4qctsLmDMi4+uPZMqkBoDmRAmnrYtUN\noLtDCYwtMs8D5BQFctNlPdTfITa4EqufZ12RkhReXY7BQct1EvYYqNk0a5Un\nr/Laa9TLi4n3sScByWeHCBj1K4qLJYSx7MkZDIO4O5cZfsndUscfhQeQDoo/\nFT++jowXX4IIK8ZsQYmQg+IV1icNTvh+RAMF2fRD6rVNf1+rAKV2v9cL6cqk\nf4bk1U3EhS/Rdu9e0yhv6TVFMRKKK1jt57T+q1bE3oz+4xmg4dKAYv7tbtmz\ntIv/HUgyayZyl4EBTqoHMmiKt2DPKWsGq4xVNLBum0B56w0qQZfxFhY7rAF/\nhym7c+Q5y2plr3CgsqiXz2HpXvlNAHaGQgNyBEVfil7LZWfn5LfKkC4+VyGZ\nC2UC6lXBebao54PLPBxPv9LA9KgqVopB62WoeR49M7/HTcBu/yGCU3rYPlwv\nOmYOjxrk6W/INsQVzOHW/H6B93wOmSoN/HpHM4s4l2GFjOoL6jtlb3Wc4SUY\nj/puBIb3eH/XQq+0YjENHlAXCrfxFMUSqJXynB4NPujsxhsabpmxNz2giANY\ngyqD6jQE2gQfhto7PVN5oi+m5tR6W7WXH28siZxLwpNPbPpZUrrhieQqJWn7\na680\r\n=tKF7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cccb6b13f05f64e22210548991ad471df3de97f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.847dd1ada.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.847dd1ada.0_1578338752838_0.3769880430038326","host":"s3://npm-registry-packages"}},"5.0.0-canary.39df7e5df.0":{"name":"@material/auto-init","version":"5.0.0-canary.39df7e5df.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.39df7e5df.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ef3d5b193301df3166fb6b80bc5f92337ccfe3ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.39df7e5df.0.tgz","fileCount":14,"integrity":"sha512-P+tzITb2+Ldt6htcREBBPAaV4/fNk4Qb2KCG87vtheyD1hdQcG9yNQU7rNZFsQw4QUA+zuuDDDUZCy4c/+js1w==","signatures":[{"sig":"MEUCIQC/plHJGgbKy0fJxRNwqoFnFjbe7o5SdlYyhFXL7HPHkQIgOjq/vUQq4Gj1KoNOvq632Kmzvd8/SWTxv955GquLUb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE9brCRA9TVsSAnZWagAA5u4P/04/Nb9LLeU9gP03Xqth\nwD0zCQ1Tmx0K1vptHZC+tGCNPv06oLMJYxI+tcOiB5N1N655cqhpgReAhbyG\nh+ymZtY8zZIMdOqVDY8ET2CHLuqccdRCFvfucw0DpIWSZKOFHQNiofU1VuQD\nKMuDGAaXzfgtTUwQ2LqJCSTrZe58WT1jU9nB7xWZRKQtFnUj4wicykDUBtFl\nMv+TDNiewRMPSBRip0EDOrtTshxOLCAehd1tpbmb2WW67leOn5m8KPuo/eLj\nJuW2Ic9Y3kfZXoiAfITyyb6WDRoDUkTAup8sVKs2dy1QZzoBcyd+0q6GdaCG\n7rGX+4pC4SZUBKvs/Hf7n75quYSMC8Aqi9aV2Jl6OKGEHZBAQ6f8QPt/7mqJ\nJslnGGiPlDsZN4IlAN+Mq/Uc/ZNKJ6fkQzoVZZc+8t98qL9QseR3DNJMRQuK\npZLFBqpKwTwGp3SedTdALBBWspuy9cuzz9o9jjWCZK//scbTpkTYaomexhwO\nvmKQMU2c9ijkYAcswES6n1OBo/xALbaUMfs5PlFXxOvnEXVJ72GCgHZGV0ot\nyANtSUfeFKERm6pwekE5fRN2R5CIYA3A5PR2ug52WPc3UNIywF8q676NpTVU\nZzaCYlPK+SH7BpFMcXKJH2LyEo9ZTSTcrp8R39YVWItFEyq6tbhivVpAprxA\nO3Sk\r\n=Ap11\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a6995715f8fc80d9a20e6b8ea90e80f4906ca595","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.39df7e5df.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.39df7e5df.0_1578358507131_0.3417780288212995","host":"s3://npm-registry-packages"}},"5.0.0-canary.f1a2581ab.0":{"name":"@material/auto-init","version":"5.0.0-canary.f1a2581ab.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f1a2581ab.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aa92e763d682ab42c9fdfd88cc3243af16d0c34e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f1a2581ab.0.tgz","fileCount":14,"integrity":"sha512-s8XKx3RrdBi0yi72UKmNwNLWYkw15fC+0prKZDeOi62adZgrS4oGt+0dhMixR03Pm3VW1KRJ9OR2FBuB2VywUw==","signatures":[{"sig":"MEUCIQDeYX+MCJpaYy1lF2UjMw5gWuHU1sxIuSiBdCZj9tfzXgIgUJtXxL6awd2fYrPqx1GWLqYv6v1QgxuDxcpm5iIhi3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFJy/CRA9TVsSAnZWagAAQIAP/1f4eBcNnxjhCPjxBgM/\njeOVHCmEVwJcVdFq3uh1mGHb74US1F0F2mZrauWeykr+Oivefe0dFN8FVE6X\nBiPkYxe18fGKUVk+/hV04MwzNYAl1NfHpwlVtFWEa46D7nT4c83HNrJmrUzn\n5eqCQP7hq60ZpxzsmXl64ApiCiklitl4al/GzqttKBdnjtxXYxMsTCj5hcKI\n3e74UjPGObUW3gf3j8F0H0LVPxDWgdZVd+sPO4C017JkY01WQnBO1yz2Gy1U\nImY5QAGM6OJyKvCaZbu78Ka0pkg1hCMuata+rV7bRvaxd2vmyai6+RbPgpk7\nDD6FotlNpMgN8R4aAOy29BUIJuP2Y+Ud3hrvh6AJDiCVyF8KwfyQzr744UsK\nOxSwUh74+NxhnlH5XNCpAIw+WlDdMgB/urnEHyVBrXe9U/9nAxETgXK1sGfX\nHanmg55uT0sWWKYIvTIrAx1RZWT2V6Vl8LtaKeSKwRRW2IfIS4Q2SFKqsu5Q\nJLx2QJSsqMrtx5N2JjkcalEr/CAzf7ckAD44VywycvZ+J/56JWg38KMY3twK\nMEIwvvUKh0McmHUrOxgpUQe3vUrnMG0NSUE2KFD/yXT7wzCb9DW2u9x7zQ6H\nPBpJsX2ASTgR+tnZIBVM+xWwgQdy5VGZym4ght/wlt8gd0O4sYbkYJbDwZ2w\nWfwv\r\n=F+dn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ae69ee79a4a22a7695be055fc67e5b974c2b989f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f1a2581ab.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f1a2581ab.0_1578409150916_0.7458686551182803","host":"s3://npm-registry-packages"}},"5.0.0-canary.7c7ddf347.0":{"name":"@material/auto-init","version":"5.0.0-canary.7c7ddf347.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7c7ddf347.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1df5cc4be8bc602ae79d79bb75da7a65dd45f20d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7c7ddf347.0.tgz","fileCount":14,"integrity":"sha512-qmxEgFj3QhZeaQQsuVOMvvzek2KadMBSY1VAcLS8/ERjV3pEmyo6KpOmAH41APY++UHOIDYbuEcP4gnV9lEUYQ==","signatures":[{"sig":"MEUCIQD97wyL8JRNwHdDyx8+X1z00FB7+SPk6dSqHO3UiaIYTgIgadZTWBFJ4XYH9rmmEEnA9n5XNeiJvG31yet0apTkEX4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFKCCCRA9TVsSAnZWagAAu2IP/064NwpKaB5bnDPD6ror\ntawY3bankZuisoZPUHxROVimBIQ4SXbF6Nsbym+6zJ43yu0CY06CWMj3wUvL\nR0vRFynZIcQmMSn2k+qSD2gbUenw1bHNf3cMeYulrQKH9Nc9AnapC/V0sbi2\n5fRSk6MvTz7HyphIw3QnzOdp+v9KQ9IUVHuKepMVARauKqRwdSS6PZM48+Vd\ndjjQyHmrdpcF2XvbDYGYB2tFynMCgctNigFChIBlzoDkFTf1kHh3ncuZwio+\nnzzKy7+B4Exb/FWGjqVTkUBUuD7x+rS22nm23lAorLmge+tLjAUJPamoXshx\ncqLwYcRKl8+6ooVQ2n7rgLmfb18bAupkMOieEMswpZ+ZaeKiK1q+2P5Jpwd6\nJLLt3xAv77eyYFMr8KmcXGxduA6GH9CPREieTKWyYz9rcuWK8GWzxrkudy+8\nLAZefuVEFxjlArwic1RvnuM0+vcsjDNhBNiTm8UqDLydO7Jx1Qbf+x52SlnB\n/N1lMR2wQ0G49RKa9CfUDC5z5kjGPSMyp8XvqFOgeStopLpXuSkfqELBXiW/\ngLv4pqG9DHkZ4+dGIobyUln3OHJuLU2sXtW3+U0GSShUdHl554xj7cqkzPCO\nSucOAHrwWAnpBwhPgxjKMVvmfVuo/nHoISLuj4MPbIZ0fiSbqLbXI+h7eeVo\nuGE9\r\n=RZOo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"940ae7448647ebd59a16a94b84c479f3f7bba9b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7c7ddf347.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7c7ddf347.0_1578410113610_0.9812863338682194","host":"s3://npm-registry-packages"}},"5.0.0-canary.a1c84d4b5.0":{"name":"@material/auto-init","version":"5.0.0-canary.a1c84d4b5.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a1c84d4b5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3a5f5f1fd5e30d880d4f8ce7c174c654998bae8b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a1c84d4b5.0.tgz","fileCount":14,"integrity":"sha512-MeiiY+jlZmg8aNI1Pi2ZyG8y/zFbFvLf7t5Xgorj0PCrqzQO5ex59YOgPSYkbbCejCbW5TuMOTTeHPFWV7315g==","signatures":[{"sig":"MEYCIQD9D40AF6W3VFn/Pf4TKwsgjpRyh9WMrT6F6L4vcSfNaQIhAMFcBSiOCXzoCoByAGcQqfU7tS961zXpa/8s/4dQog2H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFMliCRA9TVsSAnZWagAAO/0QAJ7+vuaUEQHxpkJ9VjbY\nZvK0B1v+X+IRgpmQYME8onrfnBZp7lFYzFUuMZUQPdu/U3nCdSqAowIhRpZU\nxHFy5rWzBVnrNSSXvw95EkgU7EC7OialqwGtUNbv620Y78+xvzzm4XIrv15z\nLZ3oE3VDTugvgkf2O6DMT4NdZ2W0K1mO7Ephjs7wyanjEBYlAhklCQTsQamx\nIElJtwK/URfrPXyWOa2rULZh/SDbVTYmjNNIy/8Sy9OsBDho7VaIo0KJD3K6\nrdhQzhbd7LGGzhj9CIRg5DruseQQyPLFTPeQXYycwRz4xBHSIKjyiDWMboo7\nBjfOaE4fti90Kq0U2OSVaXpqgauAhbf7pzrP9QjERQkiAznPDSwgaleM+6up\nEIpZistggLtkNbF6YuQT/cNBLyaLqXronNtmz2/DczLgDtTHbOF4qiG72cfA\nCWMF5DK8bK1D4Pjpavgv6ApmX5phvB6D1i2y+z3gBnan6jtkE8VFHZo0Txce\nYAtq/nOKE93FSdD5btH1VzQTaZivfx9ZjVNGi9AVlgw1bK0UlL4zOaf2jInp\nrsPeAJf+k2XlqKDgkvGJcQ4rTpjRAR99u3K76PSC1kBQ1JaDhxZSYStBlKDz\nuORX7FpF5qm1Hp8T2QxjqSlFNTC/FsvprcN+tbQ0N0SRcH52E80EwdMNNQbD\ngt7s\r\n=b2h0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5ec624a1b571d87d94d5187056a0b6db214d229f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a1c84d4b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a1c84d4b5.0_1578420578407_0.8614708836239824","host":"s3://npm-registry-packages"}},"5.0.0-canary.ec9f16578.0":{"name":"@material/auto-init","version":"5.0.0-canary.ec9f16578.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ec9f16578.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdb8041c8fe630f2ba8f23df419fba7e54cfbff1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ec9f16578.0.tgz","fileCount":14,"integrity":"sha512-+4zISKJX/ckeTWGDMKAykN/HQGQWkzKi14a7CHpctmxYtdzNVqDqnuf2kp+HA2m/YONmymvGYkOSU32knM86Kg==","signatures":[{"sig":"MEUCIQCzFiWwjmcE1v8uBwbz33l2xbgTg5JhYbk8ULVA41UV2gIgWGptPdfHJ1/9JSx/lnZotd9Ta/JxscWYlX/PoNX+ow0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFN5dCRA9TVsSAnZWagAAlVAQAJo8TDILAvsNewjAU3Qe\n46IbNqq9pgAkXZE8XiBGW4VDy6BX3lBlkruh+ppYF9pDr7GwAYvxuyNrTaVD\nf3QbjSyHpCMOfncT7ONC/LJnhnTIs6aU00b7ilTgcVSUY5gldwwVSwBsh6Aq\n8cwcjo++lgcY/YTHMRNcZXsaE0uRuf928Q8zIEZtst+akj9Bmjd3s3qwM/z3\nzJ37uv43HEd72xqGJykTGd2W0JMefVVbQjn5yipGsoBA2T0hcWgZQmMJ8hB5\n52bfmcl61eX5K3UMIb56hNPTIkLAySNa7P5AtWcjrwc0bvKgXw95eWN5XOwM\ns8fiEa+3cIgYTaWJBqDh69JNNl5VcBhGoYgRO5aNzhLxzZrJr6blmMP03/xN\nh84CKcd1ul04DnqsYNWrn62+c6pgbD5j4hstTZZuGZEWN8SGvOk0f4om32GX\nmGijX9La2iC9VzFGfnMkqHwU2Y52N4TXAHGu+ZKKKPlftnqpGOm/ieqU+NoL\nfzMEy7qmJRR11tP1zoVVmhNYwG+lo02k2pMVx9Bj85pGe6kvi8EyWiSgmiyU\nhVhckMa6KAouACJWj17gmqSPz4d8+DLILp3nP9d0ZrLqIORkHZmhS5ZRffiA\nnekW9FK7uCEsifwmXOhzhHzFE6idA+nkQTPtKPCEOiPfPhFDyGjiEeRD8zRQ\n8qWg\r\n=HWXi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"23103621e66342865b8700c5948ef9134fa8d1fb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ec9f16578.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ec9f16578.0_1578425948961_0.5442240988087474","host":"s3://npm-registry-packages"}},"5.0.0-canary.b602226ce.0":{"name":"@material/auto-init","version":"5.0.0-canary.b602226ce.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b602226ce.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0d0e508a422597daedabaa526e486da5ba4f9bcc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b602226ce.0.tgz","fileCount":14,"integrity":"sha512-++cNuvLyWirIBkapxKtXHIr1lfA6uQmSH/dEXbVzkMpUrqLfU8hssczRRGLwojGGUIIK/OF8eLA7eiNHhV2lmg==","signatures":[{"sig":"MEUCIQCo8KYxdMQ/Fy0CfQFkP7VAlPZbg3rsMPRyBcEy+hpZqQIgKMXSKGNQog3Qpvq53UMRaPDXZ3a6gazXrH6kskVEhC8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFOa8CRA9TVsSAnZWagAAuksP/1rEMNs2cT7Tblq00ibj\nMSXlsfxuK6B/NE38k21Z/kf07Vnb3bXvt6lphZ+vxZNbcoTg4tDz4uzLG78y\n9pYDrl33dttTKrlLMWW6lguTG1FgQ34ObcJPL1OmixXnbKCS300eOqW1QxpJ\n3nfwavv33V5n16vdUTgxrzcV4vSMLxvqklx2WPXuh/7HBC+VpGG0ywTyC7Gy\nH8nrtSDKIsKU78oAVc91qkTCqq4VfKZkOZIP4d9Qnd3CLbTpqlw3nDL7yOwJ\nJcXEIOMj5lmtijuztx9EkPhsBjv6iEZrNLH4UWTtH/7GoXLoShoMoHqaBI3j\nfqQmxw8xCwtYRyu0283QNvUReHTrUMyGQ64rI+upCOxAzprnhiYkztD4jB32\nDjxdquon2vRqw5mnVgJO92j5a9Wt5oAHJUN2N9pvQs+v0cB0rDs41qFj7rLr\n2gy5Gxr688egkfoMoS4ofqtSZRPx3oiRspYTbWi2KPHX3ZykJmdWZpvrIxds\neT7UVauJgK6Ib+35sZPdNGUzbQfN8clcKuUc5LXUuTrETCzem12a0HyTz0cV\nZOuQepWpuBPrQPmjMh3g9dggi4QPXT7jF3CvdY4m1YGTavxfTWO3oB5whgWY\n1+nPF87ybi81NxA7EwJL42Qpws+4THGH9o2ze0O9QmzkjnOaM/wo1b0rOE1S\n/SCG\r\n=Bvwo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"de0d35ec6a5285ea0c12a54a6e35051ccd0aac1e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b602226ce.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b602226ce.0_1578428092434_0.04683991964912071","host":"s3://npm-registry-packages"}},"5.0.0-canary.b2d2dc08c.0":{"name":"@material/auto-init","version":"5.0.0-canary.b2d2dc08c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b2d2dc08c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2af483556f48f05b363fdcdf0f0ee3c37b78bc10","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b2d2dc08c.0.tgz","fileCount":14,"integrity":"sha512-4xfO94AA/YqFvUCP+EluiFD9gjyPYBsC6u4qsDob2WLhq+nBGgBl1Dq6ZQjLkxIezLI8NsNeZCP8gUYgKdIfxw==","signatures":[{"sig":"MEUCIQDKmJHT2nKlVIMbBdQQfRLfhXdwi2MbrZ2qFAUMkMXYagIgCqT3QEgtBy60o2VClh+yTSlNxtDJUyZsp/JbNZd/j5w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFPdQCRA9TVsSAnZWagAA8fwP/iNLD+RmSnbIe+ByI0M+\npkl38gXpEAdoTxO7T9f41ZAtc+e//MqD5GBYN76IS6hzST2RCHDVic7zhH7a\nHHJ/n8PLmpBUfKtOyjP5qVuelcKcVQ/BcgmeU5SS1UsS1pHqKGjhHakwfd2/\nkCKjn2cqJvGjZAgJQW0i/yxzF0NBXSnIub6KC0AuiA5KAvMl2SNLdqc9ZQTE\nvU5WDY65H3evDnAvmzAiSjLAPSPLkuDf7dtQY4O5XDNNxW9YD9sh7BPfDZrA\nFX6o1x7wyeO3+z2rarG3K/XERnOlwYDT0Gv1qHqWsHilUGV+MHUCqPYzvLKz\nRgasCA60SjXDKFivKgUv8UsAuNZRk8/6pYqJzppga9XHKI0BSRIIRHP3xESz\nB/uFfgEFY0+F0bHR6a0l+oNIi+1uGQ7YmcUDUxEQU4+74up46weMTJWxfnzC\nTwu06R3aWAMWLVjqj9x/VwrX9O4jehPJ1dPdp2+IiDNgUtzrhnsRlI6dRN1u\nS2t4G1k4ydr/1K8zxCOX8MEynLInqjSo7gHyePKplsxHCCW9mT1ouWc6lF4j\nzzkKVzYa5tiNbY2QQ1k7eVDGz+iMN7C7lQoD6+7mN++WbRDnphe4zWwDFzFX\nrECbIN5IJhFy99ByzYJFEe5WZzL9yiI3PBZK9/cg+LAD3L1TVTP5WEXJZGgj\neV6c\r\n=5Xi0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ec9aa1966e1f2e307207d815ccbe3f16750af94c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b2d2dc08c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b2d2dc08c.0_1578432335757_0.7364181071394598","host":"s3://npm-registry-packages"}},"5.0.0-canary.61f2d7580.0":{"name":"@material/auto-init","version":"5.0.0-canary.61f2d7580.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.61f2d7580.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8de1700a3e4319572baad67cdf91599a347f84f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.61f2d7580.0.tgz","fileCount":14,"integrity":"sha512-AV6LEK9bbemoELkrX+gW0nIh+r7MybeR1bjjM2pIyp0PaATYkfhYSq7Lt+X+ZREFf/2jP0CTe7hCIePa7Ve73A==","signatures":[{"sig":"MEYCIQC+7xbPCPZVAF50T4B8MvyoPNpbc8c/MtO3xcQR/ZFVvAIhAI+p/ogS6oRUjto4+tC5Jf0c+EMivXhcGP7crYSYvgc6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFPqFCRA9TVsSAnZWagAAsOEP/047zXybssKmBFGb4DEc\nGl7KTZKrFuZNt2ML9ECCAyNBWRCbxRq0cf7Uv3hyhlM01mvKwve6vM5F2xGL\nNkSpE+RyMQQGS0r/ea3MlijMsDhE9qy2rvoPYNluicywF11hOGnA0AFz5NN1\nbjOACHlEGm+K7ad+yLSglXwDsEqueGBZBtqsrW16bctPKWAOB21/eD0OxkrU\nXkqPQVxtBvIXSfzGvzwv0JCaAFjuDC+zgZkxJX1xBMoymLiCXwVOB1QuWWly\nJSLUSfpuB3uPlXNiZNiLGJK8NPKBykQTUhqRgOAOup+eIij3/jWST214MDvL\nGYXGl5vJH0QKcOsBQg6YbAtYJEVDC9ZKWB9xAfyT27vZYRVJ+Gud3blNMEeZ\n9ZnJI3tyAHCNBEJezDN/wwh4zwYhGfB1ag+7tTW5vlR8OmmmHwSHcHWo1TJf\nla9IW9pdxqFNsOgJi0JLIp33vUE6NPW2BcUw+V3n7rrG3UwRy0Ene6TxIj9a\n0Ak6oQ1jBjQQfqvvNt6gC+y+hW8ZgZ2IqAkdoudsyIoRRT4ADfVrwXf4px1U\ntIkZxo+OLFAmgyPJnavTwZtCgCtFcBMz3B3oFQ5eY5ZTJ8RFHczN9s3Lo0H0\n1oL4EXyjNKWWenr7pJPrqt67AN45oagSStFSeWUX0VLRQwPDOTDOH5uV31N5\n8nNU\r\n=Y62i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a826fac64c34ef89005bede280cad29c76346e55","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.61f2d7580.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.61f2d7580.0_1578433156903_0.27773607990676963","host":"s3://npm-registry-packages"}},"5.0.0-canary.d1be53a2e.0":{"name":"@material/auto-init","version":"5.0.0-canary.d1be53a2e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d1be53a2e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a3aff330e240253a7a79a8c92bdac54cc245d795","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d1be53a2e.0.tgz","fileCount":14,"integrity":"sha512-qNWJMgt18mqIXZajhgSBrmmmDhx3WHPPRaaOycLtqk1DhYhErvitRBkoZZEFw8aESbrK8ff76YnhYpzcb81kRw==","signatures":[{"sig":"MEQCIDeWoAUsZp1d6FrCzoaQH4BVZkxPJ5FW/3CHgVm2cCz/AiA3ZIWG5FQ0HF30Nc01autRodBn84BuEPeIEwAYd+kwcQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFQM7CRA9TVsSAnZWagAAhxQP/2L2bngPuY6gQFzeDzPS\nppUrfzyLT1x13ZXnMBzpydwLm9luaE7vxuUu07+2rXvwY337WIOIcGUFmV5v\nvzn5VR3PTIsbZZgpJFCrGu+oyYGK4lx675mexo1TZKmd5XrJamlrWowBLDPb\nQSlcQRNAee8n7sCnOPS9iuapkZfRpT2yKlAPrFuquAVqQpNfU6Kq4iqOrdGZ\n/dyV3S5ZGZosoEj8kJsO7Jjh6qpySmwcPBOwhWa3M4ixjpZa2RWIsWr1H02S\noo8p2zq7+2dyQaYiyox1l2dn6cFzEfPyt/pt4Zu5vH9ahhTeacR6EkQYhrix\n4Fg6oAOV0DdU51cd5T9NAnTNg47dePk5VFrmiqYu7Ph0pDmfZ1oxa8amRi/Z\nhGgRVstrnHhZi+RIR2elVTksaz+ACwa4y2NwiQ0vPWbNfXM9cjsv4bpNLHlt\n7g9j0Gf6jw4UqrtGGiJTPvtgWzGpCe6z3R42bYkQdsqkfuJEvtBNkhyyLuKJ\nHY2GMkX6HoWIE9Lt1/ZnqLnF4JhaOamN7E9JdiFY6bpnN72DvhGai2OTjOla\nDxsB+9VjCOTKUbRtKalEua/llawT/kVNYeBigS0Y2pd1OQWobNw9aF+64TLn\nXt3YqVbE9A/zmwFwJfuzXMvCF5PlBi6JGBvbbsn5tMW1K3uEIOGr2gbqS1f/\nECDg\r\n=ie1p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5053f71f9a35d62630821c2c4084794f7bedf258","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d1be53a2e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d1be53a2e.0_1578435386783_0.9246944012871425","host":"s3://npm-registry-packages"}},"5.0.0-canary.9b0d06e32.0":{"name":"@material/auto-init","version":"5.0.0-canary.9b0d06e32.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.9b0d06e32.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f9a21bb0ea3047e1a2cdd81d333c4dab720257a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.9b0d06e32.0.tgz","fileCount":14,"integrity":"sha512-yIXuodEQe1rk9XmeOwJqnIEtT5pnxtTGpJKCz27hsQxkPIVx7XuIUYk2NSel6d9CYCBbTCD0LLX6k/w+/zI8XA==","signatures":[{"sig":"MEUCIQCF1pV5Z6601tPqs6x6tLyXYm9EUIaVw8EEal0864bviQIgSPdOiY8w0c6qglWGt5B9NB6SY69e0s3ufVIjvSZZVxM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFQPQCRA9TVsSAnZWagAAgtkQAJctf51pgkc0yzUGAUt7\n4RrKJ7LfXfsG7ILcKZYtpv3wIH0rr4xUkC46/7Fqkuv0MhIXQOPhcVWscdKu\ndLK6VXVzNOxjiMn35j/q7mnJSqwR+cpezl/xGJIXODjUwzNadsx1ZwN3tayw\nvOtCTv9hm1/lX3tquOMFenGgnYk4v3YJNK14y3iBgC3cSWdpuN+xi8rq1PQA\njcNQuZHgAwcxD/vUTBlyKFUO1AbDxkEaDDR0JIDeLXKhtnWrkjKPD/tKgMZq\nW/Ehn/e9OvAym50sVTazFlI2Nb/idvnlzZFKyFW/WlbWApIUdi1yoXBczXDJ\nmg9LBZlIksIYArvft1MSjIdwI5Hw8ebY1NoV/+bXnWpqHokLhJJT1GOSS5AG\njKKe6xaKFJMkqbCecU5KwDXr1xZY8hHr/F2UqsXufq4OgnMZ/olezbYhT78J\nmC5qSTi471Kn247MY8LMmrOVlKgwxbv7UJZNr30ZuH4CHiNiT6FKyT+rUZzU\nPwka/i4babhXEnr/Ix0NfGzTJNqU8aWi5xjhoZi3O+whYQOin7j0dCPg7iiQ\nQcAQnwu9k0+tT+u8PKKLgDCFUQvtwu5CooDrfhuxIUpT+PN8lG9EhS/ptU01\n0avrpqPX2uSIS/piOn9cX+hCOUdtxXGVYcnAZIVnyD1pWkcmncokNDUtSFrx\nyhbr\r\n=LPPS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"485fa4920288a2a37995f4c736a1d429de15e53e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.9b0d06e32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.9b0d06e32.0_1578435536371_0.7978773706714306","host":"s3://npm-registry-packages"}},"5.0.0-canary.730c807a0.0":{"name":"@material/auto-init","version":"5.0.0-canary.730c807a0.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.730c807a0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3756ffef9a2ffb40f15e023b3a13d40e2e17939d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.730c807a0.0.tgz","fileCount":14,"integrity":"sha512-3VrTjYKD8FjK7hZCNNdbfY7JkbuVzcbCU3eRgiKIEXfXy5/0mLkTF9hIhfWlC9p9EGpSJ307uThQuBdnJdHKJg==","signatures":[{"sig":"MEQCIDpn57SHZKx6oCwXiiBWF077Zc/j4DzIBjRdEAyqzt9dAiAHPoLle6Ad9l4ochFqd9+z+1YFsRuo9S/vBlK+Y4iMsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFQQxCRA9TVsSAnZWagAAfH8P/3TJvuF12uTDx3JkFEPY\nu89W01ipYSMkLTQDW1r4YA0loR+MzR7LKJvuUGcO87I7Os5P9JoxnIA4Q725\nqlaQ6mA98wjXUcWTMPjV6BaJMKhRLXcXkPY9y5UYEzFqqZ5IGwIUNlre8gtn\nDev22xArsPhYzvysIpT7iszr92Yh51OJ8/ZyIMatrSPGsMH19fTkXkMTBzyp\nVL++bVqTy2ynnY5atR//LDtldPADwoK/vylbMEGKliZ2uzMvsNzfZtHUkKhn\nFlW9EDAAgC8Nhe1cT3lk6MXZdjEffgJ6jdjYe4+4R7Vo2fPs/FtYOuBPPByb\nSB3BK7lUSKthk08APHEz2Quwbla1xCmZrKJKVXtpsLAKZqi/azEoJSArfhBR\nMFUawXmeeUdSPAhYhSjS+1Sx67tk8aP9d7JDHezEofxok9BHOBlYkXqq312h\neE31CZoUKFzmNq/ebIHD4vWKbECRvspkrIRoR0Mq2P+sbyLRmbTuIeNmvoxq\nz7IFrayqAaENvH9T8Z9mRCZwEi/2+LPUY36d+qGXvidjqFj1mFrBT23FHzpC\nB+75K4zN81Kusw2UuBbFteeZnfil/8seqRJK6ACgFOeIxMkCrnuTSsZuvbdy\nYOKsHXl6aCoTLHewH7oCP9cgvxJZ0+qEVar7noKy20yclBDuswQxoWRzqrRC\nhXag\r\n=WoeW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8860f1c513146b0f8c59a8c70750d1353e61feaf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.730c807a0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.730c807a0.0_1578435633072_0.6816362411493981","host":"s3://npm-registry-packages"}},"5.0.0-canary.2213152cd.0":{"name":"@material/auto-init","version":"5.0.0-canary.2213152cd.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.2213152cd.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6bce8f315b03fcd39dc436969b5f11bfc35e4b11","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.2213152cd.0.tgz","fileCount":14,"integrity":"sha512-Nzn43BQZa47dFv4gjAjE5jhNKIi6DEAlVr2qnlRoQnyo68c5lWVGgd5K3dkTVKd6398WcRDcJazLTnbzMJqDcg==","signatures":[{"sig":"MEYCIQD9GJclRM7pGyvmN8fhDD+B/N/rhgniTSyQASy8mgBkuQIhAN4Tb3TLbVjIzt4hiZanv6bNOBt9BiIgi+/E2zklFhqF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFg+rCRA9TVsSAnZWagAALosP/ilzqT1RtIM3pfJgmwyk\nigUu7JTz/y23GYtU/c/Pri6kHf0yCZpNjUMxsAHAuQI6pv1YaS27SxKK6tyA\nAP4HeLQk1ejtBIXfQRhLswl+fr+3EwHdR3G5yx+oLJVI5A64wtKwps1gdF5b\nTuHehRj8UCcADjkNKgvEl+U/tZlKOUaRlUVqoywAzrSsm+K9mG+MC68npPyJ\nktccoMJ3ixVqWElajpv4iaIsQPcSewnQuJGQSfm422q3l3F6w4mNO2Su+Ufx\nyuRy0hKW42VieTkJ7/qbQn68TZuQnIvLDNY0UVf5QLMONGvelyy5fmq4E7rX\nNvE3DCx7IA2nZXDJssFqRK0qBFWMSBKuzHTbfmBg06+Nu9hUDcyvENL5Yovc\nc4ZQc1omKonW5P3FWm0dDK1smps0ZBmg6TKu7ABj+7U2ieMEYzkD4nWK2xP/\nXCyiWiyjbwkwy2txO+yPw7LoINXzBoylTLrty61Bl33VYVWuMShzE5nUm1qK\nkjYfXCP7cznMzeqK8W75G6kGNM2Z9uUibkQRzTWkgEKUXQc/GOjSUj+PNRda\n4GDrIv8vTRw1IkAjPDdctEiv7ttgWyiLfyMNLbC6p1FPSr+F7KswOaJLmmmV\nIRZvGCakhHoJ6jmYxflAV8X42BMjnxk5uwJn/55V692tP6+LdsdBghs7aAtT\nJRxO\r\n=1YPP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a3677a82eb2000c085d0cab420c907dca8cf13a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.2213152cd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.2213152cd.0_1578504106807_0.07661724655209512","host":"s3://npm-registry-packages"}},"5.0.0-canary.5750f7169.0":{"name":"@material/auto-init","version":"5.0.0-canary.5750f7169.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5750f7169.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c4fce0e81538fa071b3ac527d2b906548f620ca7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5750f7169.0.tgz","fileCount":14,"integrity":"sha512-uY3Cbyohr6vjkHBzKNjB+F+WQtN+4y5Gwwi84VdYJm4wBBNeDClMbVQ1xAVlJK8oySofyAXEGuiwVA7O1qyiQA==","signatures":[{"sig":"MEQCICgUmoZ3ZzE19TozR/imgBZa38tGVjhBSvJk7/73pwYXAiBx5tPeroAaQkS6iSdcMyjWvMA8xJRtXJllrhNkrKkGiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFhfGCRA9TVsSAnZWagAAeiIP/3bvRMHFf19MgVW2ebR4\nxm3io+BFG30DRu8H+kjEGrooERbpjS3C8WkL0QAJpQb96jbX4BWqrk+awL8T\ngKBalTeuwieD+izvUIGlClaGJIhSqEgEZUQae24ozzZO1EQftXNDTaRhuz1C\nxxFWDYpV7azCQJO8KtwT2V9SmqlIIjtaYoP9cq+wIHM9vL+qO/7QjbVcwutM\nOxLrFSlI5BXT4s+BV7wO9Iu+rfGl75uN0e/UPcv4Ua4cSMyd22TrEg/yNLW7\nAwUPXC0ooEHerdEapkCN4L2Fy3iJXC1LTg9C/F56nB3B2ZZ3N4YSLPP+E8jf\nvUUl11gS2pTb7nhGpzXInPzoVf2Uf4UjmcUrWzX3O4TUMrRno35BtD0MjRdh\nv4mrHKzCebj96FApVyhF2EcpREGAEKHK/jecNGea5yFPNk3lL7JuehTVFAjh\nwaVLV9q5sjEaIBlG7JrWRA9QvnURikDQqe4+3jQxnokiILV8EogmM16xuhBw\nlPs1Dlwso8zZhcJs3xpeRytQJjNcxM6GabGqjMp7QCtuGE0trd9DTe4T5+iJ\n5p2iMRoaaeMjXLSg7BFhQrMb5rRvxmPmTLr9/YTadmkdXuvjZBujVGOck620\nl4a1O9LVFVMVn/pxK25Xs2fDUAeKxk8ZeTHdYNzJ+mZPIqIo4KlZ4f5DmQt2\nwJkQ\r\n=OaQf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"394a48c85aa714b74edbf6f2b4172e4b066f604f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5750f7169.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5750f7169.0_1578506182116_0.35167608719059995","host":"s3://npm-registry-packages"}},"5.0.0-canary.f7abc7a43.0":{"name":"@material/auto-init","version":"5.0.0-canary.f7abc7a43.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f7abc7a43.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fb909c9b7346e186c9ecea5621e300d7de57f683","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f7abc7a43.0.tgz","fileCount":14,"integrity":"sha512-pL4IHJsLSxQilIMP8VCszdo/gkzdO+dQQ3EFCZkMXwKy36+ZYFYI/x43p2xxCCgwFu/9qGjzhs5ahz31ylewog==","signatures":[{"sig":"MEYCIQDW1qYdOMQV2MxIrC0dKTIaCjnf9KItMWO/Yd7cu/Y6BAIhAPDSQpL4ctaf4Xx8GSb3LN59t3m/DWe8go4itOhv3Ayw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFh8GCRA9TVsSAnZWagAAIe4P/iKHUq2dIbdXmjJD2cin\n8+ohjieFbE5+eeWPMSbmWN87BYc42ncuVlB4OM5IcJQoNnYlpajRfCt+aRvQ\nO8LWtNAERFH0YzvtJWazbud/biBiXatyzQSMaIWKrak1xtschcGKUoftPAvP\n1L2iWRPuE799LI1CL87TgsANaaEOTFQ5LgPkdDpry9526DAGJ1VBVFrM3x9a\n4QxCZ2sRs+EsB+3X6nmrEBI6fC0oIeW8EPggLfaqCUDGFWtFLZsk0njl7FDc\nf4D+EcDCJVKCqGCHfbKSYNL7wKzKrUEeQmkuStoAEr3RMqVx3UPKSU2H/AKk\nPDzc1bvy0zSX7equVq18GyksW1O9VNak1otAg5g1oqbAUZyjpQdWzXVqdxsj\n5PHAYi6t5ZP2nGFcQYJeCE8vH3dzLKILJjCzIqCnvyYIbcd/DEVbTDpxkh65\nc0VmFR+BVTPJrYc+PDpzNTnHcBDjlfO+dnl/IQIlJCtHOxdGPBZKTolXTdRB\nrx/aMZeCpH5y/+31mZyWKmjF07uX+ibRKbDBldAF8k2LmfDoRqRjaxa99ElE\novmEP1dthLipaL1+sIk7Q1pTEtzNSx6vjtvJemTM6SI0GUbCAmy9jlT9Qz7R\n/PqSRxJsptcb5TtVgz9jiHUm70JzOZ6NLuxM8DkCtRrt6ize8UkOe+RGcFUI\ns9ar\r\n=0Coa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f7431b4b45a3e410e9cbc1ae6abe69c3b00221c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f7abc7a43.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f7abc7a43.0_1578508038403_0.6749764892715489","host":"s3://npm-registry-packages"}},"5.0.0-canary.bf7b4a061.0":{"name":"@material/auto-init","version":"5.0.0-canary.bf7b4a061.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.bf7b4a061.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4750190d9085c3b32a3f36737642e2fb3dc86157","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.bf7b4a061.0.tgz","fileCount":14,"integrity":"sha512-GX08cmaeBXaeNsYEmUljyeNOspTJPsPuPdeIXQOleSTf44uKJO8YXDVC3CM3KAVtzi51TYfiLoRvM/Ar8F25pA==","signatures":[{"sig":"MEUCIBKiPdk0mcWFn07YrTT0wv6Xiu6a9e5jqa+d3JjSTiDdAiEA+7jxVRqXPiE96/CW8P0Wa6uqb90DjnzuO4JZMuk+VvE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFiJDCRA9TVsSAnZWagAAYboP/Amq69xC2j/adzMIHLo+\nh8Oouq/ioFhxX9ytn2WH2O5auOMcIS9tt7ifpfPRHRcFRrr2EvIpd2tazB5M\nMqMAM518JE2LC5Q+NUu8vaAYcp0pDSobatCnu1Fo1xBth+4JAsGrTb3Ikfaz\nMPJNN7v4yWSnQd0mhWZlFpLGnJ639FNj8Sxnvl3OLOYyBd6YsZhn+jmboBPh\nbzxjVXGLjNVu0igVOmLonMy+SIY1qrLkc+DINO+767HwrnxpvlbwgusKmjUB\nfzKhl9I5Ofj/lXW2qcWSzo028vTf9J86qG4XYGXjW+hmJ+BWLhVurI1cUF8d\nEdMKenvAYC/fHHbUgnEJE/OebEaDJ1D6j6YJuE7aNs71WFrgxzfLk4H4QmGf\nK92AYNWX2af5vkU9CKvkcurHeH+HDVvd9vEAv3ixWh1nM35zGuMBr6bVDyOw\nJ0YOcIypSeXdqguWsHQ6oCEq2cKjcVE3rtdhSA+rvevVQB0QDCUKngvlzCB5\n2L1SLVDywuvGq86NfBSIunYiRkIGAztPgL5PjBXaTw0/nmti719X0vaYfIXs\nioHbnvMWQuIp02H/UqxEDxCjep/lSwOPtUrKwKl12P3482T7/UxZo/qB7nRW\n5bMRbuhyUaz3MK3qbTMp7vz7w1jivMcusWLtcWy9MnOfu9v02Qx67NCHgM02\nWLG4\r\n=Ymdh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2cbac03ca7852ef897dec80561a01faa8b537228","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.bf7b4a061.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.bf7b4a061.0_1578508866523_0.22440522602293078","host":"s3://npm-registry-packages"}},"5.0.0-canary.784fa7903.0":{"name":"@material/auto-init","version":"5.0.0-canary.784fa7903.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.784fa7903.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ecfc2f9edc07d382fb3a58e9483a4f2450097959","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.784fa7903.0.tgz","fileCount":14,"integrity":"sha512-DWVgqr46lYjXgrRauFELHK3ko2ZfjqiSiBDwH+kX4+vZ502DEPG5c5dBfiufhUxNojW3nWGOBJsFtkB2q/wjfw==","signatures":[{"sig":"MEYCIQCH76o490Zb3uYOT5p/Zlchk701/D17EgtQYidaEsRsXwIhAN3HJselXd2b6MmEYI/EPTlBRtGgU1Yz8T8BM1bJ+7To","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFikCCRA9TVsSAnZWagAAsQgP/R5XUKAzFo0/DRgMvTzj\npFijmNoIutQXzQVNNtJ1K+1EY5tG6MjmHdlRsLuyGXK9Cqy/9w7oguAaK+5N\nO2P32z+dDP6BXKFyl3B9612eCk5MDpqsh4LMUSddWaynDGgelFa+NBkwJAsR\ng1E/c2N0WVdjo+CLiqnpj+5A5fwSoJnJpsey1xwhyAvPRuboXLSNW7/GcqhE\n7L+presRYWN84iH/ixZcq78R/RtjVaFMN4qyEx0DKcfBg1DWAYG4lhEc7grY\nVp7zOQ0Yw3HaxPSv/6/8nZghFLmw9R/dWzuEJPQGqJrhC1jzmyO7ChxCeBj1\n6gXBbt0e1mwuNqdpm49JjtH5QfU6X3oqutqrXUsoHH0bT4xzPlpe41JIbA5e\n3nRj7uWdLv3moXCuJo4e3QFyQr3aKiFPh2z+oUQabM2gensDGb736EEdj8ht\nuw+rZr4n0QB6U4Z5OlSb1FJHueKQwNYU7VHbOVXYZw9SkGpzu56rTJ4OcQil\nPmBjIw/3XkXqV8nwAUtcJh6YGlNhg6o0zBky6A/dnkwxhn6iHbgkNosBjfyo\nmjyU0DPgYPXStkSi5dec4ddOxjw0ZAz3Nluvbu2oEg4QF7Mi3Ai2DSf3VWoV\nsUF+MO2l/Q0iD7DX3y5lCZZYNIKvY23/phCGNfpdSRaAtYlHRsNZCvewDkxz\nVlol\r\n=86fw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61b0d187c5c030042fb90bb59c1ebcd090186cb1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.784fa7903.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.784fa7903.0_1578510594514_0.038703092318730814","host":"s3://npm-registry-packages"}},"5.0.0-canary.823c050ba.0":{"name":"@material/auto-init","version":"5.0.0-canary.823c050ba.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.823c050ba.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3afe83fa61f0853d347d7ee37c9979b1ecbca6a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.823c050ba.0.tgz","fileCount":14,"integrity":"sha512-YdIvqFqtzzdRBn+icXTP208ol7Ot+N7QEvbPUiklNma3ILvphputxPKCXGFPS985ZzeS+vWzkiVSXzNHPAMspg==","signatures":[{"sig":"MEUCIQC//0Ka9ctHgW7ksoaB8gqB2MMGOcBMgvgZIgqYn2q9ugIgSSkTaKROs64PvLcm/coq1Ga6cNK8azwNtXdahsn5mks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFjctCRA9TVsSAnZWagAAiJQP/0YyiWlJ/fe6QL+86nui\n0XtP+H6iDruRBCxfrbUyTN1tTTYwQqwDcuNiofCfsPKpNaXV6eEbgtz7s0MX\nHA47lwaL+m2Dh3ePQfYDvBTOHNSlZEfqWifBFmiXbmsnYV+5MPMRDCAaYkJP\nCL4EspdjgaQE42qywTfAFKZi+YSel7sXnlnArTgsOUP3OiYnq9LlFlOADYji\n5+Y+dm99o5llfdL5OKb76ecRRU2CoqQDneV7tHt131C30O961Atugb8s/b8v\n/pLS04DBUEr+jsJ4/U01+NBwDBUAzhzL22nWvr7kD0sIv5s4O+T2wJ9fKNXH\nP5NK7vWAPwcAnnKzGutuk0RX+2W+78ye8PQXs8TCBTU2Nr4UFYymeq437zKm\ngi5bkEQmGASesTIP+CrWbQeQEiYu4K5j4Guc89pgSfNwFnaqUyyfCP7EUWVT\nf/yHQFErMzMFOKTrXGH6bHjzV1MhfM+LKqwrGpoP8YBGkBn2gpviDOTQf1Dd\nbm6IMDnPVj3bhmPj0IJxNxkeWRASAwpo4H+JldTrYapoRuZUvHfjmXwlUsm9\nwO+Ery+GgvYP5j48AXX5FyxFqzDk+EwmE72fRfay56esQsX1R/eHSGvlOo0I\nc23JYHxTD4jitZmG9EieWYX8cWYmXBDD6m+8T7RX3s3fjT2R7u8USUlWG+Jm\nvymE\r\n=Kx3t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b08bf7fb482cc6c0e80d365ea2bf510d80680bdc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.823c050ba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.823c050ba.0_1578514221103_0.8153100579464818","host":"s3://npm-registry-packages"}},"5.0.0-canary.70c708dee.0":{"name":"@material/auto-init","version":"5.0.0-canary.70c708dee.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.70c708dee.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c317c3fdffcfe6538a5bcdb8c63f7e2e90ff65d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.70c708dee.0.tgz","fileCount":14,"integrity":"sha512-bZfTHtCCYCEUVN2jv76pwb6N8vfpay/Va4XyZIvQMz4Oreyc7BHYjxcmrdg9N/1zwf72AY01H6l/bwAHVtSw3g==","signatures":[{"sig":"MEUCIAO8+v7Oqi0xojMblHwmJ8SfwZOxzAKtR/NT2e/yJY8zAiEAmi1D3vxVRw3Jm9xq37qlO4D+S9NUS9VLo/2LXNaLK9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFjnOCRA9TVsSAnZWagAA47oP/iJcFxqVaT/+mXt2faFQ\n+03ejwb+Yvn28oFM452fVl7RvIWofmde/4lkz5AMQBweYW1ShR5hg3Z63NFe\nz+WgLUUX7wmCwJoXHIl2UGrlXcspg00jLaXbAYYTgkRIVWyNVM5SVgWDzECY\nbZVDX8J+0T3KGDyvMeCBw1SDtEStIGJTG3IOtoOGWDzPWv4NF4a/27ciejyy\nyL+mKNLH8Bm9yZlPWcX10O/70x6mk+UF4E6RENnKgxyJejl+S5YTf9Kut4uD\nVGZzIUvSWd5ERIjHVjfte3e2ACVHWyNhc4SLpQTVQtQkj+G17+nZG1Xbp8Sz\nR+Fi8dtySsVMNmey0dJLXh9pMuqVNRL43+AIn7T3S3sLFPC79Y7ks5RQ3buS\n/4C5K20y8d1S3G/2eAbHTQZ/3IJAZYohgmFvfqQ8v8P1JSIXBp1QgvVCiQxv\nDY+oltQt8kkP0olePMBx2BPrQuHRc3rhX0cDkzCMsosCAV3AzS6RfAM3YnRr\nnEGVnKE3+HnJZXCKFH8xDLqEfEip9QBWEyNSKzptmqRajk7jX+SwY9nGsXeb\nf+HYTn//2Pxm5oQ8vmGxQpoDUB0hF5H1bHxgtDOazMWktVt5aoGXJVrhb00Y\ndlGeJ93uR1wmC3mtfEIqrIWj3nAg6FnqzhA/2HbcciSVhtmayS+jHbHpAW8g\n89eO\r\n=lWvR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"096bee7c4a6fa97b650100f3d0e0cb484db375d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.70c708dee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.70c708dee.0_1578514894520_0.598280903574373","host":"s3://npm-registry-packages"}},"5.0.0-canary.5ed9d13d0.0":{"name":"@material/auto-init","version":"5.0.0-canary.5ed9d13d0.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5ed9d13d0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"66847702fac9880211e3ee8b664cc18032ffadc8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5ed9d13d0.0.tgz","fileCount":14,"integrity":"sha512-0Eh4HSl7BJLSuE32vvSkBY0R/gduTdNY76eX5o5uXb3qmZUoLdjsPtkw3HV6e/KlS/3pbJ4ris66Rtb5FPsEbQ==","signatures":[{"sig":"MEUCIBuFhmMzXBaraLkJwdD3lCvT6+Uou9u6xEhvL1yXe8k8AiEA9KKPrtoWupZRq1mO5g7Zy4sLopnLN1aYiEjtO1W6UCU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFky2CRA9TVsSAnZWagAAJ68P/3i0m0ssk9CJ+XZ9yowv\nLHqM17iQSH3lSORd6/aIqGrn8WFCxKMC8gophAaZbYYZ42rRyq29NbruhI0W\nHQFVzI0eLbJO2rc7xarLHTCWVmzs+GerLQoEaiNj/oY8LcBazes/7BpicpmK\nnQgR4RioCxB5ykDMi8oXybasJ+DTQgKZ/jVQP7W8clwRx2g/5WdqKSzQCaG0\nen0lAWgafw21qjfOGp1/TbiSReuc7wQy4bssFaYRab41RxZJDBAFwrIzJqgE\n9E2ADyvq69LN6RfDsaXtKlb22z5R987eeyytHgnY+bSenHgQZIp2yFPRoQ0S\nYv2r1jAB1vrGytmsjAF33UDpT/yPe6Sypyut2N4MjJCf+K6sLUOqolifZFE8\n1v0jJ+FdY4BxlAG9pqAHmjaYptszT1WkA3R6L4MnR3u4RkGFGOBeTVnW/2TL\nBHN46Zxr6IrJQlnxHQiZZ8eu9N14YaOZvA9RoaRdNHGsse25oVKTizwtgvQd\n5r4LFQOU6F/ogIAFQGf8qdve68b5ccWSYK4f3y+LeIhiPlTq4jbtSZTiA2IW\ne8kTtsQPdcUM/18U19cnaQZyEUhry75/nkNEq2W0qikJ58cfpGi7DvrITcym\njcBnNYK60XHm7h1Kaf30HPrSlE8JmghUjtFNdHNp+NrIYnD+AvWlaK5XCrp6\nbYec\r\n=vd2A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3c9ae4313970bc3335cb0223b3e10f3fa3ee8ae3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5ed9d13d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5ed9d13d0.0_1578519734117_0.9180774060882213","host":"s3://npm-registry-packages"}},"5.0.0-canary.4819cc7e5.0":{"name":"@material/auto-init","version":"5.0.0-canary.4819cc7e5.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.4819cc7e5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d39aa06023f0633ab750bc71a38bbf36cae10efd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.4819cc7e5.0.tgz","fileCount":14,"integrity":"sha512-QIEBcXIN0zbO0i6veptknrPCagV7+V/xnizmGakMg0cZDahlnnT30ErVJ4H4PWtUKZTBiHYAc80PkoO+Ej9w1w==","signatures":[{"sig":"MEMCIGLckXy4AiTncpmE2tZ2dCxzhadTcpl+aSkg8PYa5l8RAh8nJtOS/VWk+YmPkypbvOsl+rK/dOaZnTEv7MMof5wP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlBbCRA9TVsSAnZWagAAL1gP/2axXZ0IM0c0SZcxUmdp\nstZu0u+l99g8uMjQj2bFkF7w0DzsV7/x1zG1DXb11s/bUZO5yhiCRk2lN+yS\nctobd9xOPyN1ft75U4EoK12w8WOP33MzJZmhyOnkMHV7LR1fpT01AyqyfBzE\nBd8W5UhKXZEk1bd/zu+cJNfZFzCWyReibb+O7qTdNG2dvcnXXWJlxLydrRiF\nFV0L5aY6r61PjCqsmGF+KkIOPiM6pEMwv8S5vfSH1K2ZYGRDJdpwTWhmzAqT\nTyAPSB0DYSMB3sEAvBUF5MOA/c+4MoO5xTlxCMJTxJhyviigjQLHWhXwLhNZ\n9nF3dAkjIrKCEoBrSghE/qZJKwSP/KzgK1xsvDEiDMc+b0Dz4YVqX6PUC15n\ncj87EWCJe+7gc8YJr94Va34LyskL/dFDaqA/PDYeizIe+47o+I6FHcLceZzm\nWb7jKFiShlGXGqL0PdjxMjGBVIO4xfSU6wkdxZynq/k/YxBOCAXkknUp19Ik\nMGu8u7DquSn7HVd7eBUedXmhPRi/KNomMPbCZoivj5uSvzkUhPksQmwrpvYt\noLcfAOvrz4VPoOqtaImYsjZA1E8U9j+N6qhgW15lN0MuuKhYI6o8pmxJ1r/y\nbZpA3M0XJzdtjjGk3ISScPn7Z0rZUdmz8dOCIOpztxxAy6BF9ZTI5frINVgS\ngXVz\r\n=QoZe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1cdb8bd7292ce5180cfeb2b5ea0cf8eb4aa6a931","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.4819cc7e5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.4819cc7e5.0_1578520667214_0.2021378730677037","host":"s3://npm-registry-packages"}},"5.0.0-canary.fe3ffd2c3.0":{"name":"@material/auto-init","version":"5.0.0-canary.fe3ffd2c3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.fe3ffd2c3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"81664ba3e4b10bd06573f6f66a02dff32d43e754","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.fe3ffd2c3.0.tgz","fileCount":14,"integrity":"sha512-JdalAgj3YHIm2m4iAgOCYABSqJ7MfVhLOBhO7ytV5BI6pWYlWwSV9MqqofBrZG1BxLUTl5Idg9g96laZKdq0vA==","signatures":[{"sig":"MEQCIH2TYYrXhwrVZzEUfxSR5YcsAVqagu9pieYnbTHrmV9lAiBtlRv5Nt4DdSA20c1OXx/BNsLOMCS2oSIZkJqA59zDRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlSUCRA9TVsSAnZWagAA0iAQAJXRVBMCkawcyVtpTNjo\nR2IqbzgAI3DVNbuNpJdyAgDsfi2n9QcURFZXdGqrtHaLH7fjh3Uy1Hgr53nm\ntobbNX3xse3BZAbsKJMbC+zLBw/TVi+rKvKyf/Qb+A2FYI03nLFmYmMVMR8f\nSMVp4ta8YjHVhYZmkl6aDSsEaLVFm+gt/N74px8wqbQnZLON71gVNXVoF1Jf\nFM86BTB85mf23kBZc7E0F2WbbbblO3h6yqvC2IfyLvrYGIRhSEmKsbqxxEKE\nMageoOtQFJSV2PpaNkE/vPV4fV2CMiURMQuL709ce/LhX7iwDSA61/N4TeZv\no0DihHcBHaoh+MI8LaqOSmEhuduv2/Ag8JwDzkGeX2bYEjMd8rDjBih0bMoB\n6NHmTpRhNnryY6WHfKtu/TQ99R1s8cg04Jnbq1TS5UrObgg9Jv8W2vXmrm9H\nekcKNe8xzbOQeLCkc1fl4Ck61JxeqTm1aV/93xT1W5UeJnBoV5Y5Hoz+PByZ\ntBf22sJaAM09Vpst8lyz4WQupSQ+o1OoL1PmAYY6fn/K2yuXQIQ4MRHyIxtb\nfFUD3DO7GnyWIGXhNyN9eSBVrTdW4Oc50l8uf6zQ+wJJIblUku16f1UY6TBN\nhNbij68s2GIjRk0PSd14d/KUCPuAOzctk4sxi2+C4dnr2gvjt32xRrAN+BXh\nvrY1\r\n=yoNW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ef82dd049d6c2d6439fc79408aab4567780d26f3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.fe3ffd2c3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.fe3ffd2c3.0_1578521748207_0.3610841407123351","host":"s3://npm-registry-packages"}},"5.0.0-canary.c0e850090.0":{"name":"@material/auto-init","version":"5.0.0-canary.c0e850090.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c0e850090.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4559f70c8dfecf7537aa15067f2eddf7d22a8fb1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c0e850090.0.tgz","fileCount":14,"integrity":"sha512-/hGms+Ai7YSbWOCQaep+STTPogKH6m6zUQ008IWmFZcmdKo9YIl7eZXesRssxwJLJPE/LLoc+5s1Az5KcUfxMg==","signatures":[{"sig":"MEYCIQDUj3+pO+fZhUdcWXQzAlt5udOamepHTHStx2WHgcf4RwIhAIIRN5wuDDQmUUZ6J3rUIerRj2v+mqX5yIqB48AyUxrA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlY6CRA9TVsSAnZWagAAlvwP/jav9ZRcNxzWkZe9/w0F\nyxWbYNr5zR5LB9T3TtBEAJAKeh5ElfrREyN8PwZXzW7CRtt6mTcJZZ3rmT3J\nDcI+jAMyggBFFw4/vXLdoBZV5xqseC/GHrHjSGEYY84lSkpjLQSVa/FvhRx0\n6hho1jBQaE8xl+1zstMHpnDRctPKORezMryV+wwa2FP+kc8NsWYODZD2f95L\naPY+rAmBtBfNnYyL8MOeeIY5PmN5xb7498Dz8zWZBHwGqS/Fz09u9q8PKMp8\nOd2z1Cxw6p+PQxSSHy1crTGY6RQlUroxeUbBVlNVTm+RMgErGdE9tEcTMTUF\n5SBjL3pFrrOidBhwP2q8lYxWjN2jJuwEtPQpFEUi+O9z+TEW75gaPmWSXk4S\nX20OG2oB5TBKrtKtrE4R2cy9h5Z7JYgfS/861eX+SNNPtQYhclgBBjc/ud7l\nOLILJfvvH2/+XNCv42qtf/uZ4lKU6ghuM6wZOiiRYsFdSnWuVfuBykCC9zoQ\nrqfjVjKy81ReDlq+VKaRu/y/CS5E+T2fanCXrs9GSLwvFRB+4hImJlzrm/AF\n0E0V6ihu259e7+QhaHyKd1ZL8rKv30TMkRkIGWTOGtmmPu4IRM/+tdiDaf+A\nm25ZDufizf1t4eG2YMp2DCoDjIrrSqO5MiItZYXiRAvQ/w9Wv5xipzqqaVTF\nWhD2\r\n=q1CV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"04d9e991ccc9d40d53d67d592c9532cb43e763a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c0e850090.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c0e850090.0_1578522170078_0.13651413750089092","host":"s3://npm-registry-packages"}},"5.0.0-canary.615f86f38.0":{"name":"@material/auto-init","version":"5.0.0-canary.615f86f38.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.615f86f38.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1383b45c8bd29f6c56e0acae4a3cfcb1cefdd550","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.615f86f38.0.tgz","fileCount":14,"integrity":"sha512-tAl4FwZam6YpFx4g9Y3XPFAU0awrBf67YXpD3wTgj5HphhUyOaLRQSBq5hHY6n+w4M7xtK4IdkOK46CqRwMzKQ==","signatures":[{"sig":"MEUCIQDBMJiPau4IBEACIBcdC/Ey6EOZUzkMq1dr8DEjK+ko+QIgFPVe8q4lLnzhDGRYVDiJAX1DkO0DJ/xAbEuxsVnOyvs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlonCRA9TVsSAnZWagAADScP/j3gEdEFyNFZdX+kMkru\nVdooUPb+ZMIv3uABM0wmh55/TaOh2weByjqM9uFS4NPobBEMYfFgrQwzpfKJ\nVve/4Vzi6v096gP8mFAX268grS8baKZ1bIynbfkKcCJs06ci0OofdnVbsB4y\nm+TAKuc+3XTN965irFPjkaSUQE0l9b7GEwNyNlfq/iiMgqyMMvxIYpUW8bij\nZ02tPrCGFgghGxQX1g/Ul7FtNV3fGx1ACAeOib1RJ19T7ZhZ5/Y8w8Ow+ucf\n20icx4+DA1/iWBiobLxVkMnr8qCM2n9SBtSiRY0PYxGwSsk1Z3EEu0OEP8f+\nS1xijBTLoGHX1CvRSsuRFjaEsafwtDG7LUk2nIgLbOIcrewKRDwqCwpqcRGl\n49gsycM/ROQ/suCoyrz2D2N2VVN9X4q7Dgu+fCPNJpCKOUa+nPGR0v77/UQL\nxzHW/PsCCB2rMVlDTrXREkDTD++jVuXoW17PoMwsRXglDn1S11SOuCi58x+V\nP9PkQb6LcI8JL7cFQ8K67FIQyu18QpA66qWUmaONPY7ILei467pTd0oxetnZ\nFg1MxU8etHYGN1omFaipvTWksR/i6M0Y/rwAj4+Cv8uMy4gzV1VzdbtCW7Vz\nLskft8lO3K/mrbZzMX5P289IACinqW/DxKOZYXRHZOSjq1cY4rPcFLaEK+oo\nyJom\r\n=EXaC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5ae8bb946c188918a80b70e03e7d35b1e27089e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.615f86f38.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.615f86f38.0_1578523175493_0.20313832897253037","host":"s3://npm-registry-packages"}},"5.0.0-canary.1eb032637.0":{"name":"@material/auto-init","version":"5.0.0-canary.1eb032637.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1eb032637.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64f6efb2d8910e9bdc5f27df3619d462fe45365c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1eb032637.0.tgz","fileCount":14,"integrity":"sha512-LBRdjFtIlH5uXKwxGZYFLavOGJLtojJx0f5ThaOQJyAlJyEWtmtQIz5f5gQFZKKJaSh9HgyDkYqUgXH0veEVhQ==","signatures":[{"sig":"MEYCIQCf4RTD1rLIIjitfw7kxMa2hpQ7eyaONovKO1AhjWjI2wIhAMtuGUyfHWl2qgwId38Nlax/U2lN19U7MmmRijPWeQA6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFl7XCRA9TVsSAnZWagAAbWwP/2n7rzRa7RV67i3wMzUR\nWMlMUuptZ7as+wD/fCpOT4q5xcS/UwXPtb8Mo0hHT2H/XxliZi/qHniOqmkb\nX6rDoZv3DT8lvkbbmRwUpaX151VT/VCS7vgmzqS0e/0u1CZR0ZmcudFsq0hH\nCebLpuKUB6A73cY/Kk7TIQr7G4Wz3aX9t1HmA8SqpuOg5SGXEvjy9zXB9GHy\nhGEhhHHwZs0Rrao6p0uTtWKdeZSNgtR8bs9tT0jTudea1zqCnJslCAKFaAzO\nE1Hv6nB5yFyfx99jV6FBVljlohuZimCLDOwHxDHgr210Fw59l/wS0o0V+SdJ\n0Bn9VAdYAi+eRxty0u23rV0MzJpM5+xtW6S7F+c9uGCakUIbrQeDZK3rTHTS\nBwLYyPjeON8UZYwzt15CVxpZI3g5bjCrfBHlAxv3/s3oHy/uHRBGoaoFNxyV\nxBk2kuan9XGd7KtXIcsBXWKik99/P252h0DZszBUcjs4sbVgIyw3x6BlN2M3\n4hh2Gm3ApR8cudBL36XruRz5n9zvf6uM7MBnyVLSBcLzjFYBZHondvoxUU3v\nZz4ER8Y1wr9H/Ccp4gyTMPB1eIiCIZwW0WP4Q1Vp4UBu58nTKQAZR0KfiLFp\nqEFE458S/ZK3mO4rGDRnbiJ30okd/TZoSLZLCIfvjHesSMCFze8zZc5C6ZVg\nyo2b\r\n=A6S8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ebd5efe5771491e06a78d3b1ca6b1af49af8e943","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1eb032637.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1eb032637.0_1578524373785_0.034260174278474276","host":"s3://npm-registry-packages"}},"5.0.0-canary.5bc5ebfea.0":{"name":"@material/auto-init","version":"5.0.0-canary.5bc5ebfea.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5bc5ebfea.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c6c2f4440c7f081289f84e6a6a656a0c464ddcfe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5bc5ebfea.0.tgz","fileCount":14,"integrity":"sha512-76VzAs3f003XIMzEU3GrFShs42uNguxvYOi3kNXxDPNTQ85913v+wylg1pGSOOUaT2owp4xOBVxC5kScaFRAbg==","signatures":[{"sig":"MEUCIQCh8b/D7JUnWAw2oJqWO+i/Ruv+MDoo+mJ18BO69aHWOAIgX8IcQJbUKSgixWzE/AcYSXEbhXCBHWHcGV+Rqz+JM3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFl8HCRA9TVsSAnZWagAAzJEP/3wttp3OTVw/pZj890ki\nbowfIMdb603vTXg3YEO7k7nMREVr+H1MoJceMyKoeHw4bDbEgZ6yevATYNh+\n0ClnxiDqtEMzJSQiOO/Kv9ALa8DthHxHwfkoDQe7FWATVS3rxnwrJG47KrTH\nFH3wYx9uDbeSGJFKt/z4xvWzrwg9ofqtcOOxc1W5ij/37IoIy6XRMVA2/thI\nB6Im/X+WTTZdFsTM5ihUb8pE4qjnrF/tfU/QUALc/f/eOxATjQg5jkyDSLQU\ne3jM6xBvN1pBMaUN+Dx/yPmJ07JOjJ6vaSu94Tb8ids2XQoFS4Modvcszby/\nrgyG/Hg/Jhff77fQL4sErgua1FC+xXicxuCJCVcxlfhRiaaIMxsTxkEv7X+O\ntkW9a4s1KJWsiq+q0zojbbAkIkPzm1svOTxz4RpQhs1PXihwEzFDW+j4Y1Dy\nxs5W0QLElnaD68lAfUcbgRTX1Y2MK4Lf4N8mNPAPmhwrXGPEorEihyFmsvEH\nbASpOSu3BxGxJJsCph4VoB/c5ntjg7PCYPUsTZuwyx9Rb1Mmo8nBsHtz3kBV\n0Yt7rrCyli4t2MLxr6zAzWLjmjEtkjvYuvWBQQWBofp1QQ96twQJfIJOomIJ\n63FRnsLYM34Scys3uvMhzf2WS7tYnSIphe9exe7D8+eS9sITRumylV8MQwQ+\nehAX\r\n=3oRX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8d87a9536a0b9e4af0865ecc4d9b558a6c193f33","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5bc5ebfea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5bc5ebfea.0_1578524423130_0.051351423059780466","host":"s3://npm-registry-packages"}},"5.0.0-canary.1112b8def.0":{"name":"@material/auto-init","version":"5.0.0-canary.1112b8def.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1112b8def.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"86443e9636cd51950a3dcc57570c69ee4580330e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1112b8def.0.tgz","fileCount":14,"integrity":"sha512-0L2enSMa+/Le7KAsqY8vvzZ6dxIGAzhgTx1z7OWR9g4HC5EBmlRmrwbjCMAmHKQut548PrLzCHGOSBwYLLpt2w==","signatures":[{"sig":"MEQCIGlUu9eEaxkSMorab4/VHyqASZNnMXxw0Nq6fAiqQ5q8AiBX3To54rOu26tho/Le5WyAChAiiPs7NqHSFo7YoJt1yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF6SlCRA9TVsSAnZWagAAqUoQAIjhyCb/SuSfYNPxTFy0\ngJPlnTWONwfmydkfdw/5O4VwtjfEuBGYglW15DZ0GVur8zbd79SIi+B92ahG\nA6q6UgaLq10wulIXcaOcwOzodWSFSauCndTDb/5ZboPPHN6cvzweyyGOueUM\nLJhIsa3ieHfVpEgeEPU4EGnPOMJQMHHacfTB9Pov0/g9OAsP5hbtFgWz2AIQ\nGTK8BVNCDSfszU7AyujoqboMf2HfdwH0DPfYcOOvuLB5GYj7u2pM28ftN251\nwTIcBCmD2D788++5OnJWz7U3TrkixtbywXthhD4e1VZ1S7Ur0kH0N09Etyc1\nMfRzILzZ/MyQzcZ+HXq3ekSWXNHFaK48L1VdP17UYmld/7C1AXB5rz59Hfc0\n5Xk1glnwb0yFxt64IVUOnaFi5m8QgHFGHA/9PXBKJ7E7rqXUdMBFbe8+QUbH\nWUuV0XBv6xRoiVGu0mer4mUH5b/+5IqHeL3Ll+bF+CD/iYtMAFYMoDGZj87C\nAEZbG00vsaO2NVbQHV7nAS1gdrxR4sMuqQ9OgHLvpTusQzwPWYzDeAxa1GRJ\nMkAkcD5xQwR2+/HRdhFHYl1gmeVPfjr5DOLO9DDkErlyH5N2wCbV1z8/Prmz\nZet/iGGC33Gp0YGmW3+AqznQGZ4hfFte+OfN5qzLL4+L+ZxU4yiBxh9kBYDB\nVPkS\r\n=4VKe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3fdcad176780c1976528d217d2fb149875bb4b03","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1112b8def.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1112b8def.0_1578607781337_0.9753470771141812","host":"s3://npm-registry-packages"}},"5.0.0-canary.aab102017.0":{"name":"@material/auto-init","version":"5.0.0-canary.aab102017.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.aab102017.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba148a9b1b740c04d7de5da768239fcf539c71cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.aab102017.0.tgz","fileCount":14,"integrity":"sha512-NN03sxkt8mLCgqxq6bHdRitj+I77JCWrKAEHED5//IpHCZIZi5+DlzWfAbMN4sgaMVJlS+OHRXSCDA/R8o2Dkw==","signatures":[{"sig":"MEUCIQCi7jQRfo+O75+B4quGtJG7akIypcHL5C/4bKNsrOEOGgIgSkM5dYx2a6ncaB0V2anktOrnQAjVQfbKIm0UcdMu7Ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF8FKCRA9TVsSAnZWagAALl4P+wYh6EdFvKN10Ao9BeW5\nmJhRzxNCIKbekdzNvIl3XzHEVAcF5+2hBHNHlDD7w/4jD4TRluZTwvdxAq9d\nj4jInGeTBhgS6hG1LlEBCiy+VA7uek+PYxHyAAXkUlmY4KtUq+Fxq+zUW728\nMPjaAxRp7hVY1IQ8pAFtfoQVjgfnK2jY28QMNLpfMmr+PNhnFhkpW/4LTwBM\nWOZxuA70EG04GZjcGMCEBqts5ZiTLOeoQNm1yLIwblzZxKjIKwUKrWqlNKkV\ncEVeCcZLH2HyhWRODhvKB7Y2JqZguN7rKp5QtbrVZZXQwhKnBBCmy09kCMiQ\nQekQQpd8r18CdWFXOrwRF3Q2afMtohYFPSRc/mFNXsqGNWkO4sapdARHy206\n0KwktIpI0FmWBj0STCp6ceqO7nd832B42VXpm5sdA9B5VrKCZp0OyCfdvTET\nrlj2QXHgkX6z48TNHniBmrW71xsC0fghUXGX5OJsnVZzkuV8Q1sfsOGS+dwN\nsSHy72UVl2LU4uiBbXMGZaa6yBF6DRRJ+kJX42quW5Kf060u0UTWhnueJQGp\nOVEYVn8Nq8ImDUqrz7dm0LlYu542Q+Ct+Utgpl85Nv3NC0ZzKI0dOI1ncfH/\nEwjIGWg3yYDg39x0fDvzqP7KF1FfE34LIqhVNvnPhVaQJJeyHagWRsvcTii0\n8eVJ\r\n=1Z4C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3f5eab02080f0c4fb48614a44647ed55d55eb9fb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.aab102017.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.aab102017.0_1578615113564_0.4827943136843236","host":"s3://npm-registry-packages"}},"5.0.0-canary.426913342.0":{"name":"@material/auto-init","version":"5.0.0-canary.426913342.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.426913342.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c4e4c23cd25a8823b96e81bc99f55e2f68ca617","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.426913342.0.tgz","fileCount":14,"integrity":"sha512-laogpfmA2c4M1Re+GrEjJCRoLIYXB6wqY3Ip2lgy1DANibv827QVBjhgeAC8r5EqNEup6MqPqIcZiXVSBI8yDQ==","signatures":[{"sig":"MEUCIQDsCOQR/S6/98nkPHVGlI0e9jNN4ztb0IdtaFiK4CiXvwIgZPnQRRw9+VRk6c7QuPA9qWxIjN4GE6K+0xp5ohEmRNI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF9bTCRA9TVsSAnZWagAAFz0P/Atom2/JEVmrZRTeac7n\nrIubVKelu+s8l6fOjweBNkk4eoqH04VZ4xc2FoUu2TISjGPo1dqjpkrj1oVZ\nO3I8ldqrMCriXNaIn2Pay2LrfMQKgY+7PgB38UaXhBBUne3pWw7kWaTec9+B\njLoBJS562/JqWZOcts1px+joRrAIl8L0spXmMnJ+Nkvn3Zbdl+TW0prCBoXa\nBItGIoS9vyLUPCQwcjb6DUeH0ZP0fOq1PzvcpgzYkEq8dXVH2R1NlcXc5zNr\nE3PL6wANKtjDKBPQXePJTYOGWa6T3IueYNle/zwwMw/fhEZKk8+PgBnS/IVO\nsmFuJymFvJsVSeEmcVMn98nvDyBo0PcJpoLm5oMJofhof5FFlX40WWKXszTh\nY64+taPlugXyRPvWKHc17cjnK/ASTfPq44FRaat3bGOJcDr/gQ/orF6MmKSS\nwujjByouf8GnRqpIVC8bTZdbMfM3m2oGJ1O1IXbpFNb+sar3x5Gh4yZWznoh\nW5MGAyKlM4n1zYgAXxBc1cUNN/BjHUn1VyUl2m9PkCefceOhbxjT+fBNTBCy\nPetC0r8v3cze28xvRaaWD+0KJUuktDFMh+WuOyHemBISQ9jO2rULg9YAxUaS\nJwCZtA5tRb8TRIqHd5x/O0TmvDY3XiIJbA8bTROFrJTnFhkU6TjFI1qpfRRv\ntCeF\r\n=/Ptp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a6219dfe8ca1677971694ece39ab423ee8879b3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.426913342.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.426913342.0_1578620626643_0.22639837154192421","host":"s3://npm-registry-packages"}},"5.0.0-canary.d4ea9a706.0":{"name":"@material/auto-init","version":"5.0.0-canary.d4ea9a706.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d4ea9a706.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15719b30a364abdaa1b1f3c5ea368e8fffe48054","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d4ea9a706.0.tgz","fileCount":14,"integrity":"sha512-L1wLBlsTIsAQixe/7QwmyFn/yTcPplYjHyFtEtRcuXrHgMz+o296hhFBB7h0Ojz0e74AQyoGJRXEvqCyiFWIcA==","signatures":[{"sig":"MEYCIQCTyyKo1MCvgAt9b4o83MJIfLKII08qp3yuLGMBy4VklwIhAOlbzgvX1sivYUDKbZHhbQPPGhpkz1coVN4ufxZCvK4S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGLNkCRA9TVsSAnZWagAAUf4P/3ySPuKxUUyBiEXJ0vfA\nlltRdkZNDnbgojWVOgFG1zHx4bM2P2wTxSj0uVfLTk1BB8ehsKBVMv9uCGEf\n+nG/D7O8TVViGorqUmeCKiB4z/CJk+fI/DP8kP/P2pHoMnTVq+fDpyfiMl44\nHeRdZOstzSpSktO1oJCCYAZvo3RehbPviObxKafVnzTCs0T8lSGi4J48y/li\n2mUJV8KPY05lJTxDEGGXyCgnZ0ZY5LbuCAMtaSolgA+jhz6sk0+XyEgOv63t\nkfaHv4Ktaz0fH6QNwW4huIGNTZnG2dPz5J6BtuiJDb/wX4onR3LJQmG0YaRy\ncOrhnHXwrcpzq+6RkumtPMJ6xzgMBIQJPAMAzV3F+gybsF4jEmYPg/s78ti9\ni80aZZcp2TXS9DLAlT9KWCLAaGvLRWbazedjYfftOdo91cc3zSH2IS1TXypD\n4Dy6g4KMVu8QtzxcerWjdow3RmMM7Y1PaEoZ85XIsBNrdaWiHUoJ+rEGlXFd\nKvLjRxEGldXxAt2jLLDPQDD554WylnvZXYcudMfoGtkwOmCNQp/tqUQ+cZP/\nzyjcNrv28AS2F9M8CYg6vpm/mrLVH9E2w9556AnmgZ7lnR3DXfSjgjhqImj6\nB90QZAm5CbwyaYJ8y/iqc564rxerSW4mFVqFA/EDsQ8kvi1oa8uAgIHVNFYz\nA6nH\r\n=nHfo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f4f80c96af6c2e34c34a3ed8f01c1858ef738935","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d4ea9a706.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d4ea9a706.0_1578677091722_0.18161221810589212","host":"s3://npm-registry-packages"}},"5.0.0-canary.7d4ee2996.0":{"name":"@material/auto-init","version":"5.0.0-canary.7d4ee2996.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7d4ee2996.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"01aaccb7b7cf5bbd120416acc5da40df65157b30","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7d4ee2996.0.tgz","fileCount":14,"integrity":"sha512-P7EMLkoKbnZuhieigQy+kddFktqZjqkEuHqrhAqMULlhaxTZPIHe2qlWGBEHWMTy507a7MN1xhVqhq5vSe5ZRg==","signatures":[{"sig":"MEYCIQDvSHxkDIOSz+FwN9v50GHk1U94hvYFUV1Lz0zb768+pAIhAPQh0XWNX3qRR1OVc1/1/dTLmvSyuDFYLrk+h9oJ3Smn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGLrGCRA9TVsSAnZWagAAiYQP/1tAU/9MFw2k35DR5wFB\n2icH6mCeamsQa/8AezTrKF2w3hNbOKifnFhBoZlIF+PPeNEOlGDVXmSJFDck\nK1iv7xnIn4K9eH0JfGwUnr4wnksAo4o8+g699+9EhTKi20fKNCBDB6f0qB3M\nrl2tVgDhufN2Hbo+4Fx2tg0Kan466KmJ2BvRmPEFyvyQ1ucw8P9vey9bGrVH\n9X4H0qkuwAxUoUpDqtVM/qG0ggxDD5CuWBvvnRzCnLhBDTiVH3djMF8OOHPx\nR3LWzaIfwzbMe34ub9WFgYEtkwPcb80JYIFwXyuA+OrlP+MvOjb3AWAkKLT/\nUdJ32zWGMu0juh0dDvxD6B9hlLDWli1LTJ6weD1DpxMIWFEEz+OlAVss0qeN\nKteiNPhWcmc8hgDylRbEPnAoHNj1eQk6BvZbASdkvmY6vJUJ7/0FrlWfdw31\ndb7kCREBpEiuJw1FgIWOZ8+XbtiSLslaZ/c8yIRIOW4bFiE9gyi2gYoxMVBR\neW2YrU0KR1hMno+MxLAz3ZC6fLPv8Cer82vWq9v0rwOWw37AB/OoHeBnNifI\nJAEKk/WHEOXRNpmpN8yWNNDbB/7s+/mw2YQnpFJj0lGL4n0kMWM8gsbAoFrh\niS5KQ9BUmIJBrlCWd7onkc6uZOgx5xTqE1j54mjck3ZVrm1l5CrBQrpdIKpg\nmpyM\r\n=A7qP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"32cff7b459a8aa1e335c6ccc84213cff0f6e66a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7d4ee2996.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7d4ee2996.0_1578678981910_0.9698353889036142","host":"s3://npm-registry-packages"}},"5.0.0-canary.981ec9b6f.0":{"name":"@material/auto-init","version":"5.0.0-canary.981ec9b6f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.981ec9b6f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"679f3678317b6346cda54c28bc26d6310c13d9dc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.981ec9b6f.0.tgz","fileCount":14,"integrity":"sha512-bLOsR84o+oJZd3Lq+3665XchA4TpYFLtfDPnv6uA3/d4c+eg87DP8PnKGqtthySdsvsIBdXS7Giiz8kfs0MZeQ==","signatures":[{"sig":"MEUCICi6aIYXPFWU9L1b8wrkiHEakobeGIOqIvwju9s/NRcoAiEAo6rcLBGID63swoLf2TXw68TSx5ELIZHuqPo4pfGP2/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGM/WCRA9TVsSAnZWagAAfAgQAIor1nkxUAQDFCcfwjgT\nURrfz6disJFtSmJOmWCtSKMmdUGUjksdxS3LWSzVb6SLSuoGIezaBF1kY7Xz\n7lqb7XROI+jUnwabD6sE5yJtuYgekAltXWpoAMvEI5c1W91dH9YskE8umVxh\nHUQtBPppug7nDPqhzNQc9ftykrjyiA75iPtPWoqI+mA0bk99P2pi4YjqSWku\ncnEhtCdu6fB4UAvTGwOGBgjjOPZC0PH3aowKkQbFzokIOBSkZ+feNS6TwLzE\np3+XunWPRb9FNpbcZB6ZtG2Eltl9rYaEY7UOBTSSdtQPiUjKHyZkKlYAovlG\nhbx1lNY376KXVt5Ql9NMrYtBqT5Dd6W6aA5qyxzdXcwR45N1iSqVDh0oyTwj\nqkpG18FmU3CqTVcegV2B8c8MJk4hQ3u9uW5sWNKkyJhJMzifEmSQh44Nn5H6\nroBC6TG4XNZ2N2RNtMjQDpNYDJH6UANwmuVGFRc5U4rAsEhbRk4nWtamkAtC\npaeGlpn35s8G4YGl1GL10PeWkw0vG+1uaXeBzeHldOXg0/NAHaEQ+/Se2mT9\nCcBoiYwkr3qeIoWjBle7jvkFuaY10w4dhPDk8v8Sujf7F479q9RxR6E4En/c\nTCPR29mVWF6j5QLMgOiUxn/PGob3HhOBVMdqcMe7j5y8rynfigBthoKCRaX5\nRKXP\r\n=+J78\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e2e9ae33775d14566dd45608f66087b2761d454f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.981ec9b6f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.981ec9b6f.0_1578684374035_0.7206125287335172","host":"s3://npm-registry-packages"}},"5.0.0-canary.737da83fc.0":{"name":"@material/auto-init","version":"5.0.0-canary.737da83fc.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.737da83fc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2bca05d527497e92d650e1cff79d2f5c8205f929","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.737da83fc.0.tgz","fileCount":14,"integrity":"sha512-P9ReCdNYK+olwc5TuyElTY7MaAYVrQufuTu8kWzRVi4yXJz/wlHW9DJGmuWliHSdF/MVD1EfFMTKu8YyZBO9bQ==","signatures":[{"sig":"MEUCIDgvX7ASYo5sMsVBTnY+nGuEj3hg+UEG7eiaku/UBsnbAiEAv+2iV/mmovkpnGXVmqedOE6L6mz22VzRZstwT7BzGpQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGOoeCRA9TVsSAnZWagAAIQ4P/0lI9Y6cyG2NSBybiTlI\n7zFt8yqevlJTrWLuME20ja+IU85AeN54YcGy4mIljhY/PK5D03PLnyve0c93\nwxjT9fgSO4nJ3bZ4cUPqk9z38FV2vuvR3hLhhg10kb6Tg7Ln4opi8E8DXsB/\nJzIj/94/P7PG8qrop9sLH7Mu8xpU8cYghUdgf2zL5OyPgiOU/QUz7kcxS/Hx\njRi8b4K9BvVDABDefrzSb/OmvH9ubrAKZLjbZeX9JqgyYPKDZiBdAK3IN7YM\nh3p54m0IlJay1gMTa0hOSIyq45LGKiUoccgyTTXF4XJfo/D8GElvbZ2M9d7H\nlYGUNPBTWiWoNe1rRLQyfVe+U0NpKvP8wlq1rGO+2TSHhkEBgIsSZjMxNUaX\nBCJ45ZpzOixk5DCE4VA0AEDcUlbkNt/F/IyrYMDhxkKRJmNsLLa8qctgQeZy\nr7ldxhAvxmkkYhEma7hzj95u+J+QYmgblYQz5M4vRbOJkTS2vK+NfmDIbGDw\n2nxG4iPysXKMdAClxCOQiSJJqwgWslAQSVjPwtoD8XdbfKRYXe9d4VLGd9Of\nhHcbgLliEiCc+2HxXzCIT8NV7ysGrlAYY6uKSPd3N/Ej5pETWs+AG1dy3nbZ\nI5yKfablRADuoXaR7yWD8cmC2wo5S220BEJNQo0ZkuZWDRVDwHdaeCzVkN9h\n0iwK\r\n=aZeM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3ea8f6e8d81e688483ab007855dce5cba3b72015","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.737da83fc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.737da83fc.0_1578691102405_0.4330962754250629","host":"s3://npm-registry-packages"}},"5.0.0-canary.aca8e6c18.0":{"name":"@material/auto-init","version":"5.0.0-canary.aca8e6c18.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.aca8e6c18.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5eac6fd0e227eaaeccb349c272a6c74c394ddacf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.aca8e6c18.0.tgz","fileCount":14,"integrity":"sha512-hd34PASV7pwvrzZiEAs5qEDsSst4iWcJZbnJE2Oub3xEW4X/GMNzXIJan7rhevNGO3elrWLw/pVAORzaQu9dgA==","signatures":[{"sig":"MEQCIDaPfWYJws5ALB2VgyNmnybVWgg5T/HygmLzSzDCkUi/AiBjelxdC4IpHrE5jpere6/ODZhm5gnQmT9Wkxt9utuwrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHMV5CRA9TVsSAnZWagAAuYEP/jtXQTqAM4Ym1V6IY9sA\nWV3xevKMgfbIDkcS1qkhFXn7246R5lC7fTUOrkJNZKT3MhJhtLnAm57N1h2B\nbcojby9Bb4ogEBcEANuHdy3Yq2H7bPbtCiGy1TFLsMB28t19I0DRtr6zRtzS\nfrwmfQ2nC4lWQ7ElcKpXeFeLRfI02SC+zMRQgQPU1knLssx3PHJvjrIti+N7\nA72ap75flMpJDopl9/LxLcUg8gOSFQvNtQgtreSCJnH0PG+XVFqrlndU2LR/\nFvjprriSGdBy765EEHqv6q41OjWyS3hhg3LOk0zBZnFp+Ky0xsj32IVon6Nx\nTEgx6I6oD7DVM4B4JwbwvOstudGr/Ao67+EvTrKIwOtNQK6Hn+xIlmCvbpwp\n/KJgIIZ+s+JpZkXthkfkuv+dIBkfPPevg6NfjKy6rXVZGgpmdr7WuDrgKjyz\nOhtGji21wtImPMUVaLRxYal8W88Uv8ojdMzZKgVLBEzVH/xAbBGKrOItQ0pQ\n9+5t479QsmZmlOHn98qGXegPv8spyXrRw+yOKi7fFhDzhknhMO0M+uqFPcmU\nc9RU1PsKwRswHTMJZMGkVykhccZ56YH4fP5IGhk1W14njrkRsK6N6K/XnYvD\n1TEW3JesYcl6ZbmWRbq0s81Rv0Zsa/gQ6MgfAsDK1CMq4HE/vnhiJFJs/S7E\nNkxc\r\n=B5q3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"47bc251033c39b1b8f816f8ae77c888c07b20fee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.aca8e6c18.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.aca8e6c18.0_1578943865451_0.38546442760691413","host":"s3://npm-registry-packages"}},"5.0.0-canary.c38d84e21.0":{"name":"@material/auto-init","version":"5.0.0-canary.c38d84e21.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c38d84e21.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"be064b6a0fb2575bc5633e0ce148fe1535fc57ed","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c38d84e21.0.tgz","fileCount":14,"integrity":"sha512-X3l9o42QEwDVHrG9GfmYg7UHL1tr4onEFQ3peBORipg8IQeoIv+or5fQQNyzzBQ35bCN2BiO9iOc26sZxCx82w==","signatures":[{"sig":"MEUCIAj4YpqXgPrG4LgkWzT039WczpzVBpkBHpegqUBQxFM3AiEAu8z2tdAMU5zALEiCDOOkB+hFWIHWLcR5WMW8Rnj8Mkw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHOtvCRA9TVsSAnZWagAA1ocQAJzTpi0R+S+MsNeccBtN\nL6aySKOSrrDncRskyimX64gn+pEafweli2Oe3mUf3qLj7emd7w9Wc5Dxq4HA\nv3YHgzfMZYiHGq3O+4fpITS7ORm74M9HoBdYKpn0fzmkDwJquKHp30tkpIOF\n77BesD2CjUrvK7OcKXwf1o48BK4hwCPT5RjYquaJSDSQBjJV5XPyw+ns6gHC\nl35LwYXR+23aIJOWRb+yBYkjCQRC+zKxznLufO5QEivLiZ+v8xNWvXC20Bd+\neADZt09jfvnMcPtePqKlbMWDTs7VQXeU/6u/r0+Sw2vU9Y90CeilPbFKY1lZ\n8cS98qzZxUYjZbvUhP+k1UQYmc0EbWiexIoZzgO8tipeQwJ2SXReeXlV1sBi\nDuJpdjJXW+31EzrE3Xx/I4J1xQ1NZwlNn5C+CGvZDpRWc7TbwlqWLoeWn969\nWCYURTEFgPg2CnvEo+J2wNnje5cPU74VtynwQK2xXQpAP2hSZt3Q3sDAr3HN\n1kCeY0/2OllOpNSOEWIpqq+Fyfukcq8krw7CeJoqmgxQ1OWKJdnpaVzlmqSe\nRe9EzHFknps/hn52CPMoGamZqbzNxRiH+6cExdTvqd/wH4GNN9bTDVcOnpFp\nYJTTZgm550M3XN5LSOWeMqmXeLcqkm+5JW2J323lI7btdmCsb+EiYCAVsyrT\np24r\r\n=c77M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f283cfd55cbe9b1863cb96e98011fe4badbb1fd0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c38d84e21.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c38d84e21.0_1578953582655_0.8092328405160985","host":"s3://npm-registry-packages"}},"5.0.0-canary.a4db5fbad.0":{"name":"@material/auto-init","version":"5.0.0-canary.a4db5fbad.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a4db5fbad.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2ea45399e3825345734c1318a1467df3e67768c1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a4db5fbad.0.tgz","fileCount":14,"integrity":"sha512-r5KlfbkbGaiJPhZBLAVrhwEuUMfRYhmNAc2AG6McrlRvhm+6pE+Spnmy0JIOo/Nq/pWOqKq+5+VIQvml3WCHpA==","signatures":[{"sig":"MEQCIEAjC8J0rV4/r1qoByYZYsBlT++KyB1EiF+EfeindLzhAiAau91a8f4iaKWjSLWuSKWqaMbMKie5Z9Y2POlyXCrKYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHSQkCRA9TVsSAnZWagAA6voQAIQX+XhIiBGtiGcJxmy3\ny4QtqPapEYiiIOIsytPnT2fUBnrjLIXaUatxz80AEzJ5I4C7dDxsBbpEiMLD\ntof0n1ZLd+luJBBXzH8ZyESqL8L7xaI+kbkKTwo+tim07z1mbs+n23l8KObU\nEQW8I3TposYtr/sk4Xr8egkHMZoTMp9z0aEC3zyyB2esXSSVCUCb24nM96jg\nCt3czrFP191s0draf9RlF4gsJIXJoGQb/rzp86RSZvjhBzk9HvKv4YsRwvnV\nJPzGssj+/8gbr1/To5tLhuYu8CWNIKT0f7e0TrjthKsCTu7Hm09zcfMhAhuo\n+/yNWYYN/rrmmaCwKyLMonD0sBFQy3dX9/MON9VwgJZ+5PVaI0zMOtOYben8\nhe3a+cgHpev0qw54ZqHga+oiaiGTp3i3Ywdb3kqbgZscwfKirbXO1rSjpGOi\nkqKzIb3MxAV0+IS3vASiOwtB7gkJLM5lxvuFvXqd7KAn92+elq4Av6M15qYj\nqU3OgXrFHg/HDDZSO6T6DGtPoMyntoR32pWIAmb8p1e/znSNxTq5z1DgX82B\nF/kE+ifTGTAtvOMCpeGe1flMLdmG2nEEjXQML7ljsP9Z9mI2/g853spGKVs/\nxrbyJvtNL5rSbguwfzmhTjoZ5CuGpNAmdOxvlSdFMaHXGtljwwlnYHQvrZjA\nuNds\r\n=0HB0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bb5fe141944679686f178779345a5880a89943a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a4db5fbad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a4db5fbad.0_1578968099676_0.09750098906104365","host":"s3://npm-registry-packages"}},"5.0.0-canary.faa9af310.0":{"name":"@material/auto-init","version":"5.0.0-canary.faa9af310.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.faa9af310.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5de86327e41185bbda910eae2d650ddba32c4125","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.faa9af310.0.tgz","fileCount":14,"integrity":"sha512-oDeQo7KUOQbqDpbnaKhMV3TZMW7lc4G9bzLE47qa2cUqWXTV6bGhJQTBai2nGoS4FG8XR3l7AlLVISrdP7rF9w==","signatures":[{"sig":"MEUCIBBNzcW+4y555QVt4Hja7cDnvVWo6wmmThgSN3t4NlI2AiEA233e5aiZbbfy4WGXWTp/ZOeqYo/dNGJQ6z8M58UXT00=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHfG/CRA9TVsSAnZWagAA/rEP/1MS34+QFsCNCR6Y7Qow\nPks8S1Jc+H2ggTiPc7NnoRqAmHvfDwUIBsAdQSyGA1AvwzHMq3QywEpbAfjj\naDOL6Foj/9LSLvk9466VQOHq8EleQpNQFS8DexXVIW30rvxmekoupmn3FfRy\nesO/4tttdIijdb6ci+QhRxwmmhEXEUQLlCop+bU5uRexgEswTknB1VwQ38oa\n9SEl3wwoIXEekVWirBdzLI97srp0MW9kc1Tk1gDlogYopqsAZZ5qgxQZjkHs\n9z/x/l00kwojj7zsiv4FRVOF8F1nw2H7MDzltttjd47dDk+pYv7ys7Z/pIRb\n4o8UpNt1WHAcf9Qm15LO8pr5snBh79Cf07yQnZApUjtvloueuEQkjeaKvlGT\n4EJxw24oCUIczWsin5zxqaa+hy/pCNzBgBoqsp3usL+tG+VNW8CrStDl75wg\n3xX7Oa/J+THlMi6PfwFUUjuEgNHMBOThhDGcNoHPVlCZeCpltvgZS5Rv8CIF\nYjRzdf81DaWGJOb4na96gAO3Kzf8iWpI0VnSCoJ+/aslPlZ9bCTBZ9ZlKf0T\n3ZK/PvAqOfq725Eiv4PPSCR2p2RCpkIOsfKeP1xTafW1SgagIgRZcJGNGozu\n8lofEwid5QvmptcR+zkE47yKNQyZ845coCrrYUUPaNSRN6vhylHArpCStILd\nVBHA\r\n=iMuN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ee374355df19027c59f24bdaa809bc18183453df","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.faa9af310.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.faa9af310.0_1579020735081_0.4835319468577699","host":"s3://npm-registry-packages"}},"5.0.0-canary.60354c577.0":{"name":"@material/auto-init","version":"5.0.0-canary.60354c577.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.60354c577.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f3935ba203b1c3d86d9e41b6853672fc1cc2330","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.60354c577.0.tgz","fileCount":14,"integrity":"sha512-uTyBj+/jmm2ovHvCY/3NkvR4TkKyGG+GlyC5jTTQJ5sCIytGrJPaBPK1psk8sNDAnabcQ5ndN10L0uvhdtIGOw==","signatures":[{"sig":"MEQCICIKytXWYZWZlbkdTiKaHD0U8WzioG8UVWrwJR3kAlt7AiBHjU++7jv87xWBDXLBA0zsGRtEvYIsATyQIv+uhmm+gA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHkSMCRA9TVsSAnZWagAAksIP/2YCF/dY2mc+tzmRxLbt\nUHI+YuN6y4Xyl38/ycfJPyv/rZ87LYitR73S2eBPCDFgXO5q8sbwzqvVgvEb\no5U4F54TvLjcUDErPNGyu5SGkhTWcqe831pOqKUh2FiR+fX9dMaNnKYVeVMb\nnfJuQRVMb/OcfeboBIHZop71e/a9qxbcyultSkzBpSV4Kb4yu+PwDIl1Zeay\nJmNjdjMEAYypOIYPOB9LwyqWGiyNHUomL0OTqPnzyR10VL5Q7x2SNt7m5gvp\nXug0VHaPK05//kv3WTH+zvln52aGV3tmt6h+d0z2V5KAav1jv9rabuxKePho\nXm7RuB943hdJxbRu0K2nHNOF10r4ScqS4uwyNGB1/1nnfU5ZXnNWRkz49G5P\nxkgL3latSp2gkY90AKkdWcmAufG/YXphxiqyf5N4dJLFe3BOXqVU1Aa+jJls\nlWBMGqULz1EMTkAdmTfSLiLv/rbmW0juChcWS6TLEw3w72RwDUFvPom0OeYU\ngjJLRI5jOB2n4d1YH3HKcb45Pg1Sqwqu0g1OJmstLZqDeubEYq65hcQVE0VZ\n5H2dnF0t65WUfAzSSnRVf0Rc68cwevup8b8CLMcdn8ZpumdTKy82MJFr5m3x\nVNYClQt/ZYKLlrMY94e7o5sVMLjSxiIuDK+u9edQShDuUW1cROP1Xsm90W6n\nBRye\r\n=eNyF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d9f4420da446050561084fce698a543b0dc6b543","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.60354c577.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.60354c577.0_1579041932009_0.39522330214782064","host":"s3://npm-registry-packages"}},"5.0.0-canary.d07c78daa.0":{"name":"@material/auto-init","version":"5.0.0-canary.d07c78daa.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d07c78daa.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"82a77d368db0faf6839df44d89973cab2caae255","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d07c78daa.0.tgz","fileCount":14,"integrity":"sha512-S8CjIOeB6NFg7zeDrADVgdyhnQMrSRXwkkldHE46uu6XpfcTb8FvViL9ANYJypvBPCO+/5ImiJmFzzwfbTJ9Hw==","signatures":[{"sig":"MEQCID5oqFx3t/K89Vhoah6coHJ1MiBqwQ3UlMO0vKSPyHPYAiAmVFAK90f2WrUXgKVyrMKSIgccstQLmrI85m3kTVnSeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHlDhCRA9TVsSAnZWagAAgbcP/Rvs3tXN7OM/kaHT63DW\nZBWpMpmVMM/UhHuGGyc/EMNAGmUdCrp004QDnRpRdszkdCecU1qLPMHHHnVG\n3+uflRZItfv7nUQwFGjMXfDr3EOiQBNubDczmWO7Iiz5b3/A3HmbnuqVM8BW\nbA0/cy+AJl8ETa5CxoRRPCND/yWyp/CyUBeQaJkGAmTPAeygDrWIpf5KehsH\nOPpu4mO68MEXcmjKauvMm9s+dxYNK1I3/oZDkE/sx2jfVy/hNxqq/wqFUnhC\nD5ySiValRgwbGdPtlO8V9F5+rAGMsJPC+7GCLiQ7h2DAP7dYnG4wd6TuWSDv\n3MY/Gf8+0EHFIKWGlq5sZwDQlkomfhDGAPFgja748UCg7iGnFehuSLqnVPKW\nnfURqpBX+5zJ4/q2vww3KgJNaCyTAl07Hzx5iJopaWjF3Yob1GUGb1hhMitc\neObGMo5q1+BwoF4vphaXYAmw4wi/gPoxtm5BjdWFyUU8bUz9xFdzd7VfdeOc\nl/H0MTLGW24aeqoUXRh6x06DfQ0/LIfW5Lo/+65c7MpK0ixdylkD8EovVPSq\nQYjeFOo/thfnD6/i3CsEbyiySo3nE3Y6hMHHcJI/oR7cpJHI9PoniNb5u6Zd\njKl6vrlbzsiRHE/o53oysoU9kQK4Ie2cJotJRYSG7q9ylc3hyY7oPmlis3/S\nShr0\r\n=UOH8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3657a12b1a5b9b1742b2749f6991e06a32416314","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d07c78daa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d07c78daa.0_1579045088511_0.0349593374063184","host":"s3://npm-registry-packages"}},"5.0.0-canary.8ddd5c6dc.0":{"name":"@material/auto-init","version":"5.0.0-canary.8ddd5c6dc.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.8ddd5c6dc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4eae956bf451307947b0c38444a1175edeb0c847","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.8ddd5c6dc.0.tgz","fileCount":14,"integrity":"sha512-9jjCYbgn9ofUPW5cj3wAI0zQ0SrrqvuifMPI34jEQjb1h+nfv8NYoURKTINSWAiamu0cFMpz30kqr6TjykCaxQ==","signatures":[{"sig":"MEUCIQDcISZSAGMUBfg8umVRvmnhBK3vOZWMnsBbvHXzdh3u8AIgB2sxv2RGt/JRmPV5F0b1EMGd0swCp9lF3bmf+/jXw+w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHm4QCRA9TVsSAnZWagAA1s4QAIAmIIpOMq4TWmswIEMg\n5kP8d53xlm29Od+g0HOxkTxvbZuNWhzuJ5fV2HpJ9cxMN+XkI8YuezGIBV6/\ntldQYqbgjoZMycw3woK6Eb0HNp2r/u42+I7NF87JbFu9jfQjecqHsSn2MyED\nXmMZv64WAqISF1axBFGKyswdGqeX4pTlOxs9WAcU+gM+ytRwVWWgZLWADre5\npQqiAeHqc6e9IzO2yrbRQcESd7p1v4egDWJSQ7mXFoxcJOoP+RFdWpB4rX/Y\n8CHB/56TWzeLaPfLKj6C4JYxKRxyv5pvMdCJy9H5hvPatqbtzk/BLik7qa0y\nEBoXqXzvVal5eB02HcYk8YiNmoBymZGv2xMcLBNyXpvd+Vf9+yJ06Rbx6MkQ\ntzo7jZJ/AZ7vfyzZi/TN7YOUHhJEuLqyCaBWv6RRvnKNbd5TZuG4HOkyvOz0\nl+8gMWtarIshzLoxiKKMYQjYli/Qx4sCJ1rLfv3X6LFK0f0bYX/DyfGN9Cmg\nN0vGfkds/PJphY2eARgzIwT1y+PWuEnN20qZrrp7kSrdRC2RLoHaNS0SUhjN\ncmmcOL7QKvcISHaClAxq5/yNko4aqP4ffb3yaovETTcIQ2s1y8wZBcjdZUMW\ndOFU1ZmMzaqk5LXDblRu3PCYa1uGCB0PiDG6NlkAgXWul9uoTEHRQnWFbdI6\nbxnc\r\n=eYuz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"939fade350708e559f107b53d2ab9d27d6f84f1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.8ddd5c6dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.8ddd5c6dc.0_1579052559567_0.8624041293096703","host":"s3://npm-registry-packages"}},"5.0.0-canary.a9511d870.0":{"name":"@material/auto-init","version":"5.0.0-canary.a9511d870.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a9511d870.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"42505838a9b68c66d2a0b1957191b45b92eff4dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a9511d870.0.tgz","fileCount":14,"integrity":"sha512-sQtt0hnhO9E4oytVTZCHd7i+YKv8DZZRHdp6AbC/JVX5D6DNljXBcAQLfORefyvp4XkMYEx+bivDXLHuEjIOUA==","signatures":[{"sig":"MEQCICbF++1lj9YnVgBj4Us9qTSswiWucWO9EtaoxzE3061qAiBuUXL/juKsKUWTaQxIHGL2jwMDdcYqWxx8KlaPgIhvSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeH2N9CRA9TVsSAnZWagAAVlAP/i1fNgdRV/PRLETdp4ot\nr9VqbutXmM/TedpX2MnX9pdn1H8CyCannlGFNpxnulrKCUR1jmekkXQr1io9\nDSC6H/TLUO5N7nYYZHjmj6GTCDDGZBJavLXDfQ1uflJqcobG79eggviyuXM1\n7KC38iisEK0qOg+SmukY/q/yhD1rYjf/tx9eIaGJlC4Z8OHFnrtoJosG+6pu\ndEZKoohmnvnCcN0kQo/ZKTbLsrDCb3wuql4XaCMzGMydMx9Xqa/dwh84HNju\n0aYJwtegIGECixHi8WUgp5dRjpc+QwXV73br+HVecmPNEVjxY/4ufyGMn0yY\nqbZ7u6p6uGy3+kPoUsyiBRWDa96w/vRXC2ieDyZJX0G2AkCiMtUQocXKsnHe\n11+ohzPn1mKoFkGDRYlwAewGnLI/E+lIKznsTLdloFQN01X1JbWZ9kvtUloC\ngBOJ7+IDLNYO7uwoUWZTmQDPGvW8xPSYZtb5hUi8TkRk/eXOErqXQ0iSCLts\nIJBECjbLRPFbYj+E6i+GilNTfAymRe9zIEkOda/1esHXfGpbr6LiXAHaNgRF\n0P+B3YwSMnqsgjrRwy0Q1IbAu8xwHDHnU5L/qywYnQCmOz9xwTsYz2V8NFuH\nwPygdKv5LLdOT9D1C+PV64dGrRjC7R3JZh7UksT0TWiQUFf2Yfy7xF8uBCUd\nQcbm\r\n=xr9g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"69b4f620220b7e580f5273bb82be01e5990b894a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a9511d870.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a9511d870.0_1579115389280_0.13689020213242542","host":"s3://npm-registry-packages"}},"5.0.0-canary.5d4b82bac.0":{"name":"@material/auto-init","version":"5.0.0-canary.5d4b82bac.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5d4b82bac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"263a958cdaf671cffae0013ed209ea67313dece3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5d4b82bac.0.tgz","fileCount":14,"integrity":"sha512-ca8y6iSRYd631XypchM2oUse61CymfTYTXi44DpPUqnS9SvYfvkYUccPJUC0pBpxeO6qOIKX5UNLp1DRjErfZg==","signatures":[{"sig":"MEUCIGmaIolo6CmLoEhD7VFo8a9DvMz2GcKioCr1jvRKSA3QAiEAzsV2ryoF7jDFQctaqEh06yMavhjJlKPNyCCPUzzh3D8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeH5Z1CRA9TVsSAnZWagAA+PgP/1ptrIptpnrFvoYw7tSs\n6SPkJnV2aGGGqBxC6wEIfaNfbAwrFzXS/4jdSwtE8e7nyYdPaloRR5CQwUSc\nsYXzPNE5CZWfeloATzN+cdA0S6CTerFjZJwCMQh5FvdpPwSJ+LHK5qFfG3jv\nU6sPswSMYJzWTgxxvAJSutYagGEJGsUuMUkDsFJl/hPhGrO+uIpIeX7mJ5cH\nu0Y7vYb1CYziJIUHSCUSHDHcyJ1rRiFkXhOf8fSPIrbVjCbqmBgOyxCSK0BC\npeyHLjiHN/PSyjjuLHn+qA04AbVSV8KztF09OSm8pZIe7mHgzVIVIkGRv5p9\nO9YFToP2pNULUiueeDZ+HEOH4y99PyLw2BYQ1N4WrCz3HA9Bsal9lKxM4/4S\nNmy/MvLuACBQ60zeFIL6Z7WTxfU0fjSSoPM8yY7NlFTk3FjBl3gGPfEQssPY\ntpRVMDnCY4UITudY1WeFlNYwcLIie/fCCqQ05C8zJNoiN+L+Rs7TUmc5HTtd\n3QjbJ2lp9kVt5qywNKxNnu5suMbJ1g6HXrxcaVPmmkAw8wMHYNrfKtL2B471\nleTL3Lm4TkR6+5PLe1cCBupj9sIJ7HYOWJ2Hi38SNbTfmJ1FfTnZct8JyCml\naJf5GK6ApVS28v/du1AbpfLxCaiJHXFlfMfS1EPogfvSd15HI1BAbVs2hrNt\nd0fK\r\n=N1wa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e679f52745cb7c74219ab22354c6da39a642ecfb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5d4b82bac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5d4b82bac.0_1579128437086_0.2739789966649684","host":"s3://npm-registry-packages"}},"5.0.0-canary.7c8583c4c.0":{"name":"@material/auto-init","version":"5.0.0-canary.7c8583c4c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7c8583c4c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b38317e90a6552fda8180bb0c50c452f42195e2c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7c8583c4c.0.tgz","fileCount":14,"integrity":"sha512-1FIHl0XftzZ2afs4knhSUcrBuNofChxd7jbLS+IL8Oe/qJ8S0sjXrivG87hHQCOTxFef2YwqgFYhSnyVKZSQEQ==","signatures":[{"sig":"MEYCIQCGQGcawduX3J/fRCuctN8YvdQvzzGS5fCCXpZKKMEzFwIhAMXWXqEjhV9sdc2RNHj1XiPiACSZh0vKhxK1PailcG71","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeH5aDCRA9TVsSAnZWagAA3JAP/2ZtNHKD+QZZnbvNeVjg\n9oxJ9C1MPiQVZtuSld+Xu6aMAlmq+1aknGtIA3+jqsPonD3ovAgRom7S9syH\nXn6DdBLybcMuy1dfGonlDSzfAaPVPwpjVG4NQrlBFHcebmCurr28CVHjJXjn\nrZxda68Wir0l3qvzihZSIFxTSMlbBR+CALzLORJhSgzG3CuwGIVskde2s8gs\n5dzUc3dqNNNx9zg2D+82P9j0645dH3T5yldmJwJgBnaDVsBxNNQ9OCwt2Mzs\n4oJjsY4lefSwCtAGaRPNdg7dorO0Q1+Vc89QYp5vMbqQrJFdamHRWOCYzre4\n8IJAQ05Fxm1nuY4deQlLGBRqm1AS4s4IiP1vJorLynzHsUIN3k8gljrmj0gB\nVbCxbkfWmT+8AA2YdOYK6jdbVZs7h1xdad5LrtOIVZTMOjES0Uy01OpbfPft\nGkNx7VTEoTmiEQ8jXe0A7+Foemzd6yz6f1ndsHh6QUt9RxDsgwUAU6i+kU1a\nFFpRz6GOrFmAkYe1qV6wqd7CCCi+5TnTE9ibHxgXHBDRMgnK26YHqOTQYWz7\nzjmBggcNDdsGG57jUBbczzvMYgUpzZsiMnW4427OdAfa+vc7TAfV5nKQV/Gn\nqGxJlXhnUUw2ccPRUDTfjuzhHElbXQaeWcqPQuEoD0hDypXc183ia7WIhIoc\n+p1x\r\n=qoYp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d89f2d9150d02c17271eeeb692f29f456fed4c1e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7c8583c4c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7c8583c4c.0_1579128451062_0.6199306482394102","host":"s3://npm-registry-packages"}},"5.0.0-canary.57d0186e4.0":{"name":"@material/auto-init","version":"5.0.0-canary.57d0186e4.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.57d0186e4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f5d036762fe7cea5f43c18d6553d73ef8530f71","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.57d0186e4.0.tgz","fileCount":14,"integrity":"sha512-rYdLv2uRR8EMwZ5z5zDg/mBoWkWvKdDrZ5qrdPBWAB/32dyrwHmH5red8Eh3nwLSrjQvtd0r4Z3S9do8AmcRqA==","signatures":[{"sig":"MEYCIQCHQl2qjXzkpFgEP+VRvzo88qC2VXQmYPesIWplFLt9ewIhAIupm3PqR0pyArvp3G9rdnTruuSSKaxMTp+nemv3XpiB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIKiiCRA9TVsSAnZWagAA7lUQAIvvv5iJwcC1UyNq6fpz\nStUrd8H65LXANOuokBzE47dmdQarSHwC66NmKV4qHMUNkyJF4Lk8BNYLnQ2e\nXYNFNhXE3UJSAV55yYqyuszvo0441VZKZQPc3tPtahjKJBDnTPLSwyogHzJE\ngBjt2vJg5Z3MsnBOJCD4gWf/nPRVorBJBsSMaYbGUIAST/ZOGKYwju7z40Z9\nNYBvLmOZTEu7wTmfrJnyIxP5Ecfm+ZdWPfGg39wDeVGI5QYfoaQoyGpd90tP\nmS/Vv2sTFi+xsY4I6PdL4MSHb4rU0hh50TWRRGBfhYHUwLyF360bx7acvT8a\n1CNyxoUN8s8UuAnUPxF1jDTleJq9QFgDaMRwihVxOE7EzkiCjSBU0la609Mi\n7PmYe9z5DwR8umIqOcG2rLm8pfrN3nRJcoKw546WwTROCSlwHn86B0P90X+K\nJtAlqkblIoZFQv6PcrrSgNcHqE5FRQApI43XiMx3n/uPt5j7dUW9mCGXaGWD\nWCVpltdhjdOeQXFf+fK6jQ4XgIjhvb9hjbfu2xiQByk1u6HgmT0Tgpcbtd00\nB9lBWsVIVwk6s/ummD17RJZIa9Gczqz3REW2z1qaG0Ep8fa19v+mE7Cc43tl\n3OqOFXKlylaOmoYbXUs8Bd26dCi+z7ff2XxZI4qc1JjO2oCAc8tDiXzqLWEv\noTnl\r\n=C8nl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d0058bff117ed84df93c0a71b3aa8c8d6e34cb6d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.57d0186e4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.57d0186e4.0_1579198626334_0.46343956021490573","host":"s3://npm-registry-packages"}},"5.0.0-canary.071a6ab70.0":{"name":"@material/auto-init","version":"5.0.0-canary.071a6ab70.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.071a6ab70.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f09e37033c8442bb8bba172c3a4488a16f120b11","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.071a6ab70.0.tgz","fileCount":14,"integrity":"sha512-RNmbPhzwdQiZQQ2yzRNJ3B2yu16H0P8BsHbN2bNGu0muUNzTNmF6Kqyb64TKsKWqvzGR948c8g4Ia9hoAwA0uw==","signatures":[{"sig":"MEYCIQDKKy1Oa54JMym9TZSTSscjyZXo0XygB1UKARlgSp6r6QIhAMLNZZBIXeSUHzAQQXSPxO+629yUhJpZQuKC6ZeDXy3B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIKofCRA9TVsSAnZWagAAyhQQAJUzMimbSTr4I3WFrOrt\n4keEp84tG2bgGWimSGOF5nkzFt10Xnv12pSyCH2e1DK3mlKyYXyoXa/+mZRC\n2R6D3r2SmN/JL9BjJ9MA0IOxW+p3O/HIEz8AOshSTU6CK4p1Vmoz2l/4xTxk\nBENrM20maZp9kw8NjhERxfI+lgIqkWP5fPazOw/gcjnAZICRkDCpPjWJSjYj\nvrapvnf6d2CYrLEjP1xGyJ+pOEihk5U97ypOh4HdHqGT+5+S7EmFSwFK8Ge7\nKUgXt88DoPmGNv7w6+o09w7B4r4beh6YAHZc9XXCeAOx7l07MpL68msvv7ea\nmxmYdSXPBS7iL7AMuW/n9NVibeGszl4MzLwzTJ7E02xF2Vgkp3NHWhnJtguM\nmgxSyDFg2O/g/P2DY0REJn9YEaS8kJR1nyTjPxO/14ieWjj0f9e2fiL/SsSj\nzHk8m4cwTeywWoN6M07+df46oT3akpyjdVNTH58onrjKPyuRQEQcW1fJWHLf\nWJj6CjcyE8gXzLhg39jNfgoXHQogfUZJ93XYLzSOhlThb6fmvwgjOYsZEbMW\nvfmTLd40RN33TkOff/Y7RW2Ef1HqHDobfFUSCpEJf4VqHi2VVkCCzsgbWo+z\nx/+0oxsmiRMvk2rphOhHgEtCJbnecl9Q8kcnxUh0oYpaJRe2t5TRD/WnuTg/\ndted\r\n=lo8t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"40ae26c99d00481950066e41e33aac0545186659","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.071a6ab70.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.071a6ab70.0_1579199007133_0.9792681150607603","host":"s3://npm-registry-packages"}},"5.0.0-canary.22e0cb618.0":{"name":"@material/auto-init","version":"5.0.0-canary.22e0cb618.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.22e0cb618.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c6459561bc1edd61dd85d39167fa2b94d2cec5a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.22e0cb618.0.tgz","fileCount":14,"integrity":"sha512-68pSQykGpJJcnToxlMrFce5sfhJ9iChw4bY5ne+JiZVkTQf6HVHo6zEz7DK3/wZ84muwpjsnALHgrYJKX/XDPQ==","signatures":[{"sig":"MEUCIQDE1JEEBTCWnr8saNOH3nN6TlqpN4ieYOZgbfymJdujUgIgASYXW7w85Lj7Hc/VCm/5JZpTxMp6QVTgkp+cGXh1580=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIK+LCRA9TVsSAnZWagAAbNAP/jwZ86HNXgOGy6sxnhvn\nZ3fvS8vWZpOC89PSZJFCAR3lA79J7i+jrnT0IiCZUS2OKNqkOhau4xb0naR7\nTdfTlTVvN98Xdu6LyD2PqWyHRnio4vVPYuhES9SCAeiY9L2mDE7bdpkDKotE\nIII0mULxZcnQVAoFLBHY7gC/8chMCQ922baZujY44Ok2xSv1iRuVe0Xhyozx\nOYiFvqiWKSv7z3AX/SpuSyQEADsGQ06lGiq2HNYDteVQYCV6g0hl33FHoumA\nUvh2w+QSJglIpLGuceNZBb4kmR03fuBHUl6lndeqGXlls+uZuPmbVt+hFhKy\nt4u6PKiq7n5CDsa8FERKtNAzVDAAmBrfklMFtsAyw2ag2e2gvibVv9EQ+fFs\n+sOqirKuQWBSOlTU4jBNxQ83M0CD8Hj+0MgJCKciXiIShgTgUB/u/QTZvABI\npqrruS2HDotEVDHCV+fRDpawC0X6Nz/dTwsqDcvl/u0JRGzHBkBQysAcp7yk\n7nDwAcBuwAWnZDoda+z8oAXOxmaGAsCsZ66fDpJa/jFzMroWYSZ/sB3D1/Pu\nIpaGK0CgThd4B9Xh3tAdV9jj7xj527OlRGpBWHmVJl525bilpRgfnvpYFVmJ\nZlMwlVB/IN696JWD+k4kXnpxvY9nlsCK6qpZFsd9ObMRGtvaNmKKntus0eb+\nO2N6\r\n=bhoH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2ebae5c07da66b94270b07b137673cf19d6d344","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.22e0cb618.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.22e0cb618.0_1579200395387_0.6369719884969895","host":"s3://npm-registry-packages"}},"5.0.0-canary.f16f15b8f.0":{"name":"@material/auto-init","version":"5.0.0-canary.f16f15b8f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f16f15b8f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9a435b454b45c9d03f03914c09fdd931ca0e5d52","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f16f15b8f.0.tgz","fileCount":14,"integrity":"sha512-iP1m6w9XPsoLJBMnaasncVL23SAzVae3l/O6q5JzNvxotoZ3IouW16E+ADSOKjSakY1XnXyRjbFUmHFkl6GhvA==","signatures":[{"sig":"MEUCICLa5rRjBQU3YgjFnJqaSpysl0zLl6y4PZ3qqQUogm2/AiEA0oORYmeUQPFV+FVtEMZnE0WzvgMZ7anoTuwwHU7sVPE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIPqDCRA9TVsSAnZWagAA/AgP/iKlLRTAentx4G5NFk3v\ntRQ2Z8NLhJpPyXkDi1nJqyIPHI2nn4IKttnelpnHFzKxbb8xc+6AM3ULpW2u\nz3BqNW222wgsFp1ca63/IPE9ZCzP8D42LJijZTo7/5TbTf8fJ/bsnVRlUWWs\n1mvaIkY3FSsrqPjkQw+3d/fLczrwllrJWcXbkOg5m0CC3VAWw+4Lqd1v5KLb\nsFGuCXPCjmMYqnvz20RAelsamxGxVg+WuDKHLIjtZchY34hnceM8+/bV4nCs\nXQ4lTnI/MMF0TfrOc9rXIH5PetvXho2KiwKjzx6+hHHv9CdVCWjTtLmzrIIv\nJShHb9k6uLyoYfLs9jTr5SywLh5RhFF+kAUtbDF5mEpuVH9Ol+hY7vAG5fHC\noCHq4wzHGXCMVdtRi1l2ZQ2OW3/147OM4hSwzUbsMpxZEdM5X2lSUBGi0rw/\n61FIv3BIiSOgrW4LEeSszuoMMRXc8lq36hrAZReXniJT9MDi0BnZf9S05MtY\ntc3iVEP+b6YYxSp9K8YlGWqDQYhWeU2iPILsRrKkBCyTguczulm0hrNlIzJ5\nhVYGe0Q7fHcg7dmVaud0fvQtKOoOYG1RM8RPVGSqYOkrD7UnQvVNY/tuKgRO\nl+tdW6BeJui2HbmdA7gnfTt4tjcSHOJwUDBrRywgeeGb0ZZfBAk3clMmk++0\n5bmO\r\n=UHtG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"edeb2cce6b325b416aeba9bc6f4598eb518f8b24","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f16f15b8f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f16f15b8f.0_1579219587549_0.8691613017000606","host":"s3://npm-registry-packages"}},"5.0.0-canary.aa8e43e9a.0":{"name":"@material/auto-init","version":"5.0.0-canary.aa8e43e9a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.aa8e43e9a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"99a3fcf34c6e511a78a1476c175f37b4a5cb5f2d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.aa8e43e9a.0.tgz","fileCount":14,"integrity":"sha512-QD35EnAUHDulKNtSkLcYTJkAsljze0HcHkqwSN+WPgCMX6HSa4LQ7/wxN8OPsuuV46DpJS1OP4DQmOUQfPkzrA==","signatures":[{"sig":"MEUCIHryZZwdgZztZeMLz0a0jEo7uG4rOTjVy332ZPZ4MC2tAiEA0J3SJNHwZjWBrmREYGdS9ZgHCgTIISKcYdBh9NCGI/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIQGCCRA9TVsSAnZWagAAHKkP/A1E55ZnmbSlryAVg0O+\nwJbiiNiHzVFRnrWfFK9Yce6ezZuFHx7Z07YcVQs24Ce6N1xl8sZhX5Rr3uCB\nXGIYo48d1hBE3KtdPFx5zrwFgGCSoFCx4mLSaggNIXJKa9FCFcutzpZ+7GiC\na8hXpUYFF7yZ/FMjYOG54NcB1HS+F9V9jbBlj3lCMRdvYbjNILMOK+o0dfTP\nVmHkj7lattOQ4t9xQ8tdPgoHOrv16ek+bu5T6yVhn7lOX8+/Y3CuTHzU95Sc\n4JN7TQ21kuYiahauvPB4nM3LrPT1dmnizIlrXQNVtfkIMpuRkjzduHKyhREX\npg/77spqlKF3hiIJz6JTMdcF+8vDINyt1d0j/+xuBTbDWXH4nPeNN5xWi4t2\nZLcBPreUbDhU+236UCJl0NLyprszUEBl+fJeveunrz2C+3U3TGCV50wHoTJ+\n+F6wV1iFPDBsd3UOmkd6ab5NdkXyCn5x5u3AgP5kPih9w9kB8LZpWi/0E0nZ\nmDtmAk8Ab7eO7azKfF30QOM+LAwFI8vSM8NWmkuAKpJkiWP40Ua6auPkT3wZ\nyEqbK1iG7u+VMC/uZiKFlrArwpuGqtkddGgCnh9IGMnkbGDyskihp8Y8GUv9\nJ8xpncuCgLQ0o7vgwLr5K4dYsRK0LSlSnWzziP/KqmwWZHT9zkCcGdb/Xe5c\nwerl\r\n=CPoq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b95162346a28c58839b2d3e52201e1f8c5fb9789","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.aa8e43e9a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.aa8e43e9a.0_1579221378195_0.6675799074179565","host":"s3://npm-registry-packages"}},"5.0.0-canary.fe1f3ca07.0":{"name":"@material/auto-init","version":"5.0.0-canary.fe1f3ca07.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.fe1f3ca07.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4ff9102fed1823d85761c80a133a9917b642ca74","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.fe1f3ca07.0.tgz","fileCount":14,"integrity":"sha512-uYLRoSWu3YXhJqblKHV7BZCYKW2dk8pYYbzahWVLgVKX8yeGqC+uuvtQ/H6mQO/Z7bulQfJ305KsSHNPM/1yXg==","signatures":[{"sig":"MEUCIHXxzNQWt0O/1THcq/ipg1rDXKJXeJjAiDjQ12yN+L8UAiEAqFJyG0BHPC1mupJgb+2h6cyK4uqJCpxw9mEc9mqZUr4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIQcDCRA9TVsSAnZWagAAhPIP/3saPEkfhf7YL0ryqdZC\n56N9LAd/OEP4roE8P4L4mjme+PQaV9tgXaZftntuYzdePEu6rDBYamzJ40fM\nMuriMTyuD9+vpjRTl+1kNGlsWVawZckpxEp33OWZMt1h+AUaT2tYrFvoltKT\nZtuD1HKKFirOs8XQvZ8Q3gytap+nf2zg/KIzcLkduXAl4eqlJsSvVKgv2lPP\nR2C2VSo1OUtoFXZnNKxOgsTc5gBHAh2VaKS1pb3pO+Axv2L4v+kJoEDQkWqR\nLTsBTWTOYJUyGw+3/46OOUqTLlhGDdRWArluRKBiMZ0ipqEFniZlSn+P4Rrj\nNGB8j2OUurXmjKP/QHw3LalHtF6ia7GW175Uf8m3n+xRvwgXiMd7tbjLPQGf\nywHilalssHQgM4gpSEAOrnLygaVGN3/IiLhEcy7ZDEg8OeVnomEhCqJX6sfW\nslkssG8iuAiGaJKYRArcu06N+Q9v3iWmgDxVj8mIl1uGiVlKnVpKAwBTzt5P\nd6OS6r9wuJPZUGAfp+XowkTNCnlSIddkkxExBBKUqUEFO6JDBGRgRAPlHDql\nqLcN6NresBtvG3gmIlmtF6AK+xhNbJNReItInl5+2bW0trj2SAyxmAzEwacU\njS/6J6jofD03j/IlhMbz6IfnNjJ2esmYD3H44ED+AkpXPcZG0jA4zsKMpYie\n8az7\r\n=DUJj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"55fb21a2166199c09c2ec1273c4d38c6c3eb8cb3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.fe1f3ca07.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.fe1f3ca07.0_1579222786801_0.20705479371641622","host":"s3://npm-registry-packages"}},"5.0.0-canary.d405af26b.0":{"name":"@material/auto-init","version":"5.0.0-canary.d405af26b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d405af26b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"38d68ce5a4795f29cdfdd04eb4145a2892a55c9b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d405af26b.0.tgz","fileCount":14,"integrity":"sha512-wAE14oyg6XcpmoENpBYLEChdArwOJT6wM8v2rDm0fYoLHbBHnJIhKA/KHHVrQhGLbR4EWq4JYyWQKG8S0vTq9A==","signatures":[{"sig":"MEUCIBS9cDHPKkwzYFf6jiPYWldLH3STKsjPw3+TrGN4kFArAiEAyM3Qmx5WYPjrUgZRA2/v2pjEbegbqb+4Jd2DdVYT4Ww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIfoHCRA9TVsSAnZWagAAGIUQAJb2bvT1wLPDNw+4yU2f\nZP50+D91p+uy/n07NrEmOtLgSlgumWeoUb7h2JPRzy42MHjxwGZmUz2TINcx\nlWb8/+NvaQdMt+ggx0fvFKI7wD44tYfNV2fYxPdZoZRaqMgJ6Jpke3yXkQ4C\nm9ZTYeND17BacKtReMQc9GgS6eUyO/Cpd0gncDl0DOC1XdO0KgSBdMDY5Ah0\nmXtoxMNcdiFJVDNWRpOxPsS4rCi6vqWaRbMcvwXetoZnivvdvaI4FZxw84E5\nGgxRabtSnSTGrk4cmqzqDU7UrJpizKqNFggXkR8Gh13/G4x7fXiEQ683U+wM\n0rviih4Ysob2+5s9PkWBo3YAUZ683e3mgZ38atZCGlWeCklFJX0ed5zWPJkY\npYkUPO/5DsxYQvIYjlP5+D+FYCbmnuoIAP/MdXN4+T/JqzvA3o4ZYoItexrX\nEv0/VhNpPTCm9LHbz8BGBPn0+ZwEeXS9ffL5cwXox0XyPH0X2cMQvr+79JrR\nvg8B9xt5B9l30QREiFpXQqDZehh9+wAfvuGHHqMUMnTGbxI0OD3JpKGIoIGa\nuv6+Wxs/OWwv1I7SHHRNcQ9TiMmCJtHPviggVDDoFiQ5hGJGtXzPQzrdDXAR\nukh8CbR8pRBzFj7mDlHmZrL3+WAoaCz+cPeresqANs11AcewWbw2qvhvb4wb\nV2dr\r\n=5TwG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0520800061215f99c3d58fbcb661327da2b8c126","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d405af26b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d405af26b.0_1579284998376_0.7281350736032701","host":"s3://npm-registry-packages"}},"5.0.0-canary.6e857aae2.0":{"name":"@material/auto-init","version":"5.0.0-canary.6e857aae2.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.6e857aae2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"54560ef94e142b1b6a0e0a480804753e5dbd0080","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.6e857aae2.0.tgz","fileCount":14,"integrity":"sha512-J/j0UWPTlp/irKI6zS4mtnW6mA7EEazJB8uTJ96H7mV6/V00JNHT4s+56FDAuUjf/j8NxioLqdNyU2EosT+7fg==","signatures":[{"sig":"MEQCIH462L2BYsotO+jLqoiefLhCOeOITbZJuB44e9UzQ2TsAiAcAapYhu99CCS+EV7wFXLcnvJJ9UwXCLGM5nOqk1pALw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIfrmCRA9TVsSAnZWagAADboP/jrQNZZXjm+AHdW/PAB7\nLIOX1cL7fiY4ybbIGtL/q9gPZEqAlS881ALprnGu0KyHSR4uw4/mOVg7n5uL\nK3Ni3a7CDMDt6jvXEPqoAClJwLxbkDZNCu2uJ3SdW+butqgoFgFh948FRrgl\nL85GJ3LOvmlq6trWqtnLTDFBvwR5uE8U6Vx8ir7AmYU3JWxhxbq+apcs/Jwq\nOG5eyOx2EELxEP9oq8Lobs6N5v3cf5San6tAb/bLplJSh2A0ValN/usYyafp\nlRdgt+qRQkIF5druNGXGpBvpeb0+JU/HopLy41tdFyX1FtNBt+4ZbxAqFxpm\n9NJOJhZFxr0trCy5GKMyXLfqpCJFoj5wK9zKNL25KgHAKjt9bDdcUiko5gwC\neUEUSFPDeGYzCVFlcbDdmykViXyylebMdTTSad2BbD30z0jaTiKZmQ0O2qo6\npC1nQNmnzFtDA9k0Nnwca5uo6uqjqgKZ/hqKFjTCxOiDEd8IUOr5VfbcKED+\nKH5yPEz2iFS7JwD4giENnO0o6z9nb/5kR75Wbf+yxdkFDq5TiVhUK/Lo2xEy\nPolZdCNlUxjMWZmbGf8Kt5l8FPXMLK1rJvkeny1nAnuyGcF/hvVszmy2D1mR\n3atU4d0iWyyzRQK5DK0uy/jHScn5njmmyvBWPC0CUqufCAcn2Nk4W5c7RAuu\nX9Da\r\n=xKKV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2a53aa5d8048725819709e1279ce78762b8b6170","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.6e857aae2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.6e857aae2.0_1579285222111_0.09174679615964765","host":"s3://npm-registry-packages"}},"5.0.0-canary.e2e764f7c.0":{"name":"@material/auto-init","version":"5.0.0-canary.e2e764f7c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.e2e764f7c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fd7d25487e43cc0ee5646b645d571c839a14a162","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.e2e764f7c.0.tgz","fileCount":14,"integrity":"sha512-iBxosWeDUTNjbTtuJA5KTrtlYsCqnY3jseLlDmD9dcF+vNq6SHcA7yqwM6fnz7TYUvFvI+6xsFDszsV+UcxJWA==","signatures":[{"sig":"MEQCIDx6fYy8iYekuYbIxnmfRjzIrT/bTsimANyE4DXKReL8AiAqPi/0/nHmr7zTTOsq8PIPKNfM5reZKo8qo+AYeVo/7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIf51CRA9TVsSAnZWagAAc64P/jm2mmRRp3zAeNbxgs+J\nGVo7ogq91JzMnnjw2Gloy+NMvJVK3abAxipLtKY3XFMe966053sQsLcgruMo\nmRAYYjXAzt/FiMTpLuX3WsmkyBrcoQLy8082cZfBooO+lmNb6MaEF0ZAULaa\nZdZq1Qo3ov8m/YfJCIHf57+ZHnyxlCqSghdeodVMb+rNBqRhlprmLAZzfLSj\nvw5REUWgWHJZtTtKsy1PUYYLkAuizPOKM5MoGkNJiLYJQxitJ7vA5J0eE6P8\nZj55t96ptKun742f9CxNscveTdOXcSeurZ9d8JhhoZD+bYlhhUiE0Jfbu45m\nv3Mo5IWye4DnId51yAnJ8TEwiEqZZQ/CnlhMKfqsxQ5ji2L6dzsaLIQ4vAVM\nDmvCvFek0Xu0T7o+POD8aFCgrlbIRtsNlvM5VWUbbkWPpU3QRZydPXJkl65G\npUk3paaZuZDShe4/raK8JwdB3TTySAllI4EybkIW8Xamvfh3H8F5cPwxlTQt\nT37fP4AHMEJT6Sc7qkdUgc7wpfsoC3lqQ827NnxvEcjPQ2co2z24tr+3GhlQ\n3fwiSsW/cQ4P/VFwnZc89OYGykBlDsAyIxAdUQ1ZOpiqwRqacQoJNl8koQtd\nNZ14u6qVPwdVDorob0aREGZRvugK2qWmV5h0qRMTqhfzJPxDmQ2s8PC+YNT2\nkzfK\r\n=iRyy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9dd6d44ba7288e1e0e80905a629b922c21b54e37","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.e2e764f7c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.e2e764f7c.0_1579286132831_0.6081933595664484","host":"s3://npm-registry-packages"}},"5.0.0-canary.7ef986a87.0":{"name":"@material/auto-init","version":"5.0.0-canary.7ef986a87.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7ef986a87.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7ae592b9acdc979a603b152ec5319cfca7a01090","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7ef986a87.0.tgz","fileCount":14,"integrity":"sha512-wtFg1Nqs83KfRb2OKQDxWVTDJ8gXVuH06GtgQnkDtCg2L4XIXe6BfhB3oU1kNU5TJYrSAR8icqXYcVqIll5F7Q==","signatures":[{"sig":"MEYCIQDqSosHale2JenSlDzkm/Hr5bEH6VAVD9oLLkvNdZrVDgIhAL2T5c8aS6Lpq40nMKcHjCp0ozgHNtbaMYdnk72vIYdb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIgtNCRA9TVsSAnZWagAAJ0IP/iciS5fpzCJ7Ide/hJtC\nLysp1N7ibnfvx/9RZTuQJHmAgOYvJ3X7bR4ZvjBTmO75jIcOGwf8WImPo0Bl\nzP9WRVmiYQG+fnj6EI0tRqD+BUFGsUkzLmARKI52QaTohUvaetOQSk4/R7xa\nTqKnYCGAj+YrhwTCRc0fCCBDFEUNma/0p4HWr4v9MZG7V29sJrvEoIhgaNq6\net9h2MNX0xiEVouvA073GqqtE8i49bZZHQSKBNMU8B2r0Ma1ccsy5Golw5eH\nMxPTthMYgVB8bImvPwXXcGIdLUul1ri241h6VFMHkQe8UGFK6xrRojJeQmAE\n6j63J/QM2hxXxGMlwi1WFjwHRUtYEpVZgjIVE/AYSZkcvLkWJQx5lts8kyIt\njc8KqkWi7aV6BctQ72K8FMyHLxB8Sk6vkPWuYyIVrLMiY5usvONcdY5FHbcu\nh1SNOfy3P6r+XiX8alepXbDCoYIHVVsNemUE5MY3skNjerS0ywAMC712MEMc\n1u4e5dLNnwELclRzAaq25WqJ7eQGKVV900bdABHz379Wz4W7pOPOYpy/3+LF\nXg4N0tMwB/v58cf/hBZjasHZjbU4j66fXulx+lu2XcLlDkxi/wZbFhxFM0yX\ncyJ4/yg4054sHC014zJ9BozjvOgKq/nwVUqIvwPIpjrVYT2LgvfXdvGHTsFI\nVZI5\r\n=6rzX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d18e160fa2a4eddeeddf0a07020cc2cecff9b573","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7ef986a87.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7ef986a87.0_1579289421343_0.21750223584933281","host":"s3://npm-registry-packages"}},"5.0.0-canary.29402e2d4.0":{"name":"@material/auto-init","version":"5.0.0-canary.29402e2d4.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.29402e2d4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"37709fd94d13b43cecc5f82b492d91305e0a7849","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.29402e2d4.0.tgz","fileCount":14,"integrity":"sha512-qv9z0BZUpwhQIe5DF3CpUu7AedaQ36Hg+NvAloTfppJyAxGEkbdx502HEq3jfBt69Oynvrzxbf0LX88mJvJ+KQ==","signatures":[{"sig":"MEUCIQD8LvrN0Y/jsQBWTXhUSKsSPK2Ta8WhdV0tSKlRJeXfNQIgII9sGkd4RGT3fiw5md5U0ywSUas4X9WpyToIhHxTfKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIhtzCRA9TVsSAnZWagAAAmwP/j4sUb8iPBeXNXDa78/I\n5ldATNdMvQe+NnAXL4VPLPZMlfb/w/O7KXFc14JViWB9sOAE92o8yDCT+nYC\nBLXWgxCvjVizEng/6ZwL5PCX8u7WncaJJxvzz5o8QOgckG0BJPp5jpYcs1Sp\nMwMKJ7JrUKU30JxmZjBisrvQnuNMfKLTzZLbLv+8Aq0obLdrzunPZYto1m1j\nk4hIuI24F1FgF3XPjcFBkYwdJcLRmT3AiMSVOMFONmmy3OXTGFL9T6bmMxzh\ne7SrAOd/UM+glWpdO052W90YJySRA/dJzhg8ewsKVBi6QZhwIcGJChm4ELhK\ntYVOGmQSqJaP0DLBqCtSpCw205d8uq7DKW8neU1i6iyGpc+5wkQK5IaH5SEL\nO63txjH+1SVEPl5mgYyms99mY3GYT5f+DovOJny/08RDLxNIvBzD34QQJcIB\nf1+y/nKiBubeTyAKmCXZz3Q+LDVytOcfzVKxTyJRz6VKxJc+xatXAZbpdS/K\n84VoIdgndrHkx26KfQgf3/Y7jgYimvKY6HSRXdqfyYOR97H1Ad0GAFC+oz4o\nuwBiOsvRq+r/5InEypd4IdZ7oGi054ZIy3a6n+85d2sdhC0qGw4qcvNWNAuS\n6tD80v8/e1k9cRNlwuFffDwqihG8sru6gCTgFPPH4z8zQab06iMWrfFFwKiM\nABhn\r\n=Ergz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c6caf45e8fd759ec1c6409699c53250c8c41f25","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.29402e2d4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.29402e2d4.0_1579293555244_0.41161203600898566","host":"s3://npm-registry-packages"}},"5.0.0-canary.2b3ec563c.0":{"name":"@material/auto-init","version":"5.0.0-canary.2b3ec563c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.2b3ec563c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c07874be0629dbef36a7c6b3e928aeb1ed588489","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.2b3ec563c.0.tgz","fileCount":14,"integrity":"sha512-uXuO3K162LDVxQlAUadD2ckAL+BFcabjsaVcG24n3PAsSzEPyuxt8jtiMq722pRcpJLuWmND+O8GdoGztg04gg==","signatures":[{"sig":"MEUCIQCzLZECEWb6v1xRkfogbnxunEVOkeYQiu7WBkikr2ATiQIgDXz6djtVGeTn1yQQRbuFbwspgQu8Pk9TxKlMEtHO2hg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIj8HCRA9TVsSAnZWagAAxzYP+QD0wHBtqfxt6c+12I7c\n7xPEBg9ll9qYo7Q1JgRIPfnpN8yexG6y040Qn7O/EMv5MNgq7gyQlOABRghM\n3dRKqmJr7GCix7fJsNQeNEYupqx0iofFFnq8z47W1lci5ZSHel+MIVbwYgeu\nyYYvyyMdSQFpFKC2TFh2WgEGWaGo4x8glBLUnP6JelPTO5TI6QICiQi70vl3\n0gWLoAqMf3ZBRL4RQbexnVdqhD5F6Z8TwsFvMUcrIEHIloy/S5Fn3aIpciDt\nmyu8yGMFliSce2KRp/PohYCymHa8+jEg5JXz1SG5uu+j3Mf/bi1b6Q5VKhi4\nCC4hVM6eKPh3Ccj9TBKAOdg4+wjRP/P3uM11U1korNMFuDZvzIaB+F3pxzA8\ncU9QxAxBo66oy7lNmr1Fyi21M34FR3Aqlc/4D5SsjYZK0WAZphAelr0AxgVX\nPyRL7C/C1cg2FMrjxeycuUIdDCpNOghVIoJEtR/LuEfwFgeOgeIm/5Rtlqgc\no1VUYu6hWONQleU4Dfn3m+pdA1phQH6kb5El9sWzr6LG7oURa+x/bakSWwKd\n+Wp6wZWq4Omz07sOZaZyb1p+8gfcV5kDHlSlFptv7P/olZ8FP2ReYLYzc3RQ\nqE+tShm9YdxSYNV1zCC+R1+hSZOT9y5vx/WNgKjp18Scv1ZTRtTEEwR7Mu2K\n+JZO\r\n=FLlY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0de6399e32c2553a23c71775c8e5b54fc527e5f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.2b3ec563c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.2b3ec563c.0_1579302663523_0.28913297408537164","host":"s3://npm-registry-packages"}},"5.0.0-canary.e8a993677.0":{"name":"@material/auto-init","version":"5.0.0-canary.e8a993677.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.e8a993677.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b6a17b96fe02a950ab68522104028c740b1b96ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.e8a993677.0.tgz","fileCount":14,"integrity":"sha512-3fsWXieGSdEclNMcBsij/mOn7Ebj0n6St2MDsCT9ujPg7zcsZMuP06tWXs/Lh5kPWsZ52RSETj2JWP8gsL44ag==","signatures":[{"sig":"MEQCIDkQ0itemvwjcbk9bdW9/PhDyUaVVviisUBqY9heYwvQAiBD9Bd0kToj5pgJXuyigWxfGNaSrEtgfdEqiHTA9SuhUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJyuGCRA9TVsSAnZWagAAb1sP/0vC7Kskca6FEw1aURI2\nI9bueXk5gij2YIKBT1ZJVuq8Ctdt7x9Q5+s/l6QCg0XvCN+t7qU88AYqChwz\nbYCKuYrTUcItjN9zBnNU5xearkLBnXorOsi3yDMq+2TheMj9RvWqIbrgikfq\nW9fVpjZE/te0ZRqiI46JJ4laWnSerTd+Ue4F8Vb2taegmnzqKV5JhNP5b9KF\nSPF5jV1p0uc4UEXNKZ5lC+6kKd7r+7P6uSil2rpMs5KEaWikPp/VwYbZkLYk\nvvf+KBIks2xsDNUqfdShr+JhidA6PyAmc3ZQP20evXpijfrsHoU38qcgi9bw\nXK2jB0bIRpjUCZ/k2PFJJcF+ZDZkTl6Y7eMKsiP9ekxn/WODWf6MhpOsoOWv\neXtQaXeG0nnsfW14g2X0/IQuT31WilBlGxUE1HDykbfhx6Gd+8zVyvaILYPt\nPFjOnpTonNYXL+xEOALOhmtWVuskm2n8xElYMlh6OCKCCZNv1RP3Hrc5TKhv\n60X/IfXktLoqM14+roNm3CZ/X5iDipvpe242NLtd8wv0OH9wGcvDGmYPsH7e\ne7QS11XMzUO9BgVl8iIcgd2UyxMNgZ5J4MhSWnvrMZBU5pJxPQQAExmfBf0e\ncjMoR9yc/ap3Gv4l3V9irkP3rbzSOw8zUUG/E0zsgbkgKgWofck5skcDWMrr\nC5hb\r\n=eOjD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"653e52310f90e65950905e8fd8fca6f99e87ba63","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.e8a993677.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.e8a993677.0_1579625350055_0.4967400449825816","host":"s3://npm-registry-packages"}},"5.0.0-canary.cd4903304.0":{"name":"@material/auto-init","version":"5.0.0-canary.cd4903304.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.cd4903304.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e24c484799e4d34566636f0d064f353e89d50ca8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.cd4903304.0.tgz","fileCount":14,"integrity":"sha512-w7uvvDQYPzb8bsLlGA1+3udxH07vAi/P6jyGVMYYMWA347C8uMu0SnDCUac6SxdTCWlMM5uqszuQGmg+gLNQwQ==","signatures":[{"sig":"MEYCIQDMC3v6RaEzLmYiMri2WiKeoPnhKNFTLE5MgtmvjjCvOwIhAKppYd41+pHD8LknSbiuAFd6t1xGlxjQCy9ubwyKlZ/3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ276CRA9TVsSAnZWagAAhiUP/i7APQDL50KC/F6ro06y\nVM/IJYdyFR+E+C1uPxCAflc2RMRDa+3hCA18VbVHQGGs7WhoehovU8+cj7Dn\nDdi3vY6y52CcQGr1FyU75ph8P2sYFC3kZOO3gPsUriO0T2R1XcDWSH+OBUGa\nccAOFQaLRi8Ko6w0kCwHbBFygMA2acNnjO0IF7W2RK5yqpeKLHo41O1eIXZe\nXNiPCLSrWisTQjKDAryiKMuyELGvR+WeigcIW4wEuAnD3vUeZh87Dz7Rtn8O\nfM7lSr578zDSIKwmWPKaKGfBWDCn70ADFbdsCfMws8WLqTaWH6L5SdLbd/+p\nEHFZOA9Oex0FmAX+s7TlgNz7lfPfB0Wkrn0yhZLqLVrwpqPOVw4SkyIPt3Az\nc916R8imK90ElXLkDtHSrnJvNH7NJn9WnyjKTZ/Kil3xV2S9h7FcOME1Z9Xt\n4WrxmYiX+/9UoIR+TCAYSC3PyFoPKivubNkxMepyFlCbfjTga88+QwEisIXw\nWuLyxwe54QKLJ5iP9hEFlIf6A1EaiGu1Jp2ASr/xl48+Rcm62roSUyLUQxj8\neXXMGxpo8mqaaVSIf5LU4PGSlAv1xBSUL3uneFeXeGBEQ/shA6RQkY0SF6hw\ncNy7Z3JKadAZ1cYBP6w0rZbiBpvPHqdgFfTebKgAOTywE8rXUQrMX/Mu2k1z\nvuah\r\n=Nzhf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a1f35ca90587cb380a06e8b6eb8650279b9953f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.cd4903304.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.cd4903304.0_1579642617786_0.5938950210320921","host":"s3://npm-registry-packages"}},"5.0.0-canary.7e4b04b25.0":{"name":"@material/auto-init","version":"5.0.0-canary.7e4b04b25.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7e4b04b25.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9c737e16526750b77dda7d21b54b01b50d6c5679","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7e4b04b25.0.tgz","fileCount":14,"integrity":"sha512-nXdxJxzVt5BvUfxwJ02SZcD+pHS+09V3MR/UYksDFCCZ6p89gi5E3PbcxQuK8zebNcDFRJzlej+xMRw2cin6MQ==","signatures":[{"sig":"MEQCIDDk2xOEWbXQ3oK8i7NkZFcUJuGlZJkxG5KsuOi7Z36jAiAGgDqRmpgTcw+ccePyLdtaGKlTQkkEhDZEg7IzRTW5TQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ38ECRA9TVsSAnZWagAAPYoP/0FyTNEC5bnyaJdIthSh\n3cpj/aUDO4DkG2p3j3Cu4NHLReZb2F9VHyH+7AMPwCf7CyVE4fea2NmkfcBm\ngqet6U6HL8xE/whbOSvqlMm+tx3Zeulr3h3QKPeCjv/FdP9ymRso0pAx2Cqj\nrc9uanvMDeqtdYPqpAzgMi0tgFYj27iRvjYqBpRZa/IRevV/3YgfW4JwCERR\nI3swqHCLTmhb/mLWLlDz4CRzWmRsR/fDriRTzZD9hZ25z+PP290DFCtoDtnd\ns6ga1NaprvHjBFVJvCHGgRsPMpENG+paa+mBWkkfcoWWGrpKRkgKcF5JIDHL\nBbSRl5Nq8HaUGW7IJ8bAnZ2LzOJxdce7L8qu2AEKSiE8s9QQ3PY+MadEFhw2\nUoyCZc17ZmvOimWBhrZy0BUWgjmFCyD9m7aX7CJIc9XFTJOXnsVDVnlJ3WHD\ni5Go6QUHILFvJ+0j8GD17QJLFAdZL7lxNbGqb6C/2Tmjra/vuQYP8E9+tCgV\n4w84veNDzQZ8lcKGwRka75RFJCN4e0hQqrGETc5oh9Z2dpySzQHEyrml2oDK\n6m1CCvcGWNffBgqlUcGB69zREaedbDo72ZutA18YrlrZS1UlhcLluAcWFFRu\nveaClQDtTiPFtGIkCAxxPOmhoWxqw0JaxpaiARmK5UbsAeAPo73LFBQupZdf\nGPJ9\r\n=UORd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5ce556593315b470008c9bb156d98d7624231a5b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7e4b04b25.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7e4b04b25.0_1579646724584_0.36484843664916466","host":"s3://npm-registry-packages"}},"5.0.0-canary.ebc296937.0":{"name":"@material/auto-init","version":"5.0.0-canary.ebc296937.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ebc296937.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3571c3d2474578c7f6b4866f108c674462541175","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ebc296937.0.tgz","fileCount":14,"integrity":"sha512-NzDz2Cc+ZdAgbt+QAhfPFRO9YfBZOTRQKIpXqGT9fOwEetkC0wmCnurBMTQsK/g6CgIZKSqV0b6gACIzDu1qXA==","signatures":[{"sig":"MEQCIBBkkdR0Rmagu/nw+/PIoKzBJse/ndWlQ+/G+vx3UP9XAiBkEGvWIfDzpmNir+fLmWMu5AaTyOzSxEFK49Rpb+dOyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ4zbCRA9TVsSAnZWagAA1cEQAIJcAYeyWLIbrSCNkW/r\nf2I1iuzOf4EBrR7FbxDyR0imX4TZv2up0wm7sLRsQzU3Dz2bZRp+H+Q/pQ8T\nsPKocQbezJbtkYzOxPujZ0eBdaXZVOY0cf+K0mkTlR/kDglt6lc4FuwFtQhS\nyQRHb0XfmBUMKKVij38uwxXDgzz7I4p7fVxJ3wRo/O2NMH5/RlE6194kRnKk\nnziYu/EH0PVZCuirj8HYMFcKNDF/1oB7BWGU1M3PGGCd5qUyH0syGWIch5Gl\nrxABkCls08mnYkUAcZYpNiT51c4bj3T3+Wo5XYtITuXIgTVTw5m96lfFmafT\nXjTtcq1tQUmZh1+Oa54lzUyyxNk2enTTBH8/eSmzfDSNe/iuWg6PmvsT/ylO\nFGbgVGCN8zpEFW4TIVZPjNC8OF5UZKQ8CbtpXXlic5Iwebw7vi5Vd0YOgUZs\nMdDwg4GtHAPCrydRlDtNH7uhWJgRLeinsN/P08ixsefVgOQ2vCYzv2kg0UVE\nI7WyAKi/M9jDICCP6PsxmApRfl27u7hXzUZg89exK7HjZ7xQlWSDxn7f4Zoq\nv8pA4/tfxLRxtRIT0ub9lxfohKjIL490/U9RJeeifj2eE6DdLYpO/5eW3INx\nii5SXIlgRhabAW7qLuOlUsDL9kVr1Penpd+agut4VGkxw3qdgLqYM/0Skzqm\n5ie1\r\n=8sfP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"56393bf41fd3e60f82b11c9571455b6e0b0f2025","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ebc296937.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ebc296937.0_1579650266608_0.4987954000991097","host":"s3://npm-registry-packages"}},"5.0.0-canary.cf33f113d.0":{"name":"@material/auto-init","version":"5.0.0-canary.cf33f113d.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.cf33f113d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1d7222f35fffc0f3dfe08126257f29517b36351","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.cf33f113d.0.tgz","fileCount":14,"integrity":"sha512-cnHatUULqkepTd2rbvf0nuSjRRhtQIMTf4JCbcxxsGwBRtskgVHn+0TlE3u/eMMWFDQhEj19aoWDwv1CcGQ5Tg==","signatures":[{"sig":"MEYCIQCPmBmyk0IFUDsjBNDkd3MX3wEChloE6Uwdi/oHZt2y8gIhAOOnrAxlzNPrxU4H8rIL78l6bQ4AyTfQtzCnwaHfq+QM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ6O7CRA9TVsSAnZWagAA5MgP/j6vxfhVVcH7MQThggT0\nzhSdkb4DhU+re2aIc5XXLBXwwzTlLsHk7JgkcXvDyg3Ixk6q91d69vHpzcSP\nBr5Q7qna3MGGuX8J6AxaHIRhgQfBnlDnXUPqK+KbvOeeBX/kNSWWLm9vz4s+\nhLxfv4gW1wLa4By85X2EC7HHncortcb4pi3jAQn0d1/GAGYEwsnVIPiEFvDx\nI6pLyOLi1lvbRDkuxdjLFe/cSEYofoC5PEx168JlakyOkzkirUK9wJxeUoY0\nRYBqp0N7SMNoYGxfh7PDHcx3qRqxvJmxfHJX6fLC8DEqZpcvY1HlY6d3v2qv\ngfq8n9FNVGnnZ8wYRplKy6p045ta7WG0bMvMsVnxA0p+VPDfRoqmM02XxOGL\n9RBTwl+u5hmNlyN915/vPDje0T9JhQe4vNilZLFMc22ojpBS+kZK8aWKoUzZ\niVdtbZKXqo4LmmOqeqMJT7crP6vk/Q7Jwt0nMdcw2S3pLxydmpaxLpMOHNTN\ntLq+SElefg4CAbWjHPjprAGX1dxRlMkAGsU8YLLoSl4woRrXm8opGsMe0U+O\n65c6H/uFnIC8afPe7RAM6ODl2fh09sLNrSVzNo/peDaRh4Sq+3yixmMHW9vk\n2u+6Fd4qZi0wP5LsE2v7dVxnTc8JkAsgHERbcYhaoNdn6gpgFIUeb0rnUxdO\nsaDB\r\n=JiQk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"337736b1343fc4e03714756c4fc2ccfdfe1e5537","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.cf33f113d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.cf33f113d.0_1579656123121_0.9385212928328894","host":"s3://npm-registry-packages"}},"5.0.0-canary.e1d5f1be5.0":{"name":"@material/auto-init","version":"5.0.0-canary.e1d5f1be5.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.e1d5f1be5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fbacfbfe52614e7a95a4d173c6706b6e663e10bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.e1d5f1be5.0.tgz","fileCount":14,"integrity":"sha512-AhOx/ozqA3b+mZ+ZajP20lZowK5bIYq7iqJpNZzsWu6XPZM+nQI7ciBiorMaSYqradQXKPt6RCzb9BRtCkMA/g==","signatures":[{"sig":"MEQCICVji/a4qb5EswrNe4WobRVtDXx20wSalTPN1KIbJTCiAiAX9vIqtrcvUAcra7Vl5XbzUYtNc6iFe5j71gRdE4WqnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKH5nCRA9TVsSAnZWagAAiZMP/2coMvK/IUvt4R8MnA9h\nMYYRlBfA8g2y7oCoodzuSf76L/YE0nlM+JkjO6yoxTYegnKiV4ys/dAdMz17\ncR1dmGWq1+W0lTHwGN7lb+qY5RHbrHsLZD8qtKfYik5YpZ0FxO1wZsysLNtq\n25SJn0bSEiYvM2p0Py6wiX7FlZIOKSW7EmHFKZuJ0ROWPSfe+w59QVNLZRvk\nTyK6jhgt5QA3Mpkq3ixyMN+bQ8Yg2O4Ptb3UCtXGI1u20Ml0Bvqrco3vv3LN\nWTX/mFYgnYm6uL03YZ865Bnrl7RuFuEnS1Au3HejtTNgpyKQrSwQfQ5VjHi5\nfptxBYUCSeJR7PKb+XCMaIe3jQk2gf9b3W0UnaWxgnGauXwNJnFB1mxIwbrg\nY4WuBR6k1TA9ntMibTe7s9ORvjHHK23mQCCjFnWKmOETEATQIhzTQHSbCe/R\ncEPwK9mm+RUYDoIRPgVGiTM8sFRcFMCXmEcQuLtqMuxFX5lVZ/O7w5LC73Oc\nC0IQqIvBZa+eyOpVyCntESKRzcSjWJinGywDFOROKt1vZpeYadDzCyp9WJYN\nb6vSmZpi2GmAcR5JGeI1HO2v5RZHv6KunB+fF1KUHff8zJhegl1eyME49k5v\nrftWDQXt7PghLDjEvOF0NdVQPg5zg26L7MOCpX/vP/CMqbtHMuG/xNgf9HHi\ntdQE\r\n=F0or\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4726896d58f0dfdf4ec6ed819abc20912d43f2de","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.e1d5f1be5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.e1d5f1be5.0_1579712103369_0.5292044554245865","host":"s3://npm-registry-packages"}},"5.0.0-canary.6b6a4ff92.0":{"name":"@material/auto-init","version":"5.0.0-canary.6b6a4ff92.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.6b6a4ff92.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f26f7263d876f64bfd75eac48697d0b737dcf475","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.6b6a4ff92.0.tgz","fileCount":14,"integrity":"sha512-I5/XkstiF3/rbHAo3LW6ot/1ZSyi9cImrXQaqCzBuq5YDAiIME1l/CZ+kLqgm2rPSLVVeZdRlqH7lGaHdYjAwQ==","signatures":[{"sig":"MEYCIQC55XjOo2C4Qvu5ixlKNrtBe8LdZWqQNBa+4GhUzq0nSAIhAMMRzQtWqMkxaBfDpU14+Yi/hn4JkFNqF+dcaad25tfB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKIzzCRA9TVsSAnZWagAAPBoP/2SmXCMjfT1o58OEPBf0\nP51TgWYEeNP811M8QjR+XEO8vLpdb6qWXtgLGWQD7quGP+gmRG2G20o/IiYQ\nOjzXhuDPd+YPL6eJ3DnW0pyD+SFZ5iI3HoLDcZxhOfZce5ShT9c38azPSPDI\nS2jqIpqgGwsSVbZR2fCPAwFt5CzPa6/wb7O4b6T0tn7kKZ3uUOs9H0sAY6Ge\ngWmt7yNAXWD/ZwKZeCXXsSqShTU/MnIFqDlMqpVt7PidxsxhlPjGpVX4tnly\nRE2pOUtoKm6114c0p5wSglsMRRxPW4kVp1z4OBHPMd6b0/iaxOcgq1cWhhEi\nDdtf/qSNGm07wh/bF9DZTmcGpsB0L4VSz/GxdL8v/Ku6bwZzxb2xJNyQf3v9\n2dbupcLTcJ1DqafZDLSYfqRu+RnYZG1TwzXpjwaQy0jD5MJpI5Ml61E8XVqb\nLPmPqhmMTXCX4zYh4w+yCSsM27A/UQH6y2RLAlLSl2zPejFCYnhPkbUMYGSO\nCijXmUhVjjfw2kidUJl6wO3p2CX0tNKbKYPXmGNmn2bhM/nDmXDOKv1Mqyyj\nzSlSTjBAf1rAsxMsCjHu4RYugFGzAJVRxc5iU7QP8ZVrlv176s+eqKTLFzP6\nkeYQBzKQMGbJgFw2+oA0DTyrtpAp2pOYlQxJ6emHYWrZAzsjtl3l5V1gONK0\nXTP8\r\n=OluF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4307ced3400e7b61e83495c8903f219bba0ae44","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.6b6a4ff92.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.6b6a4ff92.0_1579715826784_0.8781098399802525","host":"s3://npm-registry-packages"}},"5.0.0-canary.6092f71ee.0":{"name":"@material/auto-init","version":"5.0.0-canary.6092f71ee.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.6092f71ee.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4ddd7b1a5f9d591a586d977c252625cadbfab508","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.6092f71ee.0.tgz","fileCount":14,"integrity":"sha512-2Ma1UewGt3OEVVprUW51pyPudTKkIsE3yAceMeappZmRwKqGqTe7cK6ZLVUohnLftCWV4BV1eaeQAZinlBpOBQ==","signatures":[{"sig":"MEUCIQCIXqtSFveTybgYtBvYTVvmQAvQZ76dqWKoWPNE9oHqIgIgcUTzWcupluP77z07BF3asStDpXEEDkTYu8pK32RajwY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKLutCRA9TVsSAnZWagAAvA8P/12viAceuQ8TeKi4VMYB\nIord5wlMIwd/H6NkI+2PI/gIV0BcDEE0IwBdX6DkQd4YTXxUfK25SF9LnG4G\n+XLgBgh1HyJxalrm8jchG47JsLcS2GgCgVInEl/fiAktV5XlUQCVOCM+03lX\nsfBlI6h+kfRKLGkVedq1l35jN8fNuxrcAso2sE6du82GEhQ/fHNozRwYOUZg\niPubKRQjHzb74Y1qsBByUu6COAcyDERItZpsHTY+9EbGvNFxa4c2exsp6L/V\nitvfrrC0e8CyPzI/CWinpLzqAQ3TsasiITpyqLTXtIOcB1wZdab0emDHvM1/\n0faaOPie8Hkcms3TcZsv1If+IIfJSe2rBhAoxmMqj4g7ivRJ+ILWnmNQqtMf\nc7ptvHKDrjFXN5jRPQNA6NIAafc5u+F9INMT32z21/HfbZ/4KsYnSTwcVqdB\nVFrci95ud3FnfjOwlLzaMAqnH3TMEna8uaxCuzbVAg3ASDoX8FMBjJnJ3nw/\n9FAfWX+4SlAqF4b6t0tZ/neukJsQCp1YEtoFhFYFWhvSAPW0aKHzhdc3eofP\n6/mUYX2CxwFEyqj+FUEYZQvitgjv17vD9ItUue8W19720rd6OvByvmfSydYy\n8q2X0MDM/+OcQckLHcr7grEAMV4FjW652BpRd4NdnTy+K9WniYGsayzep9jS\n0Gqe\r\n=SoXE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" id=\"input\">\n  <label for=\"input\" class=\"mdc-floating-label\">Input Label</label>\n  <div class=\"mdc-line-ripple\"></div>\n</div>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</div>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<div class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</div>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"da5d9e639c767fd3f9ad77c867d990afc21cd359","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.6092f71ee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.6092f71ee.0_1579727788577_0.6089091752669047","host":"s3://npm-registry-packages"}},"5.0.0-canary.d8d95020f.0":{"name":"@material/auto-init","version":"5.0.0-canary.d8d95020f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d8d95020f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d23e46f934372eeedb1a8bbdc05336b1828d086","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d8d95020f.0.tgz","fileCount":14,"integrity":"sha512-LzPOvGWPWE5I3Buz9qTI5k0W0DK9FXd4/Jp8id/h22p9HdABN6OCTSaHay3/KFZwhlAiEIb4FvHggUJbZLboXg==","signatures":[{"sig":"MEUCIF3Wpf5ul4Zt3x2wEnIhAiDwvYaJs8Ov5Q7202zuMJxoAiEAhSROwfUlEtOKg+7hy6mNHja9IYbpyOfV5wyNQ4AADyk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNYQCRA9TVsSAnZWagAAahEQAIRcDwuULKdfT1npXdNP\nip27swy9pk81X6DiG+BLkWU2pummFdPMxmS1sCfh6eh8WWSa/QlgGeVIfTGt\n7JA+OWUnGUWbFTAhLW8kP/6TDdpkQVrB2/FHBksiR5xJwesKQP+Zf+DxfdTa\nwX9ifQAOsdzy0CXptel84dRFC0o8v5NAM9vBzAyaHPPaKNvco/wLtRGvgbTR\nzHRGM4dQtBnk7ENSWPsVXF7BFf+7r/Cv0dIeQjT5iNzCVRjX42EvUgQd4i7H\ncA4bALmd29Yh8EnkFuDzOb2WDvzDPc26v7hrqIPoKs73OLC7PBp5qN6NYi5N\nrAfx9zszJ+L+bdeUd0d/aecLN8RsIYanQpLUWbE+5T1hVE/hqqk8kweiXc7A\nx+goMccTbMr6ObIByAXFaqWzfp58RmzFLIBoqpZKFFt+3zaUitlnRUl02lQD\nI2LoEDMcxihufxJ+KLr9uqB3K1jtgDEleWhHdSxHRadBYFgYpBh2fKLqPxfa\n2eJsMCS19lHOPXOg/lZsEL0OMVf4ZHEUW1oeuOx5zYzjsepmk5VLxWw2TuCF\nySk7RyZGsmsHxPGkmzuSItHMDDlAsqZkvxX9SlPrHdhPwy3xox7xpyMOIf4O\neU+MdatFLEEFUbM7evVH6XNC3dxVGLwMmRHNf4zhLZ+w4m2HhwTyWTCxEnT1\n10vZ\r\n=Y5gj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6360c5189134a77fd45542c27776ac2f86b16a49","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d8d95020f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d8d95020f.0_1579734544278_0.8908474553971966","host":"s3://npm-registry-packages"}},"5.0.0-canary.b7facc628.0":{"name":"@material/auto-init","version":"5.0.0-canary.b7facc628.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b7facc628.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49a0ca78eb8183fa8269cb0c0263754973b419d2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b7facc628.0.tgz","fileCount":14,"integrity":"sha512-ACNjQH5ppAw0nmZQg1l6lmnKXXP1nrVVc3YoYKDANsHQAWz5qO9oUElBo6uyunFFpQgP3rAPE+zm0QkYaKq8HA==","signatures":[{"sig":"MEUCIQDxgc+dqV2MwVvRMJSPUxYjgQX5eFsRLc2Ck3pSImpFBwIgQlHMqzqUfDpIsuFaJpsugwu6h0v+t9yB3+F0vli/ViY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKeHxCRA9TVsSAnZWagAASTkP/2HPMR2GMTTLW4r04JEa\n/3e8HHORvdYqXGLzys7BTO2SKIdnh9oovPoxZO8mwchytvza/wcHiiOhSoVT\nEV0o0YADxdDmCe6DH2t3kmSsONNYtJ5byrDHoMBLDnbdqAlcfIaq7fCXLO4j\nOnxdm3bWGlQ93PrK4qdXhhrxYUyh6E/0HthC5vU06eNU5+2knMU5dBc4Nett\n3EkZuknUXFOPoWN7IMFiKxVAeHGqe9JxXInyE7Yfk1lTihoIsEPZR6Nvub3T\n4QtTst0LNUIFiwYy60uxZ6tlFIj0rb/1mxle6+P1I6JCr4IFQz9P6wNoTF3p\nYSNnkNaJNKrg2n4dElgF52m8n8L9kcKN7mQXy5EOyPmkFi+uCC2kYgwJaUY9\n8ac3viAh3DU+X/qgZPsydOmaOaOrmce6PeOHJ9VnkX4cg/4zS424XO+hIhlD\nOLB1rNO3n1gQlHiBAc1jgMcWdwCgnxxcbrXC/zoAACd8mnht8JlvusfrqOFM\nyy9dT3N0j03dzWEhjNWwVOTSajE+4frUvDmrdwjmKJpxgW5DT4dF1LJsYLgd\no1WWKVbpDAUPpztzeFbjJcf89NkSj+ZwDJ73AX/Un+2HjbbPjE2mGT1Q+frd\nuPfqZbaepua6Zv7o/5qQbp04AnY3kocecIMYPq24XEYSVzIdbN0pt/JQLrRn\nAdmv\r\n=8YkU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"265b39c05dba4587f44e16eb788b56c1cb0153a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b7facc628.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b7facc628.0_1579803121234_0.440137834565107","host":"s3://npm-registry-packages"}},"5.0.0-canary.63f357dbf.0":{"name":"@material/auto-init","version":"5.0.0-canary.63f357dbf.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.63f357dbf.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"818bb87a331fda101441c7a7a69bf04a26b805fd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.63f357dbf.0.tgz","fileCount":14,"integrity":"sha512-TDkpysGkIfnuUS3iWg1WUhQr74KzGvf5yv72CUkiZbv5qmD0dSnxtXUZY9VGF6PKhj523NOIshzuqGZo/3s8kQ==","signatures":[{"sig":"MEYCIQDHB6oXq2YQrFTIp+4X0vwIB16S690PoNspWP6VU2SxdAIhAJUMRfw9g0G3icrePThTTxGyldRo5GHMaLtyaHRhqI/j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKhYtCRA9TVsSAnZWagAAxHoP/3R54sZ0aOMojfif1q9h\nFTeyugz1YmKQf0UWSXh3L1PrhWAbT6tpTu4e66x+3vWuwloniaX4DWCC2P9E\n0ExjrLgO6bFbWQxHs+xu65X4byny0mU14QPMMCqsT5voVuNbC9+XvYyfEFet\nmSOUbK23T6BTWP8xrjZTATnFhoHc7qf7uGWebW7zx9Zg+XrV0PbFeaXJunj5\ngvry3UAX9JtTsOyfqzS/kJuX9spKPR3q1Z/Brm3sxv3W0B3969jx1B5TlfXT\nykcJRzzhL9MTnu/AR+IHz6G7nLr5T1sx00ycsc3t9n/Nu+MY4ab3Tz4j7/mJ\nd7DGwFAugS6t49t+E2ThaiKZM8jaweNu1VgmNLZ6UiQM2KKq0TwLZdjEJ+90\nPtWeNxRZMsSDlg4kvMZEuLK3hRPZiW4O3UtON1JuQWZ0qwysetREJ5gYAbGx\nA6OKMfiVhZxuLG329IHKwUEcwJR/39Hr1S5GBIX+s4qpHQFqRDQ/86kf9X6E\nFqvp/JrttFlL9cP4vce1FoE0fDdFsWyIr1pKoKpLgAADY701sZuUDmKE+1hy\nQ9FUqN2M/r/pVOvGZeHhdmUdT9KUAlBkCGjFLPf67QezYIGc6wr0xCC6OFTJ\nLrRQt+u9938GXXiVtBvYEsKdXtQrYxWSoiZS5Uz3j5w7BaRSSvOfx6Sz9ez1\nZZzd\r\n=fyUu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eeb2b38a1cd8ef32c66d35119a666a4b01da6d7d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.63f357dbf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.63f357dbf.0_1579816492024_0.3038093205825638","host":"s3://npm-registry-packages"}},"5.0.0-canary.f2426d26e.0":{"name":"@material/auto-init","version":"5.0.0-canary.f2426d26e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f2426d26e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0eb7bd1761bf2896a12d175c5f0b8941811265ba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f2426d26e.0.tgz","fileCount":14,"integrity":"sha512-F1XQJdhlAAVSHxFfIUEmuG7pVwb9Ns+P1hT6/J+mLuIFToVeepOxSu7vcUhBQnQnwxG4iovpmcgkfQHNsyBo+A==","signatures":[{"sig":"MEUCIAk6J423K7fwExYb64RNa0kYgs9vyq46vekrkaboT8rqAiEAqm12gegRITQIO/kF1fwTwIzJ4Dq0BXwZdPFFBWRVmj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKjJLCRA9TVsSAnZWagAAyM0QAIZJXoCt9i6jQKXIidQN\naSL3iwoTH1DdWVZlc2uKH4qCGeiQldWCT9IXu4CsH54Lo1XLiOxpFy7C/CP6\n+fS4JpeACG035WI2EawUH6rgI738uRFQcmo1gzJcK06Q34OytFRvSDHQYatH\nKau2wpAhBIEr5PcgChKK6WmY/zNpnER5thKQJfcrVWjMYWStuBCcaSylg5cw\niah5+WekvDkotvJJAgpbGjXATZkZSfsDVF0E3EoPWIVkL0SKuNjowgu2dJVa\nVBEhg2EKH1BmwHYgDWkfCOlXvM9k8AAwWy7Yq3Hh2AIlr0ySxKrJ1pUzlV1e\na2X/z428DzyRV0/91WUr9eqCKqXR7nU4XHWQnVsmTQ2lI12RcGrbwp09uo60\ng1DoXpS0ohW3xN+lOv6NNK4R7JLo9PlNGjFDAFKRSUhJ1e9yhPLHwUC8trm8\nSK7H71fHZ/zdcCYlQgEpQ/YGjq9x+7OhjgracpYWt8TnT6z+ahCo0Tj8ytch\n6THubYxiKI5bB9BaHTvUSYFkaNttHJNu0MSYnvwKAdVHd4VFMxqjXc6dSaGs\nnpo7PgXU9amFL2UudcnqoVEVZODQnBJgWk0erkoPif+5S3pmGLPpBx+jc+e6\nVW369PzkfHxs8RW1pMuHlwqYgFUY+fwNZYxyR0PaXXkpc+eezBsaR2yqcCuJ\nDA+T\r\n=tRCp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f25cc47237fd4889c25ddd16c4d80cff95fe3c91","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f2426d26e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f2426d26e.0_1579823691089_0.2655438687854914","host":"s3://npm-registry-packages"}},"5.0.0-canary.7f5e0c23f.0":{"name":"@material/auto-init","version":"5.0.0-canary.7f5e0c23f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.7f5e0c23f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb261bbf37b204824af8c83e837b1c4697717b44","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.7f5e0c23f.0.tgz","fileCount":14,"integrity":"sha512-Nucqx2eOrYDuFzYgTmhZ32Xzb+7qizlxLPopvdDnJBbK/h59X461npj6diR78ZRwE5yoIwo+NfWyJt5ImdidXA==","signatures":[{"sig":"MEUCIE27g05CY/g6rd1yUWKyGZHwBu54dZOZhtg8cAiWcWyVAiEAnEEOJMtyekT/QBgEkn45jVXTFtVs7NwTD/uNzKBlWwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKx+NCRA9TVsSAnZWagAApYQP/1uK5cYlaKv3V/6gMXBD\nI/JkG2h5OhjqNWnp3LKwDcLZsSPCLyTahLqrhzpyUtBTabTXkzqG6CnRSOeB\nH1PnoxevIa5JRa6Zqh3XOur9Hr4FAv5Os3ZSKB59GceTdiU0vOu2U4bvTDIs\nCq3xVkzUTLofOWCIu6Y6IgbheKUvtJRikgrJQEnPb5ugjV5a92wWBAKx1Y3R\nBUCVCz4TaqGFrz6jsq6es+Aa7CSmnmKOh8y6AdhgDz/KdcqOTSfZMdX46YI/\nvyBKPmJGZEtTOuzqJ/M1k8aAdFi+3VFCgEMPrV2cb6OPn4PpLrB54NTccbdz\nI2SoS7mzcGMW3o4gKPHO/ToAvBKJbJrT1WPmzL8Q3yfplhx1ETrjp4+28PMO\nAn95kD9OqEzSMxjIw0agFm/mlicMvb16XtnK1NqzPLrhWIfaN99x/IloucaE\ngNcZ2ki2W5wKdloUUaetyAf4A0hGSIkBBhd6mtBQ1L3EAVQL7yhW3D3fBlz8\n2nQAuOqdhfikJw2qODvXYRp/SMhW1YDUhl1jg/ipxANeJz/ImvCpHexISkZG\nZNR8DdQtAw8q0qo2rPRV0AzMQyITw/GRDDmL9PsM5Y0BBGzqcxzt7YtKetHT\n6Pv2hWANxRisGxURNXb//wqZowQVPnLWq/wJnjY1s/w9iUy9Jf2gNdeHRL8a\nM75A\r\n=F79U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"619b057dce90a552f56e341228cfddbfb7746acc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.7f5e0c23f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.7f5e0c23f.0_1579884429447_0.5328052687631588","host":"s3://npm-registry-packages"}},"5.0.0-canary.3fc3ab520.0":{"name":"@material/auto-init","version":"5.0.0-canary.3fc3ab520.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3fc3ab520.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca100c3da48379ec7a23f2f8e7ee60171a280425","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3fc3ab520.0.tgz","fileCount":14,"integrity":"sha512-/G2Gxq8XhtHRf0DYwAerpYNbTDbv2l2nYrQ9peSQ5Pp8HF/TwjbXjiKyQzIlc9ET5G4bFIz8+bOfsWCdzWzDBQ==","signatures":[{"sig":"MEUCIDw8AWdT2HyBby2i7nS1k4M3PQu8UDwZnuJ8k5gmyU66AiEA2WGFMVz2EZu+kXE8OndJj484XYFY/tV3j8VQyTvi1io=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKydWCRA9TVsSAnZWagAAGhYP/3BpdlD63/+ygIZxcxZZ\nYzKqbI5mp+htKRdQBfTefWIWKT1FW4x0cuHQ/sTI+8n4FDmLk5ge1l2M2odF\ngFr+zymCUH36W1iI9SfbsanFOK5PPm+wwS0w5Fpb4HqabSNUK8k6893YEqlu\nTfFUFQ9TC8+KkZm0BOK+oOVc+xP5iWSOxMoe4Lab00f+earYDAJrNObD8mUS\n2qc/jr0MIyKleys4SMZN2ydDUPVY73K/wpQ6sOvbOfvUXXHCSSe9BFt49KPB\nYLU0EDKbIEdQRE4g74ureG5lmYVBBvYuPj79JMu53GnoQY3sCtm8BARhrEKo\nKLXXw8pP9fNgS0/vgM7R+pPoZNYuG2Y30gxdNfe+zlxwaEqbrkF+uxaHgo3k\nNOqSONS8clLvBPkqfI1Bgg7HBHz53c6qpc7ObG/v4b397CLFv0JgIhddPk8s\nzdTop0d+DYKdSkwN8zrnnmwPytvklu55mG4GLQ7pH9KLAR0+9QqlMCxgclCl\nc0j/vF9LzKAbYBjHLKIaQhxaH2TQ4L5zGwIvPYaIsIAR6BiORllOamkHpJdt\nPbyKKM2nvAHUDXcNu99Nh/2YlxALQbKwNeK9mCcVjPyJSi9RQl03dw+IwGvC\nMNax6ViIiTdtfv4oHxK8LUDgZG2/2pRdhGONP7A0/AmgW+Gk5fMywFoNK0T+\n10zk\r\n=BcU5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d15050fe97c7130fc9607ecc53a7eafd2b9c58ef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3fc3ab520.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3fc3ab520.0_1579886422169_0.17373465809748678","host":"s3://npm-registry-packages"}},"5.0.0-canary.80a4d326f.0":{"name":"@material/auto-init","version":"5.0.0-canary.80a4d326f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.80a4d326f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f9b09290f0f0e6aac8619fafe7fbad1c410edf82","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.80a4d326f.0.tgz","fileCount":14,"integrity":"sha512-TXX8Ks1fnEUHkVw8jBibsTt0IiXtIIltGcbOr6EvVy6cLtV2yXBRhJlC9FfHWGE61y55VWFDB9iCNRRUS9NxHw==","signatures":[{"sig":"MEQCIGyMd/sadk1wB4itEjGMacPAgWsb+TV1iJlfCqaNlrX1AiA4DrZ0e3pCwqXT3+jWGLBDsmE5lJWXBOfwMzzqOmKQ8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeK1dfCRA9TVsSAnZWagAAUpkP/0hW8mRZpjxqhWIlo5Pa\nuzZW7pH2e37Hq3X16KzMAVLv8aoBtLk/Q0Fh66e/DA6DKAyJlNhNMRDTlr75\nGoECeQ+UBdVPX+zOrZ27PcvBMadrqDXnttiemo0U68EnGihJOSNp2Ur7Ip9E\ne9HgvXvNUQe7yrEdpKmsnZwreOrLpu4BsrlYqi83qfmxFRMFTW6XdbAJvKcs\neqIkyZEMsUUFX3xXz+/d23Sh9246bdXzknDTz6Q6TQu919+4AwcIjMWg/Zl4\nwAQmDPBwE+sTHebNBlseTQH5qdhxvKccWCew7y/stTdY5BXjLtrnn96JJqGg\nFFnJz8sc/AIBnGFjMVZrl4MD5fHwPCzn/vpnue65XANdGsNB5cHegjV5k4Mq\nn5pogZpjrHR4IeiYFPwdoOJZYxH0Q68nfL3XoZjQC1GYboO25EXBhYP0RxWe\nXfmYcvi99TwzQ1GRtxNZEKwC5L7/SOGltaikFMhUmAdllAKthhPXxMoknz5s\nSDtFBbcsZcfYzLgFQgitWGXFvpOG+7TPLN42sTFFsq8VyIusL8UylX/b63Gh\n373sNDvWorou1XUYfrDcAv6Ykmf1TEb07opz7e3t2d2+sapjEZH5Htg4Loi9\ngjBPcaYHVBFr7oz/3+aDx5BJp2s8D2VEopdIxbRTyKxcEtDPLHW15K+cB+O4\nR/GF\r\n=fRTy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b0001f5c4ba1986c74470e492e82bc13e15e2ad3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.80a4d326f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.80a4d326f.0_1579898718624_0.4719207114865427","host":"s3://npm-registry-packages"}},"5.0.0-canary.ef7de4def.0":{"name":"@material/auto-init","version":"5.0.0-canary.ef7de4def.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ef7de4def.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0e20207599836a2326484b9aa1b1a4ec9fd3bf9b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ef7de4def.0.tgz","fileCount":14,"integrity":"sha512-LJFifFybJZAPcbC87hp8K5m/JI9xdnxHVP626a/ruNOhZY9aUwAZ8HFxvS5Zby6bTlB8iO8jSC2N/Wi8ByPJhA==","signatures":[{"sig":"MEUCIQCr6LeFuRUKvvqvUbsQFWEKjp9npP4/rv/YJ91JXdcwhQIgBmOwFeKdORGanexVvb2xVT9/mHXSEcTI6HYH5z7dqfA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeK2I1CRA9TVsSAnZWagAACjYQAI0xV4q00EoqZohiQioG\nS3mIUhYcBHVQuu1TzTlJEWSNquqolezLU4mV40B1IptEw3isMwW0CSkkoelJ\nJA9pW0mvz2xoQXYP4ofVF/QptcQkX6usNj5C4HPI4RBsZr56JJZlCwg0pFUb\n2ftYPzcQ+XNmJpOWw3EoXQBn+xo6lmP7+/32b+LSCtiadSHXCKtQ43MqgcLM\n6PdAPEfwGDHyYD/cdfnuEquA7dbRsGTrr7HGwWMh7Zd0wZXShhmXolAS3kOl\n/ay11SmUgVjSiRVPojOJQzpNMBIAEtsc+ENz5rAe50sxFkVdiaS6WhSygBbK\n1nV9AGkCaTwr0LnjkXxMPW3xwQ75qaQ+07gQcWc2oMJOfzKpcKU7wwwMjNAN\nnbkyl4GxSlawCxVe3n1ml4UnCB0QrFCoYOJolsS8TTe4wAJ6wKjhBkiPl4Uy\nWI9dotIE20Ozq5Gky37IfTmQxCokg3bdBeiw4caG1JIWBQ0WOtmxvm5utFnr\ne33itDeXyfzUSt0YmIs6BVNkh7b/xZdVnhIpD5QMB32CT/Gyrd+qjjKMlPYV\nJ+Xx6NHt1VLWD5peYWRFy2AJTpwVOTBJEH2bjB0gnXivxfkVljH++hJvaX7X\nT4RFFzwcLt3UCqVJXBUoJ4eXT5PlkE780yTmeq/BycEWTwejRRYgrnJHr6mK\nWbam\r\n=g9rS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1ac98da12680a4581dd0427e23f1dd1b95a939a0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ef7de4def.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ef7de4def.0_1579901492755_0.4318147733064308","host":"s3://npm-registry-packages"}},"5.0.0-canary.93e2288b6.0":{"name":"@material/auto-init","version":"5.0.0-canary.93e2288b6.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.93e2288b6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d242bb0cc6d4d67c085301089dac6689112064f4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.93e2288b6.0.tgz","fileCount":14,"integrity":"sha512-UYbhZWSpKldU31ssDvG13ZDxc7UoTay/y2E0vr8tGioauSbWDpmoo2pqq6ZqRrdkl0v2XrMqIL2T3Fi3WypktQ==","signatures":[{"sig":"MEYCIQC641NSIZFhh0VtDpzG9wRgJ+dFzynfgkEdFq7Vt2DdlQIhAIDSt4KYQG2vMp9jl6LZHAQJuZHBPpqIrJfqZsxmV6V+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMGdZCRA9TVsSAnZWagAAWesP/ivKlcr7BOmWYMXVCOS5\nbz6C6Vhvcboe1psUo7EGMnLWVUipy2mN+yOJRJZSPqByPEDFydDM2i0saotg\ndPkVY6I/+D6pBv5cWZxLJLjKj6xlkmu6wijBlXufRVWwb9q8wQxSmE8WJF/A\njUfVlrmQmlrxXFyp75iYYb2vf5mIgHZ8xyJmVF4zbvalZ8+lF+lUzLwGTqKB\nUtyOyQCcWwMPVHbCfvFO/5aGvxTJU0iN0/oOqkBEMSqSy3Q90jE3tbZLaJE4\n7k1kNHTbroTBE9APWHFtLJ43JV46mqBKKUe+LJfGdput9NxCRsw72pKx4dpS\n+lfh5gWR+WTLWfDh4FK36Q/KEvRv5jbGg45/I/tyBR0C1O4B7AeUTU33E0XR\nLDHVpO39782etVxePkRgrS60HYslo1eH3rENnzcs3bN1FiRvjcdGIahSonP5\ngNkzuq/q4BMQ0Vwd6GnwrsDnhMYWncVpk1XKWGjGtizWRkzbiUyV6TRkf2CW\nyhiMzz+AOTugvm8DuN6/ht5vEnthOiQDAuMgkreXfO3qNYYORYKleRzDUTri\nZc7JZ0AbSpMiZ/Jz+fY7JG07LsSCX0W/pcl1HHlqncDevJQl6aNX+0fT/N4O\nPhEeaxCtMmZLN3/DgXTp64pTOSCi59NfS7dyAvN6m4aTdcTYDDLWrtoygkaN\ndlra\r\n=q8M2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00984d219befe7ef5ec7c042cd975979249ca8f0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.93e2288b6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.93e2288b6.0_1580230489424_0.6326985740874116","host":"s3://npm-registry-packages"}},"5.0.0-canary.34ef15f67.0":{"name":"@material/auto-init","version":"5.0.0-canary.34ef15f67.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.34ef15f67.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"86d7a8e31eecc501e2e15628741c874f0970b155","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.34ef15f67.0.tgz","fileCount":14,"integrity":"sha512-AkBHFU29KWDNWIYQv46iGdtsCwa5KlM9t9nmvXWgJJvn2z7oZyW8tPHJ2PdtX1HuOKCkLc7HRORaGIzYARuWdQ==","signatures":[{"sig":"MEQCIFxQxKmDALc3pFajwyHAMD+lskcfp58SrrKlkHOk4sHsAiA3zuxMLOnT+T/lB6jQi2Yz2c9IOpWJgkUACTKMaIRLSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMG4XCRA9TVsSAnZWagAAbP0P/0fCv2WH/47Slbk+L+cF\nNggU9Lw+FGYPDkX9uNTCuGBItSXsiT+wXyIS/WuIzp1YIQlRiOW6Ey3aEVKo\nv/4W/W+BQFjlVI7zseWbApOFtpgoaxnJmyhtuFO9RTJ/lbNfHba6nuwnMlCl\noAditDudz9V3NON4TbHtLuXOUFE9P7ZPTNrmPWELzCL1TLWObW3B3EEu7Nni\nvHaa4xSCwdnIL6GkeOEgg0iagItY/96fBvltgqEFnt8LQkF7tDPcwi2t71Tp\nMhD+38RCneoYhKG/UrudNycUI6Z6Gw3ZTkcWIHgI9RKzLngJF+CiHGS5tDjd\nvtAwEMDAwxlz8ZACI++J75YptI12Rsn4NBENBd18LLOH5hXmhkU+G+RPtUrh\nOoai0Cp/6hKA6KC+YYhdh23+Eg9tr93W6Pw+UAqKR0EKHzeQO0cxNley8Go+\nJmvG3DH/tdp3W0vJAGXe1lwsWp3qpaiWniiXa71+nrze6rGPmKSW9hPhljJy\nhlYw/GckyMpxUJ75YRue13xSp+kspqhPgkZezQZRbVArUbFgfqn14reX2jYe\n7gTs/UaA0UvONxserexyCPvLnnuALQJGh9piLJpnHJpeP2MQo/fhIM+d9kLz\nT7k7HMplTARoLa2b5zH/pDB+SIgr1ZWbAu8GmBJBCpyOMeItUf0veLJ7ohDv\nQpLu\r\n=VPZL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"21f8c61e71f0a9c48eb2042e25093b7a821e30f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.34ef15f67.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.34ef15f67.0_1580232214806_0.958822584224652","host":"s3://npm-registry-packages"}},"5.0.0-canary.d3d176ba5.0":{"name":"@material/auto-init","version":"5.0.0-canary.d3d176ba5.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d3d176ba5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"17bffcde4a1dec738ed9e07214dc30e3053e2800","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d3d176ba5.0.tgz","fileCount":14,"integrity":"sha512-iVydeH/lOcimNtXenudcEst1xpVjW/p2HSZjqIOAPrhxmVNmTGe6HzJ5ZD8xWed5LWmTV9of8LJ53jOypyjkmw==","signatures":[{"sig":"MEUCIBTsR7/9cEtirewJ/5pZ2Eq+iQuqSvtm1VasLBUUbXZbAiEAhbAuNbUbLxLbeqDFPCXYHP2znOMFAypja9nX9MqT5V4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMG9aCRA9TVsSAnZWagAAs24QAKOl7lzoGyuyvVyJW7n7\nT0MF30e4dsbpehP5i+aDM5XgI6wBJMtD6qc68zfktgFs8wH3PuwMGoolMItI\nrQZO7Wh3Mlh9bZqE8ZgPoHy10eCjmTTu8iUp+pbC7Zxb3MLOZj3mtrmTBUPx\nlPbBX74Ft5r8ATR8CWM1Y0q61RQ7xCJEGePYuOYSpDHXyINujl/UlNb8uzIO\nWYC/7D1J3rq+oN6MRjfWZ2vDDI1vNNcTGcRQFhnYVH6en4tQYMxOWzT4MjcQ\nteGfbLiwR/+f5o3Z2iOQaf4cd/Uz5ZYXrpKizhWoKTzvSxs7uepZOcDEcni4\nYmhXOrdvu5zNkT0sk/3andq3xvzOWGVyZ9bHaYr9UNqmdWDrNjvmkcVLkA1X\nD+G+cXkASagaWhzZV/hg91XOOdJmRuduzd1ZGhvcjBF1hJ6xXr18B/+5fEkH\nv7FKjXDYOzr5J8OS/lEJ4RlfqBPrrmN6AH/OAGinteDWH9hjQvWpcg+W0fnz\nS0ZvZKj7QIDwwVLIAVhzZYHGg5ebPkRMwDBCRw46K/cUI71A750eqsBul092\nEbmLAR6WuQjBWqz5kSnG2xsUrdkYbYhivuOf99A2SVsxPkXaQ+0qMp4vdgfo\nMtYY7f+En8sUyeH9C5/Qvo/3odKarU3tKcixzqYO7vw5WVPdrVFzoqlrASVy\nu5v+\r\n=oxNY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"218eacd6961bf740e059146072cd9e6c710dcdc3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d3d176ba5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d3d176ba5.0_1580232538200_0.14191025297104165","host":"s3://npm-registry-packages"}},"5.0.0-canary.32c1df133.0":{"name":"@material/auto-init","version":"5.0.0-canary.32c1df133.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.32c1df133.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"213e4ccb59c4c573f6d8853e104dedfd78c7da82","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.32c1df133.0.tgz","fileCount":14,"integrity":"sha512-2YbPkKG8PlbFzPIT/pIE8P76Hlp6zsZYLCChYZEE7WMjfLNb6S6hCutvfmMzQmaW2sP87nY60Wzya/C2Ft7G2Q==","signatures":[{"sig":"MEQCIFlx3DNFdJovUTgm5sRWBIuwNhzav6ZKDjAFSFFUixGVAiA1ZoUP8jRAqqH7PIsnKWjvuDUb7tpcJEQ3ifKQDP0PWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMI6/CRA9TVsSAnZWagAA7GkP/jlIEBneXs+18LmeZnZ8\nzSVTIqVYb+H284+5MmaRRZRI9FUUEwlzq13JOxSz3u8f3a2YRebliARbe5x/\nm+065Cviexl9Dh95wsnbwrMUBh4EhYDXVKuxLmpbGG4u4ZUe2MUXIgqD+MFh\nNnyFFyc0cdzDMMVT82jfnvVSM68IbSlFKxgSyJeMU/mDbah4aNPPQM81NXzc\nLNKadEjLNum43B3Mykj6ga8WDV6lVh6aa04zD+VJCgGMXtur81sYdhyV+YW0\nsUyMSSQSjnRVapul5byM3GCwV2+HB1SVtpsDLHBwm46xaSAYgs5vklpq68hm\nvFMbLmYeouOKFS89ST2tmL4DnzVbIJSKNBoP9Ldv2AqJybaCchzuoOCdBN3p\nx4QN+f0R+13/9l5sfIJFJd9v6Y6Sli1lIdrAtneSkb+h3BoPuwaiL7xJzTV3\nlM/CinP14zQqo+A8xSZF1lsat/fUm9qQUh1mtgaZUzaPLxyNFC2MjSRqVfDt\nWriWa/Vz2bgp4dsaAZvJL1XkAe5X7fK0uhMKAHduzfdKnA2S2MXksSBt5P5R\n1RHhr2SPpDXoQi4pi5r5+OfsdKoTvWLTfA+4jj6Dmp9Wu91A2m1VNFy/jFO0\nJNW+RO+V810JXUsbwIzi+oibb3i8g9OeI9qmW0n3RFXnkgdo2fgk6RSsuv7b\n62kl\r\n=iSDs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f36bc15da25ecb33aaa27693bbcee65c1d56eaa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.32c1df133.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.32c1df133.0_1580240574705_0.9896507895753726","host":"s3://npm-registry-packages"}},"5.0.0-canary.f3adce86f.0":{"name":"@material/auto-init","version":"5.0.0-canary.f3adce86f.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.f3adce86f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1ce360a0068e3a3e8a244af6f826d49f8fbc8f87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.f3adce86f.0.tgz","fileCount":14,"integrity":"sha512-7JX0lS/xWM7XX2IeSx1QH9emY9q7OCCQeB95H6EjshZBkp5uaisKYpIjkwaYdmfSPlTCDlYb5HKHbJBnribyeA==","signatures":[{"sig":"MEQCIF5uarQ5DZ8HkO04hpdAE336ruGCW6KtqDyl0Ah0Xkg3AiBw90JFAj2VlPSNa20hxM0RTtrzH9dXshgZIX/NMe76Zw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMKwpCRA9TVsSAnZWagAAtnoP/3SI370NirUF+MOrrS3F\ngasaZUa/Z2XySg2PCfksLHlad2fc0L4vbPccgwtAcTpiQMYKmQdBIP0UkStQ\nR6ZXiYjW/XGzGzkf5a9Y7X2957qWSqVRVHe4ZDfJHYh18fb7DsO+MDgbfETl\nO428ZGlzAfETOPfndyngC9xWoZ8+9eASCgRESxdhKRNFKrLX5EjnyQZOTGQU\njDn7bNFHjjHubD9C33ob2fGR0SleNJaLQEUw+sQTrF9PsuhQRPxh/tnrt4Gq\npGlQEnF9TNOjiY9UCCFOp0obuUCrKZOOkC5ieo6LKkn8P4afGWysZAyyohXL\n6PNuVIp9FPR5k0AS7QDprRbVvbZirBlQu6cQ8YVp5YKcPJBek0C1PNlNrnZ0\nZtc8G8zg7+WHaSoJz8GAUpPAdClNYZ1CB23Fz4DPnG5xkzelQ+r0Wwre1Cql\nIbmw47lg/vmngAT/oO3SPaz0JMBvlEZ4GFiBiqZln88BGerVRdvxceehUfi8\n2icAmWvPmXS59G7iEdCVbuJmH6nEyWijk9y25JNPAlMkNauPMCpps+1tD8gm\nMPtXY785iEsLVCYUlXAqzoxCVs9wa87SuCoHjDGzLUKlhuf7lkonPDvHdw5a\nrM4bBXEOnaW0+lCXfWlMEQPXGRyeI/ziLZnjbtSzx+1p0jg1xYn458JMaUZu\nBE/z\r\n=00Dc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c352913b9c3e29f7b404b08db88a506e692187d7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.f3adce86f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.f3adce86f.0_1580248104792_0.8202359152035223","host":"s3://npm-registry-packages"}},"5.0.0-canary.a4423f890.0":{"name":"@material/auto-init","version":"5.0.0-canary.a4423f890.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a4423f890.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c30214c46edf7951a4644722f36288b14678f545","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a4423f890.0.tgz","fileCount":14,"integrity":"sha512-ftrosfHYqOEuzGOuERGjXayEzzAOpVOrf+zPBd8DU/U5cGcpimbmkRAjFQ8cu65VU7qRr3WXBYGIW2aks0BUPg==","signatures":[{"sig":"MEYCIQCzaHICeP8YtJEyUe9fBgThXYVkkSca8VzngrwtvHXcsgIhANQbzpOCEZJ1n2yuT3obbhKgsEqGrCF7ItjJMfv/KHm8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMfRvCRA9TVsSAnZWagAA7GAP/ifgUVwCGPA4fEjpKCfU\nGJYI00ng9mmBrJIhOdpfaScSXtINnEn5HPmxyeK/anigbt9v97CgYxJ0KaF7\n5eGJ4w45ffFIMpyqQ0F8FXD9eZYdpeTcZzUwxd7cEZay5NFfi2DSVoGldQeA\n8nDFubjMciWtBeRoxos5nB96UiyY6oXj4mIzuZ6d/wuqVeCMFuTYm7NjjPHv\noufJkzQOgtBdHvzhpNjlZxBR2p+H9GQQifhBxLtSk/cpGJWyUy8xBZvEBwU9\ntyyiWs616r4zWVsLRlEFZ+EE+BIQIGUs2AgOw6aPPIyvFL55M3uptQc19F37\n15BIhG3oV7ybb9N0YmqnETNtsnSIXGrpTUi7tuvo3AfHmVHRiAcJkvDnuzkg\nhxoe6LRGFQYpgR7G71HtwkdFENIhz3geyiiwD7mwCzTzJZchUrK9CQTS92aV\n3xZc9JGgV7rhspOcFBemg41lY+6u1eyyBG4rS/sVK/bH697y75FDjyWaj5WC\nJUipAsnlwNnEoxZfCdip1CyzTsn3GrjgzaKo7QrY8nHLQiuWVr5byYRyPFK3\nn1oS+kQsXX20qilnkYoxvD+YdKnaUhhOrlFKyeq9x1jFjCznCDo4IQtiIr6w\n6ic4s6gKh4CEw8YBArGVlKib9PHTimN9ryERghyVA8srl9ADbNguajcZMhCd\ns4fL\r\n=PyFs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"981df6741191636b0a527b318fe896f47f74cc0d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a4423f890.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a4423f890.0_1580332142841_0.35141313734894664","host":"s3://npm-registry-packages"}},"5.0.0-canary.9351f167d.0":{"name":"@material/auto-init","version":"5.0.0-canary.9351f167d.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.9351f167d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05cfcc80d1cbd7decbe53e6a1aeaae37d4976ed8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.9351f167d.0.tgz","fileCount":14,"integrity":"sha512-XmVAUXZ9DgIwG9vdkHyHMZxUeTNdLfi2aX+JO8zEA6drfacfz4eZtQrigjlJ35kqwDd+GaLvMBCAQaSwx352Pw==","signatures":[{"sig":"MEUCIQDrS39z1KFjW1T5WJ8IEfbWkrZ/Zl5YAblS2fDfmMbPDQIgbIqV8tWsrInEqQ8F7UJtCrGV+FDipqh1jAf5hAG+5d8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMf83CRA9TVsSAnZWagAA7sgP/jq/dq9VgmNyDelf9AGK\n0P/XyZw2+Oi+2x3gF8KEh2WjMaUYxj/aidFHGzGTGE1Ewh9VihEoR+BB7k7u\nc5esXgM/dNx8Te/W2JhtZdS/FbRoskKjasTf25/iIBQbkkKzgfq2jQP5aJwJ\noR/VzjEOq6Au3BZtTxroChLez7oxEyjB97brl8GcQqu7nh1PWK6AEESEId5z\nzVYgpLIEqKg/HQYfHZyckX2/BOEjiqiYtVWBYQQa8J8iBopW87Z92ESbuMeS\nZnwwCNU3LQGlipOeog7up7EdS/cbAijFYmJlQjAcKTeioFbhNPirBwoLeU99\nh0WLzgaPYGtQ5oxCdNkFOm6BphJq4o2dEVNdf3uSapU3tlTB8XY9APhCmAi+\noffny2jo7Sx/YSyY4KjnwvreXrrKfS2JuTn6C3/Y9uv1Za35mmfjlfqUJgsU\nPWc+xAoexnr+UQGbswd/JIpGGiBB4dUQyXN4u23Tca6TFZKOH9yr52RBWa6K\nC+hrSlOi1ASjaFYBHxcbBoKdrZojbntkEmLgMhclWT+gY0Hth1wqJaSnSJpv\nwj9TTqMYXtVbesEOsAc6d4vuo1iuZdXE/pD1sXhCBYdIOvO88zLFTx77OkB+\nc9A8GsCHLbKBy9/Yn2EJ1ZYnVUOsOQFk+SDz7xsQIIhba2r1S8co19gc4ibC\nExS4\r\n=CQvh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c1a50ef6adf8852f326e285227923411e60a63b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.9351f167d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.9351f167d.0_1580334902570_0.3094780989626764","host":"s3://npm-registry-packages"}},"5.0.0-canary.29b89dbc1.0":{"name":"@material/auto-init","version":"5.0.0-canary.29b89dbc1.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.29b89dbc1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae3fa09c38e9a9a5a491201bbc65d3c2c9c3e252","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.29b89dbc1.0.tgz","fileCount":14,"integrity":"sha512-WYoWv7zCEGadBDrHkW9BerUOiEoVb591/UiBtcKs4pzytco6zxaYF1ejkaEQio+sAWPaek1LRFurSE4tcc3bCQ==","signatures":[{"sig":"MEQCIF60FOhbuzNGyM1tuKsZ4mMs6vYO8IfrA8zWlaPEH8FDAiAoNFgOWgtcTGaVBC4w9Jl+61JGWcFkFMpQ7awccb8n3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMgQ1CRA9TVsSAnZWagAAXtUP/2aReMB5rmuOXMWtS368\nC2qoVbL6aM84E8+y2bnNH8yKvWHwP49wa80T9xodVcDQ11I1XuzwNQtO7u+f\nOubpacEu4/M7eLaa5s7SJj8DDhda+ybtvTluQDv94B0mL4hSk5EcRGVZbOcd\nSuC3qOndPn0CEjSUbub9+fEDXORBk1S5ANKt3yxACq++TbKjyn3OSmFsQ/hr\nZc5yCWnqIdTN7l4699WrsqS1i0IacrLkKPJ9QoKKXfa00an9OEcOC9ZuaTQk\nFm/JQidnbOijk3xKI7KaF7AbCq1A5FliICjd5E365AJ6MlukrtvO3d+Kzw+N\no11OS4hzq1hvuadIWeEEtwsJ/bu7RqpGpiomi0BsL6ysWtZdCQutown4wuen\nIyrnpZuM8XEkKKZxoCFOprD2LyUSL5TRQ1M3PlcqO9Qltevzt1a+WR/G+8Oj\nQW7kSisqFJ4NlXH5ojSAHv3BMBjgU3CAjePF+1XBd0jsFKwOezI3L4k/H0Ng\ngEdCrg3fABpKQxWT1c45yETyVCJCkRPrJYgBvvOmwk17XEzp3nYp12homW+Q\nEqtWoQWTKPZEWOYahEhut6Edu9vxgYV4nMHm8FPx6r/V286zxiQdLCZMj69r\nlACeXIJxi7EsYfIB7LcHv8oQeQaQHNe0/M85kLHm1l/XseL3iR1nChfa0Vhr\nj6+9\r\n=7n0D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"662c3c36b5ac6bb47c841a10193f2c717bf9ca86","_npmUser":{"name":"patrickrodee","email":"prodee@google.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.16.3+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.29b89dbc1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.29b89dbc1.0_1580336180876_0.39558192974098394","host":"s3://npm-registry-packages"}},"5.0.0-canary.45985457b.0":{"name":"@material/auto-init","version":"5.0.0-canary.45985457b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.45985457b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0c69c417ebc0a3392b5771206b3d20ffb737993","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.45985457b.0.tgz","fileCount":14,"integrity":"sha512-THntfbRU499+mE75x6KI7ZiuvRlLsKiF8pYkJAh9gYyf4Yfs8rdA4c6dyN5cVu4W0Sl+7UmNtO+lxUDl6S/ZRg==","signatures":[{"sig":"MEYCIQCMDsSoKoVrhs/TkGXwSMNwjBq3aG9McknNkMIF7AISCAIhAK0rwd0TaPmK6DwnBNyLo5qp42vb0Diwc+Lcu/1N5cLN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMhYBCRA9TVsSAnZWagAA/QcQAImG0wISB7NaAhNi7q+N\nwnwXVEwUCtIqGQaH+yukhjQqaLTaaqAFxpZoI0JJ9S3MU2cACFraHUAcBWg/\nAEWsgrjwPGk0u6Aw7GpQrtgIKHP1JaEtRnYva6OtM0kt3oJhtNTrB/TSDV56\nfEYyGkiz3SB9XWz0+7CZ0wVA6HWC66dQ+YBjmWnSjctRMKLZO+wmFuh9MUzB\nZn8zr3w60gzZKMuPktPfrcIq6X11b8ZGrytUifhXH2rU391hfphLPY4IvMKE\nWimRt3B58RlGoAFSidr30femzNSo7Pb4ZLW/pzpxaGs1C1swKzR52RoL5GAt\njWU2CntUqaafS0nFqY+S34AcDSNiRzPripCDPcXt9musBl3AoIGapFmejHXF\nw9grjOfsQbmLgKQ3ebcvhCZ32/7rvy4SINdKjuyz7+INr13czYb7iaxz4fum\n9o44Ynz/EEpj65y4Okcf6cVNUGN9wTenJSaEqWZ1Dz7QYlWBoNNqJJoI988D\nzVK6bSjbr2JKETdRhgaUAc0/Y87/Nqz3EOUYk+z16b6ZX98bSokkHDMvcnlT\nkiWVoqDRiP7Z6YIrNLdLXijELphFkji9656vf0YUvFNXZDwetIi0dKsmNFTC\njmCbmqp3Qiz3QoUk1+VKaS6KH8yuVEWkc6zZPG3h1rnXCBUSDcfezwrWJ5hr\nwW1J\r\n=v6OY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bfd13ab23e42c09d1390ffc6d7cf1caf1a237485","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.45985457b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.45985457b.0_1580340737534_0.21146729324300484","host":"s3://npm-registry-packages"}},"5.0.0-canary.a1a0deb3e.0":{"name":"@material/auto-init","version":"5.0.0-canary.a1a0deb3e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.a1a0deb3e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"12bd5a83b2460f8fe5e2fc3065c742406533f236","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.a1a0deb3e.0.tgz","fileCount":14,"integrity":"sha512-nMr/SQ58rCJuxYVFXp6lFJekavp9XVndgAmsUOkZJrXNebJYl5QVHUCg81aqDSjm+0H4FEKNcF+tOEf2E5cdgg==","signatures":[{"sig":"MEUCIBHMEjLRvaYIKjbAlibMev0k1jk91l2yZzkrLdxdvTU9AiEA1yjCUz+Tvk4momYYS/OD1cy2KektiVRN3hAAzmwJKR4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMxQrCRA9TVsSAnZWagAAhVEP/3uuyaOTf8EkWuCya3do\nuZIOgxzihoC+6a5ngMqzNo7E2PGl2zhsqhlyul/90+lFwUr350gV2BMEIgLq\n8IO7eLQFfg5kEDOCczQE1nhIMYnARcA/Ae5H88i/Pm3Ze4LdcZnyNjgjWg2I\nd/tKAvw1xemNdeG04XSkjGAHqmBmKsvzHRYmET2KaBKcftNa/uhnZCUEmuDF\nrbteFo7KQaxQ07lA/xvZi/nz+P0sJJFmUnQ/X2bkQxy+HvwXg6gufgYK51k/\n35XyaJojQJI+m1E9+z0j94zrSXeZFWv5JAeAi6p45M8Y8uJU2doWAtCSdTR+\nTSas/b5BtXdDkY5TqFS6sqn1mbq6kNJi6mablpk4lmx4xpSDR0Q6y6hWSisF\nOhZNfCytpsP7LColoxcm2AF8Ae4xcQORM1Z7j6wenyfyjjz01WeF5sGS7HFY\n2IimuvMEBcJUA23DK8yyBaKxC+eLGbm55VU1QxgC5LOxo8e1P4rNqDS+FWyk\nyLj7dBzpquVFVpO0MZ1MbMWBepZ7THlHG/qpsqXfz6luE4RYkvikd7XArwOg\nYWVVlIrt+/vSyaCrufujGS8++SviN6AfKY2xIPJrSCndWY4ouNLd8c42mnP2\nW5BdFz2IsP+t/zV7GulSA2dhCaV3PtcANQHeN9ZrdY64jMDpwxzZEejHWZKk\nHNr6\r\n=XXzw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"515cdf56b0195423f7134244b26cd7999b647d68","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.a1a0deb3e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.a1a0deb3e.0_1580405802899_0.2865652036958879","host":"s3://npm-registry-packages"}},"5.0.0-canary.181486643.0":{"name":"@material/auto-init","version":"5.0.0-canary.181486643.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.181486643.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6d327bb206984465a1526ff3e53cc085a7bdf759","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.181486643.0.tgz","fileCount":14,"integrity":"sha512-iVZGpflXjCMcyClVnaym3DNDD+jPYGhlByraLRs3t0ZMWjF4yJMg7xJs5il6er+hekSjVShyit+wzRjD1zLIPQ==","signatures":[{"sig":"MEYCIQCnNJltbAUERG3XGsnTfEJngKEiTVyMZUEt6kIQJ3scAQIhAPffVEhdtvQQ7izCODM/C4k5vPVISt0jOhuqZd0JeHl0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM0K/CRA9TVsSAnZWagAA1jgP/1VIIdojVhSnmjxg/2LQ\nuL/U/S4MTveV7AC27FEanpkNPO3uV+ZmkKQTH9BUevcNo24/TpWJUiMFP8Pm\nGO6Ls1YnZZ+RZUWnknVcGcdpNNcBhF7Ug3XJseqitdQrkSuDRxWtMjWCiHMu\n4vYe6nMIKLCoZ8+YQJAFW4eQIMpKgKAQoFqBhylOzrW0fa8Fe5UTU/GXybkK\nE4KBl0XgIQedAuN41Gv+YEkbrXIn55iSd9Xf6pRRAyzUjGaLK9HIC4UNODhP\nyqtjKgCCEveyc8FSfSNaE8239kuut/0dz08zeAIVTuC0kTssMF+wUjfulWPW\nge0i1iOqNqo+d/DHhmKnfX07TFzb011r1uClmNQIRhLqMe/G1BqH0PDarFmd\nEVlfsx0R+pER8UmS6kJ3E6kOjnSEHfL4/UAeq4jL4yUiS/boM8eaKvRfjwho\nYkpNx50o528NDsYfyPyXha6jaR07nsHa4FB9cjKyMwMd+lMpQknHgPdI3Nsm\naFTy1VKpkwtCmnvkbhBpZwlis/0kBlfRAn42cZ4fM0ykh28+G3vTaL1TuTwN\nGxeXzWCzEfgoVY2kO/Ahm9wsEsx+9PTNeZ5R5sXuMbf20mZiyNiIEtvhlguO\nWx7RzY+QbfOlL3Mp/7kAWEK2fVTIEBJX3xZDiIga3IDZjDXXsdChltqYR+KI\n/lrd\r\n=1Bbh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f29e2225089ac3fbbbbf9e1a64e9773ce276236","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.181486643.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.181486643.0_1580417727116_0.8847798956217037","host":"s3://npm-registry-packages"}},"5.0.0-canary.3a85313ac.0":{"name":"@material/auto-init","version":"5.0.0-canary.3a85313ac.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3a85313ac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b46bcb2b15245791bed806105add00d24625d0a7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3a85313ac.0.tgz","fileCount":14,"integrity":"sha512-KiHopFR79d2x+E3S6tt9DqyVh4Dxr02SXBzf+fycnKpkFqju50nvRzGTp8vR+tDE5S6+6JQcAhfBLfDbXxlNrg==","signatures":[{"sig":"MEUCIArTX5VyxIQK7CZDfECZEpSZSLEluPza1wdz+vrc8HdKAiEAsTH+KNzK4ArZMn7X71xz6pqm4MTDdcqx6J3JE93Cy7s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNFRRCRA9TVsSAnZWagAAXfQP/iEFGbG/ZTiI9KpfgYuJ\n7qcEIpIaj5eWo9lWvPf+fW6CxGPf0vufb6h7JwJnZH32YK4djDpi8n7nXB7M\nvG9ypfG9lE9Bd5NMUGL4ZPi1Yrd1N8rL8WAPdsabv26SWaZ56Xsbi+Aiwyr2\nTuj1OCy3YaAKtkRGWffgN7OdpLkanwmylewnlm3ChqRk3bkYn0BQh+GlqLAj\n2Ld3Pc2VGZSN+u6tGiWiH+igLjMhrg73yH5boRXYsemSWStkijPcw8iNNoNZ\nIYdOO84bjU2BosFLly5URFGgFET8i8PaSIkxu9Npoic3hQcPDMrQmE+DFbvl\njLDkNI3NLqSfwWLg0WI+UZAzaajRORCbgbD+EGytYoF6BwHmhYT3uEGBJXc5\nFa0becdy34NfWs6egQmKV4glUTGPffWtM6vhgC+G6+TS2reIYdOg0agCxwpX\nSp3425bGJVqPzksBxZocP+IittcMajlc2VYwvQWA5npcHosrVKt5TUWJJjZM\nYVF6woD7w2S12oy6U+AnyuAMdcy7c15EhVvMxu9yqaXKpVT6Mon661XZa2Pl\n643MZytbtCR07/FCi9Cvt27R4R2A4NJB+6RZ1Sv0FSMfAjkm/4g1z8oA5lzG\nRmjd5hTIkeXR2FluVBCAO9VBj+l3fiZi0RBJ/Is+UdS4ZhfBqV0KSuWP0VIJ\nlgSl\r\n=RIP2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a37832202a98646a817d62c20ce70cd38f089d31","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3a85313ac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3a85313ac.0_1580487760762_0.3210459097006355","host":"s3://npm-registry-packages"}},"5.0.0-canary.b6c7f624b.0":{"name":"@material/auto-init","version":"5.0.0-canary.b6c7f624b.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b6c7f624b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf0ef79806677f417663c6c8880a90957e391433","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b6c7f624b.0.tgz","fileCount":14,"integrity":"sha512-FhrjaM8p7l4zluBj/fpw9Yomcy/B1WN7tnau+027Fb2G1BT7rxPSbY4vyibjd2qapfDjlATi4eosObFiLila+Q==","signatures":[{"sig":"MEQCIEwWjFolufsduHLjIiC1Z0KHlBfESh/hppCQ6lKDgCvyAiBzqhFii4ftQruWugfrhDh1UcRvkdGZZCvNnyQQzJ6HEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNF2mCRA9TVsSAnZWagAAnSEQAKEUoSlSkfciPRHavmW1\nrGygzPGqZ1fV/BJrbr4qxEg6uroKxjFW0KU+8pO6vmX1WkIc79Di4f5OVHEd\nnY5R7WGjAwjUXNSBh8+cycDFpJwNmg7mD3hrzVlE0c4gRedxNVieAp+uy2NC\n5tFKFYT/1gjIjk+KPcqdmtf+72wef+GGKDCmHGCpvf8wVKFch6Z6l9rMx6HV\nciK6pYokH9qwiglGcWYDwgAE+ZpypOdS0R+EuNEIKJep3U1nPXYZ3mXbAwpc\naiXO/1sxzE59zIDJ7UQoybqUCwE9B6GPRVyQjOg7bJlcofbWSRD+yTpZsDcv\nY+ReiwqWh4NbxmOHok/402XeXesWAdcTwluq/DH0F2CGBGRcIrWw6KNsTJQy\n52aM+w5sgc+cnEhTAGN8SmvgxISqYqnvedfJ5S27nKkhvTIqYTRqkBnsYOj/\nHZqKJ4uLyzUFTGgoZj6xXptD9QKOl9fFM7nflZ4bt6jAKsl6/WC4gNC0vF7b\n1eqJZDPky+Efn5YrVD4JYJGNgfEXZBap91dDENMf9hFyxDsHHCODzykMRzcL\nxwYrxrRyi+Nph51hPv934bd6d9gDR9LpHU4zSFbEJcRg/VciFgeIjFWBmT5p\nYVHopaviKxvD9bABspJYStuKlnbPXo0evrEhQyENc5GkLr9abwKD9F0Bz5sN\nppk6\r\n=PUrm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eb607bfa0326630c63037143dc919ac8ec5c3636","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b6c7f624b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b6c7f624b.0_1580490149758_0.13678982686758312","host":"s3://npm-registry-packages"}},"5.0.0-canary.b3f70ebde.0":{"name":"@material/auto-init","version":"5.0.0-canary.b3f70ebde.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b3f70ebde.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b59adf11e3df043634609989754ca03d51898d0a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b3f70ebde.0.tgz","fileCount":14,"integrity":"sha512-Idk32uHvhYGVUYfPutcMuzUnXnBm7kgPFbU+V09oz4sj7V2t3k0RV/za+x+q3FjYijoQ7X4UX7CQJcFDBnb1CQ==","signatures":[{"sig":"MEUCIQDjABm1ET/EYtleJWnBKXv3KVnCgMokaYWZUpXLbCM65QIgV+slU0JYWM4r6cjKPzW6oYiEwpnNmN2bHdHBcYSRQyA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNImICRA9TVsSAnZWagAApkMP/jeL8a8+91RVvKrxpy0x\nhgSdx3yuKUB4Ycm2qKyL+YqiIn5Jv0P/+4HSaxZOq1l3v7Kstk/2O6miA66H\nIKXOYXI2oq+DemaAWQ735E5cNYlzlH3kh0y3F/VFMF/e+YR0wdAyXtlTb4QV\nHkY2Zs/8hd2CRn4tSuXuKsM0bCH9qYWCs+A3EqUkBOXbQxlVNdRi3fjiwatT\n9vcoPdM5wH8DyV0EECA0GfEEeidUBYLxa8tY1jS/tfQhNOoJdusLxsVtgb+q\ncHX6SO552wwc3s9aGVOb7+Ur6ZjvNGdnoJLSNBuRsFXSmv3VV91+4+Zny+ZA\nbNrh1y4w1eDVh2zJVnAxF6UNHDjOHwXCggtpUexKMWjc0pTMkHe7eAq/+Atp\nfeUkDDifZW9pT0+g//zgJ4x1/j+zNMBw0MNyhjnSJtHePA08lOoIeKbWbjNJ\n/QrQIAhCd2ve1An1DwYfn3ZNT4kaVwKJO6O0p/xBT2lx3K9UuJ5G1sLfc7t2\nsKRvy1Znzf5A2m6zfuKOfpp8FDq4RLDpXtwU0vkGmjXKd/XLB6O8gK/Bo/wG\nnUw7moeI4tay5fFGjIi6ln/sZ6uBwBLMyc63FS8dSWz6ymSkMaJAY+Zv3zJe\nyUeNdpx3OhciCMM6i6hk0JYQvn2tmiShBAc0gErpy5YM059iURSFd1VgmGts\nrPNb\r\n=qXhZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00a0473670032b0ea60db83e614385e1e3166dc8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b3f70ebde.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b3f70ebde.0_1580501383696_0.6249355424301142","host":"s3://npm-registry-packages"}},"5.0.0-canary.3e782d8f8.0":{"name":"@material/auto-init","version":"5.0.0-canary.3e782d8f8.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.3e782d8f8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"088dda8cbf45f2284b488d82cb78efb825c9597d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.3e782d8f8.0.tgz","fileCount":14,"integrity":"sha512-/DBpUca99SeKmKWFWJ/AYbXXDo0PmiGNjZ8U6/bl3RRtAAF+d/Qun3d9awAbT/2oZk9x7j6hD5wR1FIoNJsR6Q==","signatures":[{"sig":"MEUCIDsv5MpjO2RKMKiSvR4At0gm5NVic29HgMLbzVKNt4IbAiEArmqwa91XWdW0R4QiuowYCEgjQjspaiQDrOTLngdXyrY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNiHwCRA9TVsSAnZWagAA9P0P/2Ql3ui8xujMzNTFwU1s\nRhb4sfN9LaIlkG0fAEtB21AHoKVpj7PdtKnRNCXjc2kmhUPvc207M5QnPtGI\nNhE5SkJk30xzqfz/Dg5E0EKu0YgHBXXeV6zrSno9hbNZRAzuzS+pk/2UdheP\nvU2dpqvj3+yNYfqhU+liB8+oJ7Bs57UqLAnBnCZ58KeLpMMpCFRVzDZLGzZ6\nKU6qHvcgzf39qy1HfCRRvE607KGtg5Tk6oyAu0G0522TPn+7EKU2IT9Xu8MN\nQsIoLTKDYuwGKRgBXuMcKADlPRDpUwmywsHbQncZLH7or0QKaOcbOJqLAlai\nriCZW8hoFZ5vlleXL2g5rqqo8NoA9Nhf/sNebfcowsOsMT1DqJMgou1lS5LR\nwMDWqG6S3oy9b5xNyQb58ReJZjoiDgmcNPY6sBHhJ9jKgfGwYark6Ap0saJR\nTfkP4dJnaEG+57FHxdr9Ihr4FdJARv/LuERo0m7yKqGZZxa40ZUMtR4OlvPe\nDE+nOOmBcG1teyjg3HrWwwkuQyav/k75EJI68rxupjzs1/0GFBQDekAQVQ6M\nqxpHsOAm1aL/Xy/jacp/hqDGIGm567p2qP5HYrFLvRV/oqYMT6uHpzhu2ccc\nFMM86hApIBA5/p7j5Y2FZdXlsUzyrU1N7OaPFhNl4HXltApl13sKRi3L8KzJ\nbewb\r\n=7hre\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8aae1fd4299832f77f4d1d51398e5b28ed5af5a1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.3e782d8f8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.3e782d8f8.0_1580605936473_0.9090491256608242","host":"s3://npm-registry-packages"}},"5.0.0-canary.535398572.0":{"name":"@material/auto-init","version":"5.0.0-canary.535398572.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.535398572.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"99602eb7b2ebca569674b688392140376a6d3342","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.535398572.0.tgz","fileCount":14,"integrity":"sha512-B5JT8eso+hvyzYJ2EXDRwTLxvi2Pl0bBCGP5ckqFVgSGkUBPHZFrGWlpw/hScnQA4+PmUybB4yXXz2669UYUOw==","signatures":[{"sig":"MEUCIQDcitO2FI/3tHbxEz7pg8tZlVpPCU4btH/u5xdm8VdgWwIgUx+wOiolbmFY4HZHSf/DpjvGLe6JfzGnnFbHlX/BofY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOGJZCRA9TVsSAnZWagAAfusP/A93CzmGZKeAEzzb/30b\nvyGYQ/ZbLPBGhgc93e5f8mjZeh4F3FHEmKZf0pizB3zbmX0YNxflw54i5uGd\ndv7Zsu5sxE96x9ITJ0ynZh0i5xQKyOeqJOmQrDLGMcTPsBw7IS93YVbxzNlV\nNt726v6OHB/6EHhERcmhzR+/b+gfsH8A/ybxIhDAhPTx2+MAq/5kMGHpNNXe\nTJ/YTJ/hksasjoAxjHhBk6zAgo/aenjolX2pXXOeTBJpZy+fWfXndoYssnjF\nzkmSCryR1udFfSYJiqYG9KRZXZmlwqvaY0lqBFtBhoXHQz1m+709X2ieiWNj\n6d4DzOFxvNP3ZKqA+kVJF6dNTfkNkRmfDmfNP9yGWFkjV86Z4bLzqnuOFkwn\nV9U8+fGletpu7CRCEYYsWM0HfhYPjww0wbk6zTe/vGxw/paGOrBdeI7cZrdO\nwykRgpcXF2alx2qG2Vxe23xUIRmhk1loDJzKYXsfaqV0m76iyYeK7uIpNqjx\nDqOYV0aV3gzA5opR15eZ2O6OuWMaSYG2oSCJ9PiQT9foVOlIVs9V72sI3djd\nlqYXoiUxFTN90mGby3fUsvhwRUOWe9rTWQC8TXn8QarJx+g5zYTp6luhnUIL\nDCpuMAr8SZKiVtd4jK+Tew4I4fEqShkHJAeMVhdmgohmAPiLvg5L0sKJgR73\nIOEx\r\n=mNPB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7f68038e23db60e7b4c44c1b17a6a82329805553","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.535398572.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.535398572.0_1580753497021_0.7574603656847898","host":"s3://npm-registry-packages"}},"5.0.0-canary.5ff33802c.0":{"name":"@material/auto-init","version":"5.0.0-canary.5ff33802c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.5ff33802c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f0dd33a44aba499045620c58549bb4029693979","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.5ff33802c.0.tgz","fileCount":14,"integrity":"sha512-V5p+3gQesX1t5A3L98mKUJjMrpaXSTAkYmo8A8BFoDLqIpYgDVVKG+ozywVzM/ZdUws8h7M/m8jTjtRalFjDzA==","signatures":[{"sig":"MEQCIDCRfsiQKVQNOC39wDokP8dSHkViVWmQFGzjiCkjThyiAiABCaCk2iYdHj2CMLbrZTSlkArl6IbddOmaSrLIrDpgMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeObHlCRA9TVsSAnZWagAAJVUP/RC/qpAW0xu/PVNryyuw\nW4SVEb19HSrGQ6lDD9uHRff/JQ4uvQyaT7r2siU+wYmfkdTM0eXSFZSOokMY\nVgrG1EqXxgUce9Xe9aTp+WjnIMVBXvX9CHdWhOUexg3K6n68oVXGQp8Mp+GX\nRe66LVf15F2l4MGGgtGooP1ziL+91uxFIgCWlP4EqkfIStWFkYnE4X3S8Uap\n4Kn2y1DgfZL936tfvbpzMuAs2E2HBXEL3S0LLFz1llqKcr3E9gllBZnm6Znx\nSO7Sxa68IqypnI//1q6/2v9AoOgxyrCV8RM1jWjJsRhuUF6kIiKROZssH9Mp\nAMknIl0McL7b42bR6TOJIGv0VUmzZLmd4n/BooFLlK7Le/ErOYi9uOedyNXV\nowWlUdbfyx4xQNvZmMWV3sQBiuTXyj/rMNeWv2PU0maqXSj9k+vZKSLWCVCh\n2Hs62EDSVz4mrs85LgtyIuGiY4m/zq+hlXpnlsI+CP5Tb19dXd67hSLIfzoM\nklSpkMF0TGMNLs7D7lMefDasHTHoyuIpHdnIEhvj064HVMLE7cQQ/uKDoZAt\nc/1sxu+k2rVOWbTOGez/cz7uMtyK8Q2lH4T+8lvFtL+4mXSYqPeay8zUT0Xx\n/jXj628rw8jMABLyKP4XFiuXNJc3RrR+jeNG1sZewoPfUJVOM9bnwAJGNyr4\nXRwq\r\n=eztr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61246014f77c40c0d6594f32e40f4ce98d8f7c8a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.5ff33802c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.5ff33802c.0_1580839397023_0.8875026855057706","host":"s3://npm-registry-packages"}},"5.0.0-canary.1eb29491c.0":{"name":"@material/auto-init","version":"5.0.0-canary.1eb29491c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.1eb29491c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fcc8bfa0f5a4a4ac0b7ac6d8d74a45e8f05e8249","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.1eb29491c.0.tgz","fileCount":14,"integrity":"sha512-lCbbTCG8RqfomSu2ViF0UusVtcw9TdI+up/IPJmJbWMs1Y9PUgxDg2a1JyWJo9TxCenW8G6k5MWyXz3kGLLWng==","signatures":[{"sig":"MEUCIQCj65cBS+AZSuyE2IW9xZSD3Po6s768y/oklclNtWzM+AIgMi5Ae73bfS9QIyofkZL42+AyGgam1lnmEYEmFiVpPS8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOdtKCRA9TVsSAnZWagAA7skP/RWTSgM0c3iD+3kfetm8\nVE/AoE/TzccCm2x2SyJpB1yxsvg3G0oy+MhANvMhm7qNulrtFmJE3b9yCI7Z\nAnQWKG5ol0OtR1Ncu1D3YKzQ+YWYbJEmhnWysByStp3//5cGk+F/0JdrHorH\nVvyMa4fO3T4tGk9ey4s+GI/enuu/9woPZPFJmJnMbHE6BdDzajozMzHwcDLQ\ndoeKFICvneTy7d+l3hWqzIxxtluxPSwrbvBJUgFc/MCzcBXbj7eIeKquFIEa\nIly5whb2kTKCaC+s+Oj9SFAUioPIvUgUxA8hxX/b7zadcmh61hRsWWjkQ6Wm\nYSXdCt6mzBedF1LsIZTGktA/2RxQe351BdeUnBEgzPJQud8mK+b1rwZ+EUW9\nrcohx69bC7l6DGITSAKMLtEXDnvZdDBbyhb1lC5M6cfVOSgEDMVj0aes732s\n6IkeWyUzduOb+7xpo9s2R8WP1ZC/m4H/NnPS9OPzeX0wtjcdM1x/jaH8rP6T\nvRXeOafv6lWzhbjb81gS1dMaxwNTaoBbawM0BPIS2LWpZxTGyzJRfGnWlBFb\nAGQ1TM71iGNekF2aoby+DY5CqBt+kOhF/0XV8nkXNmipTogYcDwDY1JwAnfT\nrY1QCF3cHhxn7H6H9TKULjKz5fbORF1xWBRWJnrKCjRJIc9v7SexZ2e8GU6J\ng1aZ\r\n=Fby1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"689b043c66790b1c63b5d2037a1ed800248443d1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.1eb29491c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.1eb29491c.0_1580849993588_0.5545992746409265","host":"s3://npm-registry-packages"}},"5.0.0-canary.4c7154b26.0":{"name":"@material/auto-init","version":"5.0.0-canary.4c7154b26.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.4c7154b26.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"20232cd376446baa4be9cf8afdfea87a6035dede","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.4c7154b26.0.tgz","fileCount":14,"integrity":"sha512-T5ztTRurfTxu9rik6LnE8gtI7JtDGuctIfYZCyXfxnKXhJiJ7507VZFUWu9qMp8GtDOizj3f4LqWVcRae3WSRQ==","signatures":[{"sig":"MEQCICN+ZgyOU37jWoeg/6b7uPgz8Iu1xAAkFnRhBU418mSmAiBZMsptaLMSdf4BQBnr9shhLR/5eWiCscequiZMhoAUQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOucGCRA9TVsSAnZWagAA8TEP/j01qvM6qvgWJrYU5IcK\nH9j+8jA35igcNs3hwKa/DAJ+tY4txtyYyl/f5gBKZNG3M2KArWbl9rmZm9tv\n1o+aWz6WxJAfh8WO64O824rVCiBZYjnH/2Tzp/Ut9Z/tQtiFHWkkXH1Sl8uQ\nLnhMyq19yBwSqHv/pFZMtPuq+DlE1ml3FTWVEp9Zo86c10nZkeCgf7OYfbBj\nU5TXyx/AFOJ5SMTDBkrFlmw28QZRkLeKBKX+/uVwbOXDb4G+4rpYwgDDorre\nc3vf9pdcEdk+/2Nr3JU2ETZo7KULnowilWFWTvj6F4DcEQhHzrovmcETw2ZU\nJouLdv/ZjTM7QA8qdQVuxjDSiS/2lcln8Clelox8rTe+9O26Gv/ybSVyvCbn\n3H3AqfPlmVUZFmJPe7r/RX7qxo71WT3D+/+A9+He3sR2b5XIIs/c1D24+po7\nT1NnKLppkSMM3uqMNJGq9DLrq1Sz6ukQoETHC5vSn0m0uy1Urz8uL1NcmwFQ\nIvGFwlRb4V18u2QMVakixMo9tfcSFpffxGbuGFEGzIuscKmZSGACZUVbXf2n\nZoXpw5TFN3cqaHM6W1qBCdoqO/3h+6EC102GOKcPIF5SWhQ+ieT5Qx4WxLX/\ngDcNLCYW/n8LcyCaaQqMiqRGz1sARorCmaV6ImtzyG6wayRpSFpt+1UgzUso\nnCOq\r\n=dB9s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e15f799c180f6eb07455eb8d644b93db93df5402","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.4c7154b26.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.4c7154b26.0_1580918534526_0.24555233641605456","host":"s3://npm-registry-packages"}},"5.0.0-canary.ab5f49a2c.0":{"name":"@material/auto-init","version":"5.0.0-canary.ab5f49a2c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ab5f49a2c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55446c8758e03c33b771d92d13ddcc874e7a90b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ab5f49a2c.0.tgz","fileCount":14,"integrity":"sha512-i9I4togDmio4I990jcd8GYMhdutjgZPuU8WVi8u+oXLdzTnQ18Bl87dd43uNKNRX7BWFWS0rvV9/N0N5FJm0MA==","signatures":[{"sig":"MEQCIBxUxpNeZNJP565JFu0tEMRigj2E1fdV55APwBvQlnJeAiBJRUJvCnQDg7WOMVCvsPAXjaEnuCu6xxELZcKKN7eTUA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeO1CWCRA9TVsSAnZWagAASqQP/3JXnFPCxx88AtKpxNG1\nWJ1jFraqE7UMd9+c7QOJylQ7pNuEwII5V9hnOqhrxOYkonCKC7G1SjNfDtT+\nxO90PmEHWrY1i/RzYvYlg4q9Ar0RxY0ZQbhHZ8/YKJ85OUTnj1e8MYezpItc\nQM8tY5ZCXNaJQZbtENHFtyE+09cHXVFnHX0Y+n1MMoulUJxAfkahe+a3lrIl\n5rOQxg7JGCNr9au4jwFfGhFLSH+rbhQHoHIy8ixsre+heX4Pyb49kX0lUscz\nNjf1xO2bqojNPUFS5joq7gQY67/wrM/nWUZcxyvXZHBnHvhponZGiFe/R2UF\nh2XHtGWg648DzI7mI2LcByK2NJz/qfzGv3tQEJHSe3GEKI7o+9gHV44CPiJm\nJsUPKlm7Xy2xXMlKfDNQKi385na1DdcikXxgbR6Vs92VhOHSuF0bx6ibaUmk\nhIcCJCzFUE7V+yxVj19Wn7lLiYV5I8p1akTCdY+UN5IBwhN40JsQtBSWJB1P\nn7GlPyJ/l4nORoqwBkq0yhATgfntdA0jnbO606PYxHrQNkeWG3R4yu62Eaul\nSk/enkLuFsx4CpRtpDer/S6YglRlZFfiLGdQux2VLS0vW+U7C32P4NzX9TF6\n5LhK/vInJwE8Wo907e/iqfucDFX5unW9Px+ZK4ayHt2ZOQg7M8f3g1byG1Ea\nRxlx\r\n=Wb3q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9e2d33465e4a55862766486d77f187c0bd37883c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.18.1","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ab5f49a2c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ab5f49a2c.0_1580945558102_0.9370035148494091","host":"s3://npm-registry-packages"}},"5.0.0-canary.c541ebe15.0":{"name":"@material/auto-init","version":"5.0.0-canary.c541ebe15.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.c541ebe15.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8115f394257684f91256216e1c45d0cf8fad056a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.c541ebe15.0.tgz","fileCount":14,"integrity":"sha512-JsM/qCb33EyCenFImulTHiyxwrOdzB4t05rbtGB2ik66RZ6H8sWS5Da4UGL8QXWYb2npisGLrZXWR5bCYak4xA==","signatures":[{"sig":"MEUCICZzc0wnBtFJnYR8bEdEjZ6Fji+6K2PiKDgkeYpQ5dXbAiEArLJWBvHQMYtxw8muqNdm6iVev6Est4Zh80HwZrhy6so=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePJM/CRA9TVsSAnZWagAAwf0P/195azm4h8dFmWO4zbGL\nNcp4C10esrc8EtHu1T8chsXz21S5JovufQSanV7Bga/uJqAbPWueulhzCkko\nuTcNsKQ9UKB1QnuPQ6zvhgN4x6Vl7EUXl/iijDS876SUkmExpPmtWz1mrsm6\ny8/mPJ+cPA8gwU9d6RYdho144oxqjdWjEaYb+BXoMOU0XYF1sy5lLc/LHrh2\nLJmnoCOVs7nlJjG746OxlgBJpJLDHhvyQd3GBmbN3g1RrWZwJsZQh1TF0LH/\nmqHcOtXgd2AeXoGFNCAHniT5zessi7OXj2Z6D1lbj/W44/HVkZp7zPRhXVoA\nDiqCzcjfXUbJFgQe7BjDRBVuWAgHEToUqy2qA0y30NqSfNdvz+qEGU1UpiUe\nXLsVkx9SsWyp8uoHma0uimC0jug4wbjsw/hMbRu6sbjlB7Bncg7B7PvhLfGG\njh06PL9rA5asxFywKtuPRPP0Adunrvw7WBlGtLnk25X6rpW2iG+c6bwVcClC\nHzg6QB3QZY2aYMmusXALHyHmK+31IXiKdXCaVZol+ivLYW5/XXpRPpJP+SbP\nsObDZa14e2upEuBJnuRY7YMJ+AowDPNsn+8/QJf824KM6XqEA7nlJw93JL6k\nMA3q8hhb/2VdrztlctbesusWDO8GfFCLJ+KbbE45/3F4Sy/dvhUQmUefMHqU\nZoYO\r\n=9C/5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"87d5a39f72f6a882a8412df86762c91328c6d985","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.c541ebe15.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.c541ebe15.0_1581028159476_0.15576488727416082","host":"s3://npm-registry-packages"}},"5.0.0-canary.98f7faa05.0":{"name":"@material/auto-init","version":"5.0.0-canary.98f7faa05.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.98f7faa05.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5078e6f54e3297d6ed4641fa618f75a73a14b91c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.98f7faa05.0.tgz","fileCount":14,"integrity":"sha512-W9KNwNgdIHtdaHp4iXvI/64rJh+r1hvkVEclvLUSa2EkIYdGZmQDICXueNPjysvm1Qnckz2m0xRDbtat+8fgmA==","signatures":[{"sig":"MEQCICBFBbuWeBEOG6DDsFeYv4OY9o3x7ME/umzcVN6yAarUAiAZXh620gi22+GSo32uh1U2kDqgzOAEfE7W/Nuof2uhKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePbiOCRA9TVsSAnZWagAAd2cQAKNSXpFdUFWgw/UerG8w\nr//+XFkbxgj3AmTGtU2OaD2DnjuS9SLKdx8Z80tMoxAdz0kkUUbHWJVCkYNi\nom8/iABu7M0PxPC69kkMmymOSEDQEj3MdXSAuXtWqLhuMptUlk4hJ58/mc1v\nkduUUC+/PHfW74uB38qm5/IVyK3oDPHhfnn6kGLiWX6EEI/iHj/JPFo16bV1\n236Dbaroil+uWOTYyRoUS12QH8SjKG4PB1dcHD2yFxanmZCQ52fjR/Eib8SA\nooulreLY65S7rjGFqAsZroJoKkTpZO0Rkm9llTlplffVK4hB/mEMZx+oxYSj\nsEDWCDPzbfM4USu8trl932q2s75B4W3575jNXqZFAdPXdgvrD42gEOrOIcsK\nRK1jNCyMHNqVOlQLUCUL0OINc2A6TdQ2Tzhoy1U7sMNKHrEhbcgO9AZvFDAx\nkK0q9fQVxB73td2hA6jbMnK8DwumL8h0AMkVcWn2FjHbjSE9rKUPqxmDa7zF\nY01A4b1hlpYJgXwcX0hkRIYtWhwksUdGL0PhB/I1NzKvgbh/7xEZ5f04py6s\nDx6H9qeIarni4Sh6etoOgqHbMbwfoVWNVnHaWsUqGAven2gMFG92I8avbhMf\nPbElZpP9fTqBwZ8HPRqaiC8H/q/eS2HiWClGl8YrTucTuyvV34VfyQ/mq52+\nRC8z\r\n=qdth\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"698f18ec0e8c9dcdd38beb5ab6b4cfa6218fb288","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.98f7faa05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.98f7faa05.0_1581103245715_0.6079860076883143","host":"s3://npm-registry-packages"}},"5.0.0-canary.b4727e43a.0":{"name":"@material/auto-init","version":"5.0.0-canary.b4727e43a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b4727e43a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"86f87f22efbb42732a150364ecdfff79a1cd35bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b4727e43a.0.tgz","fileCount":14,"integrity":"sha512-YvAt7isMO6GOCjgtzBbx81xHcKTnSl4v2sxicPvqlOlhutrhEb5YFUeUu7EHlZPIdx6KopsSzu94MJZZVk1/ew==","signatures":[{"sig":"MEYCIQDGa0+nF6i6bjDD4CJCKid+Vtp/aeHoK1koPce7xsrtNwIhANewFHBRj2rlL6Rtmn153L5GhfHJu7+P3UaWyXIZWUGv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePcCYCRA9TVsSAnZWagAA8OwP/jeMRpEBDG2uQMisSORQ\nfN+dtmeVg7c6A9u8fI5CFFFlbqslaDaaQfjiPPxwmVLEaOPH9DSaQkM9Hwax\nZnC2SLyXL0a3fFJzvYXayC2zrNS1B+r9j//Rzz9qpDTKqtWtZWnK5u9viVDI\nYecFZMEvrbY1FMb6ENRUG5jeW8cKirJ/WnRUQu5dCg9FpDmdlHh4SXn/PW/M\ncGWo26v/p6bhtW9MVQXy8gJSuP02SXT+7Rd7vM3RQ96GKUXfApK0sJTAysr8\nOq9g9HZTDaArSlImQ9bx8OmYQMJqRDMzZocvrFt9ZkgV3D56I40PUtgJilqC\njjy40+aqnz4t+bHxdnZq+HYvTKQGDqEiXC1uKcZRDMA9zYuan3RRxuOUQbe4\nJz3ffOOwvgaTpd5VlxZmrksY1BX0KiTM3M0MxoLLfIpFwiSYB6k2ZMI35YBD\n9Lnnnn2jkIiGl500LS8wnGBeObfflbn8tss1+b329PyVuY4yGi/TCHr+bWaO\nMyWhIWIH2X1hfQucfSuMu+fwPPh2+NDffpqTaYUaQGR+P5EtYY8kIApJUbH4\niDJzwUNNBhQMBzV9Ys06nYGXVX5+OKqAmpliaLR00972PlAd/N/p3Eg4Bemu\nEXW6EltXTa9I3tW4YulWKunbB8BX9OeNEj8aXOBTlWQTst/6keQEnD6F8JSY\nnY2n\r\n=ghCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"140a0d7a10f30d8ce4b10dfbe40bc63136e206bc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b4727e43a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b4727e43a.0_1581105303745_0.34271856571740233","host":"s3://npm-registry-packages"}},"5.0.0-canary.91d9d5a65.0":{"name":"@material/auto-init","version":"5.0.0-canary.91d9d5a65.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.91d9d5a65.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2bb387a1e1afa905f9d2224547116c6c72355910","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.91d9d5a65.0.tgz","fileCount":14,"integrity":"sha512-KMP5x6cCMRRjlwZ5Cal3J8yrxQsWjq9EvQ8A+SQFq5Y5wxlOqgtNAB6WDQ4moA9/3McOQrtIfy13krNABsjBdQ==","signatures":[{"sig":"MEUCIQDd6WhJpNuNrzRmkHSrajIujEtDnuypKWm3ibWRWQy3bQIgTFk006+k074tgLzfmNaaKAnsQoMfOdTt+RDY63QT0XI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePeuZCRA9TVsSAnZWagAAPVUP/j9WZqT5Z5jEdA5hPtsG\nYCoab5GAZXqizuMZwbVcE6WEgLqEI1cNmPGb1mpQhcL4IIzmSlQZ49yr9l24\nhrXFHw7E2tYDrK8mvJG3OobvDlx+OvjLOHu5ZwmTHs4p4bMr/fOlyvPNN3bw\nFEDDaR8ia8p0VaBN0qDkWVcCXZR4Gi8F8qXnKUm0PSmWuA+3mhFppR1nFV3H\n9IMxRgBTFJsYFDHZM4Fr6aIvtnQVZuZiZNppsrKUZ2tzlRiusH/0NkSyg5X3\nA09ZTfe9otCbAYCdE+Y7zE3iYIYVobm/11FfsPDxIe/OvW37mRleyq/KZqI/\nydaefwj26WYDKXAdg+XRzRN8ZCLsySx7Qx1JDtNQ9F+vECNvRSyAOMVTGKzJ\ndDDkF0hkhIRIzT98Xb2HMxuatJ1XKBIbZMeyQscfkx2uIrwrBJP3J+8EFNZZ\nRDlm8WGzs0vWvcfeZkRlWCrDgyixNcsY7av4gNR3BmtIqiFEcbGzJY4r80ur\nzv9YW8lfLrVIoPAYZ6vjP6WN+P/kWj8C7scEltXIqpXIc0hQxwaMI1eN7s1X\nr73MkHPJGtfJV8fUCLqShPSNjfYUZHeFzb//JPb6cd3fz37x1sh3NlzyAyOW\n8vC7E1GZkuvVig2ZLrOmC4duLdUKWBof3S0j/B6Q9YeeICGKdQYof7yjFI9l\nyHRB\r\n=gb3A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f98276c6136d4bd38889e0b4d6354081a3ca941c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.91d9d5a65.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.91d9d5a65.0_1581116312427_0.9278790267580084","host":"s3://npm-registry-packages"}},"5.0.0-canary.d5c006ed1.0":{"name":"@material/auto-init","version":"5.0.0-canary.d5c006ed1.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.d5c006ed1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c9b7bcb5ebe7efeeba40d01302fec6206bd4ee68","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.d5c006ed1.0.tgz","fileCount":14,"integrity":"sha512-UF7UKYXklQmPhRcxCJ99hIrXDPMHBRb0hxQBhIdv2Q9X47dRkD+Fvdnjexk8j/FRM46GOj+xDTcLR2c2yDyRGw==","signatures":[{"sig":"MEYCIQC/a1XSJSkY5wj+vGmPsBCof730U+/W+uZ0Z8uawTm2wwIhAJJLH9c9/fXEAwPdleloOOvqyz/fkKyQNofBK8ALdq0j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQYlECRA9TVsSAnZWagAAPIUP/j02ao2gC9wkAbCo27dL\nLD4iuXFKd4igjc73lE0ngRZRPjdWIdpZXfD8WJTbxlJsPZ04S8/HC0Sc6L5T\nzW2WDt3aUqwd43XHWSCd7qJu5xYnJaHG+zS9mCvHY4l0ZckCtDumhuldl8+7\nxdOJNKQAJHkqn55UI7Wf/VJQgE3HTpjDgtnrwebdLHcYE7fUQ0pFzeb4jIoD\npj/yNkMca91OXBbzTievkLlD2D1348BXPumrj8mYOV/JyUpjN++q5FmhlRWp\nRUvC17nUzQ9arjm5qmS57hlWFUNR6DnExYRd+LAyauZcYgZP9TZ3fEQ2S3WM\n/RWLP5fpnOBJ96s7sHF4NHq/VSByHy3zG41DpMFKBS16sogosTSpXaTBBuRK\nNdzvEhF1L5SNo0P9uodszabVjSorDwEMtvkijqrmtikPn3EVqdVn2d+4fuHL\nQl9Y9JzKHlzhuURQYR/GMSZC15SnkDEyXkjmO2D3ymtzKGCsJoU3LqCQfipq\nKMXL/nQ5hyNH+wpGVoZ07IPwvHBnKbErvZG4HUwzHElXGPRSa1O+5OZ8/bPx\nD8Xk4HydSaqMhUtv9jxa7JbJJz2p6g+XvjkQtwukb9rbgUgXwpfshEiB1gXt\nIRhdJgRhnPGUEmCWh4UKTpjS2qFUjuVsyxPVmANxlgRXTEM9e1wdz4OQhgL/\nIYOG\r\n=bufN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fe50932259fd2af2b34c60968682a0b94f7fed66","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.d5c006ed1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.d5c006ed1.0_1581353283873_0.8173040273514642","host":"s3://npm-registry-packages"}},"5.0.0-canary.559f1a570.0":{"name":"@material/auto-init","version":"5.0.0-canary.559f1a570.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.559f1a570.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08c622a531a035bd4a62c7f9b7984993789baf8b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.559f1a570.0.tgz","fileCount":14,"integrity":"sha512-fIiG7M4qGT0nWb4MmnK7JHhnWQlsxXyU16h82Mawm+ag1vHzCVbL+UCS5K0FcBmh76lZxZSPSmK5NdI79U5rtg==","signatures":[{"sig":"MEUCIFGxn3p6Ozwf+Yc2LY9wmFWUWwnQiMvFkm2UeVGWc+oyAiEAw0EMP4onenpbf1VrIjk3qTAFTy/LukTPr2XHQjx5tx4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQZG5CRA9TVsSAnZWagAA3j8QAJmTvBLEKpj378MMjt+b\nz1xryi6/6JUsOR89V1az1g6o/gXTrFXtxt4sayE/ebZqdgsf5YdRCaMjIgeM\ndSS355NsHhf2YbBCf7VwdeThw6pXDnrAvSXJ4QR+elO5A898Y2oVH+Yo0z6L\nStw/0DtDOyxJUzRvvbGlR0mABy3oRp2GsUkUIGB/OpN2JwSnxLmA/HYIU2Ir\ngDnBvHp2tsgwGFjIUhbbgNUxpEQitS/G/rmddUy5b4rusFAgKSGhdENMTsZf\nanEENJ7ZmM5joS17XvC61QFKJvjXlHYSu0mTvJ4r+ii0KIliJ6JpK8+BGHwc\n42M0AgpGRfrif4XdD2l1qakfv8H9/ecquKt+5gPmOl3AUoMtXahXI1RKLiUP\n+22FegVC0tVP9bBWN0Ivri1lCO8ymtL5ivIjCN/pAstuUURAx/a8o1QG+m/z\n7SS+eajk7pl7qb1hai6sI9pzEexuyZjXtCffn135P43mwcB7cjPV+ZX8RU3K\n8glXSX3uDwTcdXia9v+/+AHA5BKhXucHaF64CrGNT/onbe6uFRECTIc+UlOw\naV1KUPgWT7grUL6X1v5pp0tPP8NT0pBVlp470eraEnZSD7athmB/8R6NRZ5u\nAtceXN9G9vDZUC4qu+Uay47Cjz4fSuKdIElPYOupBW4FKLUxpTj1/u8m07z9\naZE6\r\n=YSd8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4adc0cb689de4e266e65d90d614fbe1177aa5f1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.559f1a570.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.559f1a570.0_1581355449176_0.7127849486170958","host":"s3://npm-registry-packages"}},"5.0.0-canary.ad3bbf782.0":{"name":"@material/auto-init","version":"5.0.0-canary.ad3bbf782.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.ad3bbf782.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"202056fc09e0acf7131b44efb06be96418de1f99","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.ad3bbf782.0.tgz","fileCount":14,"integrity":"sha512-5eSEG4rs46k6XLwUlBtnDczxdEXoGCScgho/KhiPXR5EJWZGbPRCBvyOnb5cq3PFY0qzzkqxQr6QvBwmTYyXLg==","signatures":[{"sig":"MEUCIQDEqOIRMjYmqkTq4983aJdzGk++t+4s3yJYvZsbZp7m3gIgMknFGnTVH5VjbbFSxqU+vFAux+sDlKA0Pn9lYeHPQPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQaq+CRA9TVsSAnZWagAA4RQP/RdanwD7XibCMDtHB3Rh\n0Vro+0hXYk+4m6ganYAdDX7Kl/uBDgq+/ae49K6xquTYyYqLaHqxPphZFOrY\nI6IPMAhr6D/B4hsbLK75CQzJx2jrdRE0L9Gg+KIJQsWsvjV/Odl1mN3EVOke\nRJm0EOl04O9x5MzZOzIKJwNe+j3tyy3cxyHglxjcQD4bno75zas/EJwFjGLI\nnzPLAbBdTM7e0q4+btN8n52ejAUskbiXWNV8gDQB+3w+cnDxmaXzQ4Zy4zgX\npDywq3ajlDRhPYaH45BmWaWBDQvemVIvVodzVS5Q73cBWtR5LmXO7vfJLXgG\nVdTB5gvtJXZLTgrDqwXcpCPlnIDehq2lhX4EqUST/dI69sEuqv6CZFXtfDw2\n7+Lub6/Hc17vNtrUXSMQxpqgK33iz3H2ZXFiRmLfd1zZuKOYo5FeAG7lQL7h\n0bHZqNYLsDR1nD7hG61de2RsLZdAhu6glv3w+oFPWyKdAARQbRNZ2aXWBuny\nzBIOts50Wl2NIzliANCP2yRpcJPvaQX1M49LO0GTbvVcwZtWMm4ULgNFSCo5\ncI1/s/4oytK23y3nXR81FWi/QPteY6fxss08fxicmFOkeULghFwuGX45fzGF\nDWfpq5Zyh6ceJxHXecC+aHKhq2iKZ3pHEHxPIYmKawmaOPE4BdJ4IvP49FT2\nOAA4\r\n=KQx7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"48e565307134ef2e860fdfd1a8ce59613a783ba7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.ad3bbf782.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.ad3bbf782.0_1581361853941_0.23886673687155469","host":"s3://npm-registry-packages"}},"5.0.0-canary.570d8e49c.0":{"name":"@material/auto-init","version":"5.0.0-canary.570d8e49c.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.570d8e49c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"60ad6998249014b5c3041cafb548732fb5599218","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.570d8e49c.0.tgz","fileCount":14,"integrity":"sha512-l/5SGS3+sYf57TSEWA9Rc0nyoahSgnqU2xGHkZAbs2LvpceKbx+ma+3y2ImE/wm6Zh+yLAVQCMwmoygy6rwRgg==","signatures":[{"sig":"MEUCID7un1C7phWJkT8BKkwIpQeyGUAGnugP9a3r9zEMCMl5AiEAxKgdR9QvFU4iulaaPpaBx0VLhLDydD8EGrpy1eoxuR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQcBNCRA9TVsSAnZWagAAO4cP/3VUEHeJwfRjnDehCHtF\nuiiVeIroXJ8Jyt/evcjdoYB1Z6eQcoMTGAN3LsokW6Fq/Q/igPpHydcCvqjf\ns/zcYU+dit7deP/Z2S5wmBlYASTtKMC0GMCP21V9y+GtuTyZ2TLOo85qbX4t\naVDgS6NGyYcc6xDhjdXO9pWiNv/Dm2mBX1FwO+cAwMAJKdsHm/HdlM2jWHLx\nWV7Rxv5Jo2BP6wynbcRKKtCGh4wV4DOKKle1C79OOaDDueLnpg9k0TzQNOLV\n2bWHTqDHjnh1VDOWeqF0AzcU2tP3TY0z7p9CREwPijX2Ap9i7RPly93/uWtz\nmDpUOug4staYUTXAGBTvteYeBkfMCn52GVGnm57aIL/WvS70sA6jwbx2VaRm\npE1xfskg0EZbbQw0C3XQBDyQgZOs2mpcI4JVwm4LtTy8EUwM6SPO0tSu25UD\nPV9a5sNGuw+IkUBlEK4bmLFrUQrAajyQPoCcaa0ob/DeDhQUMlqtzU7cMOYu\nnEGguT9nzB/6wI6CnQ6avcEhTnr11IEWv72TAA9TPToaJnc3zQNpQE5fEQWZ\npRBjRcG5C6C0+kfqP/cwZATZaKRhp0ZaTlSK1H6hDH6j6n9lBS3Rf7FB9t96\nPVizUNXqzpzY+cO6m/Z259OGhy/bV+YymPo69H0GS5UUUpkzFAEPMdAomxTx\ntmJ0\r\n=nbeN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b6857e33db49c411cf5f55873a45f72841824fb7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.570d8e49c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.570d8e49c.0_1581367372822_0.0893724770352633","host":"s3://npm-registry-packages"}},"5.0.0-canary.48b06b89a.0":{"name":"@material/auto-init","version":"5.0.0-canary.48b06b89a.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.48b06b89a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"92a2c8fcd1c29aec0ba6c2aea863e8d9ad07922a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.48b06b89a.0.tgz","fileCount":14,"integrity":"sha512-FTVxcCOR1RxNcsyu6V+jGU8MqIlDXyeoS8ua+hzw9l8JteK+axWrAZMUKlGypxyFwrvzakAzew2JUDtmdvuhFQ==","signatures":[{"sig":"MEYCIQCLDIc8fp9NIWKtcRFRx/5R1iS3w3oN1fB+h+bIqP7E1wIhAIwJdKQoCtEoQ8damqb1W+FNCGT/egVDJWECJuB0Rm4C","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQvWdCRA9TVsSAnZWagAAxKQQAIaH+SnElcM8VTqrYN9B\naffamboe6jkCw7rKwGK7FEiXkdG+8YqZ6qMBCAU0lw+tD1w670DCl9f7sB+T\nmJhuQM5iYz5lf6tJIQ1ppE6aJhfhyHO3qbAWRUomwldyQe81twXSm0TjpEnd\n+hr6Fq4LAHW546u7JEsCLx1PX8Ip/9a/S0JzqjQbBdqPWsJCTkQ8JierogFf\n5SbSkUic8EWykztzlXffKIDt1rHKVXAXkNxTfkaOMog8wHzvgLt9Uj9mcbni\nC+0uoiakcEhqzZc4aHkNB10yoCDoE0yFwJnhsfu7kqcvy4ymail2WvPbAci0\naccm1Nzsddnyt5mCma/XD3YUDdGWkpvZLXbJE301F96V8bMILUbe73qQfPU8\nC6g5gGQmW/ClDqr2+VyI1EvGwvVYEXK72veE+6uxW8pfC39XoUx+DD0twivk\n0z7SiG0rR5dmt+LckyrtQekIj/tO/RYaBbODydEKi2EVgZxFw0+db2RaH5Wv\no9Uhn+Stg2btA45LrJUloYZ06D2oK7EUtrN4t9utuylsT+t0UHC860oMuq5/\nknORmiGn4iisi+PjzTVmwhluCg0dX3Q9H2dKLEmXuwpQ7QB4hbX7jsd9odfh\n+I0isVKZMA90BrSFjX+kAjp0jl9qP8obCbjMhx3aITqNhBDer8vEAPfFFuw4\nF5ap\r\n=JD56\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"540a576f2286061b02bebceda7cbf10554255781","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.48b06b89a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.48b06b89a.0_1581446557059_0.2694320618774051","host":"s3://npm-registry-packages"}},"5.0.0-canary.612443dfb.0":{"name":"@material/auto-init","version":"5.0.0-canary.612443dfb.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.612443dfb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"be479cb5ab17aaa24413b30c80adbc2a4c67aafb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.612443dfb.0.tgz","fileCount":14,"integrity":"sha512-CAT91F4yTdRzViLnrp8WzPkJwR7W5oLqAmXNADOC/JRrjrjWnWUo/9zC7uLjZR3ArvY73uwJsDxmV2Y5otVH2Q==","signatures":[{"sig":"MEYCIQCFJ9veQytBFjIhM6fhv1JuHwyK+QG7kXY4Zmzv9yQdFgIhANldqHcWv5Ue+Z9nwkTBgqgwXoIyrYmljeKR9d5Pot5Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQwT/CRA9TVsSAnZWagAAzZoQAI6COIXQEmhM7MSB+/Fv\nCmax+KDJf7rQdZJUlb3dI/UlgnjulqNS1mi3mNkdDUQnTXwj2BoMYKx/3v8P\n6BuNN/tqOS2OJvsKzLz/gwpr0N11d62//n2TF0AGXUa+HZ5xcAfYLrf3N4wd\nzzIwfxjB0QTgNih9JxuPau71i1WbW7Pkfl2WBygkRTcgdiwd9YAcud76XkUD\nndR0pgHygCnUH9H3FQ2yjcFNGQUwwcG+5OsGunmgL16YQ0N4vGpYkxGBhQ2s\nkmLAclxHfZ51AAXAiGrgxd4x60Nolk9WPsf6aO1ErZWOrcIuo9vDwW4fVr/y\nuuFRY3CN5J24LMWs2rAu6DilN7g6jj3WsCl60aXpLYr1qBOm22qWwcuFPDGD\ni/U+CXQMM2jrAGjVxS3bI16SwE4a/4y3ZFSzlMOOgVAyo0og+ys6g6da6wP6\nVEnDvIJlfzFo5NSRGwrDvO8BX4kAN8rpkIiBWtSvsZbq8ybB/0l7a1aHQ0jE\ncbIchRQ/jjxnzln3ce7JDXhMfBfTicJhWEHiYAi1wZAdLZr5warM+R4+adUT\nH9+y5ljE2o3JOyX6gFuNiWPyGNhkhgL3b2TUoDDMbEH3QIb7/lPooj71jDj/\nnmPG9u/PotA8tvz0VPaf3pQDK46XoptZyh2ICWqSj6Nsj/ZXPrwa0idYDWBl\nzFv6\r\n=PL2i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"622585006b9702fc93bdf0ae416f6c58e398243a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.612443dfb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.612443dfb.0_1581450494949_0.5011786189387148","host":"s3://npm-registry-packages"}},"5.0.0-canary.8c11ea2a3.0":{"name":"@material/auto-init","version":"5.0.0-canary.8c11ea2a3.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.8c11ea2a3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6bc28d2e4aa77d4aaf4d36d79ad6ed3723fbbd9a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.8c11ea2a3.0.tgz","fileCount":14,"integrity":"sha512-LlySWznwoCSrKvrX1N6v9sRwg3pe2JyPd0mIBPTWRoeEPcdriwAJo3f8499AgSgryQ0qkm9qfemNIpiPfiscpA==","signatures":[{"sig":"MEUCIGTsVt+IG1FNcyfQezGkMjLr4HV1isLbnMqdp23ckt0/AiEA4v4qxF89CJ2o2HnkRxQGMaoByPOhl9ygrLNJaJdpSJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ7xwCRA9TVsSAnZWagAA3YUP/RjcCrODa8k/AvFWAE55\nuwyFJCHcYSQuDf6C1VoxGjMNPU/i6iPgoz4iW/PaFIMoxi8zxf6dqC/VZmUY\nydcEuO8PeMRhiB4jM9gkqmzJ5K5uSpBobC2dJcUbPXCbzM920zG4vMRO2blj\nFyDqmoUfBVjdtpSr25jz85NCnR6B6OyzsDdJ+jp/i3tAD5pdXxmjRC5fjvXM\nA5gFcIPKt5tvbi2G61VORoDfPqz5ohf+7Ywl/Vnra9sp0wtjNFFl2+3UpZfg\n11DJYr/9i7KwOaXUvO+SqO5h8NQw2ReNU8c/cf2wTu2Bs4RsnXxuqq1JwG7t\n7IyLtsO69FkacXXeiQ9Wu4RD0QtGiNFo+mw3wS3+wNE3cU4uXqtayEiPcQPd\nFT5CIVBew1erWkxrckw9e6ezRmadFGmmQs1EAa/CSVnN4MEZlAQCCiwDIS/q\nbs7d8guCI/t3mZ32L07Eo6x/g8mmFDs8ik3BqsBeIm1MuAo1OTsXcv3AlrQn\nOCmJLw4etgLk9lTYjIc2uKA9/DK0kSr2MyrItTNjdqoXHb/YkVyoZ5KMEU6R\naIAdWC4fZzAepmgg4t2UuxVnL4IVxh2yWv1nn+LJl5Z229WMbal0IMmVpjMa\nDxIA612tfscOwuKq/kfMMz1LAKUUiMQmbdNfuqFnegNGvpWkEKCjkM7vLTx7\nTVX2\r\n=8IEX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"47068a39cd18bd1e384c83a2ca5c3d53ef8bbbb6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.8c11ea2a3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.8c11ea2a3.0_1581497455736_0.5116966490317054","host":"s3://npm-registry-packages"}},"5.0.0-canary.b2f3d311e.0":{"name":"@material/auto-init","version":"5.0.0-canary.b2f3d311e.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.b2f3d311e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9aa312feddd390b9206510e1152b52ee3f5e3789","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.b2f3d311e.0.tgz","fileCount":14,"integrity":"sha512-PnTLtIoyCbIZoA2RDznGQnr0njLYY+qRpNoACS+srD715GZKhzYVNk/Gj01aUJjTn9MzOLavq+dQacpWsmcpJw==","signatures":[{"sig":"MEQCIAaq6K0Z8iUMJBdA95Nkjcr5JpjuL9O4DmCyvo8SvDWHAiBdCFJmdvXFSYUUuftW2pUkb3SaeQKYfMCOxsTWFE7Dng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRcLrCRA9TVsSAnZWagAAS6oP/28hBmu1zYthpU6pYcPl\nx5VdvKfKnCFB7TeWEx6UV2Pie7aVEHaPrFZxeERI3CXQ4Xg2RKB/0DBI8Qf7\ndoEPMQK6YCYwNMwx6GiRh4YGmGSbwLW3LqEKemB0XZY9rwOgKoS1wLqpmRSK\neWTJnC3JO0f13zqbBUo/JNblKVU7pDQQyW+3an0OVqp2PiSV9bzcidzsFang\np45+1FXrQZiP9fIC4vLhiWcOxCB9VazZ4PqyKTjGAXTEofLc28V8OieiCSlS\nFTixaa47ZShzCRR9C1EOGE1NwHz9l+N+37jqg6yUKBDIbXXD35OkLoVVuNPd\njdWRvHhlPUwrTYPzzEkZR9dcJWQjaH8ERVJHM4kwukRHV+ORWyCSyWEoLnhr\nSdiqsz3rME1YuoY+PRM9BgSLLHmbysI3TBJJ7u8qpr9yBgl9mrrSGBEw0dna\n5UGA47YbnOECyVly2tOE4Jqa4JO9pk/1XgGLD/MNE88Ksi+un5GcmAxRFqtg\nr6GzLMw4X5bEJTDz0DG7n2u08Haqb4v+lm5hSv7oqau+x/shXuYeVq/qOYg8\n3MoTPaqFT66rCk4ooJHeNWgyi3UuTOZK2YesdaeA75OdMvOAXmpAlHUs/YX5\nNE2iQFdcbNuHRI3frTVo1Rv8vRSrhk1GAztE2iQ+C6kP91WJKZAziJ8GBezi\n4jCz\r\n=ZL34\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e8b88d39be927e40deb73ae78a049ece8c80b9cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.b2f3d311e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.b2f3d311e.0_1581630186407_0.1412718904881587","host":"s3://npm-registry-packages"}},"5.0.0-canary.4f488d0ee.0":{"name":"@material/auto-init","version":"5.0.0-canary.4f488d0ee.0","license":"MIT","_id":"@material/auto-init@5.0.0-canary.4f488d0ee.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"22fedf7a8e81e2dfe7aff6b7fec4850cb10bbae6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0-canary.4f488d0ee.0.tgz","fileCount":14,"integrity":"sha512-7bq9nx4P+0qghU9jlxBHZqy/WJKw9HNz8Si28vaAc+OAlCnoKJt/UTUtXdqD3OAyzGSUaK3dVMFwALkXJ6+q+g==","signatures":[{"sig":"MEUCIEm7gVjUSNjiUMHQBy3LOJ6hOh1FhbOFC2rXRJCsxoihAiEA8T2Dvr8nYh2ZzN43BEBdT7qpASgkrelMa2HvR267nmQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRdZGCRA9TVsSAnZWagAA9UIP/jft7j4EfqjhL0xQQAsn\nAnHGzk3aMq8VJVDlcFoVn3BSRZ7G5G3bzfCbDSB6XcxoqwboqPGHYsNZjolQ\np+jJkfC8o+X9sGDa9ZDJ4IVscS3L0AYpihW/LjY1s7o0dFWxYq2THVTiPTNu\n8ALXHCPT20KEbt5b35joX9N8Jz+wVxt19wCgs+vSgJICQENVBoPuLueNk4qu\nT0lufIuXkSAjTJix0pi1Rqx8L+VIVID8X9fLhaL+f0lH6hb+RdPZ+5n7ezXf\nZ5SC181D85zP3Je0H+nCu6qpIzW4375RP6jNOg+Fp+Zcg2I3yuviEQo6bWk7\nOD75pPCevxl+fyQLIItyRMtQdrQg7VRbGSnGq3Du5f12d+MhWovRfgbKl1MY\nI+lYi2PStDl6cR9iCpZmvqC8jnMa0IGQENOrViWggU3Ibate+k+W0mIE+oC+\nea5l/JXvZkhcHdrEG8p/hJFaPu0yUfubT/+SOCHNkpJWIMrPCZJ9S3UksO04\nYgN4F4Y9o2Z/emlo5q5LogLXv/aqd1tqSsjecgJdag9bkXeuBXXabkbyXHYt\nexdQiSFpDe4c8yING7mgez6Vtwn0YmviezYUm0AKmpfJPvPnmC8FtEfSujcX\njwzxbFfD02PHNSSmJPBjtm2T16tUkzdg8q3daGgvQSaZLhYtzfSwTm4ZFuJA\nbe1+\r\n=u0MB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e3b2ff94a1a6e30260b88a9da6e55d6ed122c399","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"5.0.0-canary.4f488d0ee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0-canary.4f488d0ee.0_1581635140514_0.4136546881767298","host":"s3://npm-registry-packages"}},"6.0.0-canary.fe79de07d.0":{"name":"@material/auto-init","version":"6.0.0-canary.fe79de07d.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.fe79de07d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dec8c74fcc0ad18da379d3b53f459a0c24fda387","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.fe79de07d.0.tgz","fileCount":14,"integrity":"sha512-GzEIxbrgwoIB9QGl0klQITvFLiVa5Ugl1fxVnEGM+iSQl6HpK4nngKq6ZNBhYM1dxBDJBgesmgM+RQR0r8LFqg==","signatures":[{"sig":"MEUCIDk1kdRRLjZOI64ZGPvN9Yt+UrqPFoAb9NNofOe2+l2cAiEA8z7uYJmHyGA7d/CfBW0MUFXYx+d6CrOsBmXuWpFLjzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRdpSCRA9TVsSAnZWagAAHMsP/A7TmqBkDZUokwBwa++n\nLzv2e99wKJKDVTCLc6OwXoTgCieTQrrVqw7H/uKWWzHdatCZ7uehCc9+q0OF\nDiE39Uk1roSklwURLOTriiIr7l+3WLihfDmYzdOhKEAfEE++0k8mVUuJrLgD\n5igoC1BmelLpPdzmjG+lOSt7kTL+iIz+FOGCkTSpRG1HsLbKL1TgLUU4lL2L\nBcSgbVJlFlzzGUTw7B+oAwpxhZeiR18s2eRPonmgaxHQIaYOmoSo0sE6OiU6\nSrou1QCg0wGF2U7NWjidh5DriX/AyxonCvlMwipj0sYgPlqc1iagz67KU2NX\nZ9CPj8z2Kr2JHr3vGsGQcU4fPb2SIaJa6nYVS7pvDTBslVxJPfkxj2K2qO7a\n9HFwq+MOtMNTP53jCR2kDeE0oMpLAaM320E2ME8qBTxOKizMelgKHv8AffwZ\nTZSgJWA9ExCAE63ewXwbmYjYsfchlYhvl3YsQPgSN8ebaAUr1fH5Afn4vFMc\ndt5/fBFlV0Rcc4ZPtBhEEsyQzyOilGRUxQtZh0gn4SlUOXVRrin56yZGOTwi\nXGc1sPQtQV7qPSYZH0WfQXZ8rTs/mL8ajb19fR6hIBEU14kOYdYCer6H6eZ/\nE1g4LuwLTyvfsbXYJeFQGqFAg2WgOB862Ba5k8LsvCiiKwdsUmw/IU0u7XRd\nsI/0\r\n=OgFf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e2b4b3810f62a16846d719ee7439bcbbac266d30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.fe79de07d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.fe79de07d.0_1581636177979_0.48998257687723346","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@material/auto-init","version":"5.0.0","license":"MIT","_id":"@material/auto-init@5.0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dd8ce516ba3bb99ff60cb17462de7dedbc2b4527","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.0.0.tgz","fileCount":13,"integrity":"sha512-ifUXA6VyA59AAveNxMhjebSvzoYc6spsihjaCJDw+RsCGASvn0r5qz0omXnSnQxRJuFZPZevY+aSgiDRi25tEg==","signatures":[{"sig":"MEYCIQCrWG6FLoiPeQ6yDOyWTG6wclFVScPoqcrdLXHapjjPyQIhAPbxOQYg0Z1/5horDIUe32lgdtZIW4Ptzde/qKerUmEe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeReT2CRA9TVsSAnZWagAAr8EP/jOQZp9Gp7Ul7oBwO7KH\nWvzofbqGe+5uvMNL8136FO4gcaTzkeQiLDvnUm7kT4CwB/sTgj0K89J94bNl\nx+NEdPxuXwM+GfFmaRJYmRtYqXS4HRCDKAWd3JCijqK+21mOB8Kx1xNgLFo5\nXkNtpG9txHSBlr/9ILJEjrTrS0lZUEYm+1IgjwHkoUnA81a8hd6Wp3SCMJB0\nhcWE614JKXUI9P3cgT1SfTpuodPaT3l5DeaWatD5tOj2NsBE0/J2jcVepKNx\niaeSep3O9hM3R1Jz/2FD0ni9jEpalajK6IYq7Aj8Uz9b/Lnq1mjkD1dkqSgI\nIeGtB4yaZHwGUOtp/gjK8zUKzF+23BNBTahSKwjODvMjtmpaTLzkb3B/Sq6H\nUJzTvvMQhOI6/lAfAw9icncvke/oE3oM9559dsN2cCEezyseG+zNkwU01wK7\nZDwUU+owgI4swFHCJIM7KEnSdP6SJZy52JGs141SdOzNlTwAb/lQ5Gx5xaoc\nM5FUSftA+oXAnw3VoYUJOB0bTxvQ09K05pM7X6LkVtE/bnBjDss0bVrGZqwR\nHU0L57aqOynqS7Bluc18XzTm7xyH+j2dlr6q+/7y3fJ4t+dwNmPKxMCFDKEd\nL03VNfO8bNfX7ks/twt/OL02L8rMDyMKsUGiku2shJp73gKsIHBkgYfhiwdb\nCrA7\r\n=97vu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"47845087df2f88107786b4577b1be4422b14404d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"^5.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_5.0.0_1581638902397_0.061689128125553605","host":"s3://npm-registry-packages"}},"6.0.0-canary.5e313b1f2.0":{"name":"@material/auto-init","version":"6.0.0-canary.5e313b1f2.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.5e313b1f2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"724aa6a94ae7bcf3559ee3ab89c4bcba7a4ae14b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.5e313b1f2.0.tgz","fileCount":14,"integrity":"sha512-VAWo1e4lr3nT+BH8Rm+gAn9JpdL2Asdf2Ko44AOmvGdYGMpgg1po21lJ03pHcMU0rNUh5pQTPKrZ6QltLO8Mag==","signatures":[{"sig":"MEQCIElcT6kUIu3212N6OOeBBc9y4bpmDAxtGQjHbNNWU9m0AiA6QAV7PtHMFPb1Hhxg5a578Gen/gkGIPCxWarPEbyoxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRzGTCRA9TVsSAnZWagAAfJoP/3rl+QPEhxiVf6AS0Wph\nnXChK0DWzBXD04r5zM8otz+F32MIr6UI6xhnux4McXQco05Xb2J31hDuifji\nfU4NG90X/tA2CMv0jxgU/n8nqArhu4+9dfzcV7X77rvo57ZrnYwmRhOMGV4O\nz8OgVOjyVvsCRqzBc9Z1XQrY31JgpkJuk5xUkbcaZ9Z3irOMZ/NJI9auS9Rl\nwhCrRi9VcFGu8bOasMPkySoyWrweOkX6lfj4whpGhe+JiIHQguWPQ3ZbW/T1\nk0jxNPnxf9+XvqQcadIwh61skfFblSSIYa/k7Pwv7TiMNrSv+Cg5LzZPfYVG\n2FBc95fVp720Q5igVmqr1pwr1Io+kDxouELbAnGQuU9ogGbzLzz1EllGE0XU\nL4KPY2XhSgxdZBbxCetWkeCq/+axwZAmeUhvZy351YmWMyV/2vv3HyNVx8Pt\nO5MLbIFuBHxD1FIws4LP+w2JF5QN37SUJdP2yIxwldlHAJiTBsRnDb+5YCTr\nw9SsEpJhjU69XaMpB+ALjwQ2eiIPLoKwXJ7PINWCmiQIC9k0hRq2Jek3AIJ9\ndJz7fO1trF7a52BYzyC5EnyV7BAZGltL+znmVamB5fJgRQEp7A8Wxkps+Ja+\nMrfK96w52X0MzehFQmWCxyPZZtcqvB6Y0XLypDmYSxHwWZQGG8q6N/0IHujR\nKjMZ\r\n=YUHW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c7787e7880c79b0baaafb2af1123bbc383025b20","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.5e313b1f2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.5e313b1f2.0_1581724051062_0.9922710683265605","host":"s3://npm-registry-packages"}},"6.0.0-canary.6a56f387c.0":{"name":"@material/auto-init","version":"6.0.0-canary.6a56f387c.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6a56f387c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64032db8400f290b6a48e41077ed77230d6bf59e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6a56f387c.0.tgz","fileCount":14,"integrity":"sha512-kPnkG5WgnY8gtmqy1Z3zHoUX/dKOEqUCb/wVNIlcZJ6WjgJvbPOI9csrX/mkoKAUc+ybSbad9bs/AIxGs+Tejg==","signatures":[{"sig":"MEUCIQChBvYmT4Rk5jCByf1WkbNdiJySIV65wf+SqC29R4w/lAIgBkNmHczJ8oAElezdeV7q5IVatKU9ObBtqSboF8G1NW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTD5ECRA9TVsSAnZWagAA/0kP/1RV5yGpgS91EiMdjUCQ\nOHsdwnxp8l6uHsMrcmD9vQPzYBNwf8XZbZ1W816+bJtJRMfvpQ3W9xF2UhMO\n8WDimO1f+nC4TFZ6Y+Wq1gWtjpS5t9sm1DrRTAs416QwWK1xJBa1LIdy1PUR\nV9LZauiajjEnOMOYhRZqGpv0QS1p1FGRI7qxZhhlHYcOxTEvYyjp34Wt08IC\niplm0QRrgjm80/2fVZTW8h9IvFsKMqhh5WM19Nmo1DiKYGliQgVMi1YseXNO\nWRusHMEfk5KkTfYZi/HPjVDXGPgtuCuI2e+MSaz4Kak/flA2RHEDzTlkd9VZ\n+k6NgZQCgCjEqGkR7hWA/II4fKVbAN0Z2zmV0XAq1D1yMCjR3EpazRyCEGd+\nQgxP2yskdzVuirTX0VVLrQYPKVmLk9MNDxtL83/Cv9c3vgBAx3iETSRJAd5Q\nPG/9qTSKsn42YeYuLiGVG1MgvjJEzZZd+rr0rvWV6Ha35p2THXvtBCnZQeEI\nstXrVGfZYQN8EKxI31SKWUK8IzJDW1Si6I4nVzrjFZ395oMGV3CNRIGY070S\naMXHyf6IBJUR3M/hH40PmfqlM9ZRFC508T07zVb69wE/Wpj7k9WNXZFuuc9G\nw4/7RR+C2T52+sIlKD6qAFibLF9c9kuA633x8LjHrbTI/njzVRWtpY1ziDLq\nVkEG\r\n=vW4W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1e3f916aaa994ac19a65c62b461edb01c08e95d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6a56f387c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6a56f387c.0_1582054980185_0.31923339633657233","host":"s3://npm-registry-packages"}},"6.0.0-canary.bdfd52632.0":{"name":"@material/auto-init","version":"6.0.0-canary.bdfd52632.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.bdfd52632.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f9c123ef4e026ab5a81910a9f4a230505a2dccde","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.bdfd52632.0.tgz","fileCount":14,"integrity":"sha512-Mera/nQH2UDjlrJAjjitzEO6R0zxxSsbNvVf7mBTSqN/3JMh3id0vERuUTXSNDRxP9zzMkotRsGHFhxzYyXSJA==","signatures":[{"sig":"MEYCIQDaIJ3QZhU6lFKUVbgW/ZNZNLU+UMde4nokUcb38/ieBQIhANPLhvyAQDUySctehxmwAxXZCWNXQtr001pHBs5+dqjs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTZjoCRA9TVsSAnZWagAAUnMP/jqVV2y6lfQIJlD+yGt1\nHZlZ7Rdf5nAy/B9GUryTZnZrAd7l0nfc25l0nQ2ZHNkrF3tBIvntzjiEjC+V\n4UwQ2mWBGYSnlXUE+yCA181wliC0wpkeHI4cPHkTFD82MPlU15uNFxSYxGuo\nI1ChwQ2Gdg8jtTIpVnz+06XILDQs8UT4f+/aNZ7RUa7D1pAXvPzBPnhz/X0X\nZ1fRGEqq1qZmyXGbLCBvb9V8MkHH15WZ3FKvhZzEN1l36oyA5xpddvOycF6t\n5xB5HHoH982ER/juNZgLlUCa+ZBADqz6R7FJcMjq4Nn/vPBOBOASNsd4ytqP\nWHPVaQdtQQjlp6X4Mgz10Sj1CgQvHtAIuGOJ8KyrROeabDoE19l1qpasNmzS\n08O9/oVfnc6D00dkz669iU5oh90EdrC+iC+DL/RSSg/83GndfYLZOWS893Bc\n5OBlzqmS+dEs3gd2/QUwwQ1iYzidD3wE6UL4rzzoIkcU8vxBr0SS43zzw6Xb\nUbZVCeCmRaosjp9A6FR2mmyiuidaF6UwejKYUM34stxV1+XJrKzaTIFD7eTh\na40FyGaJCakoYbDNFKUFJ4lz8PvxJl+3Bb9RUUlTuNqyVPYBuwSlPnErwFBj\nq6acjbRBqFo3RVkcVhjEkvkzesSAW1nhaKgBzgNuGD51kB5rI4mtDGFd9UEJ\nkazW\r\n=yJvV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"533f28d31ceee3f93d9c7695d4f394323e37af4e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.bdfd52632.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.bdfd52632.0_1582143720376_0.04273370256073217","host":"s3://npm-registry-packages"}},"6.0.0-canary.ad2e4376a.0":{"name":"@material/auto-init","version":"6.0.0-canary.ad2e4376a.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.ad2e4376a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"981d324ccd81cea07e31d75e866847ac2406b4a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.ad2e4376a.0.tgz","fileCount":14,"integrity":"sha512-YrSgD9ouppyc3L7NSQZn8wcHFHMAvWCx/9LJs35w0dT38nwnyomxOKNiGp4AijzeEiTq4W8WVhR6wsRu3rxG+g==","signatures":[{"sig":"MEYCIQD63cOfqDs8QWFLdA8BqlcKpST1aj1Kn8NasuQuuPiBAgIhANUy5iaaGOyVmw+ChJGC+EL5tq54HVYSJLv9IrUqOIuk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTxMTCRA9TVsSAnZWagAA4vwP+wdXwkginfqVp25r2V/C\nzO/yIWYbOLXM2s9ePYzTsS5X0UHasLaXi/l31VQ2yJXnsd4/BPJUyfn3XRO3\nHTw0aAqQww0UPjbGgsv5jkQVxm+JjJyXd8nLS0b45rUlEs0mpBkpYlWqPqNQ\nQwcl3j1ssXtH9jbZN8F5m+hmWwFovZToD8IQjVgdCM9La9KzhP8exfGhPW+z\nuSO5VVA+LWV28t7w8ExTiQSHRK9cB0jKGBcQhZGk8QS76N3kZEkF4GF3PxM+\nmEWbC4X2+oWOyqxE3D1N8Q2rsQSJBhxJUpAUtmZ5SnxLoTd60TPxHwxMk4t4\nnx1gF27CEQSBZix0EBtceQMnjW+P5T18x2fcRoZDJhW416Dq1KD51SzsJeE7\ndEvBUkRCz7dDYwfwIBSqlF5IBkGNw+B6B6cNMV9TWX5YPh8Kj6t4dktk9PPP\nqPufnVUfrFXKowYeJBYdIU6Wj9G9N8s/JovgqE8QaZCpmQig5415o/zfqdOn\nrUR1mw4BRulvpENeFdx/iclWV1P9pjZpQaTZHYJ9ZBXQWozdPYYBVI17YMhk\n3We7A24jtLK9CPBdMCpG77ml95RPixHXwuddQdZyYMkndSAmPHt++9/aZn7X\n8abyt2wSjFugwE9kl3TBfzB+/9SvRzW4jCVenyPG2DAaQCOLPvb3LgD++QjX\nzoxS\r\n=UyHb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <div class=\"mdc-text-field__ripple\"></div>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <div class=\"mdc-line-ripple\"></div>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a91629ff788e0ccd5049a85d588ddf65efe5899d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.ad2e4376a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.ad2e4376a.0_1582240531279_0.6057220334535749","host":"s3://npm-registry-packages"}},"6.0.0-canary.765caef18.0":{"name":"@material/auto-init","version":"6.0.0-canary.765caef18.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.765caef18.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb09b25bdc79855bccdea024375094855fe1dc5b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.765caef18.0.tgz","fileCount":14,"integrity":"sha512-WgB/hfBgnILDvVli05LtKvy2gq/zLpQKKMHymeQwCyauXfYrHEZQ3KjZy84DLZKSufiX/fBL1NK/V9+g5uvG3w==","signatures":[{"sig":"MEQCID/9v7JXJxbLwmgdphwN9jOY/m5oDi60r7jhvL3JmK4VAiBQ9JjLwN4XpWNjbTkma4vnZdqGStIx16Cm0Ws0ucOe6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUBQmCRA9TVsSAnZWagAA8eoP/00fBXqKVTlUHJFRcUoR\nvhx7zm2o6Dqjxm5ixq8KAd/fPElhTcYOkWm0ZPJw6DLY4rq0VQdbA08kkbxe\nmS3xsaKJLKutBF417Xf1yxY8zytpjs03NydD1rqiR9DFmTGy/Jdy62Ha2B5J\nbNN5ypDDe32Fo4SFZk69hYd14Tfmw/BhxmS9CHkhLGGBCufy83tnfODX/OxU\n7HmPzngcqJUzSApfB06dWAUL6rCs9700FPu6AUxnGSLNCvaG/xCdZAm2n/PL\neaK2ib5iwUS/rXCDX9macicQ9xLMvBcbT2kDoYOZ7FGRlNUB7Z8bvouKu1g8\nXvCdvhBYvOqnHLIBMz6b4tM2f775KXxsHpxKpq9CWrnqBYMuLOviuUdM4ze6\nT7fAOg/QBCqTkk2Sc/5Qr3mfA3YxkQ5rLot7My4rpDfJzpQIu8x5j0raou6V\nja8ai+tizbn7miYZh7GIQetqPBLG8txfdqc5zOoyqOs0RGNyRmqIhm4idHd2\nHScZKrkiWH7IbQCXMsDhVj4QNQFiDT5+s/zBjv/h4fb/krrihQJ2v0or9f7t\nqLVSeFWAEcjrcIPrv2Tv1o0zXRLbRJWEdhS7ThsAvC9J4s9r34NlF8ZHWjxq\nXmgzDkQIVWTHzRk8xF9ZnrDAz8PMEu6MWz8wB6TzzxBbTkV9rLgyEfkD6sCH\nnVoI\r\n=5vY6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e18ae69dc972686bd9fa70c34bbdda38c5caaf0a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.765caef18.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.765caef18.0_1582306342180_0.4735869593665869","host":"s3://npm-registry-packages"}},"6.0.0-canary.949562303.0":{"name":"@material/auto-init","version":"6.0.0-canary.949562303.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.949562303.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1bf04c9255560ab52b79bc806f2570af183bd1c0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.949562303.0.tgz","fileCount":14,"integrity":"sha512-YwP9JMQLgvg1iu4WjOOuo3ycATbe46nZmYN25XafvSpr+7e0cs42u/flOdYva7F7Vw4+TC0NnY+8UNfEkKop9Q==","signatures":[{"sig":"MEUCIQDrLWwhTyk4MX7GVnF4nfh38/0jSKiAxMzYaABQ2W8YsAIgHj5b204sgJciOowa6jzpNC0o4LEuf2dQzKKF8HUbibw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUD9rCRA9TVsSAnZWagAAgU0P/2vIUh84Y/AI4TZ67ho+\n86y8rkAzjOyAywS+4kccllD3HJYPaW1zeQycjey8bN0ta+JoDZbwIg2jmuW8\nzFvL9ky5b5AnoiJhMAq6upZU6hJdY0IXrqWGVWy8qC4LGYgSNs1WdfJBdBJ6\nwA+2r2RkHpo1vJ39rLCXXB0OPexP2MWYc8qPb73Le3LZV7hTZEWHT2djQGso\n5aami4TO2MDye8knNAluYGaLCFzS+4+TKWJVtdNl41/+QCSKBtTs1c3D6S1w\nQ/FkZ2kc/+RqNxmvntOYSM1fTo7RsLCmh9PwDFGdc4WK+n9Akksep5fyZaMw\nzAKLpOLW5Szpxt5XYJHVHPiVVMGxeuTQiu9jwiX3T5JJwPXQBmA4nrSiCTP/\nP3R60qiA1MAyYds7RnMhYbaI9lBd23uL9bB9w+qY83JP54zMTVka8rNRVzvD\nTu0GlwsTCLTCRAtjMpId+/htFg0VvF+xRLtfv+m4z2QgYgoYgsBT3N+h2t55\nIXJ0n6uBaBIC8j20Fauh45MCyvbFuh8wr14sfSo7J5tCxrNH2ufbeoP//RZZ\n5/qt7Vld6pihsjF49EJTigosTixR+Cyk839hxbTMZfWq+UUf78ypekhDozzU\nF9bTefdjuW9x3o0gm+2Js7Gde3/pM18YcQ3W/ibqGOSP9wcmIqFN/1wF4IL9\nX8ek\r\n=4aBi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b23ce78ac58e49e4a566fa22d5a4001cffa160f9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.949562303.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.949562303.0_1582317418797_0.065931194266585","host":"s3://npm-registry-packages"}},"6.0.0-canary.7ec96974e.0":{"name":"@material/auto-init","version":"6.0.0-canary.7ec96974e.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.7ec96974e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c7ef2c2a03ab556477e51e4241bc4eeab7c42841","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.7ec96974e.0.tgz","fileCount":14,"integrity":"sha512-SlFUAseX5txhmcxou+bYD+71Q+PVp0/JAvV/FY4Kw7ucFJDq+iOGi8PMOHBQ/NSwP22bPokm1uGiGPwa7vJmFg==","signatures":[{"sig":"MEQCIH0unf45lIq5nagLtR4UdVdm5XsLahCq6zgDWDBegn5WAiA+6xHNuCopSXGbcQ8OZ1uq0QRaFaENwKDwTSYVeIHlIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVByaCRA9TVsSAnZWagAAhpUP/3AQwQDLdImkTW3p4JDr\nAje1kzKYw1AU7dtTE62y6u1HKHCG8zLpctXSd7eAi4A89nVOd6oXGImqhqyH\na9IiPt3zyrye+z+t/ljfnwJG+1PeskVFQ4gJNKdKvOd5hWTKHOuO0CjccWNd\nIk7ctHcb8bHWtDLqidsUWTaA1+yuJRv9L9Y0vjyIRvjpc3GXdLLX0/zdZTHk\npSKrDQFclMLqGqJ7TXoldG0mXQIiNVaSF60Ek12nZsX3lzRnop2naIX1bsf5\nN+Ep5KZ30uGMXdqkn5LFEWfoqCQNRuh9GOvLmCR9TT/h3Cw64ECy2cLr8oqL\n+i6ad/w+Dfjl5ZCA+/HW+0EaBy6PvdqqKDLvq6htkWx6eTxYbCwKOkWcv5tb\nvCj3HaAgnKBEQRVKWwImTlAkka5vdZasVB0YKqAXaF21/hHx6xwPSPpO+B6W\nFiaoPIcOnl+hg6KmZ6HqQ7rmQGYCRRF8a+pxs5lkGaXKoqa9DJbZS7JAKNCB\niIzC0lTqm3dbvIHNOmrXge+BEjkDfKMCphcOsjVTSSpyugK0FKNG9wacNCcT\nribySg5dupR81Rs6koyrDrPOnGEENdSL9UmJsEOWbbkP/2udNrDWEkbzIZjZ\nALv+lNVI6IfxZ+q76BDHdorzrs48fXvfoRnHOilORI67rgwGFj6c75BKOElh\n5ob9\r\n=37+s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"79d3bd54f6272eb54a09e4cbd6a0e62f64e30a98","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.7ec96974e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.7ec96974e.0_1582570649614_0.825439486873476","host":"s3://npm-registry-packages"}},"6.0.0-canary.265ecbad5.0":{"name":"@material/auto-init","version":"6.0.0-canary.265ecbad5.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.265ecbad5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"591eb72f2a9ba00c55da5c2ad3a8069dc8034912","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.265ecbad5.0.tgz","fileCount":14,"integrity":"sha512-F6PXG9RVokc1ofXIeWCV/TQF1gnJN3oJoKtZnS91VbJsZmWUMxfNW0fGv9/YCshNtYwu0cSNjnd79FNjOrsUQQ==","signatures":[{"sig":"MEUCIQDOdJGEXYCQ3zbpQVrn29HC9ZyLIcZ25pyCzvl8HSa0uAIgUGSulq+AErX2z6MU1VQ0348JOaJMORR14ES6uhDi/oQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVYreCRA9TVsSAnZWagAAJ1sP/jB9zBNYPtW7u2zGJ8H2\nwFm9pD5s/F0cWiAjB2cwP5ryB5KpONTIfdTmyx9oshsbRNZZESWuQhtzFWUd\nZj3GtJ9oL71fBe1956LcR4ukvsqtLl74vz0VkBp1Cniv7AQUTiaS3Oer6G53\noMR8C0Ka7twnLBRs4iaaUUpfZ+dRSXXs8MgF3b827lwy61zPweJ+cOw0q1di\nOh54atu8S7PAJGLFvj4pctQW3DbDc7Yn8LhWueLaN9wnwLBNy2N7whQIdllK\n1o9yNhSeFcdrJnHu3O0COgPm5L7ps4Q0obZ+75cOcGlehQkVJRkuerz35/x9\nkqc0gut77pDH07VGE9YzeWhVlpY9oIW+yt2UiHhzVLaJzQsXUemNfdJGiQ66\nCcmcyHp+hKaXiEErL5ah2MwKFzC3fi6lE2iJje6AG2VoeZ22hWXfDxC1adav\nvAg4gi8Bn0cZKgmEjUGUAQli1I6oGEaQq93Efmvatn4OWZlzd/WXNv9R0BLu\nccy4yevrqwxa2JwlfX5gOEwtegfBc9MIL8mvX6kDNLTyPmaAUIG8TT8xYIl9\nKgZwDBTxHalODWS5jF120CMPPdd3RyXlODn58dL/owb2zo75rVfzHH5EX6i0\nrBwfcRW7EZ3NMKdUl5Zf/UCxJeYL+wbCKXXzO5NIguXEVHTEJUWk4rxiSC4l\nmbWd\r\n=gHES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1600f4154da0a0943fa8aaa13dfa15c79b0ef89f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.265ecbad5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.265ecbad5.0_1582664414283_0.9948996879177312","host":"s3://npm-registry-packages"}},"5.1.0":{"name":"@material/auto-init","version":"5.1.0","license":"MIT","_id":"@material/auto-init@5.1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d378ea6a879feeaa0c1b521b1a6e3470822cff3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-5.1.0.tgz","fileCount":13,"integrity":"sha512-yal8Bo1cxGclFmXqg9l77PE34g1B3JS+YLBeGeZGXMsKrMcFV4105aipRPYujdKJsUS5eBFeskinJtOIo+gtUw==","signatures":[{"sig":"MEUCIGY8y7caw7b3qym4AiYl4uBFasB1wZynSV71NtX3yHM5AiEAjIplhgEudfw3JhVtdyjmy/MWJeuqqjH7Iyg9/99yp6M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVZOOCRA9TVsSAnZWagAA0UoP/iB05rc8tgWxACjArert\nrh+oQVfbx7Jvhc5oG4glkoqkLB2xM4gc3+fukqd7fN3JHr5fSUog0Fkn/DZ6\nNyNEGxfLGaXTbp2EWzanf7VX9h2nMzpJ40jHHzCY1BOOcEvG51HS6m0yUUvN\nZbwXT9UkR6L/t6YGro3zCaRR+kwKkD4XmudxUjxquuz9fjfJuqk4y4K1fIcY\nd4RQVfX71e01zrNu86WLlA0R+Y2RUh+J8g7btfnEDOypkBoH96Y4pxuHanMl\n/XdjUqxwDMAGSzCgTi3qazG+6HLzuvB0FwIN8T5XMhkw+80w4AdbIQB5biFx\nZStwVHh69ExGmTBaQXVwS2s+GOXLNYJ6L0wr/Nx00Ua9pIJcBoNoS4vYiS8F\nISwYkxw4QclFbqfaKs3L1xDL7jgyEldv/jzVwyOxyXESbskVl7aY7vC8iDSw\nWY5CFASyzGWZ5t4hItkvIajlK0ml3nIm0qVzu9AeSwJd+Sd+NkmI1bq/14y5\nsUND5kOMrjcsAszTDSyOGnxn0nZJxpcRe9ZLMCoGL80/s3thzXXBzQ+3qQWz\nPUWEhpC8rYHo/AjJsejwc2ZGl1bOUGGktApqPmVAvgpxHEUdbKAndLS0ZWsm\nRylCXg4/S1VuFYMHTqXKVz3gCH4pBG7CmaGcYjd+PGbtBJj0TI5L9g+OmZJX\nQNvG\r\n=CpW2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"2cf87456f7b6bb4803ed5f1b18a06320c301a1b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"^5.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_5.1.0_1582666637965_0.6247329630289493","host":"s3://npm-registry-packages"}},"6.0.0-canary.2cf87456f.0":{"name":"@material/auto-init","version":"6.0.0-canary.2cf87456f.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.2cf87456f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6adae95fd9fa0b7c903a69ecab6f54dda65433b2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.2cf87456f.0.tgz","fileCount":14,"integrity":"sha512-Y0eh+i3ApmiwU2rva4V/Pe5FdRIW7GwS5E1SJxwsbSKNqyZjexabrbLL/rZ6xsr8wZ9Lyb2VIK17ubOKzJCiiw==","signatures":[{"sig":"MEQCIDmD0EnXfZHgpmMX0/k1JGhOWaDgvqx5AHZKW2u2ThzQAiBn63qdechL9KA7LPkWu61Z3C0Qm3W0udoPIleTcvOrFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVZO8CRA9TVsSAnZWagAArkgP/RSOE0NiRZZD8XPlkyr8\nu2ovfu8zYeo0un3PC1YWDwYE+buUz42tY7hd+2dfXP+GYg11cK6Qe4JwdBd3\nJfuZY5uKyApz4XGPEBkC8Pc2tT4mibuBZrrf1XpJZWzmmxUKlvoNgW6u8hEd\nIC+aL+cjeWe+xKpZ4Kte20yz7oxzD0qW97KkHQAT5ck8tRW3i9/M1x4D/8tD\nV6gvWcfv/HpNT0WhQY+49HCGLNrtmt9eMzZoIw2KPdU+rAua04bh+LYS2IwH\nwTE2MVT9E5Hbi63RwQz5AskQOVAwNfQ+2IEq4fSzhU1PnJfiwMJ9ZS4Z+G+u\n7SzxfZPa3rQiyu1tQOB/3rN9Z/U+2GPO1iv5jesxwGdFLIbCwQxifOEZToWJ\nsaAEC1SoNCPrXQBLkp3xCSWHa6HVDqVY4ErfIYqAYIIAZhnvsQoKTpRIV+/4\nKwohRbx4JbbE0LipB/Vf2zBrMuRmTLbqw2BS35aXe5R3V2IOAI19kvMn4Tvi\n+dyHwFAeg0FWPSQBpyVTE9DDCkeoZxdpTieqw1YR1yxVCehDM1go7x+bAPH2\n0ZM+RbNt17QpJ1AZe8ds+EhTuZSkZVI29NMQzxmCj8+BUvzaxfZGY+fPWMBw\nYVMqhN42gl0Anr2fE0FuDU8WYsrVYXcAbpjE331boAJybkMoF9VjdEHZNh83\n5k5F\r\n=3xwm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f8e328b58b1986d1b2e248ebeef472088137ffa9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.2cf87456f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.2cf87456f.0_1582666684154_0.43647275778280203","host":"s3://npm-registry-packages"}},"6.0.0-canary.781434a92.0":{"name":"@material/auto-init","version":"6.0.0-canary.781434a92.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.781434a92.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7749bd0f60292c0b1c2637927d68e761034a38cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.781434a92.0.tgz","fileCount":14,"integrity":"sha512-ugOKuDP4BlovWrAafqidLXE17BmGNO3J7/tKnc+YBsvVR3xbiMVw944HrenxV3uLmgGZXjt6fEGrmUPLf02s4Q==","signatures":[{"sig":"MEUCIQCetQ5MgKlq9Fed2KrIBYUn7Rrrley8tTpjsxMkVZN/zQIgNC3E7ohzGZ6bfIGHUY0+kZ8jtkSkaJmHjIrxXC9H2B4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVa1fCRA9TVsSAnZWagAApzEP/17Io291eoTaOb9KifVY\nE90y8qazy5EYj8y9Ey+v/zww5wxXSzDebfTTukxun10mQXT0BQzd/Citv8lJ\n+AmWKZNtRrHW4sPwNs66X9nB1nsQgOWALHHor0E3krIcP7+nTcNMZQwAxb+v\ngJnloLNbIU/kolqQpBvzh+uNMyEEBMK5DooG2RTmA9EbZOXcFo9mxztKE0RK\nBSOc5CpFTiyqRXJqRP7SPzPMyqavvrrE7O4UgrTXSgsar0KN3p224eBXMddu\nJaNEncU8bMRmvtjnbDojh3NX1irCK4eOdYm+GYdUNIUGkhvMxMSUjA2qsQcg\nDudnhLFpmuHQLW/zv+tAoz0BjiJaJlSpbtczBdx39PPvtUwXismscFK9v5nf\nCjCSVGl27sSKYcGjpTjRUke7/SiHxnyKEB7D5f67AI+z+T1Z1FGhpz2nC1DY\nC418uXCuWZ7dJwbQnvinDhkZ4XwI5RCW6D6zfLMO34bmT5svxOlDjANwJhIt\nbe6nlxkTLw+RHdo/If2GrZcaGfABV5mlltQc+wxYyzu/5Xd5gfDGgFwHVcp5\nW+92GdTvAy+bG++uHV/sOjk6DkMkHyzROCAO3Vq1pzh7glcrZfxu4+0CSvTk\npbFm/I8tqEP4M0c68iD1RNSBAcpRNAC7Z4D9JfP+qj3MobTP50vXT+UCydsc\nm3JG\r\n=OeTs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"550f1e0ff50e94ece83c72bc45536fa64683d7fc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.781434a92.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.781434a92.0_1582673247138_0.2715477606493748","host":"s3://npm-registry-packages"}},"6.0.0-canary.d6f60c98b.0":{"name":"@material/auto-init","version":"6.0.0-canary.d6f60c98b.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.d6f60c98b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3f66969471fc214468432c2eb410754e193b437c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.d6f60c98b.0.tgz","fileCount":14,"integrity":"sha512-olI69QCcOmDlkUoAAOaNhpzRQ18pKljewryq4Km6T7uXcoaI0iGlRfZruoELHTkMsZcnMBbgbJLWPZT+uW6AMQ==","signatures":[{"sig":"MEYCIQC//NPlU3gF1FMxJC4z3PBG5y/Wyt9ajnaTo18WqmtHkQIhAIoRqG5bO0+sh7jAyV83bmsc4Y2K1oDalMfRzLDV6bmM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWY4TCRA9TVsSAnZWagAAmuQP/1+8kH26yLmgWladFdF3\nMEOgdUX6emuYjIEdi/VHlHBi6C191Tjw5IZ1E1PsH9egJsP5ELbtJES4GSyR\nrDu6hX8vd6O8FAzC0Tn3YN/SAhFZaNKwoMN2slrG8MtjctBueKzpbswxmeQA\nuBxoHjfbpbxthdTXtrL9iJu7B9O7Ghi8DHaT2LicgdLcTwkR5iIz7k0rUElQ\n4eRDMR+mmaTSGUw4GSLCaXzSsNcCu9ESq+fLcMJIsPaDd2oeqv9ihuPqh8Yt\novCWD5f4O8S+fnTfAAO6DxmMfjHtA2hZUlM8J76J/T+DO9hVDsgGBENzL2dR\ngQuZ7w1Fe4wraktxxyGk/u9VCT/ZVweQRJW1AMQO/smAEIhANtXS7k62y1oY\n/V+ZGFnxb25ZJx+qKdscX41jONv+dPXFW1Ef4ts79y7hv6EjxOmiVqpn7j+k\n0Senk5yYhZnC/yYguxYA/tJfR4ILALFka+JWjgx5z/7KulyQNKAkvvozQDI0\n9CHgUKmOt1UrEjMOTkv63VAMD4bXnNCR9bHSkxVKkQHou0FLPcl1xPlj4E+s\nDlp30cPOJb2vyXRdai2khXChK1RK3odU/HrKVkSFhakMdxK1x8tRgWInpvuW\nYgtxx/h9qKaX9T+mtfo9avw3I6CTG4aUWSubUMca26pfIqKPJ62MwsmdW4jP\nMJGG\r\n=Ynky\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"51319f628dc2d5447017b393bcdda8ea48a93896","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.d6f60c98b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.d6f60c98b.0_1582927379221_0.7625294392474651","host":"s3://npm-registry-packages"}},"6.0.0-canary.69edc6e28.0":{"name":"@material/auto-init","version":"6.0.0-canary.69edc6e28.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.69edc6e28.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6ff75d5e7657db7dcb38c748e826e8e723b82054","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.69edc6e28.0.tgz","fileCount":14,"integrity":"sha512-W043Dw6q2wu82sne0WzktnqvUnm5ZxdzphmLqYGYY7IZ5XdDIm4NsbMuzZZ2LeoY+ATtFuKVK/oRiKWiJfMbFQ==","signatures":[{"sig":"MEUCIQDxRX1b/EMcYsQOSPIH4SYfdFybNwhp8kAjAsJGJdCtZQIgDZJqeaY0wH2pYHIfaBO++kEggPMOGrSip2z23heQc/k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWZAfCRA9TVsSAnZWagAAYMYP/j+lnJyfsKVDHmgK8tPG\nbmK8Z3emfS6T/PUMd+A98ZJWK7WinAU30wh1vn1WXUHvSX1PjKxs72a0JWsG\nAjf4sfX8BItxbTgFz/c1bbu4+mVKxTZAFBKX77MaWTwhwtFdDh6GiIE75BfQ\nt4LnhmIicARFpjaJdGbhKP34G0uHfArlqmrGQAGHHvqHYIQ8Gp9ONjOs7jaX\nUz3DYee8efF0Ieo6Cr5+RYCc2T+Wrc8/qUhjaAR5MB0uZ2PUtj2nVAbkUzav\n/wdV0Un/9NvsMyvSg8Ps06cg0LIdIvqFALbHhNE0YX+wdnbj7MHiuN6lb6gx\n4M7jAVO+zmqpBylH2yYMUWvnlo8vKrb6fn1nW/n1EuSQYTp5surCZe5zI1nS\nJtykWr/ZyobSej2xmFVtcUYXwfc2BgxM9xqmEZpUxFangJfs/mMzlCkz5hkW\n5XZ831JJXO2DPSLIFNESvolceBk2aDzG3bUf6pZfjwg4Iq7lWLBF3kD6zpki\nNOJVpB7tQhgHwQMepOnICqlyEy9Yarr9gdlVIig1t4wbEKJEMQB8PNnDtqUo\nNOUY1h48q6jx+1n2FOpO3Z3nxPm2YehPNmX063/LyzyTd9Ioj0u++deJTd45\ncodWA7ZD7cFLYxse879gwq45e59v0DZmbRakppJdOmF98m1qpyZJdTKPhFlg\nQo57\r\n=cXrQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7394312b46cecfacb3ac97cf147ed16fcc42e538","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.69edc6e28.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.69edc6e28.0_1582927903034_0.5600472538099046","host":"s3://npm-registry-packages"}},"6.0.0-canary.9372e4939.0":{"name":"@material/auto-init","version":"6.0.0-canary.9372e4939.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.9372e4939.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ac0b752f7ee475478821cedde2e481ab3d563e9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.9372e4939.0.tgz","fileCount":14,"integrity":"sha512-TL816Ii+HQQsj47WyJlDrtt7bQg0B87TVO+WucDGUD6nNGw/h5gm4OOCgO5zUAoUZoP85yghpbGgf6wrX3c5Zg==","signatures":[{"sig":"MEQCIHX1oXabyXrFefxKiXVAdfbULp9qfvxgJpYhgRRtniXMAiBAmx0L+OjLtYE+RKBLDiV8rJwryXE+L2n15VSbRDvzpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXqtSCRA9TVsSAnZWagAAACIP+gLMnl1oCC2NkD5TlZti\nVSaw0UJAFEoCrAmB3xC9U1o7QkjUiXXyfDkGQP1W5J3pK/ceAWldCY3vziaF\nH9KWE0JevBzxQYUNFga66E9BQSykGCf/wcuk1yqreFZjGWsDoUpuLYsAVgtB\nqenEl/fzbD2rNbH1cTJSenxWsp4rUqxD0gJfJsR6rWlwp8g+M7S1orJg9hsW\nyJfk5EYNMYzg6+2N5xR30DX9qqXmTsnw5fzdFu94NpbElEcAyLFg0KIngcVh\n8h6l3PsB6bzZ8X+j1mf81aqYeuzBNMCBzMR4fZDuklqGahNIqEY1PNP6PuPL\n9QYj+MAJuyUPvswTjtXd5LOnSzEvMYI3atICcKdG343fBdzEkoJjsNn5arbv\nHOZOo3LN+nlhucZjKL/NI/FMeTe5gCFfzMmEtqiugU8Mmw9D4oKQIB9Wjwi7\n1q2rNbm00Q0r2PtW1uDxaxsr46F2QmLnDCorTqDVKQMWzV6hw9glOBOvNozb\nko1NZ7NI963ilfiHhJaInzzV4NfQr9MvU6QWFslIIq/5G+9IUqBhhwBJlAuK\nZZsBftkN4WkMW1ZUHMKSyfuLQf+8QjBkgCg7b7lk4581qqYv5GwfIQI2ZMEt\nAUl0K/CSA09GmfT+0z5FRFkv3dUCHCh29xw2myMM5zvjuhblj1ckMB+wd89j\nuNts\r\n=Yg9b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e54df7e88218f93cffe81e63d7e28371126d5611","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.9372e4939.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.9372e4939.0_1583262545502_0.9868675659177353","host":"s3://npm-registry-packages"}},"6.0.0-canary.9cf5e9842.0":{"name":"@material/auto-init","version":"6.0.0-canary.9cf5e9842.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.9cf5e9842.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"22a93f63406727eb4dbb060d3da00a51be7679eb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.9cf5e9842.0.tgz","fileCount":14,"integrity":"sha512-1DhUz5BQh5Rq6AN6bHoA7Eh3AVYRtje6uUq7JCAMADzZ5YMd4fHBU8dH47nmBNPgkShslx8UrYjh0RvsjM0caA==","signatures":[{"sig":"MEQCIAmSXS54yagyw9Lolwb8hcgBzANiWJYJ/5hEQOZTYOMVAiBACoaS4HugG4OS+Onmq6tqOOKoCI2x7+DCDUPZHsm2Jg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXudRCRA9TVsSAnZWagAAUicQAJQEiX4j7Ynbgr70XbNX\nAMzb8PaeHUpoeXTOK/Djg9sBIgHw4kdXC4L0RVA2idXYr27GGd5wwr4lLgBX\nZLF2b/jHhnR9r/nmTa6yXWQXFR7yxnIpq9qYc8HxxRhJfLstcmvB/VYE5vtm\np92mGOWwwoDKvP81R1UiI0JiUUGIUCk/PkSV0zkAGq5X+WvUFyUJCHDEbYWr\ng7dlZ7klO4aOIYSV7XHCMzwq4doXLvu5XsCUu4htSZ0DOi4S5YPxPqOLGP7o\nSbSo7ItzFpvgOuOy9J1pJHos+0DZxJCkPabGyIbEUHr5VUT5qypfQxzpXEQE\nHbBFM16trPPtDFcNkRNP7BbPe0hA0AzINnnaH5Y/Jz6YQNhVpM02BIlMKaOn\ns2B+F/aHAsw+g07yevnEmrrcmTJcwfg8OmOasIxLRK+TPy7wVIcLxe/1OCWi\n+vOztbPHHr5ikWwZS4PvwPF7GOf4WsEAgVKfpe8anusrYl/U78yGBeTW0t/Z\nXxR8f6OKkfvOQ5Tg1lg+xr+nmpByGE4co35b3kqI7/W+RoE1A47lcSgrnWdh\n6Hwj8UG2PjsvBPLvpwGhrKU5rpCJtZWJCTr9qmuhVqT2IMQWFwUMnaGDzgRf\nYz2EqfMUcJKa+FIkl7nCCHvx915+JtUC5WEVIcp2E/cPuSZTtgQQmqFpLHKe\nqy9q\r\n=afDd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9ae3d1faf8362261d4cadb5f9386265501b7f143","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.9cf5e9842.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.9cf5e9842.0_1583277905436_0.9777665953726244","host":"s3://npm-registry-packages"}},"6.0.0-canary.3657f8863.0":{"name":"@material/auto-init","version":"6.0.0-canary.3657f8863.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.3657f8863.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d2d980817da1ce384f0a718fc0ef05d5721a1a17","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.3657f8863.0.tgz","fileCount":14,"integrity":"sha512-NgBAWnGpearOtEAptCXLfvmuZYjqvey1vg2Z3AvDrf0lMCat7hmtOi7ewSMYE2FFrWqDI6wf4DnvkUHYAwKYKw==","signatures":[{"sig":"MEUCIQCMe0alKG6KscoWCJg9WBHedxxPiwMXKZRO2XCkzx2jBgIgfNRDmK2YsiYRzRMRL6dDAv4fRIGutRhN41aC7ma/6eA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX+jHCRA9TVsSAnZWagAAIQ0QAJskQwfDHXGYOHZIU6Fg\nkKNbqVBgdH4kj8jK0r8C4ZEbUE+NH/lXd5PztUY0w5zemQNYEP/yqLRRXpcx\nfhXkp3pzm1DF4wzD37fkd5irlSCeQj+7QC5JHt9e1UyqxHd9VdE0zfZR/nr3\nmrnLuY2IZFPKwCog9NQQIX80TzmuwlQ7c0RA57XIt32Xo17yribj+K5yQTh/\nJ88eREeqxVeXw9tEXeidtKl/4GLeb/L4dxWkhKsqUn+84KM6SW2CsmX13MXh\njC8P4zGTksQubsIdhIXxtHoPe4QxMiFfkEouijkWJOj7WM/DENkuxjvNJXvp\n+/9HUMxNObxxsPnMK9zzY3YsNEmenf70l1HFk7wUerz244tuzDjMlzvWrUtW\nUMXgeR2ePPPKRDi5wiMNco2+b1kQ9GyDXg/BkxNgApI1zljDSGMRwlYv37p5\naup3mgx8JS7QCbpE5g5+87ajUU+rNwbh89r+fdz+moHJbZP133UpnKaWNw4p\nX6mlt5tOt9OaO1OBuHQigrR8AnUdEa4b9Xwvrnt0vgg3uXw52GNU7oGKVYaA\nAP14zDXreSysk3MnDAhZY2NQn/CIVObpqXrqhJUDdkZC7d0yofsSToEtxvYq\nwkJoLDXWwK+PKE+wvuwx3rI/lAjXj9KQoUsllQm396DkI1kaAC5rkXN3B1ft\nsnSE\r\n=gwdS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4075a5619b546f352f6366e5e90c61777ee28f5d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.3657f8863.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.3657f8863.0_1583343814694_0.818512268953903","host":"s3://npm-registry-packages"}},"6.0.0-canary.98b843417.0":{"name":"@material/auto-init","version":"6.0.0-canary.98b843417.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.98b843417.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50afe169f8ee1500ff17e4beaf405d8c21178de3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.98b843417.0.tgz","fileCount":14,"integrity":"sha512-8tNi9E0JQR4mpU8SnheM0QHTHZj58cL4a9cYEtnR2uO/cB1Wi8s35DMC3BDS+QC2kW653U/RX29sShPWb3+3Sg==","signatures":[{"sig":"MEYCIQDoQD60phuUkz1M6aBAlf4F7EUgVWTkhdIzXj/+nPQnaQIhAKTaL0sYSQ7EqWVkR/PNcfuGrxo4/0vFhJJmbd46s4Hj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYUVCCRA9TVsSAnZWagAAnJ0P/3+mmnQuY0E28rvOGXdH\nUyT85dYqJISi4cjL008duMakrWaJAMgalQh+2MDjLAo4FgINUEPfbkiWIWJG\nRF5/9iUSLOXJ6MgW+j0vOqxpzDbXosmpgJt3Da34gAvpsyhKOUnQrAWUwgJ2\nbizYPgxZ7luZygOHlqi0glB5x7SNIA2eYkzQJi7k0CcCerbUzAxwq+OJkET9\nHNAirRpJKgln5dRn+LxaGMq9X+So+SpmqQBUTtCZqveSgTrYFWlmUBn4uHyN\nLpUhwlhRAlnK/Px7AyCbHG+oXdTuWHESrffYaj4ZhGX0jXOfo2UdRfZPq9yO\nhNt4Frt1FDxxDSLr/dcZlVXWuTRntsX5d2b6Zo6DWNpQS6b7Td7FMjgWdndP\nokJ3HDvznvJOGzTrUjN6TycYI0qF7+/grQpPxBpQg+Rgl1nCtgKGo6U10tnW\ntHM3hnjFaV1kIfcc1QkrdTlihw2xKTSY6UdqQ3lQm7UGVwih3OjWyB0Wnmki\nSLAIl4ovN8h/w21P3oOIYtyU2aIVyy/BLjeucLsPxOLecelHMReuA7jCE9Vf\nnFRHxJO+TDDi86Lfmp5I49jFKOlDNI38PCTCkC6IXaRB5aA0dgbw5qiDy7ba\nPu7LbnOqJ0+zzCNqgvxGFAUZdwEbKGhNHKCG0NE6s0TWVWrrDtvWYXwUL58o\nENGo\r\n=uwYU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"68f2aa7dce5bfe926cedccaedf1c0c98166d0bc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.98b843417.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.98b843417.0_1583433026401_0.16038127583494943","host":"s3://npm-registry-packages"}},"6.0.0-canary.17b9699c4.0":{"name":"@material/auto-init","version":"6.0.0-canary.17b9699c4.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.17b9699c4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"53c1bdb129f09f377106e1868a18759e8241bb13","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.17b9699c4.0.tgz","fileCount":14,"integrity":"sha512-Z18laEzIu0jm4Y2v/U2MyHbPcJTCj211a91aCYiyWCgoLufO+zeL58NBaCgDnTvgrklOGG9w7q5Fn3FSQQbVyA==","signatures":[{"sig":"MEUCIQCYi91DLWJYSaAcGfn7FlHIhsx9HnCIcoQbRgXHD+QIPwIgWW6j7qNtYytMXzHZRIcq6bU/af42iTMdJ4urt3njjD4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYVFHCRA9TVsSAnZWagAASFYP/2ybzLw8OdBtht8gMztb\nP59o1Ewi6J7DswAWEKkCpugmCddwfGr7o2ZkeIJnJqzexCaAZQTENv/9IDk+\n9lJOViFkRvSlRkmn5Y9auFw+/u+gzJYl0fcLOcG0D1Fp6qREHXhC75OgB8+L\nTdKK/I21bYFVFIfsTIpC7PNd/84WcTNFJw47GJxxjzC/0mSmurJTK09V7nAt\n7dxZ+LadlV8ZpdoDdoET3WZRgjQp5fkBWRuxaOSzYbePltDtnLhe04uRPKs0\naX8DDSg1dtHte2FPsSN11TXn20RAGURwfZ3Y+9kTt/UYrtHu7wMZUp5oUtCb\njP9/vz6Hfa5AOm4f/pQzQlLlfYrg8pUp4/VtG+2QYvnpvHlTvVxdqbNCzKXz\naCd8JjBDx1ajToA2Ww9sVoD+XRH6RW51BekL9Y7++CVkKp9NQTWv8Ypj2MHs\ncNnqCA3SsTA5rdL/BwroX/RLsjq9CD3YgO2X9Nm6XY+CLU/rYQdfG6py9ok2\nCSJPtYVQhqHrh0FRliiAEOKTZCU/pycsRUpaPuCJ5R4mMVlz4DA+LViwDtQq\n52TGEfEkUpi2fdkTz6Y8OhCIfLHHAN178VyWV8+jzjcmz+HbHyzw2TOAy3Je\nW8092MFQSqkPp3uk2MP1q/M7M2lhtUnRv8KdE3Fhk1OPsC+qcSXs9UvNNgUH\nYru4\r\n=sqTm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5cc71188279f7fb4c0eb3b0b6b98b59815539374","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.17b9699c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.17b9699c4.0_1583436103485_0.20941911319372242","host":"s3://npm-registry-packages"}},"6.0.0-canary.6ee035572.0":{"name":"@material/auto-init","version":"6.0.0-canary.6ee035572.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6ee035572.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"61737d16de0553eae5c781ff9a277ae537f899d8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6ee035572.0.tgz","fileCount":14,"integrity":"sha512-WFWJh46QiitTueVLAD4Awnvy3qNGg6AMXsa04nhg57KMvBAplmXuJNGKgB4pyp96Hf+RE1WPHDlCXZChABZxZw==","signatures":[{"sig":"MEQCIDu+JdYka4yKZ7ghpxP0PQgjI/SNMk5G46/rfTw329moAiALL9niqCZ49qV8h0IbPoYhODRRvh6KzKsiJobxvCExnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZnLDCRA9TVsSAnZWagAAqVsP/3XyOj3xArXEnv2wQEpy\n8AXQt6zqaHMGv20JUILDLathKGM5rfxMWZsneBuGniNQV2sZwgyIl1wGoVhp\nmiiGMR7+a8uSOnz7SphUR4WExXVbr0rmTJuBc855CMsRhTk31Tkpopf9nQMu\neJfBSgLEA1c7Nl6oXqP8ISaaiL0gxmnY/qEU1tQ+3VS9NJinrbL2P4v1IOeX\nzKpVMc4k/tdChx3Yv7soJXmNAvObO4H/9dsFJa3ai5BeMO9fX5Ad170G/sFA\neymgDK2Y/FI7axRTRNSVVZN39OirHI+5M3AxfxNYiSdU+jIYlq3Gl6CarMSW\nRokQ9vTE5m2Pyx+eTlb5DOCw97VKILv4Y+wxUDrgD9xqLotdOKU7uaifcWwK\nhkXDbwAokYUvPEd7rA4zOJajousDHMfmFOVqUwgi1G2FvRD8JcOdSFiLdFGn\ndolQ9rv9z2BZ85y5rKq8jC+zaJo9h0JO628Q4XN9FTz2i1PPH0GqXXUhC3fp\nWW+sUFb3/cFn/PSEDQJ8kAnG2rXgW5v2mQeXIySLIYllYSjWCYl29XJ8EUdC\nqSJjrsTiKaJePMIGyO4ko0UCDi1mHMe7DwPGZz10Dp3SS/XyD2PqNvF1Pd9N\nbmgdkrnSR/FTlnnz9VMYoLPRHwYgCGEP6GkSoM6R3ZZ8+XFvwlu+5nKInI8P\nEsfW\r\n=Zgex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f7d234455251ae34ac1d568b4654bba0bcadc57d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6ee035572.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6ee035572.0_1583772355406_0.9089080153148343","host":"s3://npm-registry-packages"}},"6.0.0-canary.bd33cb56b.0":{"name":"@material/auto-init","version":"6.0.0-canary.bd33cb56b.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.bd33cb56b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"86e3d635364063964ea600ce472baf2086e745a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.bd33cb56b.0.tgz","fileCount":14,"integrity":"sha512-w2Bw2Tbj/DrPNCQkR8DjLhkQ/jLiwaHreWi/XujduvH20/LSA64Gk3O+JNsskojj1XXoPCxZs42hBc8OvgJYYQ==","signatures":[{"sig":"MEYCIQCgKpbLqLVx5TdCvk1RFuoncF8XSbisCqUaUhqN4AsGVAIhAPrZHpyWmDqTUrZkP4HIp8xz2t8Qn3zVEpWHS3hrNtW2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZnsPCRA9TVsSAnZWagAAhiEP/2d5j9rez/fIG1UiH1eg\nnvofdNGRlezFSdGfZuf3FPuUrPKUSTRqCVhLvqihNyjPhKhEqIkQ+yySyHWI\n3lrgCsQKhueXlMc5izPRPHmlQbUq/CH0mcBDx4j9cDC93pQCd6VXFivCuu7y\nJfVEDDbS5xevQSwT61G4xvfp4VHwXuBmT0pS+N6rOKfu3lfzvRmrlCZNkW99\nK2kaQmc8WXDbC5+gTvBgwC/GbydPU5lIxc8mMRvknKXWZG1fEyO1aaTTEpLI\nH/IeIbVw5lYXdlRHeb/rHGD4o2Ivtv98UrBlWhum63O7MNJ4rSV/8fF9Y/iD\nwK6geCdLFC9dZQhy2B7vSlBbi5rHjeHLFUnFgk/6BFgEEb98DtqhIir5cGmZ\nflpuu/oMKf7oR8N80Qq3sEb8HOthMDHxUvkG38Bsz+o8RMt7Gofkv5mQeZ3Q\nL483OOOKemKDX2TtsRFpsKz1p5/UjmZ7l1pqVWjT6QAwG5ZKxItdiXMMwqWV\n525lu6uXM3gK03TuDlJGCyiv6gQoQJ4ERSPF3tlyZwW8i7uu9uvIawBePuOZ\nyfXh3Cz1RsomPrZyEiabOtrMAsjdgKDZHxBo0aubwh7TO3vZE1E/fb+Wvi6/\ndXLz/ZT6Hn1XTLTFnHEBiwLzr0BspmobMRunk4/BqFuxHCLNWzHeu9EPF8PP\nt8Ql\r\n=GQZL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8829857459a9b7c92653d2bed2a8ad63b58b672d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.bd33cb56b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.bd33cb56b.0_1583774478630_0.5124048945811932","host":"s3://npm-registry-packages"}},"6.0.0-canary.9ebee4ceb.0":{"name":"@material/auto-init","version":"6.0.0-canary.9ebee4ceb.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.9ebee4ceb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0a71fb56384df7fddfbaf39418f9949c0444b57","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.9ebee4ceb.0.tgz","fileCount":14,"integrity":"sha512-N/5qGrkJN9A1Enht/+LkhgU/tndzxkmR1TwcS/c9aCM+ka7mFq3GMbh9kj5ztoBOSChvT6hCc/CW4N2sCCTuVg==","signatures":[{"sig":"MEUCIDQ7Dc7usVNkGWx5IvsH8NrEqmSOdy2WIfiNtCLjKrOlAiEA1rQzkGxOcpdgG92wnTEhGfYKKXtymOmGWSA9K2PJXmY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZrFmCRA9TVsSAnZWagAArMgP/AngG6K89u4XfQwbxg9Z\n2j53ZgoPjkPrB0RTDvYzOT+9vwhktV61wuEz58cEI1U534APvYLSMnvfpR95\nFEN33UzsdP4nrLHT6BZTGd31jENWrm9EoGadghBSY1IZbey61Tgsr0vP6gzR\nnOeQLhdMuzfMo959UiIfVacL23/p3ShcdUmMkvIAgTo5G5Ju+eQXGSio61zy\nBG6jbIIsFNzkRo6scxGUQeuiQ1h3r1DRqhbYe05n/w19EK5QqbyoMqh2zC4r\nsm1WLA6K8NbBgRkVKGdu/gWWdZkWPouMT/8JKsYDTyvLFYDjOM5mVU1jUk+G\nJoDZZsbj4R3Vybf4NTy8pQxlxQS3C4jnLsocdAuLNl2ufIH/XWCguRs7DoMh\npkfCFaWx5dR9bw2+oEwsEjZVJyR/NTifOZuc2XUXiMtoeeKfXkB1hxJ68ETc\ncRtSZKkgq0VJIXFhjZuHOgXKu1YDxqgsjw124+8rW4hD8bXp7FsAvrPAyfV7\nVDSjzohmSLPDVN2M0/6Sx/HKJwrY6ooJLG3iQWt5ByHmaWemksKPeS+1MclN\ny2f7sFXZfkUOndz+mOldL072WurFCcAxrnIJO8Edfhp7oxo+izPc9oRKpWSW\n3y8dnI0gHMl6Weo79H87W4UKlIstpN6o4muEZcAOuyANbgRiNsDyXSySCKwh\nh6mj\r\n=/A9T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dfb57a81f5ec017319a5b83b6acaaad397e95839","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.9ebee4ceb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.9ebee4ceb.0_1583788389713_0.8180328408993309","host":"s3://npm-registry-packages"}},"6.0.0-canary.26c049afa.0":{"name":"@material/auto-init","version":"6.0.0-canary.26c049afa.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.26c049afa.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"679e2d1174d005867d01133823080bc9649a33d5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.26c049afa.0.tgz","fileCount":14,"integrity":"sha512-9zxhR1Z/aGWQfgTenKXeJg1PMh0Q61rO/6+AdDQflqQYSXa9qVXFcLx0bwpG/YKgRRWC5uk5uHmgJJgDnSDxsQ==","signatures":[{"sig":"MEYCIQCumA5d56eBevBaxOss/MuWuXb0goBz+uGR5g45EG0mqAIhAPyRVqT/Vi3WXs9czARyk2PfxbdH8zfGRt1WuupYvWRj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ8f9CRA9TVsSAnZWagAAlzwP/2pAyKQ61qupgHHxcyYi\n80REJ0oiq/+dbwkUIMoTObBER4n9uNY9L3cElB/kdLmNrFvjvdgw381ssBl7\nKF8eKmppa6JU7UFzNid7KWGqU2N+G904VR3IqKQj8qkFO/SzHDLS5L3dyOIB\nmMy0h8SvPUeXmAJKZnZ6P+qkDsdJG50iqDhbAzZBFlS6aZJQWBs9/wCp4VEJ\nDZmO3JKbSDO5Mr8EMYza2LC2HBYSkUA5rwbH4vfHDkfh9eV2IFzWEw2ccPgg\nWEqtcJx3i/MHBxdhX3F0eO1zTOzLfvoNZ6MIzMOvs1WANXcelQoZgyqfIlnI\n1quuIkmvXJ14RLjlMdNlZz/ZH3OoB67l+Wnp+umVYWpYhvtFScGC4gJ+5Qv6\naCbHXAArzsfg4ILABPBTSoMGIGI1/hqr3J9IY9kfJXNJ9CyFdq8VP26KEVnO\n5WM3DAaMoO8amw3/TfsGL8p+6T/45x6ocWk3SkHeYU5dXnFO58jCy/qkTiCI\n/9ZuiERmutBGncKQ3tN4h+AXXiHHJy/jyZ016MbvFwqwMlbSllH/Qav3HDYN\nbQLbF7WbISVXqtcoLYSQf+e06iOAgP+afliYn+dHQsD2VDnzmuHZAp9hCLRM\nZaUNkUpweFu/76Nx5ggkGAOvNI74CqeDdhtzBZWBFnMnAYYIUNr7C0vCwdv/\nbExv\r\n=hgLO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"042ad06994baa2c42398713e57185e4bafc82a3a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.26c049afa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.26c049afa.0_1583859709286_0.3077995177978732","host":"s3://npm-registry-packages"}},"6.0.0-canary.a731fd0a4.0":{"name":"@material/auto-init","version":"6.0.0-canary.a731fd0a4.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.a731fd0a4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"858354e75c22b9193cd3dfb587fdab41d2d94ea9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.a731fd0a4.0.tgz","fileCount":14,"integrity":"sha512-3RSTQmWbEgaeAKudLvD6URzlctGUoJ3Hhcqx15GORxUXs57tP9xpk1etOfPsDdpTt7afZuYfKNucfcssHhfpIw==","signatures":[{"sig":"MEYCIQD4pzctlOh8L/EHrx0kBWuBvPVHbDNgQFayJ0aK5OmNDwIhAJLY3HCmWfDoIJGyEXfD6a0LaZI3+iaZ63PCgCmsV8k5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ/knCRA9TVsSAnZWagAA59kP/iQdEUhStLq3lcD8WxUW\nZA9TqX7/2ZIS8soQOR5QVvBPsyGDxKiJeYbdFZPu8QAZbYmue8nDnnhLczXb\nhuNhnk7H1dyMm0MxoVRU3nbuNf2R0Tc/yu4VJwYMuCpgHPZU9sKdOuqtuMWW\nIXWdBeFjhVa4Cnyur+ppfjWsE5uuvvgyDb7Vj1jtU9JlGoCrH6wGMD4GIHC9\ndkVD2+1DiZMZ9rOBOleo8FAxgnj/eXC9NNpjvh7/bRhEUap1ht307NW/nIHQ\nRaXoBBSJ+J4yMv0v33oKohcke7SEsUFPnV1ztADW8sWplKnp8wrjT0mtpsd3\nodmn6tmZP7aFFUL53X+8qo3aodkTCo9fiohLegN75NirBIp6VeFPtY6FOzWQ\nfuRu6E1EIh9zJbRau7umfpzCcUiUKGXetyvM0ytir2dUsgyR8HCukMx0lAKE\nnqDc0ah7TjlePqKTUCVjCRMaJixnm3UT09bgpwBSZn0W0OuPfV+hUn/G8OH2\n4AeRMvWNUvMigDC7ywF0RYO8F/Jt4+kB0wvHJhVU5dzYtyyQIa6mluKjV8vw\nCRQX/2rRc1JGIqM/hH1YBXNrqR5qgkNsq8rWJSq5TpCtCtTZpg3fUPNqDaun\nw9E00EtuhL/v3Hy3T0swsgTFPbX0kT5U2hrOrkgXh65+vDxHFISLGCP8ICJ/\n934e\r\n=RcWZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6216eefcc94fba4c66ceb4b1fe9352d3cac861c3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.a731fd0a4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.a731fd0a4.0_1583872295130_0.13001684366472643","host":"s3://npm-registry-packages"}},"6.0.0-canary.1db5c9fc8.0":{"name":"@material/auto-init","version":"6.0.0-canary.1db5c9fc8.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.1db5c9fc8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d895f6f41b87466d58d288c81f88b709ba189892","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.1db5c9fc8.0.tgz","fileCount":14,"integrity":"sha512-Jnw7nPQAaujbO1uXKNk671VO/AuRDZzJErWGsBUx9hrCz/zmj3hy78vPk0cF4oZtgXvOmNZbc2aT8Ko4ELuznQ==","signatures":[{"sig":"MEUCIQCVCt0LZoK66eD2wITbXbWpHNK61qxRoIR59NugE2l4oQIgWKLbjJCzFwUFZIs4TQWhYKXQFH64EF3FcguqKxqCSEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ/okCRA9TVsSAnZWagAAz1YP/3DUzNi97XzJyzzEpUHe\nE6DHFuEmVWzzMlSiMVN5KJugo2S71f7qEyUbJi12Evcj766PKjF7e0KyObsc\nUOgj61ql8TH6vTWpwHugFhRDItoYKRlTsPEks82NzASnQhKExavSDqUJYq2q\nMfKKJ2M0gy53s8+kGcpCeeXPP8HUmKO6n+mdheDFDPncVnbXfVxSwIzarjg0\nypu8M7IxnezOPZdfyicOYdwre9FKdK2LfFWraOdmNq87Gsn7VVxTlH1z4JB2\ndLsh/ByZPlipVNtJg5By6JrcfLQqzOsGU2zedHSrrjPPLi00LA2nTltvcCvC\nrzMus8B9dcRILHN8kur73ag/PncSlYVjrdhohf1JdH/a5MZNN23gO1M6nMLZ\nCbdyITFGJxQO5Y1CI5NpSDis7QEhKev5IOa1mISFpBUImco/i8nqiyISTGOZ\niLnmepSrFSDH0Bd0OoefExtY6FI/sJNvpMxq/ILfdq+i4wGa3lknt+TVzrU3\nDh4kZIQSKOkadwYYd629cmftCDQEbj2PCpYYCw+fV2AcXZFaWwrdSgxOx6L8\nlYrjuxR8nltJFkvhIczCcAP46UMIg52waQ4ce5nlJOP3uN+7sH5qmmY5J6w9\nvZWBVft0HBdOAE5NXk1BJGiu8jVRsujAdcQqFkqAlAkjR9HaxwTxdWHFkTnY\nJ9Ku\r\n=TSPF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc90b13bf23ae60f937a981d548d55e3641c74ed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.1db5c9fc8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.1db5c9fc8.0_1583872548108_0.2251823073270316","host":"s3://npm-registry-packages"}},"6.0.0-canary.4971637f4.0":{"name":"@material/auto-init","version":"6.0.0-canary.4971637f4.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.4971637f4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b4f1d845eced64cc4d4d4d8a87ce18ef106f8be","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.4971637f4.0.tgz","fileCount":14,"integrity":"sha512-UYs0oDtR/t59ggFlDZOIY0xgEymHj2fBxPPZ5V3UHJ8Nid8bOR0PIs1cYOtdLwCzE0ksUu1KAhEaSMv3idpwEw==","signatures":[{"sig":"MEUCIEgIgSNOMhAzwcdqBWQQs5qWPzP5qJG19dfALIeW0R1kAiEA1Xavkoixbje9v1H8VT+lWaZW41TmqJK2bTfmDfuDRKM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaBtgCRA9TVsSAnZWagAAy08QAJpVKT0hT0VFtnYqxW4b\njovT4BtImxTDYTBPnZ5J08pgugY1v9cGf8dWuwGwJlCi/wumOeDJI5yT0Dnm\nkFkbrOh07oRQj/rNaWpmalH2+i7IrKCIMDeOZj/0YCdZJHEmUM8mS2pO8ABi\nR4HUicd039O3jZHA69lZ3CwSIcDGm8/+STafE9GDS1/rDXGS5sF6cSBWg5CE\nrqNTBeK1R8F+I1lm7hOzNtwq9UpJFTy5Uq2Soth9BgzQgzLRzTC5ZYI8yHbZ\n9lCvFwbr/oTPL7e01VUs7d63yuu4+bNiuR8mSrlgEJ58LuhzRUpX1WzmYpII\n9TQ6R/udXpJ/L0INuR74C+q7LsWljp2ujZVQW05pZ6RXlY1pM8bKmyVX9NMg\nS4xeShqKHbZHM0Z+0M8SXKDbtYhI2NJXwH/X22gTOMwSAchqXF64HQi72uKq\nL5WBA5goCIjH7tld6EnIyhzyjDS/jcwRe5GYILyrhZrgCMdaDYCA9O8+8DoH\nL9xSpRDXBatqPpZ9k+nfteqsv55UIecBwzX0eSTdQwzx3+GRQbKh3AYcCKxi\npDrGPHcmga8ze/WzkyTVS4k9n6lofHppP3FhbbzLai9Xkox27U9BfYj3NHo8\nH9jp+9GwtwDPLgPrI2sFPlVpDpILNyQ0q5xu0+rG3RcaErQctNRt8+XPEduA\n0eTS\r\n=iYUx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4a67187585998b5863a9eb407a3ac0a7e550061d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.4971637f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.4971637f4.0_1583881055980_0.7111245512124778","host":"s3://npm-registry-packages"}},"6.0.0-canary.1ae8130ce.0":{"name":"@material/auto-init","version":"6.0.0-canary.1ae8130ce.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.1ae8130ce.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8583e1604399aa9465bdecc7425059f8f4600d25","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.1ae8130ce.0.tgz","fileCount":14,"integrity":"sha512-bGz9UfVhJ2d+YELFed5pv2SPLj8S+2v1bFC3JIuk67GMRzVgtXyJexVzZ7PDad/V/0E7mzkj1E810hDABz0Ikw==","signatures":[{"sig":"MEYCIQCcFXll2zRyRU7s+VwPn33Fgz06YP28w1p/dEBzIYnRfgIhAMV3q1OPch8bKg/OTKxFxU5Qbit60DG6Tsf/9wE9CE8r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaB0WCRA9TVsSAnZWagAAWxUP/jHd4Ebf2H2hMD2mzo8R\nY4L7WUgMJDlZmU/51r8pdPiauiDZG+tGxbuSyE2lQ87+hPFKDtGxGKQo46Ao\nxeBthavWGvXrqs/brwujlfrIa8GGJX9NmbTB9PVbFuL3215RNI8sRw5fcDBV\nY3nDQ1g8M1OPudG50uMOeiwUm0+gGAZKmsgNOtosggWGnD7q625Xgb1dkkr4\nH3liMvC4R0MViOazM3qbDPgCiaFH8Z0Iqhi9CN+in2svfzZagNqhbIxE7zzk\n09u8QSBBBki92vduwOA4SeBDg+SbYM1XVIl9CwoLWpAMQYOZujJJSGPuiORS\nBR6wu4SP3rkrcIqb7XeAojAo1hgHSm43EmxUp/9nl3R0QEDEgfpV+BRYCF6x\n2AsxOtCq4GkpkinlAqrYY8PdkDksCggpLgd1Sa6B1lzjan3fB05e8j8Q6Dk8\niY5YWVKa1vMykn08hYS9EwuoOY5sM//e/KXdr+MibSjdtGkJwzZit6D/PfYu\ntlLxAGYPSPmMOIM7qYunA8f6AEfHk9unjen8bENtthTIGtNo1s3LdBA04w5e\nHOv30LgbPaKPxGyN5ZDfAQ29vFtBmFrApIWb2GORvgxwH5h55FGsVW5475nN\nRbD37hbZue1V4x+rgaH9zGH019hPQMdGTqWkgQ/NqM2ar7AkWEbxwMzWb2lo\npWw5\r\n=k14J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e5b4831aec2400bcd99b87f3537adb62cf047dc2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.1ae8130ce.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.1ae8130ce.0_1583881493534_0.6209579769597044","host":"s3://npm-registry-packages"}},"6.0.0-canary.8639c2690.0":{"name":"@material/auto-init","version":"6.0.0-canary.8639c2690.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.8639c2690.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0c6d8664d29cd6213892fa6f811c72ace6752aa1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.8639c2690.0.tgz","fileCount":14,"integrity":"sha512-4aI+HXIoUx+gMgogRkkct6cfh3aHJzB5dnR/kr5g46FARw16gUqtipVoThyru+GbGi0MH035xOcpMp+YuOD+Kg==","signatures":[{"sig":"MEYCIQDavbs0fNQ9vgQPQqr17pF87rXa3UZ/ACBXa6OnQJGHSQIhAPBUkCu7RqjkZLjvUTzDgVQa8uO36+spL66N8Na6V1hW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaIYJCRA9TVsSAnZWagAARdMP/jHqoK5sUKgi1PqMTJIN\nTYRnZHVEUBN2nJdX5QfXfK+zFl+Y6KhitpvGzZaYxvvjix/mq55lMYAcvxe9\nT+9+zNpm4p+WZyrjY8vggzZH4zHHfP+xyic5WWT36CMa1FJVzGsaEiiUNt3m\nU+WHFLm3l0ErCDDCvuR8zuGkEGyEJdNj5ZJwUOMs1pmBeEcTud4fSVitLBIP\nnuJ1BCZFIPjngzWSKzBgPHdY4+KoXOQKOC4APPCA6wIfQj7711DAMa6i8MG0\nHViJOjvgUyyVKoYXKh2VGiNQGOGlbQUelTQSAAHqNTuuwCIPVuFEn6KhLwIn\nLzIysQyEvXXtHfIrHak2v3Uru8HlswXsQX4yVxHP16XSRrPPCbhW9GMYprCW\ntEANe5XKi3YxProwR3PyVzcU/NMoS7TydXI8WKwOEzDzuLRepN8M2j74mjcr\nf6FOcyinzpGD+fRRkjYdcicsQfW629npSzuvyEwqi8QZIif6qpP4c7wlnMNn\nzL5Rv6Bf5mF5h235UuAczSFh1Q60tAWov175+Lfp9egXDfWnUm760k31aERM\nsOnWgzJ4xbFeV9w3BrgHffzLC4IxTPdNrd3mr7jg4o6Htc+MyOoos+ZPbS2M\nHinivN+uiD4xf5sAjRNQYgUnjYKQ/DnXQkbZGkylshWCtOMCnwYZnrZ/QqP6\nsaGE\r\n=5S3q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3834dd0603f05e8710f74b00560d4aeb887e5b82","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.8639c2690.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.8639c2690.0_1583908361309_0.5460906751414405","host":"s3://npm-registry-packages"}},"6.0.0-canary.d5808057f.0":{"name":"@material/auto-init","version":"6.0.0-canary.d5808057f.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.d5808057f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"36407861e47b684eacbc825b087d7aa3a2136a11","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.d5808057f.0.tgz","fileCount":14,"integrity":"sha512-QArLRnDneBDOaUF3MgeylbIGhJQUX+pM8VSwUmfGBocWnxb41VnuQY2yRuNFy9FHSRx36qtak1jXiiVMHlG+OA==","signatures":[{"sig":"MEUCIQCR5jTdOhjau0FMLIKyhCVoa08XMJwjo9L0U0k49BP19QIgW5ckln36V5no+t7QJO0CQSKeCJQRfZth3xDuh/lZsdw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaRDbCRA9TVsSAnZWagAAT4cP/jXjn6HdaSrbNxCzOUPd\n4DPKt7wSml4IQW48GaWz30nHKXzmr4ASg1BFS6kLpmfHwLhiqPBr8slmeqnY\n/G9VJoUOC6DLzpCu1gpnedfQXd8qCPkC95OwVlWfj4Qgpvlruw5lVcUV4tK8\nqTpr4ptzJpM+8xXZO7RLpfphFK8qhgDzgtqeRo7ow4dTdXa28yv08ZsnLk3h\n0AV8hBGNP954ycJ4vNnq4ywK9V71IiHMH1v7ExX1Q4x3uBrgLSuXLas7kX/x\nwvixyxLZeghBVLHJ7A8kZlxadTUxmLicjObwyOTddoXRMSoHRdtOmNXD1yEO\nP0BwsHwHKG7kvlomQCGBIUVjQC6WdiuDP/MIY+JCGacRBJB6LeegzDEt1JmH\nLR+aSDNSA2kcfB8jicxn24a97mTP+Bz2wRNWuNflvqDG1l6KuIK1pDW2CxJl\nmTVdlO1HipdYX1GptXKkCF0y+FUBqLovM1iHpTFHFU1ymmrwIGycF7rM97u9\ncvdZHSumxjrBZlDbk5rZi/M2qxJESlj3iMQaTzMU01O04rPUeOwcSfM+LsOg\nY3Xk6XNuYgOz5fGNU7rpVQOAlLcOfAwFHzb71eNN1P5ZVzkGQKBu8fBCYDZB\nC68AqD7JEjquRDdw8aHQz88Q71z+IgFU+CmT+MqnNi7ihHVni+eT0hdxWJGZ\nDLPU\r\n=1avp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00a6ffbbceea71ed3f3126dbce724119ddc06379","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.d5808057f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.d5808057f.0_1583943898716_0.3101713312093526","host":"s3://npm-registry-packages"}},"6.0.0-canary.b3f58203d.0":{"name":"@material/auto-init","version":"6.0.0-canary.b3f58203d.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.b3f58203d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"542eb3db7eb70de4a4e9d1c6d4b4c4615a3fd793","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.b3f58203d.0.tgz","fileCount":14,"integrity":"sha512-b9HUrSHcDiBzIg1saTm3AGk5h/HNY6D8x0lT8hX1sgPTq6hJAX7QRd3KKZHM5UxJHmAo7jNC6Yb4CZEPETMp4g==","signatures":[{"sig":"MEYCIQCittnJ3O2RenV+MeM0c9wkZOhfTASkIw2szXN/miG6sQIhAKtLvX/BDP9/8HEifjoCMaRXJi1OVwpo8DJu1BxJWD88","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT32CRA9TVsSAnZWagAAw40P/jT08qHGNsqvubniRmdm\nubwdIxdalUaJEqNetYJenwn6RQsc7unR9T470jCjQyBXJFxWkUO7ngFmNh6x\nLew+cC4YHamH815YoQle8bZ1NUsM3gSCCYSEb/38tPnhis/7ChnNqREeHssh\numPfI7yuNcCA2a61h7mEy0Y/032JnL95o3OCsjxG1n5mXwyxjZv1sVc8kdyO\njopQA6iW1lXmslMNhR7yr5zGH5s14nxwNx/TA637b2za2Gv/p8L7z5WXrSIy\nKdELbZvOikjvFA/cuLHvqeBAxyXjGlBA8XZ/sDF/dwqhIvW5oz4iXn2ClcZl\n6TZcCpYNHwIO0iECxM/CRhSu5pzOaB0icgl8HxtBmPaF/lvDviV7K6EhOkp1\n4z3jrJf6xBHRBtAMiynORKAGY9sxuZGQb+p5C0F6DOiUrVcL+qiQ21HUb8Br\nXOxa9zp1MZ6CMuL5h6WojQt2KwB4TuQcFD/CW63+aNQxtlQFI5EuWSqcEpaM\nJES9XqPimc7Df9Ew0C94h8XhPN5nARwRC+RbEFDB2Nm/Cfda5ccVfXtBmWXU\n2gVugYcvceZ7CdBvo06UyWt2gd+TaNW5HSkkIBA1WkLtn4hNJsdH/fF6UXlE\ngtMXUpn3TOL/m+zyUAMgKluxIh7aBtDHjKTu9yxFyH+WCmw7nx1a8TivJTUC\nxfNh\r\n=pOeu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9ad376b2ebba49982e9b605c903e752e4fb28cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.b3f58203d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.b3f58203d.0_1583955445767_0.7312002067510142","host":"s3://npm-registry-packages"}},"6.0.0-canary.bec065920.0":{"name":"@material/auto-init","version":"6.0.0-canary.bec065920.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.bec065920.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"725798c8d9ae5cf4182d65f5cb8551f0ac659d2a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.bec065920.0.tgz","fileCount":14,"integrity":"sha512-GFoWMud2unAqDwJJyhQHwte4j9KYXKdZ3LKG5j4sMroFSLiaM63EYQ2JIClcPise+ZkYlyPAA0Rn1kuPZMoVeA==","signatures":[{"sig":"MEQCIB3oX+c7KP0OsKajRrQia3KoUeGtd+PqFVNM2TZYgAhrAiAlZ8x5JpXJgiPMucNgKVHY3yDkKnNb+iO+ljPbvVZi3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaplZCRA9TVsSAnZWagAAOQ0QAJkhuVKUpQ6WL1ZdkD/r\nclWYRtd43n7aYVYwdobT/66Gv2ItY0U67iqVOa8k5ukf2uWzGOA+0P6zAwI0\n2j/knwubmJrqiQhUN8LWVaYLWmS1y+VenosXjllcPXS0LcMm5Iqmtn45yJXE\nqee/7DZunNHZJ2T4qmd6Et1RUp7AA0rpDWM8knMpy9+HrnnJEzCKghIsmTo7\nLFFga7kCHW+E2JQouicvVvz38CTdQ4PDoCvnWO0eAjIFuwCiNil6AVazRMOZ\nwJHSBsiUApNiOoLnX+faHb0gEy4NyY1aJ9BpjdvshVPonhvcG43BCWlwEBBZ\n14J+SD3Qfe5TSsuGqmIPgfvg2ZsFh93QcG4+fxKszISRt0SZw3I7QiGV5BIw\nJDOyiu1Ya8SeIg/ZjkbCoJZKvf8p3Jz+h8FTMPZhBSgczj9yyljRPjbbLvEy\nEVmwvEjqIm8hTnIUZfqnM2irmYFbkW314CwnQ9AakHCX1Z8CHnFVZwrqOhYj\nmMAr8fJ+OLB/IaXHB32/pTjdcxpuV+dE/lQlYkHjwYHrbl2sF1Dl7/G2qKKZ\ny9n4+SDiLL6zbE1BpNQXvwv3iUEFZEcntCDq6QkjyIbOpXMEAFpBp1XP2Ybw\nq2xVPN3UQXh/QZqn/KJ73hiCleWSyzkIJaHSri262EuMEPJeGtnjSgADzojB\nO1GO\r\n=O5pV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff203cc1a864067909d369c1408fa7ce64954660","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.bec065920.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.bec065920.0_1584044377129_0.8415695757899384","host":"s3://npm-registry-packages"}},"6.0.0-canary.776291ef0.0":{"name":"@material/auto-init","version":"6.0.0-canary.776291ef0.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.776291ef0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb05e69aae544200ea2d39756e24fd9dd6703605","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.776291ef0.0.tgz","fileCount":14,"integrity":"sha512-HmnrnNwiVLPcTPR/ASt1s7Ivb4hFcOHfVbP9n2G02o/ICZkHDLfSdrhVdGTbrxH0/lMDIs/OCxCGHifMizFBZg==","signatures":[{"sig":"MEQCIH6BNA0BW6xHxWG6f5zTVHZS9+/pYt/yQQU0z2NTHFvQAiBd17loA45XxI6HAz3+TrrnA8Ggirz1oXamWcyE3o3f6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecSLmCRA9TVsSAnZWagAAE2oQAKF1hu2doF+Or7rno2lr\nIJku+cqp5nMCHyffGPJ++qcsOEuIuSFwsQe/excFqiUdL/jBX4fqFUHqG/Xx\n709jgxwS1+P+JbQUvNCm4k91AwkiqWjpExnIVm7w0GDs4cr/nfEB36xefQ+0\nJSLlaYviKPFAGWLiJrnyWncPPufVrL0CPWG3fduTHOLDSSIEvdtuhX5S/Bfi\nBk+mGlAA1CxoSVbegFFTJb86181PzIIhdAdduMCMINbTX+QJKCZ9O1U63VCE\nMQBB4o+H3wcotdsO+JGvjQYW657Jc5AwgWvTG/5eepb0uDE92nUUjsfJxrwx\nAXsUKJoZHoltOGe9Q9qNtN5Oh7GHF5cAiocQJ7lhJKQxRDfLRZdfWIHnz+KE\nTh2+UqWf6uW7oqKE0UFHmEsXq9tFz3uAMdEEPWKC9EPkjfC/klFcDEB5abmS\nMZxBP+aDyK33N7UGZkOJ/AQZSPLxtt3fQ8oFXThpkTjNIq2HaWhDhFSaIEbk\ndOD2EY8IOvFq0Ht/Uy9k3LT8RrgTF9JiToTZCTvp2IIGX3Mpr59G7mEr8TCY\ntZpO+XqS5Wol/eSkAnhAjUcetP2Inry9IlxrQR7E8GVmohlDzz/LwDZfvma/\n3BotBmgZAudVEP1PvP4BSLUmDHj+1oOXllv7uaWbza2zjLYOW4dTLVJto109\npj5l\r\n=N+Rm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"32f95102d2dd047c662697060685989ec64bb05a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.776291ef0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.776291ef0.0_1584472806049_0.3762739287870063","host":"s3://npm-registry-packages"}},"6.0.0-canary.ece19f3dd.0":{"name":"@material/auto-init","version":"6.0.0-canary.ece19f3dd.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.ece19f3dd.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"586cf5de24e312457a99aac01001ff634cd36399","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.ece19f3dd.0.tgz","fileCount":14,"integrity":"sha512-RPzsz61A7T6VTl4pcN68m6ws+pZHSN0GmX2+q9uZSs4a9x5hrBZg/aQVrMGpGWswNzCWCyzCOGEzeFWfFqyxSQ==","signatures":[{"sig":"MEUCIQCt75VBdXugQ/FDFCmbJwWE5H4LSjmpF3AI06QeTQq8hAIgJYFNWHUP67x7xfAAKHFZ7flqp/voCWiN7T8n7mGpNSk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecUiMCRA9TVsSAnZWagAAMA0P/3PtBGwoY95kf5cqPSDF\nbytdUwZXrwokTyfrEWDAUBeLqVnsextxcb7OI5T/BAbSZYp2MTbrLJsWA+Y+\n0eRkpnoaEV3CVmoJoiXGSnZqZhXPOk+6htIkQvUHuWbaElUpXhXCff3pq2w2\ncc3dJPkWTUKS4P2dzu7L9hnoPORn131PBRfTLA2w/CjzfmaJBArSGFcEvOtS\nABwgBXv9Or5k0vdWMPLN2jWkV4/m0llVvLIIqp+Bz+67QFDvVwRIz1f4G/qE\nbjMVpvf1kgQFWS028mMeg3o3pf4Ta4JiuyFGp4QJbLWs8aQZMVT98X+fhuxw\nqF2rVIfWO5/I1JDg93xrYQBSY8/V438vj+mWl5IdsEAGvKamM7kS9wvkYBB7\nQOEiveFmcajo8p4McXCJWGjxlWCryEU0gh7vLfloSlycCnOoilqEmShIqDHD\n3eqH56o5nOL6g8R+oy6PZtae0f8Cn9Qhv6iMeHxYjlj8h4xNTX6n5XuelDfd\nb20GFkA4USKAmoIeWZyIVD8Dz2GQbTMHHFweQp3dIpme4hFcO7pR02TPOiL6\nmWyll9pZIh5fQtTJoTHDYpXWHQXxXKj9hjWRc7bociR/KngPmkuM4LR/oU3d\noFJ04ZuSARM/b/unxiosbzumy01Uwo21Bpa4MzsNcLXov0FBh2uUgtKNGhk1\nXZ/C\r\n=T2Ip\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"41a07e9906ac09ddaefa5cbf8327260df4eacd59","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.ece19f3dd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.ece19f3dd.0_1584482444323_0.5791308109084394","host":"s3://npm-registry-packages"}},"6.0.0-canary.4dc45af6c.0":{"name":"@material/auto-init","version":"6.0.0-canary.4dc45af6c.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.4dc45af6c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c528d4e3d8a6454b2f238e53ddcdebdfd7dd8f59","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.4dc45af6c.0.tgz","fileCount":14,"integrity":"sha512-yiysuu/DVSSjadCl7JNc3r69egNs3sfFAkopIsURKc9dXj5MMgshcni4y6qCeSCwWHOFLv6xVIHGB4Cmz0SiHQ==","signatures":[{"sig":"MEUCIDnKbFk5Yj7MOEhSTmeoTYqoXOzSlKrpSXgapq5gKKMEAiEAzo2i6ndjoTBs2ZnmM5ZfO+QPV1LVu/MPFDAnZ6qW8Ns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecX2uCRA9TVsSAnZWagAAcF4P/RGK7uJ93ItPdEEg18lY\nKjsuUaJg1FR4jOtFxJEserLNWrxqID6DQ67G/ibGyzN2/yRQzQkTshHKeNT+\noveLfHB3ob6uSonjQ/Efjs5axTc+ylBLfPT2oC3tN6pk3+UHhVuay7BlX3O7\n2K/ULA3aPIB0lNYRPqS2EkMMFD6IMzSo4SG9N3g/gWeYxnmjdwkFJYrmsnZ3\n8oDgEapls8dkuGm+11z/4lRz7bVjk4yaaRSbfN0cN4KRymJYUbcDkB91lDaM\nURfXIrvZnMwLwF52V+uD4vHoQDBroYtHme4ngr9MfnXvxHg9T+a6AIAzEtdE\nvpPS6AHy1KQsCbp3AwtrQIabVOAxpbkrhvZMqK075rZts0Y2hhGclUHKFUJT\nvd27ceViIIBmDCPdBqdWOI23BasVRz3gDIPtwFQf5ddY9MGM+f7PiShL1xt8\nqP3ZOtZ7491dju/GdE+dMgaCDf9Y/hEjJ3Q6EAnT9n4hA+ZOotWj6chRnxNB\nPZr347Jkly/t9I1RrZWremRm574i4RJaaBEsUa50jm0C7tUD0Do8dnUiUgMN\nbmyoIPTzm6rQowuVigzyah9CmWziIkfC1EnmO73Bu+T/s3xKFyGWTtrGXoph\nG6cWrbuN1n0xW2FSKyKnkLQ/wd0mAUNk3oLPM9Yonu7jKTRbr+fTT2ig4iFP\ng/RC\r\n=RDh2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2b97fbd4b046de86f7e8aac6b54c5a6d31583b0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.4dc45af6c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.4dc45af6c.0_1584496045992_0.8302249829518891","host":"s3://npm-registry-packages"}},"6.0.0-canary.6b48781bf.0":{"name":"@material/auto-init","version":"6.0.0-canary.6b48781bf.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6b48781bf.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b824e104f9e63b163a5062a33676524ab11f8234","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6b48781bf.0.tgz","fileCount":14,"integrity":"sha512-AHXOh96p+zH3PlihgDvU4uwcqZLoXO477qjq66zV5WFoglU9rJmDvhrLvwM+2vipEMdZ2cYaHBuK4Bo40coLXg==","signatures":[{"sig":"MEQCIAmyl9S0Uhue10l1PmXtiyk+ybdPim115ea+wUl92jg2AiAu3SzQm8B/3GVUYHYCCR2aVhulIzCZ+U2yD554pQUpHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecj9zCRA9TVsSAnZWagAApocP/jCnKBe2N000PRy2vPTn\nY3D0qWGHDLFnJ4fXDAFq49JCN03FNas74BNHEgggtYfW9Si1kYlZ3ayOkmAf\n0ufxv842YoSQnw/4Lp7QDwTuJdhlwhsSl5jaTi5l6TBYteGebpY3yRLB9qa7\nRMMrPIB5qbwJDpFzPqBvajroolWW+bIy5W8a56uUFPRIldWtymdlx3lTjI+s\nigBpAVkttJZteVEE9RyRQdJ+8LudBVCj+bpy9Fx1I/NzSJyQEaDBF99W8bCx\nNBPFn9YdpPbhAs9he31fkQfSFh9cNr3DhumedgpLz4gPkjqg9xaNtxj0XdYb\nQHyT7Oet5wnU9SSQC8jwiqfMtvT2q1IL9n+HdkWhqsM3FDwaWq/5gdZmVg78\nq2A0a5o7eRCyupQ/xPsETQCSQ/klatmxdQkoNKfX139+GCBKwVQaLYjxtN6F\nlh1y8KqtrQNW1jqqkzjoHoHQh5mS1bzwYk7hXaFH8sJsHwmhmk7PeG0kcwlv\nNCJeowIJ1RbEnpYNB6HMrRiJIQhtFg425vhTmYE8EPNBS34br107xIsoqw17\n2KU9zRHRfCPcKn9N4+4KtC8piAUHNGLVZpAwhj7iaJh7xCy2i/wYmv3X62qf\nb0GNy5J1f3f2ULw/mtHVv1rzH5DNPAY75KGJSbYYY2j3okgG3qZBDpAqODgw\nwLKr\r\n=Ehoa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1da9fc619190678090689bcdcd73eb5885c8a35b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6b48781bf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6b48781bf.0_1584545651461_0.8429419070705988","host":"s3://npm-registry-packages"}},"6.0.0-canary.a88c8e4dc.0":{"name":"@material/auto-init","version":"6.0.0-canary.a88c8e4dc.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.a88c8e4dc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ed838f29abf852e2dd3e9c1428d4c9c315df4f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.a88c8e4dc.0.tgz","fileCount":14,"integrity":"sha512-zyYPCcD8xUyMP2Q7SvTBXE6gdsswtfEnyjyX0II1dJN52xwVGL1fMRHSzJ66U7jZzPCkt1vuwOZpXhcfA8X09A==","signatures":[{"sig":"MEUCIQCZgLGXlTZamn+S3j24GnnsLqBIUZxtC/QCon4Df7AX/AIgX5UeEcLpB6nChlU+WBdToPiThLwBXfAwKOAmBXixuKA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec61ZCRA9TVsSAnZWagAA4mwP/A1X1Kl9bDWcAAJSeL16\nygysA6weCr0S9ZB+dnj0E51BRnHE/zxfSKgpJY5iBrDIwQaA1oGZjDHxbZFp\nh323PvrFqtE9X+BL8DKXkU1LvG7WJmbJSFeyoDILKWoBDkemhgx4JePnR5hQ\nUGK5YEFg48CvOHBY1HC/fRXk7bpzut9ptLD2ttSojcr4ghkaVMARVsmuhokc\nIiGCPNCL2lzCEs4J6SQh5gydv7SUCUVBTmxNnC2hrNCuOKrx7XaSlVQWBPTP\nB96IR/Jw9ugX7WQCazzCIn9n5vDPuL5T5+lIAQgBLTAlCot4MeQKIMnRO8oM\nq5RLkb9aXmq7UJtkA4YwFrDj+6t+LcugOGDUqpyKNKZf5Z/QDTwXSe5EFZRK\nmBUOopJGaznN4gLodarJBCE7p3m/L5OSV00rrVEq68fanPItfGNmwnIKhGHm\nfeRLOTKLg/EB4Ny5OTelhsz2FRsV0aJq5IXHZxt876xHP9J9DBUtRpeBTsNR\n/0aDKgtakw2dFhdPrIpBrWiB7M/TAvVsUNyraWJhG5OlS2QrXTcE1C0AjDBt\nqC9ptuHSRp2v1iQxKe3vxAuLwKX8zkO/TOUS9hfa3FIQC57kQru1dcUxbbJl\nEog20rENb0AeIPGCpxN+SU5V5N/gCxNq6+06G9dU72u9PPyj6uMUG5g6e4G0\nXDZw\r\n=b9+9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3d8bc73a5f46456d2ada622785f02cbd3b81c6a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.a88c8e4dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.a88c8e4dc.0_1584639321162_0.504023331714532","host":"s3://npm-registry-packages"}},"6.0.0-canary.cafe18860.0":{"name":"@material/auto-init","version":"6.0.0-canary.cafe18860.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.cafe18860.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd934eb64eaf408fe7c2950e043452281ee5257b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.cafe18860.0.tgz","fileCount":14,"integrity":"sha512-PFgm6LQtFnZN9j2GvjVq+p6hT97dk/iypHtNHCiG2rY6sn1frE+e62542/NK353VyRdWaXvdMAarrXCYlcjfow==","signatures":[{"sig":"MEUCIE8SbAbuzp2Agv1ZM/xNLwQTFq60fj3hOzcGfe7yekxGAiEAgxTtCdGzZPorVWqFcjGz8DYDu4TauykQLMEX6Fsc9XY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedNjMCRA9TVsSAnZWagAA0HAP/idcvemKxQTl5TL1puUa\nTksgbtulMja+FDCV1WW4+E4wRJqcFX2koIXp5yafKYShN6JzrPQfnPdMs7Oa\nJbUSfxL1trH0fB45C09toALdueRld0l26UEiqdNF9tq2uTr7iUvAeP53SBfY\nEkBThbPXBNBUpIA+2YJid08bx0EoZzieQ7Bk88AaQgEYujyWtNVyw11op07C\nZgtGQUmEUNPteAICaRtx9WW3lSUW5RaRINuMMzO372WK78RWn2jbh0oLLiCp\nd2cEnfVQpg81MSjHx6IX/dHGpZwy1VOlzg3q1vOUkIU4tLvTO2/AyYgBzmwn\n0n54xlXxvKpdnutUNjWZeZ5E5cDD1emC3H+ScVKRybjFnTdD7XNgDcXco5DV\njZhdgIjeOwbej/rNINP4cVU7/f0WF4FiaW3YuSg2mHKiTBkfR9YlLjgaPPb+\nHqAIYL19bfegEvtj2bliZKxuRbu3ylVDLCYZ/JaCh2Bs9pq1+FkKRC83LAWS\nMQiwYTbva2PUZLbqtiXnuknKL0PW8Lpi86jC5u1C8OA8caMje4Zf7TpUosrJ\nsRGocQnppsomyL1m9lzEtUFjx/ynGoW6Shwl7GsWmIJ0IZl70pTAbx9vtT/j\na0rg7TKEVIMti6wVqmjNWBToLPov4KAu+fQKLTaEVpdwy4AtaYc+9j7y9TGn\nZeBH\r\n=YInd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"51706b933143947baefab6db8cd069a22ed080ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.cafe18860.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.cafe18860.0_1584715980091_0.15392501790487878","host":"s3://npm-registry-packages"}},"6.0.0-canary.35a32aaea.0":{"name":"@material/auto-init","version":"6.0.0-canary.35a32aaea.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.35a32aaea.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"931e26fd03ea059ee68c3df2615fd02c1f91b593","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.35a32aaea.0.tgz","fileCount":14,"integrity":"sha512-jt6xW2hamnRLrd5uNc0Mc0Tzfu5S6QuixqOG3JbHOWbXQGSa9sdIyugccM3g/nka96PPHAEHwbdTHNUm3pUPow==","signatures":[{"sig":"MEYCIQC2ies5SWnvGZkJeg0iCK24jmOMrXgnS2xMATvsoLvGYAIhANb4Pa8m9h0nHjRrVdz9RUze7iiQ/6AqlnxnHMJnEL4e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedSBpCRA9TVsSAnZWagAAvtoP/R30u6zEKlLdjrmQ2vwT\nrPn4Ok1vQes2/tq6yhbGzWP7JfNmT8mYxc1CqOmXqabYt18nte4gWss3Dtrh\nykyM02P4Tko03z05ZZd2cQaXhrSm+VZXPwF7KWUAeItEMGa5pZgzdGC/7cjM\noKmyI6v/brYG3KvRRSB+cq69nLgA6hsB+ZYOlP6U1G3RnAw7CYPLCEM63lhv\nxHSMqonvNoa2tq6oM3CR5Iu0f2YwANPpCTb2VU2YMX1313Vh0RzDxUrom6qh\niusMwoQoGDwmbEpCq0OcGLc5lFskMC9Ar45AW49OWnq0dywCjbWQAiu9Kmhs\n1sY/ku87sJuYLiTzNOYnOBn734rpj9lFBOl1EykFQVgNR6N8OUsi7oOzRM68\nF4HSEefhnk2HEb1Ia+lW5XAQ+lU4j84hPPLN9QqBagbETCyoWDx5UkJXC/rY\nKTde5vnk3NxKykxQpx2zD9EBZMaJt5PyA7ibJGHG3QyuHivJtSNYxr5RG+X0\nop3aeqv2NKvSFRJj4D7HRUh6DGkf03yxRR31pQ2s1IGCbiVZz6r2bTCZpVc5\nr0ivghhqPQUvoCga0p5cWjgYwGbWtHKY4SK7RlFt1i8uRkHKeVG46GEfF83N\nJ/eEklhVGFuFThxRev3VgY0MLMmNBjo7HjvA0fjxUUYPULJu7NYBBIWk/4uK\ni/HD\r\n=hP5R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"09df3d66223ea8f4d4a6ee61b9e34bfe08387774","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.35a32aaea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.35a32aaea.0_1584734312556_0.8149792453259046","host":"s3://npm-registry-packages"}},"6.0.0-canary.e75deb854.0":{"name":"@material/auto-init","version":"6.0.0-canary.e75deb854.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.e75deb854.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bb3f0697df54d934556b820a0607dd98c684f66b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.e75deb854.0.tgz","fileCount":14,"integrity":"sha512-JRTZVY66WCzeUXxcodGHska39Fsn7Qq2v5KjjUWGpPlIRw7n00vnDHichhF+WcHtc10Xhl8skGpRoYnj/Bi2ag==","signatures":[{"sig":"MEUCIQDw3jtoKVu09LN/G5cR+zXdvm5xIOMN5yxYksvT3zlsJwIgZSUR3GhybqXVQtPR3JDZf+PkjXtCPDnFLENoB+zYMds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedUBLCRA9TVsSAnZWagAAmYkP/R3OVBj8ayJJlos9pum5\nrwy9agfV6vf9rK0+DxuhdxF8QqTfY9YSAQSjxkI6XdRGPk/3L+J6LL21g5Ql\n77Dozj2ai9Ysd51CpRVrarqBF+hrtpz3fygKKrIohzVpLg+bf5vy0ivTib3x\nlDYpqCcNWzK8RSRgxVfVsQRI/KC+L97A7yH/pyXIwioUcLniV3zUnUiavOfd\nIbGhkraYwnh7FTb273p3u4dy44WPRRLEV43hlvqI5vl7uvzZGmrpAirlCvR0\nQh0t35Lt9UsvQUxFNoX4UOAXDUfsesQMvPtElJG61n0gY4Xtqo96ODBE4sS1\n5KKzIBn0081sIXOf97MmkFrDLCx/9/B82HeyEdHfQ8PCaNBsX50b/xgwwIFA\nXFaMP7Q2miYvAf99PpZPis0ciw/LEz1gdwXkOZrNXYx6jpXMqxoZbaBfKjWQ\nUUIPTD7lJgR241yC0O5piFexf8ccmet9AAnUpbyQATK7/XxdYsPlXfC7hPlY\nTxJ+XBSZrSfFTX2+jJFoqaAjdPI2r7LO8NJQbSEBHYtwVwC317sdMVgK9IkJ\n1vgFZbu7ja3rso3vak8RF/EvfBzAWMKcwc/m9WdQHUDoIRDQF3AAz7r3Pkhp\nSLWlbp699Z1jUglyOfmC6FT56lSuzQ1W944kABgBPhfoQ+K+I+e8mZFZzXdz\nd0+i\r\n=kiSc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a461f6b9120827a65ed980dcaae3ff77d0581d82","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.e75deb854.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.e75deb854.0_1584742474519_0.21235198586705883","host":"s3://npm-registry-packages"}},"6.0.0-canary.2cc6966f6.0":{"name":"@material/auto-init","version":"6.0.0-canary.2cc6966f6.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.2cc6966f6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"12827095a38a729ae371d699761fe25e61c70aca","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.2cc6966f6.0.tgz","fileCount":14,"integrity":"sha512-KCDNrPZbylTwy4Oa6jyBJBOF1l61FUKihurEP8cQMWl0dgrUJMohkdLgMQFaPmolnBYv/tZZrvP9XwdAFe3w+A==","signatures":[{"sig":"MEQCIEyN7opnNRlpBlY9l4NMv98j4gR95gPxfUGxtEcQZZxiAiAIK6NYX5VGyBVdAipKLymDnoBydPMFKtRTLxetHU6B2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeelStCRA9TVsSAnZWagAA6BYP/3iLLYUjhdmHbOqBKy0F\norzl45s6TeCXK+MyRQa1wz31rt94BdDR9aJuI0nXNkxcBcjAqVSjcm3oEzJz\nn2BVawvtlmiH0J0IgjTrVmRmhv2rYcilpiNShxieW0YAjxjt0WA01VkPbAcJ\n4hV97sl82ZZF0OCRiHoC3GliSvaKsnfcN67nUQURiiMLS+Pt0mJ2GMSOvTCD\n/aix0ION9mTu6htedgFutJDRGAKqWGd2M+BXm1Q70+7TLXjXceuyFxDhDiFf\nanVk98P1+2dK2XPSZsy22rPNMFfhdJ4Mp1UTHVsIRBor63t2kQSoONmbHQ4D\nj62/nkwUezTUPlf8dYQBpoOu8oZlJy/9uQLyAyG+8cq0qfl7+jl7Iv3JBPWV\nFgyygdUOHH711eKlXCzOZEuF1lXx4W9A/IBt/K/OuVi82q4ia0XDYJTOAvyJ\n8Z2njjlrWjFnA5H7JSDdm9ACJ6GObDNwQ5v6hwIroQAmH/9BD2hfLT2PXDcj\n3csmQSNSiUZtEOthXQDzdMaJ3piBq8Un7wfuIsOLmCb8O7uNwURMnzkHxH3U\n1JYTmf5Yyi8BZZAvF9rfDNuWOBtVzgBQMVz/ydSUNgNnr3UerFsBw1rL/ERO\ngPz48ooK5MBRkfreBBp964ATfFr2D83plakJ8XsgekOAcTcq1wqdQEit/Jrg\nLBYl\r\n=Tzry\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4af7a6e31c561afa46ba7b74cb35de52099583ed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.2cc6966f6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.2cc6966f6.0_1585075372760_0.2252270698415817","host":"s3://npm-registry-packages"}},"6.0.0-canary.8707953b6.0":{"name":"@material/auto-init","version":"6.0.0-canary.8707953b6.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.8707953b6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"84bb5ae281c54f20da2099ca754964f389e050e0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.8707953b6.0.tgz","fileCount":14,"integrity":"sha512-AfgYGi4MeMRG/1XbGiHcRbc+VzjfgyTSmmr1M7f8A2hUoPrc6UD7nupfvSvKM7BIhovJuy4hiSJuDttwZrM0gg==","signatures":[{"sig":"MEUCIQCoZ0gig6KBUfr7uZGeeLZM+1bYkjep1tmDQo8mS0E7IwIgW7IaFy+bUM6wUk8KsO68BI/um9WWJeXXy0OvcJsR6hM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeelWKCRA9TVsSAnZWagAAr+wQAIEmaz3xOam2mKP1R6eO\nYoT7IjUV4tm8tXOn89YzeUNWfEwsM/+JP1294/APAE0n7ZIM4Iomj4DG8sF0\nlV+/GTolEGbuoFLyhfkepGulWejqZ4km9qD2o27hy+8Iml73oOhyWvlowj2k\nb2aqxaBCZFlpgjgvV24UBrGhT8ZYyIVDTzY1ZFPE8xDVqsGSnR4B0SRK2ugv\neqOw/wIIGE/N2wY/H7Z2ij9R7OAAH2WkaMDOBvt2nWmhFDAIhhDvBvNzkE1Y\nsQVxL/mno/6g53MMhB534qWv9QxrE6r8fKBBpM1B12yVM4jGTCjNW5mJFFpo\nfMhvj5o3EBZtkr/UcK+FeTkn9cc8iVhMO18IC9m6Mnn7FUmhEbrRW/oRO1u+\nRJTudMxX5/UnUweUH8NZ76SP8tbRE/pxZcKqLkVTQligWBoqo2TtqquG/KfG\nSv3vuzVnlDFFSpVbaTcr7E2GGmHUh7e0Nxt4qD46YGVy6U338UOZzRNrDQmL\nASx04ivI1eXNsMQMF6DQ5jM03ti/8cQ1TxOrtCHXCo+536wtB9/NDhQMUGwn\nkKX++OzR02B61GvVeJG8DWzAaX7OcsTjflsyM++kduK/0Jrz+Cs6WqgjAiaV\nXsuAcAVvRPD5eA5InYqU9C13c5oxSNz/qZNowXXiwcCWgEvdBJrV+F5ODO++\nyXZu\r\n=dWDJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"595709807214943e737834107d12d3318e69112f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.8707953b6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.8707953b6.0_1585075593513_0.5681342051154163","host":"s3://npm-registry-packages"}},"6.0.0-canary.10af6cf39.0":{"name":"@material/auto-init","version":"6.0.0-canary.10af6cf39.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.10af6cf39.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"69576d642c461c96dfe35beb09c9b1a2d0a88163","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.10af6cf39.0.tgz","fileCount":14,"integrity":"sha512-tb8qLAhVY11fkW5po1H5+J6ScWjEzeTPvh8pqyj79IEIl3ju5ZbtzAzGh1Rv+cjDWHpHvbU4f0tASFLAWbGs9g==","signatures":[{"sig":"MEUCIQCylubgN3CD6gVKUYsUE4LwaiasCAmaKecILZ4HpOfQEgIgccddJDTJiNIe/FWyLS4IboiHzsEU+8SivqJbkEzTWcA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee6BPCRA9TVsSAnZWagAAcVQP/14FWshAnU9qEndmRgkU\nc0ggSxe38nXEYjjjYKfTQF2u1O2gwwRAFTxPtvUo0sExFXdNv56DlSP3By8Y\nQQbDpbxLPcEwym7dqz+0G2U4ZKvp4EYGsxFdlIkWEOwHRT7DpesP35GBXwKT\nymn/OVLJXLFdxtUxyy8Sy8ogp37x7h5e6zQ3K9jJM6xqpkVdf4gVZwzwSG72\nZSJEqxswl0ybPWrnI8Er2tXEFcBi2EYjvoX1AGrbONc0R8TDl8F+wtthILKl\n43d8M/bcpGtagUFbr8h6lYlbc6gCmq3z8e0iN6O23eegepjxxbHMY6RHNeCp\nVWnLB9+6RFd3ZiJIXKnwftlv0QqzYZ89guI0MzK9XhxWeBJqE7MI6+Ym5A7N\nQXoI0plcgvAAkpyzsx8Ah7k3QybVoedz7lFeZ94pY7SscnTiK+uf6FG9rRdw\nfI2t2oFqgO0igBA0UHkGKkcSnWo2P7jejN8C2Yv8oPO2oj70q7lKuLGxZBp7\nCr50JRBIZe8aZ1bT+mz/PIeNzg1EvOxtAFbvL20+xcIBGob06GwS6jFX7BZB\nLQ6ri08ag08tTIE+XfVbJmQAU4iXfi6pd53QDW/YQg8Hd0+UicjalUy6WDb+\nwFgVVJSZFgUOgD6hsSoi2+DeLalAtbn+jKbH//QTlty18D+pI5fIa3Qa8T8h\nGruC\r\n=qBko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d618b0c9ce2ac312ce4b887450bb947ed367e100","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.10af6cf39.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.10af6cf39.0_1585160270860_0.08723280566036418","host":"s3://npm-registry-packages"}},"6.0.0-canary.7d8f9c8d7.0":{"name":"@material/auto-init","version":"6.0.0-canary.7d8f9c8d7.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.7d8f9c8d7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d2fb982c43683c69dd5e9ae62a26c63ff3a4007","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.7d8f9c8d7.0.tgz","fileCount":14,"integrity":"sha512-ewhcL2LKZl1aFsJYr6A5fZaSLQCR9713SRhVBydKqEjemCDHnIZj/dq1UxwdQmxY6VCO1dfd8seM1yX+TrF6vA==","signatures":[{"sig":"MEQCIEOD08JNCVlSDHvzBV7bU4a6c9t24n/jdYPvZw9KkEa/AiAW9/bliVlF0s6vWw6ZV0F/zw+lWX37WM8HZPUeQq8u0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefkAjCRA9TVsSAnZWagAA/REP/0sJW2AQTNSe5IydH79R\nmkxPqL+2Yrn2BDWKie1KnnSG5xb3J+gF9U1CDI3PhbOmWdnqz9eR6LQHrsKa\nLJGIFClaBf23K+YHc4uQuqFTZMokrdbxH72SeR1hpsfSFZCyhFOQD+3K0MHg\nACR7zhQG6+kmjp0sxxZWLhTS/xA+XzTl44HV+v9O5leGwqClh2wT3gD4CuY6\nmJlcrMZTlFlvuj6gOEqx7oil/OVcRohK83r/XOo2ma0ibRqQg8uLPnK52C4n\nTlqITlgxQrUwSyx4SHwlp6rYYyOX4zs0yv+r/Hjh10kAHeqfgbokjHeT11kk\nDzoyTkEl5bUacoD3KzMyenKsZiQYJt1xdBFg5DxJiLxsuM0C2Uhvhg0czsWd\noRyPeUTS1VZrx/pXi4yu+MfOplOARDWZmtwkejFK7mAE1T+Mi78D1x3UZ59c\nFmrXyAdbSL/dEI6fj5BKaXEV4ejrDDR0fF2e4jciGtMb8epYMxEmGOUKn0Xu\n6sUn+5sW181Bg2R/JMHaVbyoyHTXLwwFwupDLEpVnrnIBNpXaWt3JX74Vts5\n6D7WL2FFmdkn0WkKmH/z57KDRkJVZ/ebMTydBlNONKOg6CDV0tJYMt+CLl62\nxxSnLpaKZp2vxVmqawJzAyXn9JDHdHYokcPsrvFY3TTKKtniQo96tmYZTD/E\nS2WF\r\n=jXT8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"764519b823414bee993cab6845b42f5b60f03c1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.7d8f9c8d7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.7d8f9c8d7.0_1585332259258_0.5826666018506959","host":"s3://npm-registry-packages"}},"6.0.0-canary.d6315efe2.0":{"name":"@material/auto-init","version":"6.0.0-canary.d6315efe2.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.d6315efe2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"097ac0933021c2ce3f87a40412fdee70535b3954","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.d6315efe2.0.tgz","fileCount":14,"integrity":"sha512-DyLs3YH2fVSFER4tLYIOgWuQcShHVy6h1H4NfjDD38elCTY9UfyRHruWnZi297YE8bT3JV5SV9udtLhOoueOlw==","signatures":[{"sig":"MEYCIQDytGSriIQmkB2oS1YS41gdE3IsPk4PhptfRlk3VwZY9AIhALZewF1VNXn5kuxtd6y0WjHT8DExwwdYIHDu3kWS+KIh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeflpICRA9TVsSAnZWagAAC7wP/2sUQ8FnimL/kRHe2teY\na1DJ5SsJUgGmjDm6ED8j3FzYrKRi4hYSCmge+Kz0CK86HZE+lvkEoJPMhyLi\nVlea8pT31KpH7YbBUIuDUKpVoRjcbKvfIJHUSP+m4wnINF4konj9RAs1yyKU\nxP31eZ3WCHax81Y0a9arxhFeLJQ7BAxVp0CTGPDFdN0ba75IgP3naF/tmWeA\nJZrWAz/B16ixS633kUD1l6a13gOZPHzZglZet12RrWWAfsy567q36i3zTuK1\nroYAXDJV/Z3lvMOTg6KkzqVtHM4YD82dbZrCJdba9PZICJtNkMhqtCWynI9p\nSrG13Kcijg3RyImFgK3/1ux2edVgBLcgIjpLdAy4JqouW1MZjQt1mPR8n2qd\nMDeavqy1tljVik/KV0dEr5840jP/4CAnTCxdm4fUB8F6KJ6YDhx0zUCj58LR\n0qzndvki2pVfjJ0muYymW4xEYo1NoSU/ECHglkRx7/HX2ldhD6uWNB82VirV\ntevjkyXNlCr1bRu/QNo9f6e8Sw1gmO3n4RRuiDICCxuN+53bEl4cP8j6hhRT\n4CVQHb26HBBq5WD9Cwzsh9zDgaTtT8/w6M7o/wWmt/ijWEtWHqwr0CBYa0ym\n5zoj47ZoHJDKtyWMjZoUXNCpEROIb+BB5KNYrUQHfjtHLJjZ7fX1MGRxzs07\nGQ4p\r\n=qlnN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"87fcfa262498dee051bef9a0a8e8b8f39869e6a0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.d6315efe2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.d6315efe2.0_1585338951504_0.06651115214499481","host":"s3://npm-registry-packages"}},"6.0.0-canary.a3016368d.0":{"name":"@material/auto-init","version":"6.0.0-canary.a3016368d.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.a3016368d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ff229074029a4651a6413235c3c4e4e3c3e66627","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.a3016368d.0.tgz","fileCount":14,"integrity":"sha512-C9kFxd/OK0z/ymYkwsTYS5fq2L/3xcONjvsQyIqTej0USaQ6Y7Pl8gsWEj4PqODAVkam8FGkulEZUzurxWhw6w==","signatures":[{"sig":"MEUCIEt/xPOrjZUSaanD43Zx+diNjl3U6pUwiYmFA1hwK3PhAiEA4hRWeZHtV83SNhGhXY+aNm+lxUdaO0ZIH2G184jNFCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefm3GCRA9TVsSAnZWagAAJhEP/3fmY1/UcEBW9aGoWXKD\nlYOctNN00qIW75dGiE46AMU0cuePcVrrxawd/LznZwpb6/+papagqzlQjnTU\nBgDtz7Vp+/UhsB3uyarHftENxbcDThGJEAcgq/ny8/VlYOzECLrd48Xw9Nl3\nE55Undkc/X6Wjy7i7LBmBNbjcD3j3qXmHi//QvKKDOkbybnKDtjURKjJSEAh\ni+aljY/RqEAiUqoHgUdtezo8gJb8zmd/ysYeosJ90jBnn5emSohLr3+hNldz\nU1jWYtHqjh7NFy88Gk0FaVVrXs4Q0gzc1l/Hpi1zWO8jU2Csek8OwIpoEwpu\ntvFEV4wbBWDh3uLBK7OVWE3Kv6e2s1S4je4911c0uRNHTsU4pqa9D7oQQgku\nhL7VGERpOmi8R+djPs6ERcAdEMTnz/F683m1nxKg8xcl0J8gXWSBrv2qjVNf\nTK9zmIO/H+G4KjlRKivZywdURH64Wc4vxkeOdgbuwpjOINGzWpgd8+wBwRjR\nkhFN40YpJksCkezQhj10RtwLKhIvzSRfUDlVRQLk/u7mNNYXetXQCRJQjRsw\nX1X7CyYP71mNy62GSD0858zDLzCRLxvKbqTZiIcFtd4lLTyJiyxE+BbtKQ0A\nRAbvVIoP8P6cQ29t59duDj3W32IC+eMhz0Wp9fdAGIhRo1G30sWGhgWQBhaP\nYLd3\r\n=J6fO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e41b28d8c25aa5e36e88910a1404e7a0730c5d2d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.a3016368d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.a3016368d.0_1585343941597_0.725749735487002","host":"s3://npm-registry-packages"}},"6.0.0-canary.4b45b6620.0":{"name":"@material/auto-init","version":"6.0.0-canary.4b45b6620.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.4b45b6620.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"104a1f8c35894110b94961009b1cb2c14de64607","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.4b45b6620.0.tgz","fileCount":14,"integrity":"sha512-4dBk+rdOcgS3QOYaX0fCOev5b15HNa65sx4BTL2lD5FPqfBz7pKAQEyyGbWRYT4Jr7Ln6lq0UijbpZumkkX2dw==","signatures":[{"sig":"MEUCIBWGdI7TPJcj3RmiLLjrfIo86N4PcZoKl+0mmSVlwzGvAiEAwHicYcobR6Lk1Z2KAiQud6RtpFwPxbtvEruIPaC0p5A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg2gACRA9TVsSAnZWagAAw2AP/iyzz492Cr7FheHDyY9e\nOZsjTPLggy9wXyQFnyyvZWbuvUMHrCOHR6JNBH5JOofz1k/wg7LwEeJNmJsH\n4Gdv2VZWvhSK8mh1Z/U/bVj/v89GMAhrUCc+dlzz0T46ihkmdLdOJV9kovNz\npcgLvZq7pXXEFj6cynWs1z+0N8hfifiYyEDnnyR7vTxMkOnFqb7JbDPMENKU\n77Q3wQvV9LSgws69OKrLc9vIHpaQDthLUlw8+B4AKowpDw/oQK1dnvYa8SKs\nXM5qCu3To0jWe45sUkCFz78Bmc6OdyAMU4DnQ8s/24TnhLzzodKv1peWBazz\n/vK5qGQCI0c3iTy1jDLfDZNztLCHpXvl6vtFx9AT+GC4qv7LvEhkDRFyc+rx\na4TsJpQP7CKSDbOUJWdoyT4B3/Oh5zg6CXjeBCj1Vt3vmICVdo8wutMpySSi\nQAREbKYs36nZGQO+MppYjJcM4eeQuhYGq4yre2No9K1RO09M6SvfSaIRtz9C\nSOA2ssXfHB01tSp4cBEj1Jf5Y88pcEYn/LVsq9uOwiIS+PlICseCB9yxQA6t\nKpp7X9ndWIJWOrGQHU5OFBS2blH2t5MDpheIS401AU6WOIikIGX88W8xWV5n\nod3W3XdeEWmn0EUCm89DtUs0C0epJFFf5JaSym2U4dS6w5iAaWhTGCBlb8OX\ncBK5\r\n=AIrH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9d49d0fd4e563f312e9b2a25d111cf5753591eac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.4b45b6620.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.4b45b6620.0_1585670144082_0.030976369703676898","host":"s3://npm-registry-packages"}},"6.0.0-canary.e84b9c8.0":{"name":"@material/auto-init","version":"6.0.0-canary.e84b9c8.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.e84b9c8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7abca96cc366574ad5eaabb64d613ae707d4b721","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.e84b9c8.0.tgz","fileCount":14,"integrity":"sha512-DhohlJFRGjKEzTt/s/zCH+T3ER9b+aI7M/axMz1gX41z97PRdJcP29x+yuNf9x4b/W6c4x/P4lXg4EskxF1nEQ==","signatures":[{"sig":"MEYCIQDxrJP/Wh6/oleWgNTLecUJOhSrLu+8Wo6SzUrZ0wzJ6wIhAPLb5B3uQWennQY0mJ5l1AVgIPN6DjozZktKv2DVeknK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehMd8CRA9TVsSAnZWagAAztkP/jGHP3tyURyGn++N0b0x\n7vCpQi4MqXMdbpmsg2FZCIctKuSwoos0hgTjS0WYZ8UoBuxwAi0q6+XBvw2w\nDFcqhBkOLZYAfm2dRlh0sNFrX0oje0CvasNCeFa+1N+8d74g9RxGXUoJUfA+\nXK/EaODXVCuWJciJCSCsV/E9nufENn4oMMv0e2/KGYvQOjRZn6ByI/n2LEd1\nDCwM8ECFphynSbxzPGESgo9+9s6ZP/maCIWNKfkt2L/FsVCtTU+7O8HZnn+b\nQAtyH5s3BDWBU18pZPAPqXMmMYg+EIcVqZKBPGMnDQA8PL+iNnVwrcQlDNY0\n66Zy0AFnZqNI8sGKPGsrvpEn7XheHxa6+Z07K3BEKKmYM8s6aeeR6kWDV/Fx\nn2+MQmL9+nVge6aZm6t2SCg1kCqxj/2uhcHJ4g02Z5JG8EnpuOygX/jGkvMK\nCmtB+HpE/zL9QcuDu8MZPw6f8L7lFBRSaKyj86AhqDG4Tu01FmjDCLOJ0V7l\ngA+EIyFhSA8ZGqiLsT4yQJHgMt4R1kJrVrElz7KRvXHccW85bRRHpxMF55td\nvkhuHcxRUtiUZ/SvaYgH+GuY6Ogm/1W2TTDMT1Igg9b/kHKbOPeTE299h2EZ\nfJgwzAwwS6EF3/g4dOrJLd7Teq/PrD7SlDIdmVSPuEJPw8cpUfod85htJ0Ub\nnnPO\r\n=JVVQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8c119e9b02d2718e7b4df7fb72c1724650583b0c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.e84b9c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.e84b9c8.0_1585760124415_0.5614920776187047","host":"s3://npm-registry-packages"}},"6.0.0-canary.e33c49e.0":{"name":"@material/auto-init","version":"6.0.0-canary.e33c49e.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.e33c49e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4eab3163629abbd649591bba9ff55202c8ac6eb7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.e33c49e.0.tgz","fileCount":14,"integrity":"sha512-gDQpRKJN4+uxvlhtkUj8eXIoQbTaK6SUdAd682eiDh6ygCHn7Asm7Y6SbIKB3kSow9pQN6O70nkrr43+HL0Trw==","signatures":[{"sig":"MEUCIAQOo5zVrZMlvqHJmOzo5n0FnIns+eO5XhfqAkcJPB0DAiEAg0XxJj/q43dedNRSx6rYaZNOTG8XVFcqcmTBW0nn+Ws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehS0ZCRA9TVsSAnZWagAA9BEP/RghpGrFY5q+jC/UU/nQ\nW1eSnQF4sV867n32eNndRzFTX6lR7iPkd3Ml44u8SwAR5W/Whp8KJ2/p1OiR\nbUKk0VrGR8Fq6IownRzYoRe5tSVjsFw2BM24shMf4wtiey1LXbyFX5FAhj9b\nKG0JcDZ1EUPGmmSSTCwvcl5kVeIxAghqv+8+bi3pNfI4OS9U8DttCKmwl4Ag\nJzwh0hLTuDP2UPvu8XsOadXrHLgtxdKZquwRLZVSc3UcQyDUGIh4L2eT7iEp\n2Xi7FAoeHEAsMnb6yqwvacYYmngXtrHMvX9pSJeRn49WnEKAef/6mDJVJVPK\nFU3hfTJDFoUztKhVDUPNAnr71YAvyjHJvPTkJBZpJHUrSW3bD8bo1DOJNIRb\nni9iRsDt1FbqIA4fryp9NZNCawFS01jJZrpicXl3qws1KjtHePq2dOIH5HbC\n2R9bS7awYKi3Ii8Rf2IurbItQXaZoSMOu89hJ417j0Nv+uMXL4MvGK1xGM+V\nppCK+iEOdHajyoX8C6aLmvX5NVo6FGalHsbN3FGTB6UlcDVNlb4ok0DROaJy\ntvQ/VQmjEMY+9uh7FeeGFaWyz5uTTc2oBqHltQV1tDTm/QNmE7aYUFm7uFTa\nlEKC4PMKOvm+4mu9hx8AuEo1opDUcKJwQPWYCL2GAVnt++y5lI8IoHtSEFaa\n/DaL\r\n=eXOS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e369357845cadf1687509d31fac95d3131a90718","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.e33c49e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.e33c49e.0_1585786137032_0.6293008960442295","host":"s3://npm-registry-packages"}},"6.0.0-canary.f1f8e60.0":{"name":"@material/auto-init","version":"6.0.0-canary.f1f8e60.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.f1f8e60.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b6b37972ca5cb32158291e458a464ffa6b44810","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.f1f8e60.0.tgz","fileCount":14,"integrity":"sha512-hmpHnRqEW+qycMW6GEcmYsVpF+HtDTmQcaJVKeoEPO85vgsjAPpwTJUHnCU12EUNV+z7ImtsgvHN/yl+hfPrFQ==","signatures":[{"sig":"MEYCIQCtnzCZhuYYvT/8PHAq8D93TIX7InT8Vsmf4E8jZdy9HgIhAKZ7t0g7AjyKkCqhH31XpQb/7f5uNCottsGLbt8OxVoo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehjlJCRA9TVsSAnZWagAATswQAKPm/mPDsK3hY4dHFxji\nYbrimEqDmsWLVZ6CllHLfffJglaPoz19kGPcVCeQLzMqm4jbsanoKfpysqXy\nhlfL0vrIVyFXI9j1Pils9t0WBPCp7dlXQcGuv+xfgt8hj6nWFWdpGIeGbgZi\nsJSd+XmFM7dYShEMNSjYo5g88TeeCa4ZvG+sMdh629776370+yWL/hiFnqYZ\nbhmp54f7u1YKUW4A8AS9CWbGxjbyZmOdqqnQ6qQdWnIm9uS8xtrPNoNOIoiO\nGfnbt/0iR7vYQpELdiWO+icTM5jkL6RM60E8BxoLExMsiSXyRDV+pOu0Nbly\nmPpNytWBGJG5exXEym0e94/RsKy5ddvzyvjenwsjNMF2yAhmxjRVm/MGFEuI\nhYWkeblnOMmPsODqLEuZDBnIJ+vstsXJv660uQaho+OKN3TTtOAxPLFgXpVo\niLzdhlswNArl2nLdX05sfQQ537QitZiDBVavwfEC0dWnUCmsUc/Ugznw/oMY\nhtwb79EGDi6mCYKakuJNu9cdiiKaZ+cq2qK7CoGvnXTiiasrB8ny/xCtzd4H\nXrVWcSjlHMNyJJmXXyKnomIhePBY6YEFB2NOLeDmjgUx2OH2vR68XiyxZLTB\njSY4WSINdPbCH9yWgJco74vrB5lg9YqZkPy3ynUGeSuSebjp13Cf0aVO7RDb\nDT5X\r\n=r/dl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aa365c532331b10b868579dbf1fa4335e9499185","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.f1f8e60.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.f1f8e60.0_1585854792488_0.582826731680183","host":"s3://npm-registry-packages"}},"6.0.0-canary.1e17c49b3.0":{"name":"@material/auto-init","version":"6.0.0-canary.1e17c49b3.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.1e17c49b3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aef1e5503d79d8286a2d26ee221487cac7c47ac9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.1e17c49b3.0.tgz","fileCount":14,"integrity":"sha512-5PyAquVZj7tbFAy1YgshGVrzgTywH9juZy8tMtWf1lD4ZptaQ5wO9h91eD3Lx1P8KkDjIAHGR6n8Fsq+l7XE7A==","signatures":[{"sig":"MEUCIQDzFmV5YXLCRvmXWxunoImXAj/uQWOkqdzK9wqdG1X+gwIgdteFrXq8P7EyOVo/Cb3I/oJwZdCmeM4iVdx9ywPLOpc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh3puCRA9TVsSAnZWagAArgsP/jO9kYe2VRknjDBbDtvq\nYS4rh54XXmNVYCWiHINWJTQkN+2mXemEkctqiymBiSq7PTiinc/KH1SmIcRA\nh0PFJ7Ixv68kC+GGVqoY8AFTAcxF/nVdB7R4DalAfxSL7DXKYjsMSm0uTtrS\nZA5wdPDjO6WucwwCWGVodoQ3dwQO2QGq5RKpswQjkEf06K0qmzhiS/C//2ZR\n5MxxA+MKGqDnKmJvuHcdGxKa73lBpIUuaTP4wd1YvO/Q0vgjMNrbHrMmmCf2\nFHoWSyfiCTQMraZPbPF6PqDyG6MeffAeTwjmXjUayIdqiUqD/NW0i6dJPKqz\nSw/mGXr9X2lmTWfw7WLiiS2e4VBXL4lJGFuKfWDaiv51rSQd4UaCmpx3u7KA\nSX7ztM80r7eH3+v/d8eJmXzy9isWKfRzx6eQV9AQr610G4PjGzDV5XSH/nHB\ni12ackhXzaRRm1tWKE3Z3Zv5+cIUKhf/Syw17mbaJSQkyD/7jWmMDxL0ctT6\n3bNpBm6kI50kKeLx0Vg7DcbC5VxZMggrCGzCqxCGoCBonvD/aPwAhUIXSOLu\ntS1NCWP0KgZcaUO6ALjOlq7w/sHBWy7RgWPfPGT+w6uSLlWozChPV7TmgQc1\nH0WkWYDAtOoraTMOIVlQ/cIQ+isGoGCpPpuH2eu7vOEn4cS1dJHY/2LqrLOM\n313t\r\n=8QP1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"08bf363eac26d705e8c4b0bcda91042b9c73f82e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.1e17c49b3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.1e17c49b3.0_1585937006003_0.1568049461364298","host":"s3://npm-registry-packages"}},"6.0.0-canary.6a40ef217.0":{"name":"@material/auto-init","version":"6.0.0-canary.6a40ef217.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6a40ef217.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8f7ac983b22733cce0a73bc7df9b21c81b1ebe4b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6a40ef217.0.tgz","fileCount":14,"integrity":"sha512-kHTbWV/1iOwWBnr5VMSnG8Wxlc0zPDYL30csEkK6U9CahidTHUXHLc4mbVp4f1rjLqp/qpvFwoHyq9HmciEWoQ==","signatures":[{"sig":"MEUCIQDF5KgEFb+yGfhmAp7FNC8TFag6RvX0bcPozKadihX/awIgYX9ER0EOrQdqpuv1PjXSrK/piDfpKEYWlQD5yedbL7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh41VCRA9TVsSAnZWagAAsboP+we3B1c+6HBjwugLu0fM\nmrWFhwyQURnoVEGZTVIdH0xc5id9GgfdBf2pngcHEBiyOWwz00zZxwhUP2xg\nD/S7d5IEa5q6BEnfybFVX2nNJB/emm90+NUBSlFo0YKFzAofqknGR1HWh1w3\nXmLnWedHyUU5rYtVZtG32M4q83rWuoD9JoXDdUfEtkseBcsFzBXNT95xxMcE\nI97hh0ue4ECsRUrAccp+4FFU8PIanCDFtrw6de+/fnQdqvP0EJBxPzP79gjh\naz15dY36vHx6ZBXYYJgI9KFVqLmABahk95IRxzOWVSD4Jh3JMWhZt6Sws14X\nfgYRDdq0js3KrZ29l5dWCxKb19GSrIdCYlaqbsACmC1YobOBarMjNfpED1yE\nmnXJErPFQ6ROQjrEd14nJYcLbCAA9AIY7Id7HJkQEJ1NGQkPFA0Ynu3UyUUo\n63MGslwaznI5oXNYQUbaZJ7FAOf5H024DDH2Bb9lM4t/V+VC+0p88TKRIa1J\n66vc47DUeUnppMndNDvdWrYcTuwfrRFaO1EOUI6dTN1PQt74FQjs/SDV1rhB\nApBsMW2/Trp0th2u4OHHfWFG2t3hy+Wib/WFUD9bVGyXcLiozRBoah83n9Oc\nL7UvQs96xLcgM/OdAkCpHxMhtGlafbYbsL8rUyFubap0k6/+GZyj2ADUer9X\nj7/9\r\n=rkNL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"94e553cfa7e3fa8977ae7bd2ff7df4021f815787","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6a40ef217.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6a40ef217.0_1585941845098_0.9978500445595722","host":"s3://npm-registry-packages"}},"6.0.0-canary.5f24faacb.0":{"name":"@material/auto-init","version":"6.0.0-canary.5f24faacb.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.5f24faacb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"191cd7cb4484ac334647c1af3acf66d35397b35c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.5f24faacb.0.tgz","fileCount":14,"integrity":"sha512-WYTuIkjAW5TgKrzvnS97yXS3w7RwtKXpkNsiJkw5ymgDPH9FK+M8Bx/F8l6eJDZwj+Ih7IqGSwTOy7jzRJFURQ==","signatures":[{"sig":"MEQCIH7K8wFUaA3/yBgw9JdN/D6QzRHtoKUyV+Yv5RYaPc4yAiBln4Wrk+PYP8jUIk8I5IY67nZrigdE4xnH7eyPJGcpMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeje9FCRA9TVsSAnZWagAAxtwP/0yEnA1OHw7RAasqneOT\nqb28ZqZ9Wm41a613lT1GwOW057dTVKMG7iQv8T+DDAmH2xkqOf4iVomgjiNv\nOTA2e/GyeF2CnAzCTHffdSPPt4AXEHQTSPKfk+eOA4e1eYVGMWPCL9ZMCSDy\nv0HQnx6MJbsnGUKw6nAoR4wF2H0cSYbeht3elM0dezZyUPCQk5LwYKPCLeNF\n+NPE8hBeb9pQTG9U51akyw7pGTwfS2/tsPijQI0l/1p4wRs/6srXS/uzPv4f\nVaiR9Ak0Wl18DQ0yy/w/xPzRceHz3kfN0A2s74EqYlwsV2huKvbD+hdiBuAy\nCeYaxJ+3ZC830HC4AZsUb+VZzOg6KRJA2Fl1w5tTvlFiy1x6ZRjTrumEGOJU\n5uhMsnyg2gH39Ae0w/MCZ0FNLD7d9xFPK14cmYebgUBbp6BMoIYMB45y7pOM\nwNOkJSiZeuKmTknjFYCJhAYrNEQFLvLV1CEhf211JBJwTAT+INGs831Y3vqI\nz3ZUJeNUdQhErxoXw1mHWGuQ4qA6XZKIvSJh9fU1/KpeTAgNE2x36cq2AuCt\nrDHhCaSYdGHMPAKYuogNfnfxO3zrRquWAWuIW/oZY6Js4EC+RNqcsgALpA5m\nDkKol/GXuawUjTUn14FkdtK49QdXG/NBAHYMP8nj2QVb+tPqg9tyWSzQSHwl\n2vi/\r\n=bRBF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2c7c3d8feb6b7bb5281c1144c43a06f3ca963316","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.5f24faacb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.5f24faacb.0_1586360133096_0.5381002612815073","host":"s3://npm-registry-packages"}},"6.0.0-canary.82fa986b9.0":{"name":"@material/auto-init","version":"6.0.0-canary.82fa986b9.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.82fa986b9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e19ff45f256b99bce2436ccfbf08933049266a87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.82fa986b9.0.tgz","fileCount":14,"integrity":"sha512-6LXp32t7IizQX3ShFv8XWjTVsN4JjzgZpMwoQ9LApdJm/ltyMlOqYYWNb79gjuGsoQbk8QW3dAJDToqd9bFc6g==","signatures":[{"sig":"MEUCIExvXDvt/OdrH2ZoCNwY4o4PGep7fIUc5kd1f9f5KMxHAiEA/ifMGiLPpItOqHB+QIjRrS7AesXqPv5+q9xskPr7Stk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejfCUCRA9TVsSAnZWagAA70UQAIMoSqHVNWpM1cQsSQ5K\nnOt/psQVi+RfCtbI/DXS+oKrD/f+8wTeOYoS/yBNVWdNXecH+Qu76XHL30L7\nOU6mmofY+8mgY1sb2DavKb89BQXwtq+Crv+hIlYj1d7PCRR5XOzCjGHtR36b\nao4d/1+Zde1p0skvwkidWijfIL3KLbl6OKn7GK9dtFlkrU8Fu/soR4EKMVzj\n1NG/Tdy7K++bj5rGRWMaK6mrEDjaw/zuTabJh8ZZ4hPTr+0gaqx7Gq0VXXK8\nJKJ86NshoJPjTpfd7LfedtRewcI759uPyu+Ietr4/LU4W6UfHo5LBC6a+6pz\n7yDuF4lhuyRjqt+FQOUbSllmTdgSveFVJmcZKOw02v5VowwqbNwt8tr1eY0m\n8rrYYy8tyQftryNyLsx1xOO48gQTKHmTRazRaA6HFeO02qdZmdzvhLDOec4d\n+EqDj4GJ0H8c2fjJTHiCyAKTpCHlqV3uvX+tZTAjqIF7T+MJw46KeZB4dfeS\nC6eAliV5pG7djKiMuUwkxZDgNOG/tAe4NaUGMbbofDiG9TDTvk9O5zOozv0Z\nrtS/ucyDIcdzCctq5MFu6JRxPq3booeuyeKOWVPLot9+fXd2Cchjs4O5h9z5\nfTjz2kGTlQBQdMBB1Q/O7qSxnblmy0XCfDyioW9GP+DGVr6tTUYHRwmsVNwE\nRXYr\r\n=BLBF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4fd9bd21072735eb447e594a5fade5eb1e846831","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.82fa986b9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.82fa986b9.0_1586360468118_0.5200598027748788","host":"s3://npm-registry-packages"}},"6.0.0-canary.9930d9cc5.0":{"name":"@material/auto-init","version":"6.0.0-canary.9930d9cc5.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.9930d9cc5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0a9051328800e23f1c3139c5d9f1a8ccf1bd423","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.9930d9cc5.0.tgz","fileCount":14,"integrity":"sha512-/5wU1o0LAPI2HsKg1uY3am1atF9BySV89RXhUayhi0udroxchhaGUKkZ1sOZ6hJbXAkLb79bXpA3EugIr8fPHw==","signatures":[{"sig":"MEYCIQD5kLHuJyYdqsjIxdhE67XABiHfhxUKULDrBuGWtJ/UGgIhAJXDVPgzpw/mXURGkiyYDAQ9wixPTPRvGSJcOtyxKLRN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejiatCRA9TVsSAnZWagAA6B0P/0AL7yya7kwePcsotdg5\ndpUhMeJ80xov1y9oxHEQO5Z836bTujtu5jCQVeSEJry8uQraqhL/nz0NLXAS\nbUFOQeZjupuiWjxEeKyssHMvnUpVdEwagtIW8Z1bnBApEgGfocslwxGNnf+0\nvHauztyk4q/rRZVK4KOAMIGwgB7dejk/JB2tnI45WUGeC3CA0/2io0FNzmwy\nJbz4bYp5QUQNjRG+Jedisq3yTZ/tccx+QEuXehCkW7bzF7n/psLpYXLLrJu/\nFFV0NAWcbv1nLwqLYN6BtXgDCPj/a+E4YfMZvXsSuZdFBnX9Rdym8qZeI7Gl\nDQNmRtsP3I0Gpnybt8Hmf4N5wS+RWHvVzBd35L6d4nxXDvZfeCk6Cvp4LoIe\nm+RElB2ai5CDRNjYsPxDRWNxXPpnZe8fZ3B80evaXeM8MZhKvRlGlJ1XfRuJ\nN0bKtHOgylTDSf9ES5s+DHyNgySSbEL3iyw6GsSxDx7RBo1bzK4Ut+GnMVmr\nT/LqLQPuKZPMRBU3XT2OAY8VEMkpMJ9PRxV63C9IQT+iYJ2loyJFQyudavFq\nIOYJe30IVVKCwjM3gizXEoAdTlUWOcH+Qxk3i6+TKngd1PD/cHPKnbRpAy8L\nhUw8EsUjd+hex1s61rOsiGz44RNwgriRFln80NneAt2T/YPRxaXIs/pjjYW5\np7aM\r\n=uZhU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a0382987a27373aa348015a5e2529f301f638d57","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.9930d9cc5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.9930d9cc5.0_1586374316407_0.18850530018187794","host":"s3://npm-registry-packages"}},"6.0.0-canary.6601d24af.0":{"name":"@material/auto-init","version":"6.0.0-canary.6601d24af.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6601d24af.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad8c235544a8f015e4068068c4662ae7e3146534","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6601d24af.0.tgz","fileCount":14,"integrity":"sha512-17iYj/LzXMZEleFP96+AYB6yocDKPpECIw4FCeVGCJQ7it7U6Mw3g7V4Ce943wPkMpot6NOMtkW9owjIqdEEFw==","signatures":[{"sig":"MEUCIQCr1QKlLp0z5WF3g1Dr0TFpPiB0TaUNM0SpfHrNdjwCXgIgRtOin+OHByee/h8KTmaM3kPP2qUd7sJqSK4lk7gldi8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejmxmCRA9TVsSAnZWagAAbhUP/A3uCM9z1O6NYHYTiCQF\nJ3bKGjY/LMcmawlONTkUNHquAhse2x9cG6bbgvInnR+yUyV+D/cGqHj2cbxp\nha6U6oYOi9wtFawyfHx1PeB2oaya3JKiyjkhx+SUrIWgzAeRRETaxPBlOnfe\nUVXfsLm/p65y+baz30SijSvY7XMypZ3G4Q3cAA7tZ7ui51ucHapMslGcFLTp\nAXnWhpFr+XexHgbMmv4K9ENEhCs4jdevxO5zuVhRMkkrxK9ijrxOpetpDcBG\niY0Neld4ffpng+IMbkbL4vXrdbljp5LRkA+fjmmM8H+hBhw9Bwe4IYw3kLXV\n39tSDJj9vza7FxOuf5xLpUlt3zFgm/eGIU5pCzlEaJlKfy8L3NsZpjGpocAm\nCUf0q9ZGai8yyg1r8ge9H3ZAXGIX3FsDmq4GMih8+h5sSmWwaiYEgsFjMFUT\naXLj4sr/FMbu/nJWbZ0WLoW3cw41lvQbGMPWxdBRGfLt8ymWiw71HEruWYeu\nvfWKiMh2NCREXlgwApmL8NS9mhavW6wSvmNonX1s7HfLmu1npgC16BPf8a/Z\nErm+KFbzji0w7g+MHYw8SYL6rE862yJBLbFumnAiwAp4CnlFQcNadoLyI8AE\nRhIdQVQPAcaQhPhjqLN8wiE+zXKNCGsTo9B8IytP+/OQX/nUDtJy54XTVTYp\nShRY\r\n=moHA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f22a45db8a22981a17395184998a94e6a32944c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6601d24af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6601d24af.0_1586392166398_0.23225237766385498","host":"s3://npm-registry-packages"}},"6.0.0-canary.05f5e1583.0":{"name":"@material/auto-init","version":"6.0.0-canary.05f5e1583.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.05f5e1583.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6d25ab314e67b5f8376e6196d5be84e8320faf14","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.05f5e1583.0.tgz","fileCount":14,"integrity":"sha512-cjSe1ZrwJfcgCvIleEOYSE8nipTONh9nZW3hLE3ridr75NSUWJcvSaRV6JzhcESAvJ6ajbchvhR+92aQBcBVAw==","signatures":[{"sig":"MEQCIGVOGFfTrJfh/8MCfYaFPQFDQsflpBU7sqVBj8RizLezAiAE95GCbWgY3Ahyb9l8FPPX7xF6WwWD2xcYIqv0f6RjaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejnByCRA9TVsSAnZWagAAEsoP/2LegSEO7w91JeVrUcEe\n2trSlEUoIY0ej3zXDuohXetnN2Yn/yS+wvL0h9/Rr10N6GRong6RSxcd7ImI\nEbVb/+expPUaJN9eiyqoLOJuf43JpSc42attSJ1V/YCBrnELGJlkkoN/2wWt\nRzwuGx7S8ox7Ry6bqbE5M3DFAmIBHjahiiaFpMJ7Mf8C7iaw/yCNAj4DeieV\n0+FVBlZXmEFug26gV4MDch9M6pFyNhtyvnrln3tQRG0cdSpkeFdcEEhi+L9R\nKiXbDft6y29n0L/U/JKhIMEwZbDWghWKPq+dJTiHCHQeqvKbSIOj/zrXL1p2\n0F/6U8ZKE9FT4CmmSYu3vywJiVGjEH7uEaNGiUu5sAHNmcWxHyU8F00lJ0oY\nlbVDxdeFwIoB1HHPov/1v9lvoLO8zqxx9Zq1j5VUYSynHAU+GevZDnbWChzT\nNvxa0mU37ct/NwGVeiEDFxJgog/fCDh0AwUlefbUofs7eWKiYznCRJs4q6q6\nICg5BTx2c0+ybxrOlFHlECWqu8YZeH88RrobAkcyA6toQLH5L20axKoMT0B0\ntahlDZbDwiT+aBPWgLodcJpHHUU2KJcw2dHwp9CxTYfQ+zFA9PayEyHFoSUs\nJpCnYAOCETwKos0B6Z8cC46xY3F1nePJcmH4niWDySq+niKb1yk4OHJV+4IP\nonDN\r\n=egxL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"413c1908165c032ac95dc5456e70978d3994b6d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.05f5e1583.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.05f5e1583.0_1586393201700_0.46214330052250285","host":"s3://npm-registry-packages"}},"6.0.0-canary.bce00e186.0":{"name":"@material/auto-init","version":"6.0.0-canary.bce00e186.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.bce00e186.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57bbe2435eb88bea3f9c1ab49df44f369fd8154a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.bce00e186.0.tgz","fileCount":14,"integrity":"sha512-o2yp+0iUil8o7+hHHw9EqaOmyP0ecNmloiAOE858PLxEnHLQzaM/snD6/F2g9HtsOVJrlQRWDHWgTgFkpWWpBA==","signatures":[{"sig":"MEUCIQDOzhoSOPSUCc+dk/KHCLfGwWzMKfVnSLiXSDE7X3TU+wIgUa/F/pvgiZ2U6gce4FL2Q8qIBPNBSlxrcJOjo31uh3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejz2eCRA9TVsSAnZWagAAh+AP/1CVOzjps4qIN5eEiaWi\n8nu3WPFc6XKo7GPXb7S9atrdBhonz0dD7lBOCTmZ3FHB57C7VuwmhyqXzZKQ\nh0WpbhKAiI1SDfKjqvItDwaJ+kT0kINIfO2hp0Yier0bt20njGRIxeN5oetL\n+GccP8d6beV/jNNsbr9phdbHUmEd+HutbXe+lLMYt8jfj7/vO+Qc8o7JnU6J\nk4hMLduBnOfy9FjjriQ/TEN4GIBG6/cls1gliWT5hYgOuUqJyoj6W8R1BEkJ\npL5Sm2vnM6Nl81MsgBQyliOLIN6Fr6/Tj63ATcQH3O00noHx/QwyfUja3hSX\nHKId+HwboOIxIdMWdS0mszMZUUi4NVOkQNeqALwfBRMlMpN6DoVowT/b58ww\ncvKrg4dLXlhV7i/LDLptCenDeNJ7AHiGw9mDS4kgVu/wuv6WJu2Er3lLyMR1\n79LgsYSCTHRtxoJTt4wduhjcZshtGNrTXidJkfhjqV1okT+NJmM3J9nJYwRC\nonxzH5qdk/e6mvyckLEk15G89gb/ZKfPLQwV7+ksl9Fn/Kqln0/p1KYbaEn5\ngq1ei/3iaFLDA7y6ONxp3jUTVxRnuSGob45oP0B/0QdEwCBhVR4jqTs1yrFt\nL27jxPxqnWMLtmBOMRoyBc41c/Cx0QLoGIDDqUlv5Vr3m/DPk/PXFClRkn6y\nRGjw\r\n=QXL6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36e6ce5271637d131432d915870da208d16bef74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.bce00e186.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.bce00e186.0_1586445726283_0.28230938003186323","host":"s3://npm-registry-packages"}},"6.0.0-canary.927fa902c.0":{"name":"@material/auto-init","version":"6.0.0-canary.927fa902c.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.927fa902c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9dfdccaaec6e7131be94612eafed943ee1257d4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.927fa902c.0.tgz","fileCount":14,"integrity":"sha512-7WnLa/gnt8DH3wTghsg18HK5hvM4wqOBm8ZyMYhLo+apOIJ+lucHfWFBnpwxgLKyzGnLDpBgSwEJkhbNegIxDA==","signatures":[{"sig":"MEUCIQC52nsmbpMIKEdaXHYchdZFrNKj5AZRkHQ/bX+7BODgEwIgWd73senpZgn4NI26zYLlnQ8Hr+X8Q/EvXgZPdC8LKZ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJej21nCRA9TVsSAnZWagAA1ZUP/1t3NpXAr+xRdDUKJPXm\nnpQrZ8CXIsostUVJszbmP1yM59h7wU8yo3+VPIVzwMvtCvg9MzpQIA6Vi9eJ\nsF+L1ELVUSObpseUHgRYOySOkMrs8W2oIHiwqoZl8XVX9lyxISDVWcNYW+mh\nOFG7FxVRri7pgbXyJKYwf4yBXlauHQyF0iq93rxHgF5i8D/PUMoGWTZJy1iS\ngQ4YxlbG+5beaajFjZd8F7xf8ZUq7aQ7fyxw+fIQCugCc8a4uPQuQQiaWs39\nbqzUAV8F7tZhIFYu8MGMEndj5uup1LM2k8sI7vAzuI2QuDp1PzgBU7/v5Xx5\nBLhHV6qwcEhPb6sHFNE34WVP2xMPTWtUazORqVfPFRCnjHcIRkmdKjEXCckP\neHjmuLdxChhT2vH+dNbMRLseCqbGUsSISzpOPAEZwhCJ5nT6T+GW3xEE2iFG\nLUg3gFcE403B03ENgvlOhMX5nm6dHnTHxlb2/e6tQNQyyb6k4F2CnfpEjfGA\nm6yEqfXqzFSpawycZGaFrBbCfVazEis61AZJlTWfNTVHkZeepo0Ypd1gKN6n\nD1ZOiA3UHvc1I1N/Lwf7Zl8dFoyDMFTt4+ao7uhiBgqWJqY53JS3rhkyfGuL\nEw4tiLK9Eg3f97yMSZpa1aPtEbt5QdMM342RstjYpLW8z7SXYssaBlp543eo\nz0F7\r\n=xJvK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6993aa2a4786dba507ed6b641b4c059925b7ddfc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.927fa902c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.927fa902c.0_1586457958650_0.11658904112900581","host":"s3://npm-registry-packages"}},"6.0.0-canary.eb28b6ecc.0":{"name":"@material/auto-init","version":"6.0.0-canary.eb28b6ecc.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.eb28b6ecc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b499591ce0af1ea53710d4b297802866bd635698","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.eb28b6ecc.0.tgz","fileCount":14,"integrity":"sha512-uNhBNKniFM4+8/q+7VF7fB77amMBBY5qh7CQgd+nl7CsNbxIMcyTIcQQNhNtmG2ykHfpKASSeagIO5ViZip3TQ==","signatures":[{"sig":"MEUCIQDxhfNqjALhaZZmpqyZFRJPDAndi1QyX90crUUoRqXV1wIgNF8LBUYelxLmsY5Cak6m+HZC5xXKKEEyh6fhcmDrlH8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekMlZCRA9TVsSAnZWagAAEegP/jjbhr/esrM2wwYRpUj2\nPcgpCEUUBiir521zMJxkrhI+/iiUrOZLWlyVJJ2VYA4p5hqTk2iDo2u6XUzY\nxgkiywJnNL51WLj+0Cqs5Atic+CHQehurwkysRaw54ySxySQ1++fn3WPoxYU\n0OrR+bbj6ClDt9PQq0xf14Zc3sc3IOJtpyk5C4LkrmJl0pGh6rntQxF5ZuQG\nx5Mq+2IMg49rvejfOC3RbNgfUpQ+hYRxRW7jfegjw/OKhATTCSNrWdwEy6K0\n2VDDKPLlhQhUu69t2bj/2y5kBZ8l58MjPYzbYX9kmJ+v8EgVFFK4TZuXfe4W\nzJdkzw4VosxdZGemNnzmh1HFYoFsxmBZYfbj4m0E13SZWFVXCZwWrXLremtf\nYrNQHR191OyxZQjN3ZPyuFJIto4FEM1YI2n+kyOq5FVU5acCPLEXyQFZZOsK\n5rDWysocomQgva6qE7tq9ojATZX5rUBn2n2sfIq7sdq0Wlk82uWOvMeYFs6v\n7t0ztH3LS5ZyHK09KuTKCFXxig68FrchymJvsxe2LkW+i/nlWe+QsbAfGp+x\n8lC8ar9b6tNgCbdatRnsU8tvQcOMj4ORPFZ/opCmcab/neGyq6OIPQSydmAR\nwSMUo4ZDSJUf4fxWeJJzEZbEDAyzkp/G5V6p+DNWXmPneOvTbQUtkwLrkAon\nQfEk\r\n=/FkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"14b97cf99132f4a85a978c1799a668eae031d75e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.eb28b6ecc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.eb28b6ecc.0_1586547032786_0.26618548129327624","host":"s3://npm-registry-packages"}},"6.0.0-canary.816a43b42.0":{"name":"@material/auto-init","version":"6.0.0-canary.816a43b42.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.816a43b42.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"469a4cbb6e49524e58b8b5997145e20a730c18c3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.816a43b42.0.tgz","fileCount":14,"integrity":"sha512-HKXpNsA9f94CuWDVhbDFYBNh5OySBNAKCgZH+/1uNs1ybF+IGhOTKo3CzyDO8WUFofDI6b1n7FHtRBjr02z5vw==","signatures":[{"sig":"MEQCIC9fFLAkKGIkKePUaWTpjYKdKlFyi9xe2I6tZZom6IYZAiAo+gGFC9cjpp/xnSTOAK1PLhAU1MGc6V5FD6PQfLL5zQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekNx+CRA9TVsSAnZWagAAZwUQAJuXCePtd0ufAH1L14d6\n73cgwmUypY/oGnxLT8HzXS1sKR1ewBzAp5gpqmpDeqWQvvSWUDZUbady94sM\nnlFIkvXaZ7Ckg2g3+udPjHCoLxRNqdcOcCbcCa+PK05HHO5v0tApeMiFFMjk\nW44ynjLR517uL4QdV3PLqCU7p12a44Kx8JzgYWJpEVhJ4uexQ5ixctS1HPhp\nZW6M9Z7dZ8+QH7brJ1QiakxvgyOML6O9clH81VcwNvoJ7lYeFrxJH2pgyD7u\nX2hWvBadwrgMSmy6qI3p9o7Cj/aEBaaoUTKHfIV2Mtn+dvW1qa0KLnbhCFKX\nMzp1gC4n8s9BLz6Y411AjYcg1gAUj7fBoIQHHogJ+hTyIdo67daRKoCJwYyO\nNApaS3UiOrb/CmXaEdQanij5+ejaXHp8yT3I9D+XPW3DSomYg6Lrva75B1if\nm3Krgse/4MuTrBTK/xl5MY1tkprP5YmHE3qGADhC4uOC2M06dDtWRUHhDaEJ\nm8wSqkdo3H0pIZlGgBMrbcKe3GhAmBbpCHtkhnFWm9ekWO4RFwao5fSsv7ah\n7H1TwBe1xVjuT9lWOtzLAVBcllKs0cr8j4yhhOSvhNJDjYbrfUgqFxDP19NP\nrT4mCGomZKGDN202IJy7aoeRVDjS8RcUc/TSgEqjEBXisFVQJHR/F7v4RKWr\n9FwR\r\n=O/qK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"55d118d08a4432484dfc732189dae38773d1f437","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.0","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.816a43b42.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.816a43b42.0_1586551933709_0.16370667572591135","host":"s3://npm-registry-packages"}},"6.0.0-canary.008c4d319.0":{"name":"@material/auto-init","version":"6.0.0-canary.008c4d319.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.008c4d319.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e28596b50204a7f29c678c998b123536c178f947","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.008c4d319.0.tgz","fileCount":14,"integrity":"sha512-E3kqck46MWGNuifnzFUkUuhklWikSBKlwK+v40i2d9+fvu1VDYgOZl7437pPfptotsBkG6f4bWz1gK5oBgnFGA==","signatures":[{"sig":"MEUCICAFvlgGfYCcbs3U5FvskvJ7KU3h2G1rry4jYQfI3AvZAiEAwgbklDa+jkLZWk41QEy+BX2U3ClPOSCpcZJPKgfQnew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelJRVCRA9TVsSAnZWagAAfD8P/RlD7+5/HPhcDbUi2CK5\neA6W88nxzyWPang1UCAEor3Vu9SlUFMdSZOMSlUSvXFhzWwvrLbrOF/aw0k2\n26pJPumXcrE4sy3qDQ6mnowOHjPE76NHENkCf5uOCos8wNKE2ZBRPl+ZKfNq\nQg/dOUU/a7Kk56ixQWoxasPa1JfV8FPkx7rtDoYJ+5TziekGxZUu1eR+KIAG\n5yVTPhmycF9ryxzP4p5WmnlY/2wo3dRWb8W0MqsmgYAWZWjxJGh5E4xokKm7\nnyuvZfxCLVIWpzypCSFBd2NPBD54E1wPEVMJs3i+fbVgjkmvEPQi9P4pJEOX\nlXI4zxVKLhPbGwyREpQQ7dr/p5iHRnI2cfs+ZpDHg9BK6ux8wHaailiZkwR2\n3c0owE9YIkP1fPzZr45vp/cx3bVv0ygGEYeNQxFtP8hjaThlDhTkaSCGNZru\nGhZlF0kpSxWWMJ6B1ZmE2arknTljF05A7QjpzGCa/SMZfIOlBa/FAOfWUgCy\ncIo78oQYYXVi+HV3TBVQ7ZOR8t1g4XkxuVsNmP1ZoxBH1PORLxDusvW7LfKU\nZDiymiMmIB0h4GI72kvojQuVTdzKQwzRoGIGYGgoZWDCJ7FIjwx9V7qF/qEm\nJzw5pmxd6rcvdG/yw53XSnSuS+iieK7MpaYGYnu2bVgb3vwMXwkRicCOEixB\n46GH\r\n=8iL0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cf7ff62c921da3167d96b5f7cc7f07ac2af41a19","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.008c4d319.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.008c4d319.0_1586795605074_0.31302672232672557","host":"s3://npm-registry-packages"}},"6.0.0-canary.cbb3f28ca.0":{"name":"@material/auto-init","version":"6.0.0-canary.cbb3f28ca.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.cbb3f28ca.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bb8f3a59e6c8edbc74d67efb10a8144dd6ec3d88","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.cbb3f28ca.0.tgz","fileCount":14,"integrity":"sha512-I10YWVYmqQRKiXtnJqZ2eOBd+JjE7suR3qLqK21BLDdYsd0HflfdLi5UaRYtir/a+cSAeRKojra6e2J7eJ+aig==","signatures":[{"sig":"MEUCIQCr27C3vUAc7R6yDTiQk3iuAuW1MrJl1uoWt/PuhA3UNgIgdch06VhnnOzjrVbWBwleRI/835zA9NXDn6Bp3znCiow=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelUSaCRA9TVsSAnZWagAAwSwP/1OWdZeR/yK0pP8n6GZE\ncw8S9H2rzJGWCxB8wjIE6YX+Vj4aNnCSjCmvF3PFeqBlG4fWWRZTZNoEMibD\nz62R0YputlMLkpEaxyg/GhfuaUvnb/9Dh7b57ypuHssQ4X+6rz7FsF03sBj/\nZbaQghbIf84Lo8T/rV+VtDxqX59JSBWrDCaSt74DzT5K5SQzva9oEtza8nIX\ndyPDMkTusOTxSHFwStVFrXyz4Aw6Ot6Dc6WCrcU/Vf9J1bZ8Td15nvNqVtig\n2iUaXAtJtJLc5x7meMZu69aNI8L2tScSH2FqkH6+TmggmMXJCUGtrF0SZ7K8\n5TAtpaey9B8s2+sjLpdrlWHkA5Oq0dcyhirp5eSmY9oPDvOS6zkuyfAc57jn\nh1hxqafwblxMflkuRdJCM1VwsXcWc9YbnJx50tRc/JHk2iauJyGgIDTb04z4\nuw1jpr1EgcoM1IM3EGF1xe1tXlMwtbu4IbAyz6/Z44RJ5lusDmTW9vQOPc2G\nACZAmsDeP4DfcU4/skJgihWJ4uNUYdQinp7twDq0RrbCdSF6X123cc32bk05\nEDJng8u9a3oXie27KVhuXLApVaZ4HI2xUU4ll9rCyjK2mn2QsLUnC8cpkcZH\nhy53R+sd/yb48QfXXUgrXKgx66czwG93Ihe/LqDizDq4kSShWf+Bo8IRd/4V\nOPlB\r\n=8iXn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b6cb89b18de9f28799535d82c5ebc759433a5307","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.cbb3f28ca.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.cbb3f28ca.0_1586840730371_0.055413818368359236","host":"s3://npm-registry-packages"}},"6.0.0-canary.f172b0f90.0":{"name":"@material/auto-init","version":"6.0.0-canary.f172b0f90.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.f172b0f90.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a89fd28cdfc08d6e90b56b31b1353578c1fd6e02","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.f172b0f90.0.tgz","fileCount":14,"integrity":"sha512-F7AhDmtoR0EdBvYGE8auclS2kZQ19nlI962lAFHpILeMYXKkzt5sbymy2/VfbP/i48qzTiwJ6B0BAMwNs5COsg==","signatures":[{"sig":"MEUCIBzeGXf7yx+Tcrl0ypv1Dl7MJmABRC8xQzg7nc0ymLCiAiEAwxZDAya6pHFmsz5gN4gJMT0xx/qyVo0NzJFj7P1CAgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelkLFCRA9TVsSAnZWagAAXAgQAJRntKak08Ksa62ZxySP\n6vIG1HqA/ftwnaJ53Ez6Re8KdCXOgMmLL6v1KMfMbzWMcbTSoGFzG64C8vR8\nVqadNdqsNeua1EeVumn2wuoy+XD0rJZABu+ycKPkEj4WMMpzJ5d9KitfZf0n\ncXX9/kE5kbtnIvQGcf5NugJyyV0/2h8XGuO0UXRXWUY3A8FFLgDxIuEvHPPN\n7KkaD3ZrIxa0MuFZX1NBux1KNRHzWCweAyOeSKV524Uzh20rUAR+0QlXZ2g0\nUdKAEjyQFR3PPhEA8v/GOSllrVbc4GN+BmkSbItEPZKp2Eu9ULzLgPVsg24O\nm8E5B9XBhCp6wH+gO0ukbb2u8NIxJLV9owf6YfhrNKxc+XsmoJwu8xfcsPh3\n2NJqWj6SKl7hE6cPD2FMP9cR+cX1LOenriiBN0tYp0rhYtH0mIRnuuLDZR30\nPuNDhfPGBqUcO/VFSmaCGd9vrHjipw2FTkpNKBuMK0aQFWQAxJNzVqnugyQ+\n/LC6fPyaObiwMb+yG16ASG5tP3pesq8CQ4bf2M6s5hMCtUnUCe6GetCgNrxW\nwaVG4aqwdJSYHcotODc/gGCmSqwZJKpnxRgCepF6/qROkuJc2VwgwhJLKNLS\nJBNekvSbfUBnbz/SrG6San5hgPdWdla4+vGq1ZjliyW9pKFyob1Az1efTMAT\nNLnD\r\n=n0ZN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eaad6fe33949c536d515e1177cbadf504619cfda","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.f172b0f90.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.f172b0f90.0_1586905796403_0.7097908100996511","host":"s3://npm-registry-packages"}},"6.0.0-canary.c02642273.0":{"name":"@material/auto-init","version":"6.0.0-canary.c02642273.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.c02642273.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e980cf168fba843bf7ca827097d5b2b2a5a5591","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.c02642273.0.tgz","fileCount":14,"integrity":"sha512-Mnx6V6GFEQd9FirNSD/pyjaarVqxV5H4GdOMO0DQnWgh4ngeT1AJGQhdfpRs5H/CtiSHhTpZt0ylwEy1Neambw==","signatures":[{"sig":"MEQCIDfTMSDvra5c0GMiLk+q6ofmNgvmRsVpn4EFOutTr5qjAiAQbCSsKL+T+ppZ3KWnCbaUx9m7Lik68cze7ISkXlX0eA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelzN0CRA9TVsSAnZWagAAiGAQAIdY4fV970zuOqSRWY3z\nEBqPGoF6J+nt/zdi0C9peLyH0sjZaW9SC6xzDIF8+nvHkmP+yFqQAn+xK2XW\nFe/T3mt5l9KyltNf3uNrrgu5h6xFV93tjsCwtk+IAM3AH51DUblfySHdNxJH\nr0173GeJOJodm46oM/IMrKruRDmFSzufD1oxv9JnzRwoCfWJcV7+9c3b+KgZ\noZiJMKP5OoI8ctCq0sbHHstQohx3a0+vA6kThp05Me1h1S2dF64o1tpZuHXJ\nOD1aSKe4d9qEISnWzy/csjROEdWEJcLNLkWyLvw/w5gCU4Lv66wuw9aNwpFd\neCT+2cDVc2yNJzvFdHVIvTsrzB4Z35VMv2dD4X1l3TXF5slNCngDtQBEaYmB\nWvCzMmhQuwrl69Os03yBM9c9mu3PAGsQmXc3IBYTqkr8qhNHtQEP5G0Yddvt\n4IiGpLJSmuXppfalQz5pwf7jNUJnEvpbwcfXa5mDZADl+9waTLSiH+g02xzj\n1Kzwz4UojIIs8eaxES4s3eI4ud/9mcwU/fcEvTOSuhEwEUTIowSZwKWVszcW\n65cwuw7SSvlPRpLoV2AzAw7Un4A7BTsCNsev5LEFGnnrto3q53M3Ct+6eE+N\n6WlxkxkWkWh4fdCijicu0XTjeFMdwpYe9p64JO5FshbRFJpxrDyiKt8Z8ZSD\nchZU\r\n=Mkt0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b648ba2f886a5d6cb78a9dbdb435d18b5f600bf5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.c02642273.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.c02642273.0_1586967411642_0.052235345459209714","host":"s3://npm-registry-packages"}},"6.0.0-canary.8a299b568.0":{"name":"@material/auto-init","version":"6.0.0-canary.8a299b568.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.8a299b568.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d26a903e0b1ea3dd254da77fa5c93fd19872ce07","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.8a299b568.0.tgz","fileCount":14,"integrity":"sha512-cWjizidnqcMV2qETRcpXLqaGiUgTdImOIKR+uvC+wK1V1x8bUhXHqtW5GCan46MkWd+HdzXtd2l8fxxelxhuew==","signatures":[{"sig":"MEYCIQDQcecFS/Uj4lAOV0TVdzXyLjSDt5QHGJfy38BMQsKhGwIhAPWuAH8bGBvz7XHEUxyKtEtkYhD/zn6WCIflSglpMEsW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel43uCRA9TVsSAnZWagAAulEQAIDJ848+1BaWiy5W6D9I\nVemrlbd1hsuT1ETpoUhYaxOTBTfuZp/N0DFlX5j6D96RwvBkbzWETYkfbIV/\nbZGMqANYZAJB05nXkejzqFU/mA4cbdRDKey7ckVWjV0khPfMQh+qr5YMnL9k\nkrj92gSSvCS7SlyEwyNKRXl0RoGA4r5qGfSuChcjkj4gsizEzuWCNiiyg/Wt\nmjiHaEIP/ZijsYVaIyEUIMD2L+j+vbZjmQbOxLBOL62MvsibFQ3zWXUUEwwk\nUAFQfkk89gbS8n5Ngj4TFKsE6o7W/viYp4A1AXrSpOxZwvvySSxhvWVikx4y\nq25S8o99dRKDZas7vlrdMnCe6QU4uCE4dheAH4nyJgwTdslZdFR/9YI/TOSB\n4Tf2kVRXt1nbmtorLkL5ZtnQxO+lr3Z+DkOmX40rxI+Pysxf9ixhPmxEUhLj\nqSRHROQd4YPPs+WAJ4lMvp/ifnUjd1z03OHC75jRbXp7KSACUO/oP3EmVQky\nFhqfQnsqMUGET/vRKyeeT9LI1eySLYWjMyuYITpRkOpnfImCNFRjYwQATTl8\nA5V2mP2GecrSDp1nI4cZeqF5VD/X3SwJ6TFQuJEA+LzKm0Py+9RBh+QKFick\nZB3Mo9WJofQnhslCzsR37HIMr72sws/fSdm4h7NMRin2YenlUPlwUV9nuvYe\nRoZZ\r\n=78nZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1cce57afe783f6d0ee960b6d55080fccc7424cb6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.8a299b568.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.8a299b568.0_1586990573945_0.5466711814663752","host":"s3://npm-registry-packages"}},"6.0.0-canary.490fbdc09.0":{"name":"@material/auto-init","version":"6.0.0-canary.490fbdc09.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.490fbdc09.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"347d4db9c8ad3a11fd418fb2e9ab43ac97e1358f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.490fbdc09.0.tgz","fileCount":14,"integrity":"sha512-oaYsqGsTidfLYb25pZdX0EyNS8kX0wc33iB961BK08L86wsu3vZjGVm3mE+vsRQlpbiXOrgVjc6wWvoLl4/Rcw==","signatures":[{"sig":"MEQCIGL7LkW99eAqj/bCQWzgd9rdROMg0HKpOz4oW4X2W3PtAiAMipRop2UzUXo5kPW4oqh+Np408bdpKFLs9luFB7tC6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel/Q5CRA9TVsSAnZWagAAq8AP/2LuxlgHY0YkIHMmlpac\n+bzpxG7Rc9Z7jdlwbBYWnl28Q+QqojNe4T68oOYgMpL/etqvTQ9DRkWrd8TD\nCizLtSU5cNum8gHbdQqno3pcOrZvrcwt2S4MnOcCmWVUCucwzXB7WNPUerYb\nKfcU8Dvw/prn4EXnQXbXawZhRqFdAauzJEe/WC/Ma0e0ay11Cv2wxmBIZv7k\nstCfBzgvq0uxeEsjuL1mVOV6kSbf3gYwnBLw8TEBpNncDHvEwZxTm0kRJi9B\n7Yccg9vQnIvK9CpZ7cP/arH6e1ef9dA+M+aJcPQDlYIIMvMLFeT4fMxdZStA\ne3Ma77ukjHiGqZR0PWgr8y74A+irut6ah3sIswzM1fRXpSkBYsE6y/mi4dmE\nq6wraAfZ4y0N0cDoa3A6tK1XA3vLYTWnG1M8y9RVQQZnjI9rsG29XgSsavwe\niLvzIfZGXuQItY3eRjzyC30view2rlEmmyz87NFHCkZ8qhYmAn6EBmU9k0II\nudM3qS750ilXhRVgDG8cny0y4hzXsrI9TqI/f+RAp4+TOrP2amE8sWjUjT2A\n68eHEo+XYHQlimn9zwg+oaXNprBXFGlezd67pLi7XCHc647Fz/LjHnFT+0ks\nRl4Vn6/sXINYRFUbKDeDzJXY0v4250nQb/Zhkh06lbPl/h2zuvwL2XK0+cMV\neGCO\r\n=RCjB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20bba7dcc3290528bf225184ac976a3b486ccc00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.490fbdc09.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.490fbdc09.0_1587016760866_0.39839456434095233","host":"s3://npm-registry-packages"}},"6.0.0-canary.f838c6e55.0":{"name":"@material/auto-init","version":"6.0.0-canary.f838c6e55.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.f838c6e55.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b36516f0af27768b77f2f286ede6fe75b5005c96","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.f838c6e55.0.tgz","fileCount":14,"integrity":"sha512-b3egGZQaY29hcmVtoZjhsu7q4aU3hXQT1QRpi2RhohfWk+0wPHif23FAnRMlWhy4q26+MOJDzhRwioy9D3jSBQ==","signatures":[{"sig":"MEUCIB4Xg250NQ4n0gSkSGUIOmxDqSgPBN64s2zLwVF3gWNHAiEArcvvO8yYKAudKdsZUlUKTxipVrg19hqKuDAgHVtNNW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemGsBCRA9TVsSAnZWagAAT0QP/2OFd2WFxRkAMX0cN0he\nWv1G1EXRtGSUeoa2M/dhXl26oW349DUDYRm5oo+tyPnO/mdmUfqWFNbOe2rq\nRwkYEUmIk0tzJwfZVCgbBjHIiPJGHGfTjcLoU5Sh55m5RVfmngxXgnYORL2g\n/yC2NxtfH2GWTCr3fD5tlbodStEAsit4di7twUMSGXD+3MWRhFKG/iPAhIpB\nueuDjt2kKZHUYkNN1Z4+26/E00v7aSPN2WaVxHll5KTHn+89VcTp9EcCebrf\nwTOvNtqLy7+teCuvywrtV5DqGilx1uDsBJMXSmZFiYyvJL9b54yeKx1hCN4o\n4u5l+v88ZXc8KjmBCa3TrGXdymqK6BEbodWXwL0vgK+TKIl78RF/5pIdhIT3\npy0WRpq18aJombnyXxENwYOGbEtCJ36Sj3u8oQ2pCOHHGMNTggypgR+nktH1\nKShyGgAnIJtEAtB56viwohtfUaB1G6FjNuFQa1v2QTK/bsu8bgyqut8YHZBr\npPj58AXu5Sow5bRj/pZaQpv2nLEARyHKp+pigppZzQLl0P3h+XZWOOIdFP8A\ndugF6sNKWD87gc6f+8SbImPMw6YyR2CARDx3oYVoHYrrsAlQQvGjdn8bNDDU\n2hsAmFgefXXNlhynTFidk1bxA4i2YTl8SIJZNGSZcl10dMj5Kz6CIJZgB82n\nM9dT\r\n=sjuQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4088837a2a2d0b4af544090557a8266202e13a8c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.f838c6e55.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.f838c6e55.0_1587047169255_0.14587433935945548","host":"s3://npm-registry-packages"}},"6.0.0-canary.ce6cb7024.0":{"name":"@material/auto-init","version":"6.0.0-canary.ce6cb7024.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.ce6cb7024.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a69eba8e5959c6720f6eb63c73a527122dedfb1d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.ce6cb7024.0.tgz","fileCount":14,"integrity":"sha512-Qa8u1N4JxFrNV4+h4D1/BNEH/xgeDvqd/KEwAO08iMwZjM5mzuoAxwYdxPIIZPwJyAKwWO+vYgE6xaZfs5Un9g==","signatures":[{"sig":"MEUCIGraadtX0NN034G9jZPUDNCfIoC//l5YY17pSUKfMgznAiEA4DK4Ckwu7g34nfTmab8HK08OVUDBVjICk9yHBEOLUyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemJNwCRA9TVsSAnZWagAA3hgP+wfTPVYu8IwyonJ/uiLi\n2qxuLhLgErn90/9FjUf5L+A3mLIQjcl584wQfDwGJWuK5OB1/aABpBAu74vX\nC8b0g4OIuooLtm3cTZ+jULfe9QiYT6wPzTQn9DElpHFS0XJGGRQ8jmFuM0IY\nr4v5xDU2ZTWueDeU8UmeXO5kKb4l4ipLBYDbNeZQC2ekkg4Bvk4nnkFPCLJ4\n+j6SV/mi7M00pr5rkyxeWNdnS9iWmPLxC9VUhRSIxSRSEfGHBcaH3UWKFjSS\nGTJ8qb/kSu0zCxjqGinU2JnBYqlKpbif0LXkaLePFZVUcBKwpENpGnq/K/2t\nJM0HelfXxw3ZWCk3z7cErxbVjD/FSEjH9iY2RL0WWsBcGJb3g0v+aoaaqJy6\nausLnSdpLWnhaetra2AfEwhbb9FCvc5WEowzk/f3ze5GmdOUeJpdgMd1M1sR\nTGJaULFw0y9j8J1U628TSYXBuQr8UHns82GKd+JokRqUwgmU5xxAaAchJavw\nj0V6A+eIi8XfjG1CYwMllh1cgS+h7kivMDpYy3rdnnf699/3pwOvdHgrbIX7\nczqmacweWPOOagJR4z2KcDC7y7fxs4DC1gOR1N8t9a1Vh9umASity0STZlKe\nugw4lgVXZfv4Qbqx8pNM88Ey1GzLlWB6q4/RzDbLl4F0iIMlYPhUNCQxINkl\n2voE\r\n=i/mc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50c11d42dccdf93592bf97e9211f34d95983996a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.ce6cb7024.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.ce6cb7024.0_1587057520110_0.9311881116526883","host":"s3://npm-registry-packages"}},"6.0.0-canary.0ab62a65b.0":{"name":"@material/auto-init","version":"6.0.0-canary.0ab62a65b.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.0ab62a65b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64f1207eb3d82e7b9df3a39e2196739901e60e05","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.0ab62a65b.0.tgz","fileCount":14,"integrity":"sha512-VilFjC00BUis5kOJmIcKmsLCl5JJQ2XdJVP//F7hA9++ZSOcxhHpXDvLeWxmGKNQuqqLd3SJHXlztNdlMLg7HA==","signatures":[{"sig":"MEUCIAfb8dJFBmYEb+ozU/yUkmVmluRrnjoWcdHqDDlT6CyLAiEA/yK2nrnQnIW0qCYqELemMzYdfFekggYlzhSn2cXzg44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemKm/CRA9TVsSAnZWagAAtf8P/3cwX0RrrPae/NUI/C5a\nhDeXkN1gQmG5COc/XU1Zj3Lw3H4hPsXFvA0zrx4Zl527Yjws0QgRKLUcKyFM\nvS93sj1JG6KwscycFNtnu+QxC0BUUukHK3uSKxHd1VRw12mUdjtyQLDi/1OW\nemjDjhtUxfz/G4DkZPfsmyjyTWxfCxy1R4/dncDG2IqIJSgtj0aNihdrM7xC\nYqSFNcMKU29h+94VtSI17/JMKoBgiKf68C4gKi0ORnLQUbBNi3vNW55uExJW\neEov1AX0fTS2epLy9FpofA23eeoluGqLJ9vdt2qtqVsT/+jdf3qLDRgPC2iq\n71q6wlYqaybR/8Rr1T2MWnE2vQ0tUgDiNfm4g0PGnyc42VaRMDD/8y+JMBAp\nC/gysqgECT1/2fQ7KL796Bf3zPJsbp5c34TDpl5t0AVoYWeZb7HT0NGrbbBP\nimyiTB9MShp7UVpfGVNl6YdHbNTzFkyYHza/pucgrdo8XTIi1Dw4305X9ieL\nOV+2mO/iwHi23FYM3AzmKH4Tg9q4SHzxa+qlpCvagtlhEMTz4vQEq0v2vfpw\nMNpda2JycFGQVFjeAl3ruye2o5MHWTlMGHCbh0viUemg+Q9yVAvo9HcwQR1e\njvV82HTS7m/MYkZ1kR/VMYDkEav7Gr4frcKxs8zdIJ2YDgUmHxNjnIHQgc2l\nSR8I\r\n=0crb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f8890ca1119e1fc3b197f172b8273c05b5fba35d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.0ab62a65b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.0ab62a65b.0_1587063230563_0.8731860029965444","host":"s3://npm-registry-packages"}},"6.0.0-canary.ca61b656f.0":{"name":"@material/auto-init","version":"6.0.0-canary.ca61b656f.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.ca61b656f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca52444927815a0bc775b19510bde698a096f6cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.ca61b656f.0.tgz","fileCount":14,"integrity":"sha512-XSozZgcmhFVLZ7yzvkXlz3JIDhAXL8pDaeBURFGk2cTYsNez6vahcc1I4drbrfBo0CIeje4dYfkhfba/M4vZgw==","signatures":[{"sig":"MEUCIALs8aS67gcMN4v1LpVqrK9Qwr7tCVJHKjApmUtPGJwtAiEAtIJlcnEtYuUau+N5ZUuGnxq5fTfPaTtPaIqFWOOiuts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemLkmCRA9TVsSAnZWagAAqqsQAJ35kuGfCFf33FU/Sm4E\n7rLkFZPTnV4Rp9ou0M0kKCaVwvCSt6WoM9+HFbC5B0qcb3QGsjeNyw0lbuU/\nU3Mk0vG0Zo7xDbDJ7EASc7MuNLk97jsEP+VfGZp43K3bxEPt1O3YJt0rX/cT\nAIVpgo1pcIF3spe+Yrck6PGWk/zbyfYVOznDUZYdgJcZ5uEJtKJz4B0UzXC3\nv7E5hXhPw4YwHtHjZbRb1Uhhzk8zhOVb9CGuMmchFDUT9hMYoHkhAFrxm4x+\nRW/d87skHjpLpO1PhCWtH8ncdRojUnR6tQdoBYBxGqDvzKcpIq0ZAAsg9tc7\nVlYazTPIU40t8S0jOUc6zr/YlnFoSdp6hwhCX6P1mhtAU1lnTMzWvYNi/jCc\nhFjPvTPFwxme7BAgyqgMJxQDRs3a089ejU78BmkROS32icCuLW+FyhSVhB51\nTuDivY2utr0iaxe1ewB1W1WQXUsCatwChPETfvHvU0CaeDtHGJu3F6PA4Nwh\n3c36MqidLw59DMismaTTY7KKDtDPtY+w8Xbhyt2UPgU0TR1j+jAQJZQc/fCz\ncyi7w6qg87kRm4P0lHlo1emqvjImB9oHTYnZeiqcL0AX3CdCxZ98wIoPG59v\nwZl6uGXg0J9ua61kdQSG+e95E+l6jylP0Mm+gVrkeurPRU3pt2bjTwOVfVv5\n9QQ9\r\n=BDTT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"967c93bd4843f43b3821bebc6113ab9c73533ac0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.ca61b656f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.ca61b656f.0_1587067173827_0.13229270181460118","host":"s3://npm-registry-packages"}},"6.0.0-canary.45a6615e3.0":{"name":"@material/auto-init","version":"6.0.0-canary.45a6615e3.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.45a6615e3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0837df922c8027c5a891371b532dfd1202ff35ac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.45a6615e3.0.tgz","fileCount":14,"integrity":"sha512-I2BR4vMvTKvoI7EE1yZboLXA0PWGjAWAMxCYEEoq4f3kFmBYBzC/jIswGWKHsiT1B1T55iT0PxaSSm0s4QlKYg==","signatures":[{"sig":"MEUCIQCYLu5/1j2xZEscIPjYxLqijvdHSFtMVUd0ZTM1r4hwGwIgUo2KuwpNJnf7jOmSTSatNxrWEGzG1YqMFdMjCFoPq64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemMDeCRA9TVsSAnZWagAAiy8P/17vJKcIhZQXEILNPDFz\nUqh9Q/0GQrU+ZxgSUiYfWmDtmXRoeFxLRIKkiGNIK1ZuGyTkPpCvZ7mv9T8V\nbkfbArhsVDjHSP6C7PW/WP9VRqdmKHGiXFev4uk2AyB0KMbXkD5krFULs8wv\nahqVvLafYFgavZUSsIw3H4+l+I/jmNB8KM1ZUI9NHl4yaYPCR9UtcIJkZhLl\nggXVLn/xBOJH25zCvD+yj2/+/ULESIPQ1sExAYH3zTSmxjsl2oLdvcPxDTCb\n1UpVx3Daz8foN7Tokeq4G4kIbbF+3oMx0w4RZgkfFk1bDfVP0OUxt98ZH460\nre1OZLt+kW6IJ3lNT+rei0RB6CGaQDgoBxGDyMp+py1m9gGuMJwS6oSLJ8sp\nL4JV7pJZSltlLJjiA2KiX48mYYZM3EICLEQVxGvMXD7FL+BUFlWsa6Xm6sf3\n7Zca+qtiv7d+wmDIhyVesKdJLGyG8GndgR4ju65dzc1XdW5LLxBMQ2hQMHqh\n+iUwk267zkc8xqG1hHds5rOPp05VqdrfGF1goZOqJfx5/GEmyXIKS8iXydCR\nKROpXvCsxDtUrMHXQbbj4E9IQyhxt1iyW8vDpN6Ni+HgR6fBtzOlcjXQV9BB\nFkcZ1DCOir0fn5qukb1iKoydCMf7ITHDYqZ0I25SnozHrO7p8HeIqKOO4edM\nS+8L\r\n=NA4P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ad3ae693731b43b2c055b2fd649a42e03abd2a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.45a6615e3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.45a6615e3.0_1587069150170_0.9925030826049526","host":"s3://npm-registry-packages"}},"6.0.0-canary.4b04cdb0f.0":{"name":"@material/auto-init","version":"6.0.0-canary.4b04cdb0f.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.4b04cdb0f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c22afaf22a0cd4f52aba93d41db12c21e731158a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.4b04cdb0f.0.tgz","fileCount":14,"integrity":"sha512-8bR7wJ71yo7JybOkjAW30Ec5KXTrwjEjfHZ8huL8rDmGYZctcMrsjvCEhNipJ4t70TKMPF2Fv+KkCrVJIjFiXQ==","signatures":[{"sig":"MEUCICjH3E9Lou2adT9eQGwTbCCxec5kiMj+PgnbKaX38A2UAiEA6zOLOl9bx74iBCSFN91qb+bR3xETMX+7TxqMhjJesZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemeoTCRA9TVsSAnZWagAA+1IP/R9JpB/gBW1DKDkRo1e5\nUMuv7jOccjz0Tu/tkCnS0Fd35KXYuRosAYoCgzTwBNoYwg6INlKDdsU05Jb2\naMfFyw+gnGxh4iY8Jfr3O44lQ1haoDYrn7f3KtxGDwE6yuDo7IX49RrKI1mD\nB3yrH+m8AFU8vLpqhI0/wArCU0fwqUcIs0w926MdVaBQgMqtn3PEPoSBonXS\ndvVoDnF+14D/IhGlfmJhyIPrgs53YOwZ3ceELijdfd8tJYCmemsIwDYESdmY\nv6e3EyGYKmWbGlg7pgohOmtBwMEUQ5hS/iNqX2s4DqviWZD54sgmjy0CjqXR\nLK09AjhXqPi1+Jhy1rwTxwaroyL4IdzKX5uEZVCJbHFvw3Q3m+Ke+THDjsHH\nsG2cFizNXvG7CO9fP87huhuUX/m+S8asOk0aDAPLmz4KpkB96i9rw7pr8Ow9\nI9gOh1Hs4VIkDa+55roAAzweXpyIzsYJ03rh12FzF853RgIAMCul3RpDqcFj\nIx6FjXHl05G6TRY8TOXVqVCgxJrh+DReXfe1XXXvikrKpOVa2g0LbhqYwGqx\ngEo6cLXcPBe1PXr7wy33ThFsJfqZN8xHbICWgh8rIlUXvoaR3o/vw47KkEcB\nXwUUhETKRF8MUv9xNZtqCbLGzsbDfDv8G49oMhpFt74k/GhcrESUUTU3X3+N\n/VN+\r\n=uIde\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bedcd48d2eb94c37211fc93847852f5261655559","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.4b04cdb0f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.4b04cdb0f.0_1587145234795_0.2963528964888382","host":"s3://npm-registry-packages"}},"6.0.0-canary.b273afa93.0":{"name":"@material/auto-init","version":"6.0.0-canary.b273afa93.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.b273afa93.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f13ae2cb33baba46f0b1b0d0f2eec41872db12cb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.b273afa93.0.tgz","fileCount":14,"integrity":"sha512-kV4u3ZR7lmpgtxaRpQ+Wfy8EpcVh7CPOCz2b4RJvHRDmGla/f4DRt6OhRQe9dREss2fZP1ok1yO5azAS7fAMjA==","signatures":[{"sig":"MEUCIQCCtLkVV4DlNNxMQ+WemH0Yf21Ep0s+oHZwfESxEZoE8AIgP82EEUUHvuermbeCwls70SYV3Mgr3OJC0C9mRF1EqXM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemjWGCRA9TVsSAnZWagAAjaYQAIFFAxNiWxIi3KQ7xv/m\nr1mUmg8xbUhqywoVCb9Hm1GMOnzbdO0vZnm/mcO1g+mN3XaphQLJunJNinsY\nqOZa1gxPaP/mQvAF7ahq1B0XfK6mJXMfbbmfXr58tu1Mg93kPNX+5QIBjaKd\nSmnCUNJBlwkuR6VYufXJPwaxFtquozIrtGXJve0CPROKQ2ngrmDR1Ub5lvt5\n0SfrDBL3nWURiMa7fjfuXOFUvcqfzM/n2pl0CphfA4QQeyt7wIoQBzDDJ2eU\nN5cNNXgQNlNu+oo0kbWqFSGOePSah/UoclTx9kYzeu2MVErV8ShXG4t0FQHd\n2gs2/2dBmvOrwgMnOi2NgB92vUPAsIROHYkfJpOmVVqrGxW/bK9DKqV4/6MU\naTdbRqyy+6G5TImjoFmXjOdlx40EVydSWuX9f28SmiPlQeH8qebiYV77jghL\n/hVL6gqLF4TztZblgascvBUkLAKAmbb+tM786NA0RS+/80H6sFp6llJkWnRN\nYqLSJ6UzsAnaf3e0DPeOMbgkSFhS3PbizHe2nvyeSODa84TyZ7EgD+rkKy/9\n+u6sTAJi7wtD1Q/jBPXt7gclbvzHOoh/6/wq7TrdQkgFVSOjsqxxyb94vJSh\nLjr1GCTijTzXgkkdqCXpShSM2d36dEMYV69/0MTNCrvBQPVExXF25uitcO6B\nQqbs\r\n=s74t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"446d7bb0e65fdc3259b7b9025c6c058731ff02c6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.b273afa93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.b273afa93.0_1587164549796_0.7974126512880662","host":"s3://npm-registry-packages"}},"6.0.0-canary.b70bc601e.0":{"name":"@material/auto-init","version":"6.0.0-canary.b70bc601e.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.b70bc601e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"88ed2c62a37b1d061fc90a09fd83556a25d900d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.b70bc601e.0.tgz","fileCount":14,"integrity":"sha512-FSsochLrNGJTuNEjPfA0/VzrpcAT3MgeJnWWyKUKKiIU1e1vW1Da0RVY0vvw87RsPYmJksBPbIArSwN5DcpFzg==","signatures":[{"sig":"MEUCIAgBBXp2Y8AFXnlbKdfxA7WkBvMLHbS/AgnUO/7QymtuAiEA6riotd0ON7ZjjMfW5rxocLumcC8pThafP7xV3uVinug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemjnjCRA9TVsSAnZWagAAKaQP/A0Vw5s1hxms9OK/T3u+\nL+qWbd7D97od5Skd3P6UUuq6DvG062jOpjZbs+aNmhulqneCrmu21oxCYNyj\nOdo80fkpbTBj9wc80Re1axlViubk6M5W2RwHCYexlnOm5Y4OpS0ThVrq0luy\nvLAxvjuty8WBDj6tK4KI6i+hux7DeA+kRG+jwP3geXWYysk8qxAmWGBvjydA\nolhgWcrscH1e8zW/QTy8HmK/YDv4G11nn9I7YXHH+ZnYpmN7MLyaHdvrxgB3\na8gitnsv0rN7KjMt0zLiGPZSdevp06A41C/o044E/9V8xWmIpDO/h7YG5VMs\n3Anr3XYvEP4x4qSNrV2bdSN1bmzjznJGEU2p70l7+IO4dM5tferAehBMoQj/\nMHmw2HIqBO9gaQIRFl8/kOokT/dnhBQadmL0dFhlXtW6is+qnYvS4VSKl9Io\nMJaaf99ipxe3Sv9C4X6V/xOWoHGu7S1keY9LUS4jvd7GHTQceuWmgkkYOBDe\nQSyMtGfnNeNnqtpK7u6A2rgQv3GvUthcz9mL0e/Ja9kAwq1qIs3fL03Bxmc7\nkJjCVj3t0Xl1xs57QIiRtVt6p5Y5Qg1hzALMmyL63N//1P4+xSZ84wy6JSNC\nQZrXOpWdBdmoy56EE9Kcvai6UeOFa1Mx+QKGOVFfoX4PgrEzYr4DQsJqViwb\nF41X\r\n=hzRb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"90c3468e59a65aab424bb59d4e91a4d522fca3d3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.b70bc601e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.b70bc601e.0_1587165666378_0.004529154946233627","host":"s3://npm-registry-packages"}},"6.0.0-canary.c4b4bba96.0":{"name":"@material/auto-init","version":"6.0.0-canary.c4b4bba96.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.c4b4bba96.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06057eb71ed3a9d04bd0d8f1df8c77f92aad9c3b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.c4b4bba96.0.tgz","fileCount":14,"integrity":"sha512-K4IPD+yAxXtLrK4KPtUPVWX5Jm0HukF2mvYl4fV1aRyYhxa7cfRiFLeAKYP9L8+cIUA5dl0CDGH7fpGGOE0R9w==","signatures":[{"sig":"MEUCIQDBsRymZRFaKpKoxTGPfhyCfzwFCaEjkycKf4YlkzpeOwIgHsEXnQY1jIsT8QAd84S8nhTdztU5sTVUA/IQh1qLSoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemkcRCRA9TVsSAnZWagAAYK0P/iIU7/FFUFmT/5p5k5Hz\n4aI3wBD+2GGQqjdeu9Jkvg/jhZLeyzImeJuA03ha9Fiwdn7ZtUk4+oDU6ZIZ\nMQVyWt7wn0u2WmfBAbq0LZV9npBfdh6IKDr80MoPuxRjR68lMtaQ6c5yCQMk\nlNq9NKVHzorgaGk30B2v9S5ZJkijQpt0qEXJzblX+N7kuUs3PrkU2T+9K3YE\nWx3UZa0Gmf5r+DDwYimA1PRQCf831eSSW/zYpmqEBUxxZpsLNtDc1SwpHjP9\nqEWzVaKFVbAG44Z+huyAW0hi1wDIsKFbYOOg0DW+ehqRniTboUi9cfEzGxUk\nstJhy6RXPwQSYrOlrbZyRx120niWH5YVScC+/PU6POqIq+8rBvn2fpR91j6m\nDSjMLtTGrmARI/+bXNhJSe7p8lluHw3g3zJ50KVoRStwny47pMQ8kMJBBT+i\nxiVItLtxwn66Pw3473tdwjF1rA5OQzMhkTUHoKvQmOW9+NawThOc+Xge4a6w\nZp0RWrjkK4fqz4/FfyzTm9U2HYLm138W2tidEEBCwTnlKIqWohTQuwMARlBQ\nLJrUah90KsD6EOnep9DSkNVrLdEpuqWb07YkXz8y6iHNZH36kzHAQUSpZIF0\naVoZ836w0mHDaH+DK4Zx13sza9OZvG1KgkeY36PmubCaPTiqvolDfWGPKAnm\nWqs4\r\n=mXDj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ee02a718dbd2e86f9ea056b6199c1664c5abe70c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.c4b4bba96.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.c4b4bba96.0_1587169041020_0.042006176141859086","host":"s3://npm-registry-packages"}},"6.0.0-canary.6c1ebc721.0":{"name":"@material/auto-init","version":"6.0.0-canary.6c1ebc721.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.6c1ebc721.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdb7b7941ba534b7a578c466feaf5b7708ba9f9c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.6c1ebc721.0.tgz","fileCount":14,"integrity":"sha512-MpP4kC5yYUsM1TRZ8HYajq3Uv7RVn9mbSCEqD1ttxpIrXBYlIChB2chekUUBW0K/iPB/hL7kwHcflPLjS2WQ3A==","signatures":[{"sig":"MEUCIQCkY8Ty+6Iw1Z0TO7holdDxKZVNK0r2Cy8pRMUJqrMymAIgboDCRIlnbSlRE7u5Gp2cyWAKUGyzlk8WDNXBoeuh+9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenf7ACRA9TVsSAnZWagAAvwcP/j7ZPpEFiMQrJltC6hyj\nKoyjNK075mwSKN+yODp2aH3r33eVPRhpanus63pP9wFc3nf+alZd9GTDLTKx\nDdNuMAlOn6CMKzxuerccuMvKoWnHHg/3SmIcMkONsVDL245AP++GBHOppEcU\npuUrX9VQz0DGp9ItZSsifwKX9t4CwhkTegGMHa3AQefPMi4D2tGNCtwT17XQ\nfsKr9lEGNV+Fc1RQo90zAG4RicPMc3v6K5p81JHMhn+ennEii2X/QAn9oMHv\nKx4HfCo3YLSbWWzQ2hAt0uRN/8wo3BdQ8BMUYkg8juPf+3VWOFZ5kV/VORDR\nCpQdxdxJgAljAkZ7whfKjvHWr6W9qvAksb0S5GSqWtTVwFljj2J7lgca4/+4\nhdhNJf9Jvc8e04JqxjQ7kOnSs9Q2i9h7GcgPcf+sp1/he0mM2i7UR+yymZnW\nIU3B9hA6iHIXWlsoDF8wg42VNBymtbvwDWte7aIlZVTsRrIKfzqrymIdyxe+\n3OqJCIXYmgjCrTvRBoUMYkDxk//vjTNsncExwWQN9QOPpJOq+lSs2WSLx6KE\nlwh2XpNDTlaKTJCsVgXMek5HNaol/4+x+E0AsPpx/OjgPoSXViYCt40FBxve\nm3B0wclDYgIi49CC/VoZ/ke0KaHaiMzVbnhOvGGzHlGGNV1KW6iRGZ8Z2M8a\n/isk\r\n=699D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1a71b1e525edb460d6fa48e392b09267db9d2a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.6c1ebc721.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.6c1ebc721.0_1587412672373_0.39558319675978515","host":"s3://npm-registry-packages"}},"6.0.0-canary.9cff4318f.0":{"name":"@material/auto-init","version":"6.0.0-canary.9cff4318f.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.9cff4318f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a21b07bfc6cf6545c7eecdcfbc6c25ef2560b69e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.9cff4318f.0.tgz","fileCount":14,"integrity":"sha512-sA+CDe1VKwinbXIC7KlijwPdX6+ITCfv6llDNnxqqBBi1j/AvfdtuD9C2KxmsCnUs9CfS16imCQV4JjvzcNueQ==","signatures":[{"sig":"MEUCIQCzpNchoavENBFP/ijZcvM/I3IEHv9sAFQKz7BVQT3XHwIgHBYQFRIOT2unpyia6i5b4f7axjCJxGHuR0E86GI2V7A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJengw8CRA9TVsSAnZWagAAOTYP/14izLvyF+iwjICLzNy8\nIife6UAdgwcgTdA94P03ip1nge8Xa9xWZ5bGEtrU16MNoJMQ5yvhklCO4CV+\n91u+E5M3XIrlMY+fxE7c5lSItfz/vkbqdvv2vmVPROWGoMbMj2wVKEnPDlea\nI85vI0Ma/N9VR4vLwXwQXXBb61HIVP4Fbh4nBNf0BrDnLPpiRszJU4H/RiuD\nMXBpThnV/YTYSOQNnOIrlob9kOJCf9+dEiRUNoKUklG1dhbzTxoRVsTurcJ9\nFODGwNdHHxZDhFl2LNPLQJQRjqKZuVo9VBYRmp/Hq0GGjeHYwMHtlCKv/GwS\nXgRuX+D6S9WL0gtcnopVRzrmhUKqU2V7kZuklykiLrUCQoQlytu6zgenV3EM\nb2oEu1PwyTm/uk1D7oEMBCXOpvYQVY+YRF3BysiOIUxdTTA1nqHzR6EVJcav\nvvsNMBc4z2kTq97mbMiM42KhfryDIJca5YofdrrVKnZsmNkXWcH9xAImdUFO\nr0SORZpIuk6I9wiVzGu3fOs69evYLcjKBdf2w+s/BhQAYQqxvfPvISfR5oN1\nieSwlsOjMCTK+ZxFWWoRRBbh/xQ1fq2sc7wwZCj4y+djuKIbMchuTDajzEd3\nBFMlBTWkzzEZaWuH8pAQNnjf6t3RongsyvdweROwyj2CVbrxjiWJv60x5srg\nwW5s\r\n=cpag\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ff1f177754c259b5b0021494616e96f7b6e0d8d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.9cff4318f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.9cff4318f.0_1587416124007_0.44095416049919023","host":"s3://npm-registry-packages"}},"6.0.0-canary.7b4482402.0":{"name":"@material/auto-init","version":"6.0.0-canary.7b4482402.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.7b4482402.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c537d37a73dcf577217d8a50fb1f2eb208a1fcf1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.7b4482402.0.tgz","fileCount":14,"integrity":"sha512-0cryZ5T0wCLnkVcvRY7rwXFtJugW1uT99+Ckvy4a88AA1llXvi4oaHtDpBVnX4IQLuLM719gaKHxsNF3XVmiNw==","signatures":[{"sig":"MEUCID+TfCy8DIcqsDUs0+yVEjp1C6o0UwELXzmWKjznybmeAiEAj8kS1c73W9kg4pYzz1uPZc+vzEU+glwg2YbCyd7ezd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeniAECRA9TVsSAnZWagAA5HEP/0esEACCl3MpmBUB6oZJ\nYD00TiMiMF/Mjf0rh9g1JOGDNVqeFD8Hskg9o4UoO3GT5l7XYpsU0gkzMJ2j\nio5qxEcWA3KFKxGTqHIweCFPxfy9K4/rmOofnkkk0TSfuVK/IslldWoAiqhA\nUOD6GpJtfGIF1FD2kf8SmdsC9VLj2QKAPjgZ7sL9++p+bwMiV67DF8g1e35Z\nAgJjO8hkwjly4g8v7S3WBG8OJB4WTEfHedpxLjMtQ4MIOA0bJMOtJMJaXemw\nLJr2Icxcr/PjQGQc7spvMggpZqZ45B+KNk1obEOqAOcG9lS6g9IUGLckMLTG\nOZs3btjImgPWyS/Zy9AyyrRpoVX/ddGCybesrLdX4odTzVYGP4rvyjqgmvo2\nXIsU9DI3H7K2sSAqLH2ht+VhYALeciIOpcdjEJ9oe4+OCtqpLoSoOW2ha6JN\nOjK6QUvWefDt42Dx27UIoibqiFHRnNsuwIPBxC71TW/kU3qSrbS6hKW695Z/\n05UoW+Pq7hkmO/7TmbASjmRI8m07uAuNDgQ6TuKE3sfgYyCAJMYg6JeIPiqr\nC/HBLZnh069cPSjIdlsCdvxHZh3ryX5Gp+VuNZ6qeX/mhYDT+XOhkAYBUzlb\nm71cDqfz7X7DlrR8vzplpaRnT1duTIWHEvtIa48ldpALnG3PH4KInUmCgnyr\nR2B7\r\n=xZrj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c25f7586d29e2c5a6d3c289197d47b826d499cdf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.7b4482402.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.7b4482402.0_1587421188102_0.9696722140497493","host":"s3://npm-registry-packages"}},"6.0.0-canary.deda86d8c.0":{"name":"@material/auto-init","version":"6.0.0-canary.deda86d8c.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.deda86d8c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9c79684c15b610b3392d3018f517c98c13aad40e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.deda86d8c.0.tgz","fileCount":14,"integrity":"sha512-AIL39Hqecg6nDgSXngvtQsr4mmgn8tZFXiOdO+I5jBP2UKHQjQhvV9gs1ioOBCu811Oou8uJiBNu5nURyjm1JA==","signatures":[{"sig":"MEYCIQCPbp5D3R/JrCC3bT3kazMmLdkxEaI3aCy9sIFiFxAn2gIhAMzwYUjJj/zi+S+p3GZtpHSPSkk9t+JN+1M+1npsdmUb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenkjtCRA9TVsSAnZWagAAoeEQAIYPIOErqdivhuKSDdX/\nJ0kAiwILINVS/u7Qed/5Nyl2Ru5t4AcsP2lFrsO9XzK1uLvb/i9abC/vacuV\nIC3xFonFp71vc9zMEIVKmC+eZNKepB8ol5cuITGY75heAjrNu21YwlodsOw5\nYmQZtSo6cn0jVweEN626atakpc+vS8Pw/RWXnVkK27+iTROhAXMACjxwqvIG\nichBXSDMrWxG4P8LTlv2dMJTc/HVNq8bbgGxlf0Bzax3CMsTyMcLEg/x778q\nd6hwuNkmSeJV/+pSMw4bGTvsJ9jLu5Tk1oxUWfaeS52s/mKEsmcWvhiht2qJ\nXXzkBHIdG5X/UOcfStwD59oWJrS4lZM9pJpvdDkr19C4dIFalr2s7EoOAHgD\nA1onkZ5A5Nd3BaogxVqKr8bYsmXnZTjZu33T6QaR1kYWCcvIbL0IJCok2MBE\ny63ZmaX7halQaDBVgtbGCW49DaXW3TLUlUIFhObkAcdViGtRll26ypX5U6aR\nvO6b01IhUbKZeKuOWDIxAOSYOS05bzJy24MklGZr5xEQaaiafHdcvFMhMWUW\nKxJUGgRuxPNZyVKxSZQblr+E7JBTdV9j9mdA/a+gZQ2aTxFlkp/BtHNDu9fn\nUujVPQsv/0jY5BRBRsXKmImN4zbnDwYboiG4FQ4lv11pA+8QEH5hz96FVvRc\nLJHo\r\n=axu4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7bea6ac56136246274e77c281cf8c66e2ef3e6ca","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.deda86d8c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.deda86d8c.0_1587431661195_0.03768949473359395","host":"s3://npm-registry-packages"}},"6.0.0-canary.d10412cb2.0":{"name":"@material/auto-init","version":"6.0.0-canary.d10412cb2.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.d10412cb2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1461ed144b4caa8875c574da9ca01553f0538414","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.d10412cb2.0.tgz","fileCount":14,"integrity":"sha512-RgeVm23s0zRCITPNRTp431TWbhyNLkZfzvFwXHaAcDFTU43rMz2zultmvmdjc2T9cWCn1Ys1MTEdG7NRzSn4Nw==","signatures":[{"sig":"MEYCIQCPWj/sFdgFhsQhtAtlGhNG80WXlJketfiGmycQSsSL8QIhALE0dNqrTE3unPVj+T6tnoXaReRG0cgwGs8iJP5/MauJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenzjQCRA9TVsSAnZWagAAg5gQAIiaV2E3pxWYv1U3uUeg\nzGDnyUX0dKVbUzQ4iArX39Ti2ToT7d7HLmx/CBbSjCK/jLpLoJv7fqd7/8rM\ncLewmqSZxJ8ibAyVL9gJBFF3U/2NqnKjDf0qm0TUcJLAt5xevH4fqmhFqWF1\nXDZgYSViW+FNHEmMQ+hVQnGjRazLpcmCpzAXb0XxrhuPkp0eikk7J8qt8HRH\nH+GOZi49pG8qUUwV6Gg8gm+h5M5fBmij53FvpEU9zytbRQNna2xTdsX+MgBt\nzFjh38C2TscF47QM7q0SK+w0xg/aVa0kQDpfoTc83fWCVMj0KeGb6pZoxMYS\neeRY4qCNiKfBpd0a88msBZHNquV2bsBTlYJD0wz2bqiE8NsPGF4E7miaWf3q\nBPv65iUgODSPYPhDuQXavqlasNDXfpbVA0CsnAKC6gWtvuJiZTuMGy7MKnzX\n257/47+zgx7LKp6MQxtdfvN8lwjQPCR4qZdZAvEkCVcVcE6MduH7IiX0lel1\nL4cLrWRIB3iKZq3t+k0PScMio5usX/F7CVS7lp33IgBJ/O1REc2SxAv4QXPg\nqOtJdGeL83QHroKN+PsFWQ0numz2c+94qQGxrFlrMKzOnlvvgrlF8RnLAAVJ\nhEmAfaP9TVVO9jU7L3QFwyjxc8IQHFqWUjAWpHzYSoOJDN7uZoHfW0S0Iz6/\nu9da\r\n=klim\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2946b5762e597bce2d8e4e72f321bf4934e4543","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.d10412cb2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.d10412cb2.0_1587493071600_0.5021120601718316","host":"s3://npm-registry-packages"}},"6.0.0-canary.c141801d5.0":{"name":"@material/auto-init","version":"6.0.0-canary.c141801d5.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.c141801d5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bde857ce1427f2dd34536e70080122cd8c42f8db","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.c141801d5.0.tgz","fileCount":14,"integrity":"sha512-plPj963MTY1BeFtnE/6qBJIYQzdSJBzXr7gFI9xBxuT3OXBWEAhGGOLJBgvOqnj96EN5oCk4niqaDHy5TzX6pw==","signatures":[{"sig":"MEUCIQC2ltaV6mRAGxM1pPR0FBp3lIkuL5hvlXEC3uoAn/UbFgIgFav4Ufb4dGNX6hVda1/34ZwYQpLMER4vc3ZK9wzQaTA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen0xoCRA9TVsSAnZWagAAU1wP/0Deq79KUJeFdgxg09CP\nPJjluwweINQdwm9I/dbj+P0k48nkiWmePjgh32B+E9tbEr0DWjErBcykBXPm\nMsogerldPPUwQ8WIk4oPfGL6YdJQNrPOpXKzXUp9rw0dVsg7G3+UD+p2LuBu\nu42WgAzLDNxBDXKin3s9OIAmdyFo1Jlfpc/n7KKXZYZZETgC5TzKxEYRHy1T\nXcXEkzFMIcm32r6n9Gh8i4SmNxXnv+eaoVkhBxOW49rBGPaDwpL0V9CGN05Y\nLP34UHjTsc7QI3mwbSZrkXYndf7hOaMuEFHX7aNjw1Ftjk0PjbfarYtsmRyc\nKt2hbZ02FqKEaNGqifav5rloBQLMC8D+1JN+g+uTXhpD/bKItHVKNhF3rA5X\nfVBmYjDnWQsXC+s6SxNSZOdqjlw+wYJbTqjolaCkiulAaX9xugUlSQM2pOZe\n5tQnQZZLBVUHmHiz4HpVgu0Wwp/KYKlkAe8WAdmhv55kXAmlXvCC2/MddCMf\ne6bx+F0PZ2lHKX/wwo9jIfwOikDhW1DzXl3rEx4ok+P1q9i9/BgTYP+GvMRR\nswCp0ovKEjyrr6o2Kaf/V8iQmbhbHGZo9z1ejppZBRYX9IiTq84Dj5AJ+bpk\nTqw05lrEZibxW5RBcGioKPHlHqzps9I9Xv/OZq4VFjci8oGEezj42/xLEEch\nKxR3\r\n=eKvC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d026173e9bf7440b69f1e3e7e4c1bd60dc5ce6b5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.c141801d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.c141801d5.0_1587498087576_0.3626337377447575","host":"s3://npm-registry-packages"}},"6.0.0-canary.28d10a96e.0":{"name":"@material/auto-init","version":"6.0.0-canary.28d10a96e.0","license":"MIT","_id":"@material/auto-init@6.0.0-canary.28d10a96e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb7ae8e2578d15c24a8366868c5b42a1e2b7a478","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0-canary.28d10a96e.0.tgz","fileCount":14,"integrity":"sha512-kFAiJkjKRSK14FrpOCGtsVDRZ/2iW7QrEKOCptNn4k2mXCt7KOA91MmlBmQhIvtiVaL7s5XGdijDh2JjU6bs3A==","signatures":[{"sig":"MEQCICeOZySuX/tt0AZxMdE/IJUnDww6ShATzOOrpHI8+k4mAiBlmS710VpoNJK8nGy3OaDjBvu8KR/dKnEUFyVVd07i7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoL/xCRA9TVsSAnZWagAA9f8P/0e0gK3IbM/eGCd0R00+\n0Oo0Q6vcy2YCju7VeUQOe11M5RULMDILKDcFyf5WrTM4/gb6BPGuQCPXmO3n\nvQ1LkFnUgu3JApwkgR0kkZHZ0Lz/DJ+PfX0sLFofXwVld0TG/95P0KpuXhF5\n4TescSxYmnwpnliKMkkAdUumMQ9Rn9oIJmdTWHj4RMU+AGxrhZ8UTW/cRA0z\n8C77qaV8PlvwqFB/Yz4zMCSy4orcaUZq0p2EspOwQuXNYWT7BQ/1k8u6q9ZX\nD85JZZvBXZgK7ParAnBXLX6JgofObm+Hx1iG1eMTOyvkV0TWBuL2F2zc5+lB\nCPE12zrsujaNzFWpcPajvGaR9lGY3eX+750FqLWUeqyQElXbpSYiP5cTHO7w\njMqEujl00Rx/2PDTdp9simL+CoA1kl9SUFA9JTf4POn1u0nSnrgAmjqQVC6x\n/5/FCVvU9+6xVRP6bBu0liVtBQzBNkvlwidfenxML6ySDAm+hpv7m19SsQVe\nBsFIOcfa1+1xIRZwlfAYvGIIJTMPPF3kp6NWAiMB089g7UAJQKEpa4e4uc6A\n6pHLS6odFM99Cz3ridqFL6zzJmUvPKf94O4Z62tsCqIMxYUgM/v6DYCj3mir\nKqb7ZwUycmUDmdTlyx790zcRscsf5Xfy6qLCkdxjJovlfsB8KHFdHaT3xxcL\nb5zU\r\n=oCXU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20feb77e4dc8d7c73f3549e0dfea4b381106b061","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"6.0.0-canary.28d10a96e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0-canary.28d10a96e.0_1587593201079_0.0033773583611766966","host":"s3://npm-registry-packages"}},"7.0.0-canary.8540808be.0":{"name":"@material/auto-init","version":"7.0.0-canary.8540808be.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8540808be.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8aecb4bf714b99b2b13dbfe1210ac2a5f07245e2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8540808be.0.tgz","fileCount":14,"integrity":"sha512-QeHjRBifJg8sS0Qd+ZmryPo2+zysvkqSAxM1t1C1M6Kir13HQCZZYt61w0ur09+P8fa87ZViOA9SxGIqwVIaaw==","signatures":[{"sig":"MEYCIQCCujWJ0UH7TMmSXSCucSdA29OJGMVv6EgB9V7VcWDqDgIhAK36q22h1+vxn6adJKVgRWcTvo1Mi20EQkKPYtxogikN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoc+DCRA9TVsSAnZWagAAXOsQAIGbApizdI7v4VyxIsjO\nVDcxnRnRU/JUTvauUNXy1DDaACANGrPpxDDn94TyNdGvpJHH+5xSMjz96iHv\n/2VYVtMHK1K+ue2JMmkUoP0Rh39gkGF7WBPFevb0oK+NrW5s/7pXYBUqU3vK\ntPxx0v0EKh8BS0V8MifagBneYXNlFCPxLU+pMsS9Dp61M4CNPsGgPMkQvev1\nstBn2kBRjeVFp4ajLOxENg8PFnP2wNcrN+WADEAE3c1oqBIbRPmlPU3Fg5jC\nUVSGfMwpgNbJ3LwnzgmTh74AIRU+EpAPxmACklgRNux5FQxk1HyxHHAG1Ifc\nZnHFu77s/jaMUgQbNbxP169uzns89jINJpMz6I6M3g6rxZsI7JVI4b6Y73Cz\nFGUVK36HmJytox27ulcjZo+z5LmZiwlZ7u1ZTGoUCiaUlER+Zp61M0Dv20Ud\nRH+vja4JADPORoUxt4Ixm0PLI+9NCNK1hiAY935o5FIooSgJR7gqG/VAUZ4f\ndcrErWGiRGc4bArkzv4HaxOp9tBP0NsFxRe7UdUkEiuI/mwhsyuSyp2qoHLj\nIn4eJzL+920TckTArikbwUJOqQRsGyZXzSzrcltckYkT1EUn+PjjEnKTwkCG\nh6NpHNmRt1LPmqH7zGCL09sN9HvZUhWo+RYT6VFSmUkQYBW0bp2O6lWrZ94J\nxGP5\r\n=CNGv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a99320a8e5b4b718dbbcaeee1ec4fc8feb72b592","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8540808be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8540808be.0_1587662722540_0.6157473926959065","host":"s3://npm-registry-packages"}},"6.0.0":{"name":"@material/auto-init","version":"6.0.0","license":"MIT","_id":"@material/auto-init@6.0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"56efc689fe00379741077f9a15c6e376144793a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-6.0.0.tgz","fileCount":13,"integrity":"sha512-6ahOyXRY1nlBoK7oXqsRmPMcPwkQCru7rAl+2e5U9PiwvNkwRLWG9gQVomZnCvrVOKMxOC97jVu6ePZIZkB4Lw==","signatures":[{"sig":"MEQCIH4HD792cAkihJGXbItW+A9D/DQ/Jkwo5qIFo9yJMcHbAiATAyryHYYHQkI/QIjwLgSjjHcZqh1REKqdWpypdrPLfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoc+hCRA9TVsSAnZWagAAJuQP/RG/2LqvApyDVvDy6dV1\nZRpurF5TM5BeQ4VUVr5YVjbHWbJqvCuing/gwux9eTXYN5J8A3DiV9cQY4Xn\nAExN3436kvUbeJIqvs7oDSVxXlBKh3I7BrphgYGUWCMcbmTOOswoqRRjTwov\nPts72t/eSXqA0fVgPhbd6LPuTW8hvQfn5v+Sp22W3FkORXlO5h6k+Vw1Wdfu\nvz5f/TnVEzuExiwXBC1jn4BaFuFa3yMDP21E+DrZd0CQyw/9WuyS63RqTMm+\nlkTs2q8jwTA52xVD/0urr542JdH9jwIt82QfBpneqeJtEKC0fPJY6qjh9sJh\nq3QOgpMj3SvKeo6vsNPX84/NLvHScBO6U503WDqZ5/qPaEQJ7jiCrr6OGX5K\nkZIusP1di65zY9AUzN2aQmsHU1prEvU/4KnTebTntC993ckNvarPOVEVZkxM\nUTAS9ZX1OsZ1lGrnUfDd6P/LOb+9O21xG+/dez0IxmaVe4EjufaAdaIPfmtc\nR9xTikHSLrbzRah2e84PnhC9UnrMWWuSatFIzEp+Drhh0srbnGJc8j8J0rYl\nmGXdwXUpvc2P87zA6j8kjy+qxHO3fyT5Rxk/9it+Wj909NlfcRz1y/P9Xo8n\n41bvsQuoxY+LceR+RE1mQ3tO2UgIMbbA7mQNGToAs5hCKMZHn1FEzZKLwrDl\nnoeT\r\n=7983\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"8540808be4296e60f1c1d3a637413e433ca7efaa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"^6.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_6.0.0_1587662753077_0.7189966278395021","host":"s3://npm-registry-packages"}},"7.0.0-canary.2673adb74.0":{"name":"@material/auto-init","version":"7.0.0-canary.2673adb74.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2673adb74.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6249995490fc883ea6bdfa1ecd1d1b3c2270628b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2673adb74.0.tgz","fileCount":14,"integrity":"sha512-oSDW94qMjgMDj4Oje/07HYH+puAcW1/r0guxulXdoZwt4Ro1oZEVlrnTmXIhLMkhSTH2hU8OSPHBA0BvFEZRSg==","signatures":[{"sig":"MEQCIDWPSu1x/UQvu+LBV+zTsV51oeWv6NfwvZKdLm0RbT27AiAaIPjZ7g0TE3zr9lXc2lGNLYPMNPl0gEWjI3kPU2IZqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeohpyCRA9TVsSAnZWagAAWXoQAJjb0MLoEBnpn4vw6mOx\nrS5gr7RbHuoW5ZdqOkO+pgeXGtlhvWrJaiKHiiTJ9l4xrBi5J/ckSEatsN0N\njqnc0PePyUEDCcwankCvKHs7BQyjUA3UOg7up+Okk5udGE8I25Zu9SRHS9eC\n3nPeaRFSgFqVS+2oVe8Yryqe4D/UFBS6SElNeP+KF25RGstEVJ9nkoYlmWzk\n7i87hLBM5ELuXQ/X3WeEZSviVrRXkQeycN/MZ0QCpTS3eVXPqqXlNRxRnSIr\nuCljLByLaiX7c3juFsl2aAXTFoFtXL6urYWgvXAOPWe5y73v/vP/wll9anNs\nqBMLJmw7EFoAAB3C1NC8TjgHo3Ijd4w8yKLnd4eKtvJW8Up/jkJaikf6TWOE\ncdMn2VBlTwavltwR3H4vjBB/9atgTh6UzRgV5pwVWZR8ZxyYAUF9PIs3qBFl\n5c0iM+RmHahGN/myrWtuFF5TIR6UiS3+4RWviLVqD3AWIchenQyLzCViIpxB\nhg5jLaU6NSLUmoGlXcV2elqBdsnyDBY4i3wmv5PAaBx75/qJnF5Ld6u0yMst\nk4l9kVmoCQITD2G3AmcxqrsGP6Q+wwkfwY5HPz1FHJNXOsRNgvkcnVQeHdts\nfwdIHz5okK+vlXyNSFErkS1KEqhV3YI/fo5xOLUDZojsLEpLTAj3WTEugUEb\nj9CJ\r\n=GDrA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9cedd1d83d1c7d125a3ed38281072b6e50b57e9a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2673adb74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2673adb74.0_1587681906286_0.5503878653905918","host":"s3://npm-registry-packages"}},"7.0.0-canary.b10d0d7f1.0":{"name":"@material/auto-init","version":"7.0.0-canary.b10d0d7f1.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b10d0d7f1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05ae152d3ef195ac983e65d8222e397fe45d0899","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b10d0d7f1.0.tgz","fileCount":14,"integrity":"sha512-MEiW16Y+OoopHHFDudqr6DG2woCHQ7Q1gL8AJMphNJ83LBpe4rhALqg/tvPO1lnlKy5Z4p7Uvi+AW4vZ9E/Jcg==","signatures":[{"sig":"MEQCICB3cTbbTEb3rRcqxcmib+NhWckM1/DpAphOnR14X1d9AiAPIERzkocGf5lTyOWFeLcnvVEBua+Gc0I69nkJn4Ge+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeojDWCRA9TVsSAnZWagAA8+0P/AotmpoNv2KtyCsFWYnp\nkaaRALKbfJCur7rbvaVMfD6wP6EF4yTeX6beb5nThv0n9gS3bMB/3JE+Ts2s\nd9a0hkI/szh8NL0xFLdhdPWz9lGlnZemcZxX1kRpHS66T6mpqAcmWP4LIn0O\nnw5KI2U7S55UnRBNFn1mc6RBhr/4CTirGd9s5pONbP8ErLv7yT3tomtbQGKr\nF3FHN4BrlrJ7uLvwOjeoTfg3uU1iyJQzlPoZd1E7xkMt7Yspm/LkslfAuUx2\ngVNP/oJf1j7MFhYiRz8kSucvITsL78BkcupEQA9ptmaoKp+Tkixu1eg0E3vR\n/+7RcBIPOYovjzf3oKE+z5SVvpQPNtkxjw5mHC0g5vYRxYz7eq7qJZq5yZyZ\nTv/gFLPvblt2tiLcyAQHkcs7r6bqJ2rUUAZTmOoa9E3cpuhrJqbH6M1dGdV8\nyZrK6xHbGs1xgmPoUix6p0QXsazZDA/aVnIbd7tm+Caafuxud9IYFerXua8O\nMyS9G3ht+6dj6WWrjhiJOxzJBLKRt5ydL69mLOahJ90G21LM7uSkDwrBVlFS\nkGuLbiVur75VR9CrvHVH9rn4DV/nWrJ//tcgqmVeVSf+Zw2h6jdI/RTs6y6L\n73qs2P1LTcMX+ybBQKsARZuDRLlAUYaJ0e7NpcKgfO0giQCH8h/gcBMZTkSt\n+r1J\r\n=Dp5i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"83fc566b3c065e01bf601ac65cd6d17b634b7872","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b10d0d7f1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b10d0d7f1.0_1587687638021_0.1962531098835174","host":"s3://npm-registry-packages"}},"7.0.0-canary.3bd8c1bac.0":{"name":"@material/auto-init","version":"7.0.0-canary.3bd8c1bac.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.3bd8c1bac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"36f8966cdfaa6c1543dafc9dd3ca5d76c61cc63d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.3bd8c1bac.0.tgz","fileCount":14,"integrity":"sha512-ChQBcAFPSoYE+m8WqiJImC33ihxExafYwe2f6FpWHJRRuAYhi9GNBCCUz48dIS33PAqx+6Z1Fjaetx46R1XJAw==","signatures":[{"sig":"MEUCIQDBXI1m15pXyfZlXDEI93sgxIFncsQooIAhUGrg3ZJxEAIgWWw5K5Rl4WpuRjDlWQNyb6vx5P8Sv5pDP9eZYPxlMtk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo1SeCRA9TVsSAnZWagAATnEP/2FSgttaeAX5YbI1zZrC\nH9FUN/zPgRLueBGRtC2ObinFRHiPj0mrVewK4N/L109O7fnn8ririAlcTQ6X\nz2CZoh8zA8Vo/TXsGKu0xD5Wc0qewVB8RbDyvMcmXTuQa88oJjFBkLqgwJ3o\nsh3D3D2M0xtCHpPXdOyl9bb4SaY0R38Daqp7M4NPi3ump0DVdcmVAIM2qjY7\n2ps69P/i5lIYTQvr1RRv3ld1uXdMJ3EbTQV2jXc4NkCX1BfgidozTL+Qp1Iu\nYNqrl/3blZkMY1dgZb7hF2yAQj8SS9Od+PcWl2caheGuuouPfbnepsIrmd/5\nNUrBgxZitSYqbIuzLpmWARvmOA169Ex4fmO+A5Z4cpLfc2jRicq+CHvSFNRj\nKaowh/5VfUghJRHic070wsSjRxnLBjjMLLherHNgRQDHM500C17luMOdg7wF\nMVFTPm+VkJinE77EhZGj/B30NQBdGNBwkaZspsLMkcwI6o2ENXuND+fUByVl\n+cuv9Cm8GCH96UgfJ/liEIXktyAmq2f1u+OoHI71FlaUovAZrvyvwABXMXOo\nLq6eNKn0ENvvmfIKD6nnimU82qV/j4Ac2vLTmLYB3tsqheFyp0i3jhk9uo6K\nK0TmqCchDCiWIXlJzapVwU5EuiNqED+z5YbcFexIk3RRWwgS+l96Cru5qFX7\nXrGJ\r\n=jMdO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6f324d1b107431694d9112a3e94b90e82718ccb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.3bd8c1bac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.3bd8c1bac.0_1587762333834_0.08530984309449963","host":"s3://npm-registry-packages"}},"7.0.0-canary.b83c8dc22.0":{"name":"@material/auto-init","version":"7.0.0-canary.b83c8dc22.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b83c8dc22.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"59a0735b98d33ebaa6a87e2ee17f760327405c29","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b83c8dc22.0.tgz","fileCount":14,"integrity":"sha512-5mhStz6/eDRQCYcw/DNAFHwsyC30LW+dHoZi57kklN7cEuw2fCkTs2x4+iie2WZwRfYShpWXRAWIcjAvNkuCnA==","signatures":[{"sig":"MEQCIFFnDMB+Xon3tG0FlRIzxQP4aR+YYg7GYCl1ALvotQFVAiAKeCldHptspqlGnOVmdOwUw0c1cfu5E1scXGWjVTxOcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo1edCRA9TVsSAnZWagAAZ6MP/joOWi3t2/GOp0kYvz3A\nE8/kOykOA86N2KIm5GUMFPMtVLAjV6JG+F+Px1BWjrVz3KRv1ylwlShYJUrp\nbndRUMIooj6NeUEmfZ7TRbo1mKIMttqrGFLy0kjO+/011k36znZljmsJmJXK\nerrJHdee27KJ3kJ3Lniw1B6TDYH7+xbHEeMBQJcdGVvDoRcLCAM+LilFR2oB\nVlafLD89Dg5RH7MqTEzbrbj7mEdJMet1Umorqu+6wFAPbp8Wl3L1WYmpJCFY\ncq9XfpwHFzC4CiMqt0e6EVtuojZGfXU6FWD76h5ASyoOAqM9CfuG0OyjktsT\nryAAGY15LMOIbeAQCrU6qCpZsrs1G5fmdM1CokZLMQk78Kh55KTyrhlddzAF\nXSZiahEvH/e3XeLL8RTpYxcwhui24kBMVmBClP80409PFOVQpYFVvpLjc0yt\nxb7ul6hvFPduGCjFIAO6yYJGq2G8P3HSpt8KDpg1ah3KjKF4QGfqlLtszaVp\nWOHUACOKHlCNM7uBZfVG4e6SLH3hzo6ckdwYX3wpWhcv5K2RUKwH1tore9ao\nqRa4H1B4UHSX8fqtKolqDgxL6hH0At2yVFm+b+b2c0hDPjFNQKu/8rgZc901\n2JeWjxIienREsGTNcdCUXUqA+qCpMeLPWs2NLKB24vZD8B9W6JmprAWv+k9f\nfS5M\r\n=kmly\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92cfe3e927d76c82fa2d8a864bb852b8d19f30e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b83c8dc22.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b83c8dc22.0_1587763101470_0.3623524438600465","host":"s3://npm-registry-packages"}},"7.0.0-canary.1b3dd846d.0":{"name":"@material/auto-init","version":"7.0.0-canary.1b3dd846d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.1b3dd846d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a7d72733d42d1821f3be0fb1b0a963e7c859830d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.1b3dd846d.0.tgz","fileCount":14,"integrity":"sha512-ATaNqdV/38dnUFdms5aUroVEnh6jA2Z1XqgcxFf0H81GOhBZmNXtDSK2KFiiIC7mHWGO7cVQJHFbiVhWGKnt4w==","signatures":[{"sig":"MEYCIQDimdhLFATLJCuvWymn7TB+1XQs+wWdj4nVCjYzMPBs2gIhAPfnnHFvHQIA8QnN78D3EG0GVWBbQsCfjNk9VBWMTpr5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo4exCRA9TVsSAnZWagAA9fIQAJSLoMbcRLAutWB5vEic\nGpLLmopLc/EHhSHpPI0K6YlHmxFUb75YRLfadH/F4jNpp7P07CkSl/2CDuyJ\ntHSAbt7C04RKT92qsbjIafH7a8h+PXzkUDlkwZtIjYA/uFtMDlVdz7Ard05i\nQYO5+gQTy7wDXwRiPWex1z8IRU3iRAi0W1rf7hOGwmEH3gmm/ACgxTs5F8Ro\nMMNI/aqVuTJFm8zxQQDu5ANwotHGIbd2LWdVfwoDeXeOsV7QIrR0ruhpbmxR\novHv8sQH9cDibAVwyD3ry56RCAWJ+3OvHks/ozLLmpasTam0NdFHGIXUtLPB\nVMyfFIpwiV2R1q4Ubpem4cU7Yrf9w+1wk2YxBaSrFSp42aNh1T/DLql/217b\n9o04jQn4imbrs9WDHZP6Sv1lKHlVGVIpl0QCs7U/4Ba8Zf7aRpQfY7FGB/45\n84EL6n6Zw5E5HXtn9LmWQ/0uhAsAEZ+6HVjtvHrVh51ZvhqaDyCpSssz44cB\ncxJHCb+M4IuBk5D15fJYA5vsZ/rwdC4Ts4lcaPeqwwRcIzgbUAtBKKO59ai3\nzY4za5g5ff2KjZgrkBo/lha7k3Yd2wdY8vIxtlMScZhohkLx7MzCUKRYl541\nApGmIhF4AT4GlPmy+f46sJIRweLqb2dDi1mLoQW70FOKY0UsNh3Ypy1/393U\nfwcN\r\n=3dVl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"370fec5aeb98791d923dc357e46611e61cf6eb0e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.1b3dd846d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.1b3dd846d.0_1587775408696_0.5913907281437414","host":"s3://npm-registry-packages"}},"7.0.0-canary.29debfea7.0":{"name":"@material/auto-init","version":"7.0.0-canary.29debfea7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.29debfea7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"521242de08a38c098cee3821afd20bf2324187fc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.29debfea7.0.tgz","fileCount":14,"integrity":"sha512-1tiBTJi7jrdT1r1Up0lLdLIEsXz/9u8z/Jj1HQVhuX88FVYdv4J5GFA3yzONT+zyMm83d+NM8GB5VtneNmytPg==","signatures":[{"sig":"MEQCIESgbnTjsblSJ/l59BTwUK6H+v8wQBTvqKWLgMWR2W5dAiArur6u+tYmw/X3o8fNYWeU7SLXdCWsMoaq5AHScxmrFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeptCmCRA9TVsSAnZWagAAXz0P/RjYuwLbFXYBPicY4oRX\n0GzeRNuK3Xt+bu/YMsSrYSHX2XQH3Jo3M10zKYU2R2hZIDAg0D864LeSWXjn\n9+GalKz2n7biKnkq6LigHp0VWw/aaF9N99VguMj6ZNbjrvPwA8ENItVJalbg\nacaeTw1bm8mURFSidxl+ygXF8NZIn6O4TufwLNIU/ABH6PPaDx9kbW/D9/jn\n2jPnODDeiO/IppRqRTlrW1keuojKggorh38KKhI/PPzeuKiFyK6Fb9qwD0Ta\nukKiDLyOZDz85NYjd5icbvzLROwQO70rOkFHi7h+2cznllOgUhOUfknBJqMK\nMrMpprzDWI7UYJF70wrPX+lShn6M99pkmgHh2HKn4/ndY6IhfJkYPQhuueds\nBpIeyZwFHfNvF7HlIT16TaBGy8ZG105IXxiayUbZBQeLOCXJcxKMwDmeneii\n2I3HiuyTJSW0eefvD6fayW9wzAxSRLSVBqW9F/n4GNngHp3nvUVgRgXuqF56\n9eyRE4HFdpSk6mWyPbandF45N2kMMPIwI6AuD3PXuJ/jDy3cYGa3WcI1Z+ze\ng749Oj49MdkxblewoZ9m1jG4ogCenzhEPGEUIF/JnWKgKDrxyxJjaIIGyuw8\ndSUwXDNMWUHrXG7FhBPmPPbaaU+oDjSv4hnHxjePtYe8DZM50ynM2Ez4vMoT\nm3kc\r\n=TpC5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f121c350e2a52fc59191d5e843358aa3e3926ca2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.29debfea7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.29debfea7.0_1587990694411_0.027510627216887906","host":"s3://npm-registry-packages"}},"7.0.0-canary.28d32f8e0.0":{"name":"@material/auto-init","version":"7.0.0-canary.28d32f8e0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.28d32f8e0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a30c7b72790328bc9f71e445fc1a8ca76e11cbb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.28d32f8e0.0.tgz","fileCount":14,"integrity":"sha512-hMbQXCqAPIFeQrfmWrDQjEU6WdJtuoYxDw4GpVVfAIOsnnFtYVysn4BgKIJEmUyvRfV/29bQT45jGZ+l1BJXiA==","signatures":[{"sig":"MEYCIQDELhE4ISdAvLLeSPTxDmD9zyMSyGmxKc40Zet5+b0M+wIhALCsRfn99o3LGLtsvXcQo0uay477acpbv3fMA1hsUVQF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepubUCRA9TVsSAnZWagAAPMsP/1zaxRXeibiOkKwb1td8\ncJBrHqO7mPFpkaXckc3NdMeHqiQCm+bJiWISKHJqYL6I8tONBFIjlXUtglB6\ns2yhDPzNRs5NEsE2UpzPAfLqyfBL6hxeS91I2aH373K7pB9w6AjwvzdMRSWN\nTjyX1jBJaFdl7JYO0Aph+XvUn+tYFLhUwhBEDXqWdYcAWjnrRkqpX0AQVwyh\neC9TK1jDUOQ9jkVowKSa9PrjfTJDa/YJIoArsCq4ifE+oKRViRW8SWUz1iHF\neJMDe26VDY6OoZV/g+i2HWkt5ZexsfJgpidYyo28EcIekA+G8QwL7AyjzQlS\nQsNBwN4EzSI6fnBEXKT2CoGpWOczhuGmsB1zovowJlVzjbYouoQr+RttQpnH\nUCb0XNu6Cw2rr7G+oY6tX/miwEHFDuctcg0m0wCv9NSkqcvypBsDzQRp7pAG\n1lzBDaoxdcLmjGwTyXwzQNVhdnuXtW+ZAzAM/Ck6s+hUXlbi5O4Y/ah46KB7\ntVTGDPlt5bTtZnIdiok/0Gr2qTdtEvMMXrA6n9HJPhTH1qZcM/n6QBXNkKrE\nUaTREg0gCi1ObLr0MX7KvFvgSVlO44lfgDKDEAst8t7O8oQKu8AuqwTHFL52\nPJCDLtTV+IbwMYpGaTLYrKeBthdV0l8KGOpceLhCToIZEoXYbdxQopzyV2Ai\ngtWL\r\n=BWwp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5e2a5c88bb5127200d9f70d65964a419ffe2b123","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.28d32f8e0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.28d32f8e0.0_1587996368637_0.07446028125452919","host":"s3://npm-registry-packages"}},"7.0.0-canary.af71cfdd6.0":{"name":"@material/auto-init","version":"7.0.0-canary.af71cfdd6.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.af71cfdd6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6560b6287508784f8da06dd148465742cc2cb5ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.af71cfdd6.0.tgz","fileCount":14,"integrity":"sha512-yGGdz8G1D7jc2kVl37PdRb22KufHRoN29cESXbUvruM47JFHSzXrNhBkBsDkNqvk8DpWp3pn4eDN5bD+ITi+rA==","signatures":[{"sig":"MEYCIQDneRdsOiJjlFQzQ8zBUI42dn9odVvVeSOiypPQT15m5wIhAMjgM8oLqRLiyjV6xc7knu5AxRWX6Aq2fCz31iOu+3s9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqLlrCRA9TVsSAnZWagAAYawQAIdQYw0jP6T/Y3ciME8b\nHm1TVS8nEJZhMQ3cPSx9lLysg4MtU6kbGZJOICEv3RZWs1eoRNxzielaMrMz\nSmG8A1mo1hQRuJxgLhTo+50T2oUacpGcpznsRk9cEpQPleDgcuAZcy6Ta+si\nYqrp0FvhtEMGfkdALh23g89T6IHcruSxqj0uN9HveG2gelM6Iwz+i05Pnzph\nrptKVWCYNTkz1R+6dBDQGfv3+rCxBgWb51X7UoBfzK7Nxdc8zzJfcjS0r4Me\n215HIUunFVR+BA3lM275ji6qROxaZb2SXDI9rw+kbAWZ/nugTmTHvYWgCCjD\nlTXbwSLKDaHlQSWCYD8caeIFuSN/bpWQsckcsIZ3arkL5xDNbaflQJyVU7Ic\naBvtnm5GbxSdClArIdD5wI8LqlHsIxE1MaymJhffaW41Iu4NCownqdA646ue\nrEehDTgakMsnajvg7/cw9fWEBYRyB4yyQGaVBW2kPHawg7y+itxptAZZo2M4\nLp6nQEObX7D9wAsM3tmgo0cB2ciYuj3xyJkfQwtIN6C2TPN2lzeNAQ46jiOZ\nvFTz7n+zEIla+gTj3Uce6oCyDeksQK3FlmXDjLTFbRov/IIXDy5yzT8l9JjQ\nvM3jDGat+lOTGAGy9svDVNUmEsI/yJzJ1w1FswELVQI+YSgJUReWZbA+jM6z\n3uKG\r\n=lweg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ab654dfd65440046211cfc73468f20a57d7fb4c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.af71cfdd6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.af71cfdd6.0_1588115819429_0.6495216715309853","host":"s3://npm-registry-packages"}},"7.0.0-canary.99d2fc961.0":{"name":"@material/auto-init","version":"7.0.0-canary.99d2fc961.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.99d2fc961.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"44b058c84a2fb618e6e37a331867de95d093416a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.99d2fc961.0.tgz","fileCount":14,"integrity":"sha512-g0gWkMBd81FMHa6o1577w5t2vQGcnrrAqlI5ZUrv8pOLN6VAUfaJqcCWqQ247GDLi6rRiMF9bFYvpqFAWiNAyg==","signatures":[{"sig":"MEYCIQC6glHXf3BWBmpMxzscdF9YaOtxhqfRN0N18tnN8Sbx8wIhAMZ7w/kZaJGFPZmoX9ZagJ6R6J8+gLjAFL4R8xGrjzYn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqVpFCRA9TVsSAnZWagAAATsQAJtO2kUihGa3fxOLN1OH\nCFzdJRwp1usDaiLszeVQEuSUuJhaCDpwYfmlx+nOIoWEYyb41XZxCx1epYEk\n7Xqom4qUhP4G0HwJYmP2YleEktwZI8XB81DO139DaD6RH2hRX7nY/bH6Cbu1\nYNSJbJbEsjBCNNPUC9TLP7P7CdENLZS6QiMFm2tPHkWeznRgzm9+UxOuaA+2\nMWZINcUeJHVMmEzYKCAlqN3DfoxFC8B+l0eGUq/ZDkBp1oCYN/xF5PiIMB0D\nvW1LxFKRd4vV8E45AVEfuHdpboX0VQJH+4cQqi2KunGS64G2zdDfmlF/9LqP\nRLMbVR0orGBrfXz96osyDTSka9DZcgQivyQ5tlOV5zHbvMXKZwD0/UVQCHxu\nEDhrX+zSOzdqw0hlO4qZaEYdSOOHIVjWvVdlQ3pl9HVofmQA9dNElrT3ZvZx\nnM2v5AHIt650dvIRAVnMzr/97abdVOtrVBzIplDcyoyl8eaEYVoBkoVRfVB6\nodlsqlWzOeqIHg2KGnTTQpfZvAFaoYqkmR4p76MEVWdqBEV9HJMVjC4nTIxe\nsMjojY7/gmECtUK8xRGlpEA47pNmITLm9Z97mUe/2IP/bu0nPQZVyCPVLEL+\ncOrp+WrfrlMi66ufsyeO3bRxbIzzgpL30iTDc2n2xCzqVSTLUOFXDw7HHYun\nufu0\r\n=ZUup\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9b1ef36f20c436f96aa47dc90c983832edc5985c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.99d2fc961.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.99d2fc961.0_1588156996969_0.5973994948936128","host":"s3://npm-registry-packages"}},"7.0.0-canary.0e052b24f.0":{"name":"@material/auto-init","version":"7.0.0-canary.0e052b24f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.0e052b24f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15fd05bd462d536e92bc5f9dd33d51881639a266","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.0e052b24f.0.tgz","fileCount":14,"integrity":"sha512-Ie57Dk2d9DT6vq70Al0qH9EyUGLrkKf7IDgMXuqE1dyZMWbw7F/g3i6V1iQqjdH8EcYNr5vAMV7nPGrBRIpJ6w==","signatures":[{"sig":"MEQCIEi2oN3v+5ErMZWSPBl/WiD+Sr7p3pFComd7KUimiPg7AiBthtgB+S10+/PWFrbfIHEhKvrRblyHcMWewSpMjEhQ/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqinZCRA9TVsSAnZWagAAvIAP/3+P0+m02/KJHBYI32Pg\nxPuJt5wrYOyt/keF5HE/M+mttsTf0pTJUDHs0rDzWU8LoM94avijBPgzdysT\nN5UYX3LZ011YhQE4ZJmmlooUh7Vfqchvn65a1I1Z+D14yKUVCUWG2WKPxHtS\nRa63VyMysYstur5X8oTcVHHyn1m6hNuURZzxyBgH/ratOAbSSEl2AANsBVVo\nxW73Wh8WaP/bVwCQ80OxztVU+5QkhbAD+PDip2HjW/dQcjW/L2njW7kTTgbj\n/f7X4oaDf/czCGEQBEK11QpHlggLfed+6pColfUn/z2TVhOCka56f7m3T3o5\nkDbmBtAy6VT55Uz/MPxeoFPzlJC6HmOjF+IaMVRHFkcLKU7BZFOiO1Z91RR5\n5goEhLjeprPLqlrCVoylCmZcPivU3w4CLS7VhR+c0Eg3Q5ToqO3VXG9CmB1C\nsoXfT8w7yq33vhktNOxVUhHSz2txJwUP1vw8DVt7hGKmzkogY47EuOJbWbYI\nLJ/c023ZLIcVLSP/zP2kaLx2mgjp5OLpjJvJT0ZsCLm3VI+/aULJYFtjZRgQ\nOyJj4iZGykizj865D1Rbg5DtGpst8Wp5zHaT4WpWrFU3FJmimH0x8vek/1eu\nyl+g7y0npma6n83jx8A8NLZMHtXBQp7slQu+f2jvYJFn2en2DQQ1s5E0xHU3\n5RZ5\r\n=/Ojq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"69929564b970323734d16e9588636ff8a645f2ad","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.0e052b24f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.0e052b24f.0_1588210136953_0.4229955003326311","host":"s3://npm-registry-packages"}},"7.0.0-canary.ff4bc632a.0":{"name":"@material/auto-init","version":"7.0.0-canary.ff4bc632a.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ff4bc632a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4a6600bf51febb7c670cb470b928d7f96135d50","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ff4bc632a.0.tgz","fileCount":14,"integrity":"sha512-LnXCI6SbfHYxwDcc0iQ6UsFiqt5JUeATUPavE04jl7KEXqtKjMiPRvc9XDcEVnI9GQlSrmHMdD5dcBodBxyONg==","signatures":[{"sig":"MEUCIBNQadbEAeOYZQnLL2hlqT63sJiwmlcPxTd1I41yT1GdAiEAwbXLZv7cSLayfGCqte/kP249BaSa++kCmLXSubDU1Pw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqoveCRA9TVsSAnZWagAAfPQP/2I6zZTsoPUesZbkWVNq\nYe19WlKgmPlFigQoVnZIjQ2Lap5nX7/ytdstfe3jRzZ2FHQsVXTNL40oezjW\nc87YOox8ZIwW4JHUkHW/gbTUtUuw8jKM1JonJQxPtrW7OK6zPNpnRf6/rL1C\nihe9RlVcgH2nElhWZYUryH22w/8lebghgVbBAgxt9Vh7MIf2O4hPPtncnvDS\ncTTy8JoLr2HtKVOeaOo3mVNpomHYYXofdVg8mF2JdnbWtR8aHlKEc3dU3N7Z\nRz6DBwUzj9tJW9j/ENn6Hh60JwgG3n30t2gETjNNDeqtxfT/DbLH11dG0NYp\npSikNrJ+FjLfqIdmfTZYQBkU4whNljs8s+QAkAvV+NWgpSOBDe5vNsoaiQLA\np3LQt6v4QUFBB7U+UXQB9QY/mwHXKLzBq5NmVVlwsSUx8G3w4SesfsuCTY/i\n3eBal/V+bH/XSva1HOx21wInvl1tBztsstML19K/sx7Uf01jJRwtF2QdInF6\njECsXXNxgXi/OmyLOOKGZajcDBjPN1/uq+1OIFTdRvVLHKLmXpcbYZRseymu\ns/26v7sjA3x5INm97hsRWK0D13i22ZEdHRwttx3Xc+NBjsRG0SlV2Qxb5vTD\n2MzANl7Td2T5TjVXrYnTwCasWpIBz2ziikw/lCC9ZXVcco8CzsaNCo7/OfY0\nwBW4\r\n=IpEX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bf4456b9aa6b24c3dd166ee7bbf96a700054183e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ff4bc632a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ff4bc632a.0_1588235230410_0.960839261466544","host":"s3://npm-registry-packages"}},"7.0.0-canary.b0f83d2fd.0":{"name":"@material/auto-init","version":"7.0.0-canary.b0f83d2fd.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b0f83d2fd.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"361f484138123ef2266532891ca7f5b99f8242c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b0f83d2fd.0.tgz","fileCount":14,"integrity":"sha512-pygp2d7SE5HHcDdSlAxa8rcXGjDXrLNgWSFSywHFu7g1ZdvmRlYNe37xLiiaGgpWxVsUZoh6TSUDSrrqYUxOFA==","signatures":[{"sig":"MEUCIQCdDF1txoidIFgyuV58BF43FDmy3yTlge7rJJDEEiDH/wIgZuv5LD6rlrskVcXmPSHITHqCVPzSXy94sFABg6wcBvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJequFmCRA9TVsSAnZWagAACm0QAKL/yiWdNAyOnu00j0HB\nOLkIawxRuJDPvr1ponnS7FMfem5WpC2hVxbLSLLOZXVm2emCctyUhwE70cnc\n9F7Ie+gcN5Q3AzBm+9DucTCX3quC1pRvdGqj/+xM9iDYDEZO5loY4x22IE7F\nDCN3ZKPiSj3G7PTUd4GpyLP0+jIFGfIgMgC8uFqvdCkTGnQAzW6+naMCc9yP\nwY66u+0Aq0WuKCNdL9/4dKcj1Oo4Xc2dYIv93IiuCAGPihVVKpDiirVNF1S2\nZn4X6srWwEvswEtes6caPjUM3A/SFkqjsBBg33Du+FWb40uiRnXWvE92JO3K\nMvA/wOEFr99SD3HHAbTNj2FSswWxSgSeUIl8iQ4o7BROi+iVyUKHrYeN43QD\ntwwy52CHDdWXcIyBQK87Refar25pHds+qIa5NQibQN7O95UAqYMM+/j5v1Fa\nwIPR/8j8e0lpfy1twaoJpqwZGvwdOCQqpZQ2tnQPn+5g8zgcjAfprqJmH1bT\n1dz/387I+c2xfq8hNEn6K1q8j8nTq6cmp8m3Bv6Y+3ZbCtXoKyN2FkHT8IPv\nSByaw6EwK/W5SIQva5UcaEasQH3DPpmlBeHHjzptiAiAClZNBzSN7p6a4qoT\nQhzv/9V49+cn+U9ME4Asq3xRIMxjf0lqH4GNHcL93Wc+5rUrMMmL+SwOseOx\nEJvD\r\n=rJ50\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a1500073e25d06ecb6fe752169f836de2cc6ba13","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b0f83d2fd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b0f83d2fd.0_1588257126251_0.5171544016079099","host":"s3://npm-registry-packages"}},"7.0.0-canary.e59906a57.0":{"name":"@material/auto-init","version":"7.0.0-canary.e59906a57.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.e59906a57.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8ac216f84262e5fccdf19f589ab49c3ebb0d967","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.e59906a57.0.tgz","fileCount":14,"integrity":"sha512-XwdNa8FX18tvP9gj5uUJhoVEIUIc+L/IJ9uDf+9GE91xmzagfANYjF9NhHue6MYzqyPOzzcYN6R1XwU0boYGaA==","signatures":[{"sig":"MEUCIQD71AAMx4aqH4wTUW0H8AL704VzxdP4KZ4nqQ/Y81u2+wIgSsZkIeCmbqndym9Dys36anuN8xFKR3MY+OqZa6qJ/yw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerEM8CRA9TVsSAnZWagAAN3MP/ir9QeZWKuJKbGFwzhWK\nw+jv/TteAe8pfiklpvRFhgg373962eWHdSuAdjwE0yChipoBtqBVYSANxyGT\nD9O2Z2yFNEfZeCsCHH7AmuiDnwo360QxtBCYp4N28HIkPbxTCjta/6U0vRiH\nDykDFq7EB5LQt8thuBTXvmg2I6Ii05pgAex7pc+AAtcoAUDERxYoLpOqd0K4\nHZzTKFtIHNowLpj2pyb4XtmF6gfJibK+GGzgI7TQrPzrJDnit7yntXcoo3cP\nmjUNK1q2XdYsRqKobXaHGd8X7yuVwWDC+zkjf9AtbUB/FohFBLmY9oDfHLse\nEWATcGHbsy0naaFsRRmZZMfW0MiYhfO9u1AtENdY6kVScBEf6MU4dzJaADZB\n5WZEQHbMhpUTQxWkypM/ShAwxXWx3UyNf/h6VsfazUWkJ4PDsUFdtDilhjvu\nzkgGxrKb+/GayMR8R89fZyiYKKJfLWgKxZdfxeHtoQDy9b17PIjdeAuueEfW\nJpSqwGaFW2k67A2C36C3L3Oh8GUubXUgrLOGN/SseTOX63JZKg7n4MumFYe8\nU9wJa18nXgRdb3BRrpRCO2Wnp1RKwGehwaYew+oSdGR0I+2EEotMyfr4aNcT\nsr+MS8bNNiX9ha1UcvxczgKTIKpQKFtLum8kW0JdO7k70wedweDIm7/nI+DU\ntaLW\r\n=vL3Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fc7a5c94d345c5fcd76d4957427c551ed759a1f2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.e59906a57.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.e59906a57.0_1588347708183_0.24485705549934567","host":"s3://npm-registry-packages"}},"7.0.0-canary.c02712b59.0":{"name":"@material/auto-init","version":"7.0.0-canary.c02712b59.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.c02712b59.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a707ef32acece589eaf6f2acad4d5d120008d8fc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.c02712b59.0.tgz","fileCount":14,"integrity":"sha512-wMgvBhGHECepvUUqv4xlm4Y66siXhMCBocFVDvMD+PoEQZr+WbP9ijUXnuIA695FVs9350hhwhQeETBTQv6Kog==","signatures":[{"sig":"MEUCIQClqTgAxX0rPdL1kLBy/oB946ZM5GVSxb/fxamOX2hcNQIgMrsU44dg0BF3RAGUvNWO15u27GpJTwCIUnXmmszcZtw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerGmNCRA9TVsSAnZWagAA7zwP/jXxT+LXCsvy7FKILxsd\nDEQleKXQfJwN/oL5v7aU1ixtDHdJl4aYUUpSxLQljumsbQnvE4sguxIdLPnZ\nFb9rqrJvApn9Y4f5tcZbhzffaET5OS8m8Tlj5sY+7iNLXkrcsbW7d+CiZGiJ\nWXb/QBbg9L6Wujk7xIj4EpkvnpajDEnKBR08WXEHyKW1qXBsGBxUm+5Bne4l\nJKFgh2OHBsGsNmnQUciQQYXU868jFzWcpJbGFCctuuXetj3tzmCsuPLuIf4M\nR0h+HzC1VC6lGCP409Ws2Au4q3Fq4j5xJF8VW9XpR4I+/FGI5d/GgaOhalGh\nkSavAChAy5oV6zL/JybHYHKIorgy1gAucO3bVjnICVpkAS1ZeBaeloxHMRag\nxZd+30gasDqiQGX4X9OHM8aEDUkhLOWqXsZ0rUcG8gLMJ/QatknwdBS8p/fI\nyY16dAVHpo3W9WDGnootAwtdbhH2pNkIC5d00Xvq6DgQCUCSnZWT8qCFwK6w\nKuZ3U7bimoqp/yMkaOrfuRkDvqXmN8yq7tQr231OChUvmq+5qWjVA05cShVa\nEg4Q46ODh6Dw4R4CnIjobe9F1gyFxfpeKXgloNVvq1y+yMKnsrjxQFfxWLL+\nMWSHEXr+PqC5kGsMTW7yzcklKPiODO4aZ/5fitwJOeRt0KmURQwYvINk7xSa\nOC6L\r\n=4KDF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed5da0cff8ae5197cbaf84af0bc924c207d3998f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.c02712b59.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.c02712b59.0_1588357516701_0.9113771983412451","host":"s3://npm-registry-packages"}},"7.0.0-canary.15d65448e.0":{"name":"@material/auto-init","version":"7.0.0-canary.15d65448e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.15d65448e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9904e3140bd0dd66b96818df458bbcf533c98ffc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.15d65448e.0.tgz","fileCount":14,"integrity":"sha512-COeBAex4TwH2lfaOFfkLUO384PPK3AT22JC9sSguVG2E544NR1jETLVAt8l+5afVjqLrZSE/llgX5JEo1u7Faw==","signatures":[{"sig":"MEUCIHhV2H6toWFSGHTfR2kSh/S4l+1oUBPVa8/qSKwGJ1e8AiEA7sjZvDzVY+7QwVwWfqRv1TAxGCKkhrNOYvWURasyIB8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerHbbCRA9TVsSAnZWagAA96MP/j/oG+wZrB+sq+N2EGI0\n2WYrJ9gYsJOaTRwtLX034x0HTxaYlv5IBodDqrdZDLRsOtovU0FX8CdeQlXn\nz+4xzdARUyGD9UUXKbyMriCtiqaCt2v+UQV2pWDI5rWtpMGNkGh953AH8kWN\nspeqRcJfx5wyqEQY38vfBYk3vA2risyucnWxn963/hf0rh0pSkXnCEqtT/rD\nKoY7bBcJ8NGqbX++prM6pCHG2GghHEPgahByf8uBoClmfxkzcRz8plfgE0nk\nJdsh4wr1LdY9r+lUB+KcpIHQxjsMIPsuyU6wm2m6Qi/XQCNxQbugiV01b2TI\nYUfFHIKit9NRvkSp6PBT4N1Ih6iQpyi1A6EAS4wMkKLK2zttQ8NHm/6wf8cX\nfWd7hXPCUmSFltVLSIRbVlHWcduUDbWWGBp2PRyJ7vz496I10NIpzQ9HJFFT\nouFY1HqY0+SDq6zGO/x+wr9X/sswx4V/h/0RdTSdG1kfTQT6floxj/JenKr5\n5R8xZwMACbRORpO0viPdQ+wdDMA9g7mgDv+V4Vgk6mk9HgRxTC27zR/gB/tr\nvsP2sUQpRyk0/6++ywujc2MCT5oko1BRceFxlNALGa5s8o3jiJLzoPFK+Wzm\nP+QczyyWCFWqVti1RI2UDEQuGnifk72KEsOgWLXAlbCvSj435orFGiVIXhjG\nptjQ\r\n=cFKh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b2e16d6a45e857fdec3838c3c09ee0a1c61d1858","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.15d65448e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.15d65448e.0_1588360923084_0.9606067100232887","host":"s3://npm-registry-packages"}},"7.0.0-canary.142b1549e.0":{"name":"@material/auto-init","version":"7.0.0-canary.142b1549e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.142b1549e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a2a98369da7d8f0ba4775ffc5006c78d0607a671","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.142b1549e.0.tgz","fileCount":14,"integrity":"sha512-BllSrjYpDozGQVSN/7ecySjb5+aemqev1rphUN/W8L+ImCMegL3UVwWKlZw55fz2mOqgugTqI1wG71YZ2sJ8hg==","signatures":[{"sig":"MEUCIBWSoGGPH5NtQhmF+fjW+xqnE8zY9Ce08VP3vgDkSwvVAiEA5rWm2Hr21V3ir8hL2LaZ1hPOnni1zx0DkfWTk0hOnLE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerKQmCRA9TVsSAnZWagAAxm4P/34EJzwczJkVCYURd2yf\n+OObPiCwUZwan1KmNvVXV9GmwH3d7h3QUlk6O3c1iR/hDdKclYaDuIEHXL4E\nYsiB1jNocUdMePkJjnt/mig1cLpK2y1PFiMjQNx5oDNbNLvZ0Xhul4rHsUxu\nCZ5cDqe9cTxj74GHG1Oe4eZsf8hhkvTcUotNqg59MMnwrx1vn5LAnwcF3kQ6\nWrfPeg/Eopycn6mxWvbcc0sr25MPq+9PWigFlGlFokravHbL5moqbZ2sXUia\nDTRVPjM9utv4y8WJrXqy7nhkFOf524wwsBT3vgMqQi/DMyhVK6jpyEFxQzX8\nnzFD/hzM0oALbdflIYo/MX2aDdZajTBf+om1ywbQBAp1IiJZSg77pDps0JGa\nlJFAr275QgKuq2PZKPyYQT8cBOzsupi6FZOy5XcTRAjlPqp11TLB/QJ6VuE0\njmpydXat1lDMl0zYg7CwPfDIaABGyw4BWQ0ISn6rbYKg/zl5GvwM+XjuvYYf\nrQkp6dUCHzUAdcDHJbHepub8RKRx19mM1utSqI7edumiCYOUzTLG8ESsb+vU\ngmuPtjF/Q90gwHFuhB3kHyhKVSf1Tvj13uCBjojqJffMmqu0fJsY2hIUUG10\nKhBtjQ1dUtooNuUqBUY/ib4kAr9OFGuNm7eGLhv6G/zfQKlr9FLycKK5WO3I\nmbW3\r\n=hLr9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c43c6e2e74a4352aad7225952aeb9e7154d35751","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.142b1549e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.142b1549e.0_1588372518334_0.4376052191684212","host":"s3://npm-registry-packages"}},"7.0.0-canary.524b7b812.0":{"name":"@material/auto-init","version":"7.0.0-canary.524b7b812.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.524b7b812.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba8d5098ca79fc2ca25e4103f721774a2ad55831","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.524b7b812.0.tgz","fileCount":14,"integrity":"sha512-wA/0xA12zm1w3CuvVJLn4UVGlTiSiwgr6KbU49LIoKshrLIqKj+ozDLNlUvkBpi1M9MjumXAqGWNyq3EEf+iSw==","signatures":[{"sig":"MEUCIGpR+7qrnXqdPyjw+pge2vGpKD6mEKcY0v5cT2/X++a6AiEArwDIfKZrHIoof4bEU2gThQ6q9Kp6dIfseKjxC1cXX3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJery3JCRA9TVsSAnZWagAAeWAP/25a0fT3J2wzKpu/ZizG\nUHJblqWHVbTZTbe6x84GVN9UQpATCBPIJ7EVZoIsxsSkSm1n6Br4+rwzEz3Y\nD5VJUd8YcMmKcX/9WAipvkbbHwo4FsVGRmcyrOTWRiFO1o6/l9uoFzhd2ugo\nW6uEvl3lVDJCr0tLdvPXYiSyJtfM7KjMuFVVp4x/G4O8plMq3oLsyMYPbJRd\nxPmZUUBb6qmWhhiYhuSknIUr1YtEDsx809juUMs/YS3SEf34c8JFVEIyg9V+\nL2jl+ByQIkrgzs957+8tFftc35EFvrR8L6VNZJ8wL4tsXrUlFkHQv0hYbcI2\ncVwATYfgsSfQDsSftja9vJFom9maIZbXNOEzJBVrPY37jiooRbgDx3xOEQNn\nZ3VsVNDKWcpqhOVVWI0d1qaJ17MBH09PckTh8LmdWTsO2yFJdvS36MIVhALl\nPZHPUMRn363WyJr+MpFmaHY3PDLBjkgOFBjuGZVAIfNL8yctf5XIy14itTfx\nrgY5cRV1yOs/wXhvlirrFh2b7yReoiYpbSbY6VR5vj7ktXUcgQtGuh2sf9Vv\nL4JcX+qvUdCrJvZ6lOesp9bEPVmVt1SPSbR4eXlnrEchrP3aQC6wCFwxdbrr\neyc6W/BYMkdgWxw9akWDbEYsl48Y4rw5B4N9YW7l7XqqvHD6TkraPDUl/HL6\nWNQP\r\n=Pm1B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"82ab8bbdd2373b285c315177e7054a727b38f4a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.524b7b812.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.524b7b812.0_1588538825323_0.9861932405653115","host":"s3://npm-registry-packages"}},"7.0.0-canary.bd8ca9678.0":{"name":"@material/auto-init","version":"7.0.0-canary.bd8ca9678.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.bd8ca9678.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db91269319dc1213a14b4a8ade8e508f7fb27d9e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.bd8ca9678.0.tgz","fileCount":14,"integrity":"sha512-Il9zpc+xNf33rrTcu1/khECU1fITJvzUK5LRldykweWF0k9KnjbA26N1EhojOLx3RS0lWVp2NYFN8ocS8gBPrg==","signatures":[{"sig":"MEUCIQD+pZshTyZ5re1ycGtp1r8YF0TlSmQzEs0ZbxZUTcHtDgIgEkJN3u5bJ++CjmGeVjbsRJ1YLiHZ4Yc2zJjbjtpace0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesE5nCRA9TVsSAnZWagAAHjoP/2X5zPdEcQHP8iGBd7PZ\nWKFKzvhgaU32Hpgngz9KOrpppv4khJAyv1VowqE50IrYBPU8oeu0OctT9/I5\nThQC6puRonpNwFjAEsXesSXfgZUd3U9Ei1gB+PRV4UlQJu55IJRffVazaalm\nJT0syPXo1/6hGT+2dP3M0DTDADmjT36hooi7iZblC06K9oIbD4gQC9UI3CuS\n4zib0BQ9V1/eSjLRFF3DbY0EZ8SfUEy4wu7bt7s8Y23N5eo/Kh5rwpSU4A7Z\nO8Yqer8qEwgaQeKbdBlR3lsFWar6I2NmE/pUT1OoJvyaPqLNgau4MpD+YyrZ\nykhNMzV1TLUg8cb3wjPAgQ9fCnLgzEH4TAXQozu6kOujCHx4WL2fuV9Cri7z\n/0AtVJvuEiQ0DuHIAmK8lUZUh9z9A+Wpza1XQwxTkCPzf57VcVNc5SJ4Knpz\nzp+dVD7XjYvXVDi6Ttk+HOsOYekvjfbYByGwZ5RUjpwS/l2atSijSVYyHcuy\nW2IywmVd3b9e2Jedz7o8PUQFVS9fWGklvInEnHeUpzWXATfHB8MPnI2vSgsX\nc4CEEyrmQZEX85y5fynbn6FWXmYi8DX8Dio73irm88XWxdvsyWP4Lh2N/nvm\nuB+bZ9BiRD62C27hqCXW/ufZPRCATy5Kn7PU/Tyd6KCQ6R5je7QCuHeOQI4m\ngbuj\r\n=W/mr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d21e98ae16f9c893bf27272d187617574615c417","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.bd8ca9678.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.bd8ca9678.0_1588612710590_0.8500084179338612","host":"s3://npm-registry-packages"}},"7.0.0-canary.2553e86fe.0":{"name":"@material/auto-init","version":"7.0.0-canary.2553e86fe.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2553e86fe.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eff0047ccfa2cb8116a8b26ed4279a45e4da92b8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2553e86fe.0.tgz","fileCount":14,"integrity":"sha512-Fbzpwk1P5FoC5r7+E1ltc86NZkzQVw/UVsVLrx9lSYUqEnSn9xFgkxmija27TnFmGyOYZD94AnqC9oJhPXS6bQ==","signatures":[{"sig":"MEQCIHuYgMKBq2bak0qD8MaFT4gLcP1YSQ0AClJ7beG6AVMKAiBSxj8W1VvzEJjzL8o7898yQmnv/hKMqYG7bD4bzbRtBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesFE3CRA9TVsSAnZWagAAu7YQAIgIgenEaw8OyiVbW81u\nnlW0n5fyHkC3du21uK8yMy6jhcHtnMlAZpH1DaDZ8nG0qmkUuVTdF+czcSjW\nEfvSkJIhtX18FxRRehoZUDev/Pmhtq10Q7Sa3ttYg+DcCrVvRvLEDvdhCuv6\nznWnZ1rEevHrZ6giqESavZkUUYNgCGQm8gmWRhnGnolNSzK07wlDrXMPqkmG\nuwracifxeJ2VggGA6ZSzGy7m3l0JegL5J1rdw8QCdjtHER0/I4EH4tKKmwYS\nmzygBOtO+3o4yYAXAoAvxTK+tuc3gvORUJzIdi5/viZ8GWVvUwCTS8nlNLPK\nhGnrAbsLMt13FmxFi2fYrVkSWgPeBNJql0ZYbnI5xhtIlBAax2Zqk3Ku6099\nsa4/NnVn1Uy4QvWqrAbeBJXBhOAtgJaKSFLY87YSNWNhAXCYgt0DRugdiSaN\n6DE6/FH9MzaTjNKa32JF4ykrZRZX8U/ek+a2N7E4loNmsPCwDkZwxTRA93UT\nrlEro+3QMXRniRRpHhEj08cPz2Wt1F1gI1OtH9POZ5qKN4RWcptGTvsWzN8X\nEl7yJCurbjPValFB39yWWyeV9lSlpsJv1MBuslq6hYRgRx2hle0LPY26ojZa\n0mQ/YdcmJMJ+P2HSGea+/ArQtyDvai5zPqRUGWzk2/1QYD0p1+IW16IIdGNM\nAB+I\r\n=dglw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9fa3a214bf3d70eb6522a1f75e622d936e7c0273","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2553e86fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2553e86fe.0_1588613431078_0.3037474326136287","host":"s3://npm-registry-packages"}},"7.0.0-canary.03dec929e.0":{"name":"@material/auto-init","version":"7.0.0-canary.03dec929e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.03dec929e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3834ea7ab12033117e536de34735e5b968515c2e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.03dec929e.0.tgz","fileCount":14,"integrity":"sha512-WUU0CfXxRVrcPJb4+VHKs1OmE8TZ7KjOHlkahQuKJNFTcNXcAu8M4xtXAc6MIbuH/S5FsCkikeODj/Oc6uFrqA==","signatures":[{"sig":"MEQCIEn/+3mYhOoLicEXaJOjznhevdbkR8UFr0TWn4Oop+poAiBUlB75ZU179fYPJvvNHi+IqFjDUEnkcWjPiZvjbEV7xw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesKY0CRA9TVsSAnZWagAANkYQAIjNv7T2BNI6uZaUdBL2\nA1Uvcwf0dUCYxsNsiPE8T0+hMFvtWksocwCGSs6Is0hpBXT2DRT3aBLUA9tG\nnMEq92CteQ4ktaBODmtBIKdMcvHtk60Bqgboe1JX9HEzLKkKDy7r7e/K7ks0\nZvyRnydime++MCt3LNo4PnDz4SBKlFOpSmx66U6E2KjE6m0FtTUIs15JMvzZ\n7qt1XnScu9CrK2UVxJ5EWyJqkxq+ZcYs0VgZk59rMCnKs6pkEZWtmRyyHdCt\ng33tAH/51sbrkjCL2UC2PIB6OxewtZiPmLG4wwTh+O3b5CDAepoDnAXejSLE\nxsRh0zOldl2rxtsGljV8PdPqf3CpLlTWEIgFc2dlNU4Csbb62gqZ8dhdpswl\nL+Dz4N+YwTuu1h5vkmmmClmexDxh3gnP5Mqg7aIDS7ftE2R3itmzBvNHLDL5\nOp16tC5mAqwhmlNYwX0VaTCCTwfy6f7xbtcvxSVQHBporZSGSsY7kNt6Y9Ue\nJBNmgkMnSE2cfoJEnUQ+MByMit7BO7icDXnz6BBdIdQmfSsKQhq0khvmSG2E\nhn9F6sX5PsJihXjMRQwsqhZBIchGeD5xq+oJHj8Hq8+AC0g/MA8tQBO1bmkQ\nnfMoJfltIJGHbBTbjpQVGGKJO7vC0WPhvjeK6pFVCm+W+b9Bt3Op2QOhSM49\ncmED\r\n=Ljq/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"976244ee82fa3e080e074d9aa9a254e6428c90f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.03dec929e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.03dec929e.0_1588635187671_0.37005313623947833","host":"s3://npm-registry-packages"}},"7.0.0-canary.d92d8c93e.0":{"name":"@material/auto-init","version":"7.0.0-canary.d92d8c93e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d92d8c93e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"98773a521cc1c07ca75eda4a980e6750de3cff34","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d92d8c93e.0.tgz","fileCount":14,"integrity":"sha512-SYlA2s/cbGsOhHVPY+6Qc2OpkATLD8smtz7/8kNldlS2lU2MqFUL7D8bUs2oqWGSglNf+Uche4jQ2ybER5IOtg==","signatures":[{"sig":"MEUCIFMHHfnkIlAqOlglp29trz2QKIEiLQK2XvPNO9bUGipAAiEA8FJElBc3UUdped9xYD3nbcBOWTGmLoyXDWTDRXpJdww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesZsuCRA9TVsSAnZWagAAomYP/1jmaChZbWiaLQ8BsWFD\n/k2GznLBRraJ7YtOSrWIQnZSrzenGT7HS5PhGRyiK0qFGObnJporUrmk2xw8\nWNvxSdsqR7ZJWey5nvRm81i254Vuwo7ttWjqF+2zzzXId6GS6T7kUEPYlTJP\nwvAuKw3bo4tBXR0k+L0nz+vr6rd6fPwFHcZZ7zVwKKSEv/02oNQPUj4l6v7q\n7OzmYnmRdRcmBsE+DSxZTR9LAVcDC3qpxjPTrM1PZdYU3DNN4KIt1qnP/yT+\ntlQ0wwMbuxHHLI4x7NCn1esTDlkZ56wweU+IKiUdcRLgh9RJCk2FzS8tPfXc\nJeNi4wzpl5N+lU5aufoEbVX1CiirHbzg1NJ5pv+neS9KWiGfxDp/hvyQhgQC\ndgkRak4Ivq7qAeQkSqntnG1MSEejboJ7R60BZsNLk1xqg7ve22Mb/0BxgSp8\nQlZ1s+FAEXyzeYnYQelgrlI/9mn8BfDEb2ArNulTo4AKgb2Q2mR+QokHl6I1\nZQHRFHpixc54Gs6/vUVNq2cuMwPgYT9cH1YXP1vHp7LaINY3Ezs8kjrq3MNf\nokDkEFb45vpRYpcglkKMCQUJrpEuCQ1RHm7JFSO4rFt2QKLQMOW64bN1yt7P\n4cIKdurVcLYDlTHuWUiOPSFxXxbju7aunvrkcTWAhC16lGkRDO+wlYxzTCGQ\nagJT\r\n=C4j3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0781b5a0f14ce17201271abfff044630d170700d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d92d8c93e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d92d8c93e.0_1588697901630_0.5758107857668404","host":"s3://npm-registry-packages"}},"7.0.0-canary.09f591967.0":{"name":"@material/auto-init","version":"7.0.0-canary.09f591967.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.09f591967.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3fc51353a0af0a8883995f26df7ab00a31675548","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.09f591967.0.tgz","fileCount":14,"integrity":"sha512-XVnml8FBXtoLiWN4aMnxWe/R1gTQVw6ikpHqVjUCAOVrjUoaUEYfLXUtBQxWKFFHG383izGztfpRAIJWlWC0rA==","signatures":[{"sig":"MEQCIBdZy0ey+7FObGy8PMNKMd2Ib7gm7/8S9edTFtZYv2ysAiB852ekCRjeB9V4vqKPjOXk2hvBz8usfJMEIR7waWYlGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesdSsCRA9TVsSAnZWagAAWVYP/RiyoxlG/RjFFluELj0y\nmJDzWDiEYu83WhaaYaI2BGDbBaJ4TsQ5LMGImUcYVvFYNHLySzMPtwgNEQF0\nQYBmzx1VTTBFMXujuC3Mghh+c9/YD5H3tcm92ao7jsmR8O5JZFUOTkGCrTx8\nTwkJU44kxLB95yDANmJpI0moUNTtK2a/fKoMNuqTKX5+J5xrKU3V8oczFNed\najEakjoWwjEUXYtt9Vu+y+hmQcBNT1jwgCG99dFLvBOCHfhpgwjPRe3zhX8e\n0p8zzXKU1z8o1jxGIWmgzY+IPMPBw3MEswu+0Cs/EdxvcKPs7dMxJtslIqUQ\nFXSxoC5PKb+sAI6VBxBd55piHCgQlcoFMSiQog8vnHIrr7VdZS1Jw2sqbSE6\nJzMBbx0AG7VUofmbaxWPKDvCxwrNuONMolW0Lz7iIi40PyRxSC2NI7/0Q7aX\nvAro+ZyFunJH8tubCY5WmwlFqqhDrUuGNTUwhvlCbiz+hT8t+UgRixofTacH\nz4mI566nZD+tSPZtnoSkmAJvg+Yfgv+oJmfoTnuzxiYGdltlGKLAEJ30TxYC\nvpSDmNerUnYN5z38W2o0/xxik6RqrsGXbE9qs3hYRuNkN5Us5E5BjSk83F5r\nNEho6WBWy7VdCYt+CHmkrhd5mFPVx/7bc+pAhnHleiHAt0URcoox6gFHmKSK\neOOe\r\n=6mVJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1c5f494b8c0fe5f6f9710e50d51e2736a01b227","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.09f591967.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.09f591967.0_1588712619897_0.3978845108477931","host":"s3://npm-registry-packages"}},"7.0.0-canary.3846ce311.0":{"name":"@material/auto-init","version":"7.0.0-canary.3846ce311.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.3846ce311.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"14d69a2aec439b953650bcbb38af08cc39bf6e17","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.3846ce311.0.tgz","fileCount":14,"integrity":"sha512-+LbR772jkXJ5UkJsjJLE5Y7Ec3trRL/amIbCkWD6qO5qPvRL3l1l3PfyWmfmvbME8S4exuo28ICBwR1x/Nc6Ow==","signatures":[{"sig":"MEQCIFEEdPT9nttaflifaqsV70dwF9tSD/rNCeIrTXOh4gh0AiATj2QMtXn1Aw55TZAiSE+f3SKBUssmLWypHI9Es1fvNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJessT1CRA9TVsSAnZWagAAcwAP/0BYTxhWzA0er1Gka32D\nHiMGb2BCuTn1I7a/DoFZTwPmzoND9qQD1tPPCSUG2zmktJN1ShnrwZRMWdeu\nSAlxlBCFcb5rJAUBw6lREQtEjQO/NkHCxi7JnMJQIVpBJrlSWy2MlFv6WyZp\nQg+SnVUQdPG+RjNcP+oEUnXfSrAi9A5Vy1EptWWyftOrQWkVWphw1AeQGw+G\ncffexvbKh0JLHEfYel79sF6v8Ef+GbB1KJbq++Q1mEwBthClgxaVURmK6qFg\n0yx4nDk6HTUSPnC+Zwv7YZv1Xyoieh50HRzwPjTF/8uw/F5JE8ErExa9Dczs\nM/QFz3hL4TL0Icl3BhDspkuRW8DFggDDUgJKu3HNvbvcsN1W0QvKTC6QtDwC\nQbzegoxXorJGSpEjYczVgCacExWz6vTRDvTY6IDRT0aD/hMCa7PkJQB2EYEH\n6mANVQUtI6Aou+ZO5DfJsRTCc9plnNrAEztzuDZFCN08ALRyZmcvSuFJ/aj1\nWqDvTvYA3UO43NHnpFdm8uvXjNtdsBP+jsHUJ8kdy7dbm4qHKCyO5Eii3n5B\nbkoJ1l06XJkLHNeix/cuISHQUWNCdL+rPZvV0HYTHq9OwtdoxNsTknZLvaa5\n3wsr2C6FARqsPmfS4jSYPNpbu/Tw70u8oTRuM4zMO8vz5uRfK1JfMgpCilog\nM4f/\r\n=WzbN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"80b3806d13f75bd5b77443c9e504fd6468a5820b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.3846ce311.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.3846ce311.0_1588774132716_0.4987953357523056","host":"s3://npm-registry-packages"}},"7.0.0-canary.ed7f32463.0":{"name":"@material/auto-init","version":"7.0.0-canary.ed7f32463.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ed7f32463.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"362084adccdc62fead8bde6d637ec97d5c77b1a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ed7f32463.0.tgz","fileCount":14,"integrity":"sha512-9OUrWjXPJpbjr/OsNnzZz0KCw3mawbtACe945FcEcFCZFpXOxuoSzzbSfOn/nE2MpQolkVCrU4q8bxqp8On5MA==","signatures":[{"sig":"MEUCIBlyg58AA07aj0rR+Oa5QB06L6g23WO+qRvEBZokHWAAAiEAqVNoZAuLn+/sM690UPoLLH5iqoOhA4beBSy2Sx6KG0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesuCFCRA9TVsSAnZWagAArvAP/0W1aT48ES7Z36QAxkhR\n3BjO9hSP+j1bh81Jie8z2b4qyGixZJ4mZWbs1/oluDsnC5DwQ5Ohw/W6EONa\nj/N5PUPpKrvO0e0o0zJ6iFFIv6qF6TyI72ddXAEZH7bfgzN180gaKYBqfXVf\ng5JpybhUbQcLg1h4OR0VwxRISSwJ4sJMSCwlYKpAYqopaE7EJGtVFX1PxhT4\n5AFwBLUCVUCw1svklV9wsd1SYGvHSwRNIUqJVX50FUCMjrtelK6zA1ii69yD\n8lCMqsxKq2GvV8U+H2c5IJbDklxVfA4mEk8J8uNPdiPJ8sufwPY/Al4OgiOm\nT6h3cv1xfXaaQTRplMnGrPSk8SK3EOGoX4O0eGYQ+PVqxl5p1HYv9SgJuKzp\nvHnSarRgS9X7F/ZnHXx5NxtB49NL4SWV/WHnXh/rzO1kw7k+Zxy95gWEsI4a\nc3jS1oT1dEByRxtDUHFqmbBo4VqfDol2GBRG+N5Dpq4pvou4G19oxl+zsLV6\ns7pwvEZwgNVagiLtaAVKvevqwzeHCDiG1KuQYLAu44GydLksdxtTOWW5cJKU\nyyece8v/9HV4QO1GWVuspaer2rTcH2aDTV5hyBVlrWsH37MsvwSuYYCtZCzJ\nK9fon1bc2xbp864Is57uL+jQ9MCrNK1e9LZhkeU4ItzbN+N5e9AJUD2yFZyp\n4FcO\r\n=BXnt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"84dc461d7b4d6f61ef286fa2ade4f3d05018af62","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ed7f32463.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ed7f32463.0_1588781188767_0.36892066378148525","host":"s3://npm-registry-packages"}},"7.0.0-canary.8135cc085.0":{"name":"@material/auto-init","version":"7.0.0-canary.8135cc085.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8135cc085.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d9101677d252267368cce3be778a2e52c3fe2531","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8135cc085.0.tgz","fileCount":14,"integrity":"sha512-agvTDuut0A9HsdrlxXQfAO7B79BJHgAAgJ+OfrxYjA6WqNTaok/6j+9gcugSYirP3vfth4pgHtozPTvlTjF9Sg==","signatures":[{"sig":"MEYCIQCrCtMnUULxWaOVS3FyJ4bQhBmwPPahs/0nB30p9S4QLgIhAP3Ws/BtcsWEH546RL3th695w9HUA0ArzlSAaVppIzR1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesxX7CRA9TVsSAnZWagAALqgQAIQ53/8TzCMoxvZLksqZ\n54z7WxiT5+ODIPnsFSYsTlQR95n1UDbJGkzXRBLbl/maZbHQzAz3//mvXFgh\nKqXIlkv7JJb6K4NTiTMYqdqpN2kVfbN8Oa7rQO47JJbNSy+r1xpujxCpSC5t\nY6hWQoluXKNbi3yIth+tRmW4okTBaJvrsZyegZR+6uerfLt4wbEylGGFnsUg\nc+iHtVFjMkTPYanFZE0PWrA+7n94byXqkQfO7amnXI199BlgQgf3QbnSmwuM\ndEXoxBA/uOVwwgW0n8PBOXcbCKobQfJTlLFnIc3/0CFOycjZuOGVEeNW36xF\nRcwFtxF6BB0vhjO0YqGu6trCmWRd3xY0UJIiJuqG98t6/ymIiDXaRcwSBQby\nC/BDMXTqxTs4svwvWOln8QVTZVWL/uwWr+5XStHAAlTEFO7/xI/ZDu7J2il+\nd8HklTorHQ/W/xBjMMsDC5HHdZCt+FidIZvY+XMK4AbdxjsrIf8Q6fQiqHR1\nPgwZlsE5QzzUZ2O5/V6wrxbEQJe95TxO7LOMb1aUYsmouhQ3URZsQ0+VI32Q\n47aB2ueDzOSU6LE+OKp9z2cTM08YViue/vPc5ATad9TiMOagcQaRqxiGbVNd\nhg4VS4xMiQOQWSHqG/A64oGIFDyAO8gJ2KLo6XpOMhPAwmx6niYyeBFEPtMJ\n1iaZ\r\n=a5aN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"56422959574aba25d1461d4e7ebd168437ebf9a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8135cc085.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8135cc085.0_1588794875218_0.6450250083019555","host":"s3://npm-registry-packages"}},"7.0.0-canary.deb212de4.0":{"name":"@material/auto-init","version":"7.0.0-canary.deb212de4.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.deb212de4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2a1f165e985df08149b58ad0dfa9990f0c95491b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.deb212de4.0.tgz","fileCount":14,"integrity":"sha512-nx/SfskcRbfRmLafyk0KaCukyU7df6PltSKbqDH5Zk0lKBend7Dsjb+TUjsxOki3LqvawMuXgMoV8v0rXw24dA==","signatures":[{"sig":"MEYCIQCYIOEyxQOYx5tRZW+4CTBtII53PXh6JPrFb/Y1ICk/XgIhAMfXZcSk3j6nYnhZJVvaP5AQwmAjKaxYMHmjFX+h5WWV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeszeiCRA9TVsSAnZWagAAZ4QP/A/w0FaWmiGSdzC+WuYz\nIKf1JOH4sY9/W9UhbdGH87qddh8EOrVg8rypzAqbAg0cKgwEGtZ2CC7R1rS4\nmNAUtmDQh00tJHyrBgo0hnuCJmLW3JEISDfyKAFDVQoLXlKntlSIs9MypdYA\nIQcV712zc1QENhngyEGW+dswAnwUS56leEWIew83c3ubCKb/BUZLFk5ecaCc\nWVLWBPaV/9rowMvphuAjEervzpDX7r7x3q2xBQENc4R5i5tfhCqZKIxreHvM\nWL38gPy4SaEYhdi9Gp7w90S0FaXD6RqeIHGJ9l7I2sGsEoOnMDkzWnzwXB8T\nXXl8404J0rGLE03u2IFkJSfqcDCb6fDLHowZO8PU+f9hGaceTHBZ1OklMAFJ\neTy8vrzeDMdVr+MRZuIxQtyvb2agnttrWN6Fg5ADsRkf0ZoPcisDWX+iII1R\nROK7RjKle6m0N0G6o9D/x4SJM8eliQDJxVf4c0h5nJLj4B1Ah9p8oaeqjg+g\nkw0onqiQ8fyJAP+PlumNv9rNGXua6rsjjwbL2CGfUtPiGcUaIlO0LEYY4kgf\nL9jVO/PqOshYnUQro6opu/zSWyjpWpyXU9L7Dph6suUweDdlWlWlyaa1I9nF\nsUVdrQuAumoHR1EDbpuVh4MZdJMI1J5knfPF1dcPdpv5my2LLuue1U62i1Og\n6zhA\r\n=eLJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fe9c146f82589e5f1c471dbb4986ed6b3a7caf54","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.deb212de4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.deb212de4.0_1588803490202_0.45194579395359047","host":"s3://npm-registry-packages"}},"7.0.0-canary.f83e00898.0":{"name":"@material/auto-init","version":"7.0.0-canary.f83e00898.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.f83e00898.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3438c76042131ba9df5d5c5d574cfb438605c859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.f83e00898.0.tgz","fileCount":14,"integrity":"sha512-0eHt7QIF4VjNj9tWQAapkaNn8ONyOY9sl2qMy9o+6mSdkwJaE8NGNHglI+UJtbFlV91qpt2/WtlhsCWfbhTAKA==","signatures":[{"sig":"MEYCIQDilS6dfD4KAdcMbgeFw4+twX2lzHclB8xNC6gZhYdteAIhAKaLz2tUuKfTOqjJTegycKGJVaxV7Uei0nikrtQGlhZB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetDv5CRA9TVsSAnZWagAARFcP/izu1cefJNCDvdUA3S/C\nmvl4I0Q++x5UDs8mJ0hAlcpjZvT5NJgDgIevQgmydCVADlTawwZ4cWwGcTMp\nhSr01dZtOzl/Gyrke+/1fXxZU9KWF4C3Ty3n/ZJQcOzieUKp74Bugyl3yVrF\n2Z4Crad8xiA+CUBe0lPol7KVeDZi3gTBh3KuMrLOZc104luMzGOCqijep2Oc\nWB5JKTz7ybshATI2OPRbuCnv64ppyER4HB61ksONWhievM+qNcDQop0R4+i1\n0VPNnXfGYTsJk3aDM1/ICIFvKoxfkSKR0tRRPfJVMoXdgerDibLMvJnPQtnH\nnu+8LtuiV9itbN7B22RVztZJeFLTEcOV+AV2VVB1TQMrsYvMfkQ1w7ZoD/Hw\n06q0S+P86hkvmreJkpjHRPiqsJkRkpgPdkGOJIMXHLZC90upv31yhML6tEb2\nARZDUGzO9j2wPkHcvmCW7P37Vi6cp7prtnkfNB82A26eYw3ostgLjPmKyvzw\nAhnoTAYIUIooKWez7R1alrZQmgRelNIL5VUauqmMRuc4VzI0NHo7KKGS+G1v\n7IV6sh9Vw7MOusn/J7jDqfvFX092+Fu4/J9KbZelbOGXS40TpMdwCWMXXmkc\naMIs4dO7+LF+WerUupajS6WO4G+IUi4vK12b210aCDwb8wYbb7hgUPPVHueq\nYkum\r\n=LJ3Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"02060afc2f5dcb762e9083970f865f1c714a38f3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.f83e00898.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.f83e00898.0_1588870136757_0.827245125821763","host":"s3://npm-registry-packages"}},"7.0.0-canary.047e6b337.0":{"name":"@material/auto-init","version":"7.0.0-canary.047e6b337.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.047e6b337.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a59099106119861dee3b7912410dcbb0a6bfcb11","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.047e6b337.0.tgz","fileCount":14,"integrity":"sha512-qSTosQUKqeuZikNO7XGIgEooJlCjianP7tVvdIUP3NFvBtGuhi/nhNRS0678x4QoXY2SOxQhgTNpFOiJ6w4wKA==","signatures":[{"sig":"MEYCIQD0FyUY9Erd37jDb7JkgMNsBKtzDmE7Z7VRghofUg+wCQIhAISXLdt54WhLM29tUcHhmfJl9DBEA2CWUZW5upJDITKv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetacBCRA9TVsSAnZWagAAFxkP/jwc4//SSuJbKymmcImo\nMmm1Mq6k5/5fDsVGARy61sEABqBNHSVwcFS/fmy15RWr5b7kuh7yD9+giXVT\nd74upN5SfiEeHHXv4w91gfa5VTky7rTdQ3gumuFkjUATsS8kMBqoSngxOhkT\n/SrRn3pI/utjLEG56MImDO0CVObD9c694ABcSxGhE4/fFJ1hI433SP5M3AsL\nShZPCn+5rvJyN3op7HB1onzjCh7xpvK59cmuWuvy3zExqEw5E8NcfFCHB5kU\nLQZ7k67xjTzgOFaT0k8mewykUBdYj+59S/FFIP4FWeAmp2yVtDctmD4jX7bB\nWv/QZ7fAuNs/xjOPZvPOuVRqmyT4IYgTws5C9z5uqf7ADOZHF0klqzJCOcnL\n4pQV9HzgmdFGgykWROZSvN2ps/vYOlEVjmGiaFB9Yrv/BvyBz8H+p5CRUu72\n4X++iewUeak9DYVsN3AZ/59z35TTrUF10i2dHwRfzzLowZMaB1HluFq7Bu6c\nFhb8xPJmnlZk0WuTqVt0Zm0YkjbZdADmbdXJN7wKFAwlAnXhBbejLIhtA5Ak\n0opFyiUwxGznslluv8RTSeWfzCmVDX84iQnQgRiFeGwbcB9FoEDHVXuoiv0f\no/fW4f8pZV2U+PJVXARwOfxmvE9TDSCRPYoshjdac8QEx4NYWphVlmu+tH6j\nm+BR\r\n=AwjU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2be3b5993e14d0bddf55fdb157837e5593ca217a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.047e6b337.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.047e6b337.0_1588963072651_0.5012457208659329","host":"s3://npm-registry-packages"}},"7.0.0-canary.119e21426.0":{"name":"@material/auto-init","version":"7.0.0-canary.119e21426.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.119e21426.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"58d459fac6371b9f29b79ed755cef05e74d2622a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.119e21426.0.tgz","fileCount":14,"integrity":"sha512-R8ywbW+vmoe644afFcMHxHF5dEm/j8tX+ex4SzYl/a+rJD88uRfkU2b7tgYcdgOXdlCNnCjGu7bm4j3xw+Y6fQ==","signatures":[{"sig":"MEUCIHdSxImF6Kb66WGQ8Dp6mkiIDQDr1bGR4uYxhlDsJD5sAiEAxQU7I+aRwyiQiqhA1EwF2udRS46MD1kINK6MX/NGU6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetb9dCRA9TVsSAnZWagAAa5YP/ilEjqgaQCalAJMxYQee\nmeWlELfb8m56q+DwC8BB1XIfyLHxyKpq9XFi4e0qKLU4nIM2Hj80AbwGV2vv\nFzQ7iiltfIm+5l+1v9ob524L8RaH9jLqtjFYet9q9fnsSKbg3UVY7LYBjM+o\nJj/bjxRN8fxAGl35MNB67Zmggc5gnWV2vLGObm5kk6Sg9Uf0+DBYcoubW89P\nYf8oZOU+VMhfBFB5Evb5KV6IKsKIdTdiqyHL8g18hNvauC+97GggWz3v5rrc\neyOcwL9E1KW22WMKoh2Zn/vFRLt74rUEvQLGN13G8zbFujKARCw9hq/xuaRI\nC1DdbMr5MuiVLgQNee4gtKPy6MTsKRsNIAvqQDDVPW8XVdifFKsQNryKEAV1\nfmQee79rm471bPm2to+PoRGj5JHUK4XGgqLFuMFiBl4QV0irMr9jyfxt+Sa7\nnQ0z2BIHD3nKspRxbULHjOkBwJdZ/MxJDx7R4e1ME3YOJvbWSw+h6JRKBwT2\nAgU3k6QZwSsZ3k5WjvG0eu5fQsvXRcHM4iF9Hwl5QjRpYEgzJgi7i4DxaDjB\n4dE+pSBvxAgUz/BhnQAT5RjjB43DxaYvk9sySS9teS9Lw2XhrvQDK6xYPpTx\ne2kVVZqOAaW8En16R05rDfXUQ/oNrkGCcZEG2DSI+yRbetWfu45g1n//RcX3\n3xrb\r\n=SYCK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"693ba4159b1a25af6955ffb1ce0555d7a989aba9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.119e21426.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.119e21426.0_1588969309438_0.22647243640959003","host":"s3://npm-registry-packages"}},"7.0.0-canary.2f052d824.0":{"name":"@material/auto-init","version":"7.0.0-canary.2f052d824.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2f052d824.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"94247d48919b7d8b925349fe9e1563f8a1693a75","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2f052d824.0.tgz","fileCount":14,"integrity":"sha512-5/MgKsAl6DCRmZG+RvU/FOGQRdIl1qlJj2Z/SBqH1J0HhuiT14zuT7UpclTmxI4X4KTF8ayMU9Yhcl8MuGPSrQ==","signatures":[{"sig":"MEQCIHpCsT6c6mpKpZdInJ4Vxtep77WV9t/UjfinybDQn4p8AiAVkZoyv3U7LMsb7/acyzPkOGDNXUMuq7D9Gi0tG/fgMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetcneCRA9TVsSAnZWagAA4TEP/A2s5+wFSxU5E3gFZg+o\noJztwQIEM/YbEgMygPAIErbMhZ2wiOGPLBlVt9td9BxY2Axqj2cOU4gvswWL\nXPVfwmxM3/saXEThlX2eL05QrSZ+x4R5frYD3GH5IWZlZNBGNjSQWXMTpyOv\nzYAv3fWKfwDQjChZJEqNZU5PdoSIdL5KEkb9tfNJ3WOb0jTIO+qB4UVsPV0N\n0g3iWwfGNClt9u18qyMRZgCbrVzzQSsWoZxRCEiW8H+r/rooVqm1BmbQZfUt\n2BdNE4q5f981N3Gl/pUck3pHuxYsdd5W1Sa7tgIX0mhxsBXLIFz5LkfOFxyS\no1onUTM+g2vqMru9ATgvZYfNppIM8UaywE36uHrwoJNtF50eHTsw9a8fVxf2\np4LH+IHs/wRoy7KIUaP3sOkq01SKhUru8HyKWGHgAI96+IpPbCNvm955xS96\nRHp7GfQcKMDCrrTdyBQVZwW29T3g8lHu7PsEbsuGziSkkX50lm4wvum3Q1t8\na+sG+Ggvf3kX421mKv6amVxsKI9ulD0EsepeuCCRli1AYm+h3hECmSo0cq75\nut4O1ji3EPHie+51psEJ9/O2H5+2njk54hoqEkLRa3qTe+9894u+TotUo991\nHyINlJtBfJCJ2umdtJ5wadn5I9ikA4gT0Kr0tytlYqOTQazxz99+KXoCh8T5\nS48A\r\n=X8bp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e3bfb78e98db35607ba75f333490d9693f14e844","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2f052d824.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2f052d824.0_1588971997665_0.8804957040323553","host":"s3://npm-registry-packages"}},"7.0.0-canary.e84444387.0":{"name":"@material/auto-init","version":"7.0.0-canary.e84444387.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.e84444387.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b9b640d97fbcd13eea8d08f59948f150469e41a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.e84444387.0.tgz","fileCount":14,"integrity":"sha512-bSb080MRwhrHIq4vvFq4iLMJXvNxSFKId+nqpSjU3h9iaDP/qB5BsRaFgids/ST4vOZSB6z9m7hkF6k+WC/ySw==","signatures":[{"sig":"MEYCIQDGclD+01U6NkLEq437YyEb8nbdA+zLKdNefT99VmoQbQIhAJBgMFmsozgSO2d2UdEbR+ELmBxMGTUGsR7KAFT+iDVO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetc+VCRA9TVsSAnZWagAAtsgP/Ri2ROO1dawRP+BtBuh0\nbUHoPf0fboAPVGjrNb6IItutbQURBK4VfO+KpqQGcNHIsBX9H8HdkPqyBfvV\n0ucXglyD72ZbEeeNHzqW27KLglhECYEi4Fgr3Q9og0oCLN7+Qt5fywdT87ck\nJONZiJ1CL+jE03O/rPSgmGmzKjete7Ioooe7T3k1y9qxH+dOMnf/B0AShXeE\nqXzYvUjJJS5tc9N6lp10Qa3OHu68ia9eg0sv/aOENdLKTKNn4i8+6BMRioeT\nBhWBIN/yMguTS3jMWTW5ZU2tRyDtniwBxEFHz3rfxwtqGBduynPGQibM1U6F\nHq2hHnqozHWkyj4KNUknr53kxV9TSv2hABpVKFYsDh+syyw4KHNdHoJ02NYm\nvxOx+Qia8cLHiAl+0sDM6AhdZ920BYQq1TR+MdrZPXDEvjVjOxdYA04BEp6S\n/qfaC2im6jmQWQfnqdm2u5oo+kUdAESe8rT1h/rqxOxyb9Eoj9bFl+sm5juB\ndqcIL+M7QTiGwoALj2tI5d3os6xHJR7gduNHrg+v8iNbuWooueJco53vdDwm\n/BAPkpfRmOMGl/lHmjdMhOaQjOnCT98Huk5/TWk796zNRUuTJLtsH5G9o6YP\nAHP1usr0EsT/xqV4bSAJlS6wwsv+vdXUOO7J0Y/sP/NmpdjRxqMXtYCXHy36\nFrT6\r\n=GnYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35f59683bcff8d7b2e79ea4f582488d0d86b0b97","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.e84444387.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.e84444387.0_1588973460648_0.6241213567131958","host":"s3://npm-registry-packages"}},"7.0.0-canary.893eb1876.0":{"name":"@material/auto-init","version":"7.0.0-canary.893eb1876.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.893eb1876.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d6f26c26744b81e48c715b9023a937b996c0b8e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.893eb1876.0.tgz","fileCount":14,"integrity":"sha512-tF7s6KAA7ABh16VodIljCILJ86Has4iuG8zZMVB0ndqt99zkCwkmcRw3RlMZPsvsgO4stMeo1oTvwXsJ4pujSw==","signatures":[{"sig":"MEYCIQDFTq+YcDlMx3uQ0TeUgGCSt4eC0II8Yudb0WvKR96MswIhAJi7bnJVG8GH43ylpCmzI7t+lFp6iPM2Lb9MqCtbnW4Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuV1JCRA9TVsSAnZWagAAhgUP/0qSO3C5egwqgeV+OxgN\nq9mO4VujU/4cJyv6TTuyCJueBYBPGiQwbSDHB2vRU7G05NqGRgUb1qzeg1Op\nwnC//DIsVLUKGlT6UHPS1f1jb+EQpE+howXWNx3m3VzghHSqV1EYM2zfs0YR\n4CgK82HdThb5yERG9ECRY+rlcH8N4rhxzALwIOUt83rggBkT02BHF7C5QE8k\nQTL5D7ZZuzUZaKzDV4UXPvgkg+GWES33JHkdO2zfohKwCFuvA3ZLPTECVwHi\ndW0s8tWLQJpJgUDwsNM3bfiZmVIcx4Y34rnbD3fkL1FQDNFc1AiRRWJFT42T\nNP5TDhzj+knQaUj81o89sUzdOE4wphM/FbiFOkHrQT9+W41tWk3NVcTxBwrV\nSL4TDXZG2irKxs+EJNR7ppaRKplJZcMkg8XhNZI0wfD1H7JP1KMWokf9KoUD\nnSHt7ebxe3jm9UPYoMoFjq7ULVMtYQvQFcVxZGDA2fH2FM7TNWOJmbN2BXL1\nowJKEBises/03wcC5au5LRIEY3c0aNbR+YGVzgYuWR5mGJFs6gYXQO1GeD3E\n0RgR311+9KPcrGn4y71Xkon/NYzYa0N/+VXu9yyh1PScWFYeoutNYiB5ijKc\niuKuLI1o0A2cJSdGjOcKJzCA8/g6HUCXMSC6y2qrPsw7NwdNOgFMEndplvr5\niSmq\r\n=5Dz7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4bf9fb733753ef4cba5683a95a2f2a71a743a68e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.893eb1876.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.893eb1876.0_1589206345067_0.7798359190361792","host":"s3://npm-registry-packages"}},"7.0.0-canary.a5aeb3001.0":{"name":"@material/auto-init","version":"7.0.0-canary.a5aeb3001.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a5aeb3001.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4552d0ed639e3fb8b1584f47109cb2c35a33231d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a5aeb3001.0.tgz","fileCount":14,"integrity":"sha512-7RSa5I1HvYOajjO0S8Md1iiDYw5ycFgyRlokkFBUlL2BEw+nowZNU6V9bYJDBpxP7UXyneNdehbV4GT5ysapSQ==","signatures":[{"sig":"MEUCIQCS3R7Wenz7JSH+KMrzSDpvBhl1o+WG/f2pribf0/VfTgIgJfN61hEAqzJxWnITMV6slDb9vK3J+KQb3+NtwWSwsz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuWEACRA9TVsSAnZWagAAHcQP+QFm1WBLSNc0vKHVw1kB\nAx90NIa+JOOMhSvAL/Pl3HKRgdPPl6k8dpbxTEENSh7XKtJd5cOKLscX1HoS\ne/0MpnVeXtVL5Rv0KcmEMF5xCHCSCglmWJQCHlxAOxPGZUhETClNgSosKI6t\nSf4Xroag6OpV61h2Mlxl7S4jqirLXxEsgHNUH0c06J/98+GBWuVV54ZyJGR5\nMKz5Afos6K0ZsQK+Giu8umm9T/evnhI6ZeFahDYGC0qnSJ96IVhnjCGJI29n\ns7oIh5/jx/dLsLx7/r4w0J8oDhqih007W+lRpM6XYcvZuXMi/G5Mwqv/I4hS\naR/3vxLaP4GVRd10k6ChG9MFB69bodzQie2C1mDcPJyUn7yxv0fhdtbO4s9H\n6eX5yuS13BXdmy4JRJ7S9aCHVixzSicM892B72FH5aLA+ouO8xO5dVzltxFS\n5JdDj5Cuu/QJ9J1kd5auGWxQYELKm7qzoGuU6gZAnSsSISyaKqPyY8ijoB/2\nfgmAjc+hSuNAhGPNPd0h6X0KT/WMy6v8/9dLUhDX6M9MZsnwnBWeVgzsAZHQ\nUfUry1fULolSAwI3B0tpgb0kaVfL31MeZrN/wELes6VcV6r2Zteu6b63I//9\nu+ZzgMU7AqvbGlXDiWAfrTXhs1mrpyBevKMm2nsbTJH9Ltyrklh2+KaxPHqB\nRGBV\r\n=xBo+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"01ce640dffe32b7838dec108ffb4d0c40d3e7bc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a5aeb3001.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a5aeb3001.0_1589207295929_0.57906067807422","host":"s3://npm-registry-packages"}},"7.0.0-canary.610c68d97.0":{"name":"@material/auto-init","version":"7.0.0-canary.610c68d97.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.610c68d97.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4efadfd8a20e7de85b77fddb47c38ffc0519c60c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.610c68d97.0.tgz","fileCount":14,"integrity":"sha512-fOUPDMFlP5XD7/0K79+243mmELaXJlP0KZlxsZ1ZGyF/5bdq97clMj3qAZWCmn3JOVLjrbPkYfblcGm3GlF9sA==","signatures":[{"sig":"MEUCIQDQ35akngfSVz8M0sQjl7vMCGfHzTAeKFv0b3y4e/LzZQIgTIrH0+g/L4K2/Poc4zMarANJliRgR5koG+F9BDx/71c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuagmCRA9TVsSAnZWagAARL8P/2j9oZOfYeiwrkQpSrhL\nu+U2bR41+IBTspyBbVeIAgs7jMVEcqRt2hjZRAWedkRDiXWde6rX54d1r4KJ\nH1qxJwQQr7RHouXg1wJPtvG5ZQMRAgWu4+kfck5kSVQhyVHe0bHdlcnoI5GN\nqjgSNGPffLmbIciCbqbaEFWX8VnpI/x2b8q/yqojnXZOOPWnaYJzUTd+dmeb\nwvOSJwZowg6bNjN60dPWD9r87qoUWvk4TaT0/gc7ZqKzR9X3xOmJYX8d4qlq\nEc54qOQPNkRWNqGAOqqeQ+4H0gn6lTFbDgF10Lh80y83dMBLdVS7QUcfIaYa\nvGEuYZTjCs4kwSflJUIp7CJHqvzwl/MdFs39xMeCzI0SvuwvpIR2G1u0LmCm\nlwOjKkQTFSvY8CJNNwxRpRpROE92BMlhrPFW+0ZZz4qHPqHsiYYAf7Z7Knt5\nX6OtxQ2iJOVGMzDPl1dXq+MmOkdg9cO9fWseFFxLvcTwpOpIzEO7pDhDBPy3\n1Sbkx8NOz903vJxHwYBDsx433QaYBNFd2FHhFaVxoI2ZLzAqgCsl/c+O8ejy\n60/Dq+/DnNkDJ+URCJoMYYs+QR5q33HHer3AsLwTVqQsxqHsn4Cg5VkwkaHx\naikErYYBo45yrkAMgPif2W0hZ0ES0ll8VywFNzRgFv9jYByQxpy+TfmOHP6c\nRwgQ\r\n=WZ4b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ac4b0339093446110cc551732ef34ba30b4f4a49","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.610c68d97.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.610c68d97.0_1589225509691_0.5855742699161877","host":"s3://npm-registry-packages"}},"7.0.0-canary.ed52af767.0":{"name":"@material/auto-init","version":"7.0.0-canary.ed52af767.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ed52af767.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6fde6d0a387a4cce4c910b8a7c5bf2a9e8d95c88","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ed52af767.0.tgz","fileCount":14,"integrity":"sha512-JneFjcaNBPxeqaVuPqvMcloAEKsaaPH/4bCEh89qwgpHJcd25IPbaozfBFm5S6dZClrWK5weuHxA4jd3hp0Udg==","signatures":[{"sig":"MEQCIAlWAz4Tr70G8iidYgyZtPEgC2cA1BTGrbFB3d0aXfXYAiBhG4KVG40JEQslg6b9Rg+ffmAVLIw35qWwWWDVx3v/oA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeubUBCRA9TVsSAnZWagAAaXIP/1XSYMk8Kk+OXMhopT5G\nfqNSK9jskyc6/ORLx10fCKgd6jGyrMogdOKk+VLWyqUXEpBMo1VLighIhFlB\nKh+7A51mMZFGegsSxHeEFMQM0WxfDWro0As+/z1qmirM6qAlRDnwOaSXj5NE\nhxgG4HtoOMA0y/5J+qvBptYcmkrHOhQDDnPaNeHkOEMf40y2FsdtHQZZPunV\n0z2pwrfuZf2wGUeo9anL+Zzerf1PkUFun/i5eZ6ZhJYhPSP1IFHrAnE+hN5H\n8zap/OAId703Mmrvd0n7NGDNBiVWtg62HQ8NkIDXmr44r0jbC2d8ft3Qlfnm\n+8YBYD3DDNy5NWFGy5gjKdlKMl59mCroobHcHSYAI5tdStMxu+c9ETpsN/cV\n7EV9Ea/cqELrfsxS1rmt16PwWr0CnTLDvpmU+HHtwo2GvCL+J8Yn9ugsoong\nLm3vRy1UqO08z8LCHnCIxm9Fxfdr2u58J8BxNKpOwLaPs1ldXj5pHWLHoKO4\nD1tSiobqOH5dXcJwmamIkZvPxYtN40PyZZDF8Ftr9ZrjJNzcpm/ZxZaxt0Yn\n5urWEROOR2tgZ9O/07NRh/laPtRAVe/vb+cHAjcRnwbKJg1uocIQcwvjqs3s\nbpMOrN2DQaU+XeSM1EfQ4FDf/8nUUIb+sPCMKzyCX2YJGKSArFLUIL5u2Hos\nfLv8\r\n=x4Vf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"06b24ff740d1a29e8764ec98f735b6fef77dc5dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ed52af767.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ed52af767.0_1589228800754_0.5015984275858316","host":"s3://npm-registry-packages"}},"7.0.0-canary.058cfd23c.0":{"name":"@material/auto-init","version":"7.0.0-canary.058cfd23c.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.058cfd23c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55d612acf082f34a0bca4de86c4cf04408fd7846","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.058cfd23c.0.tgz","fileCount":14,"integrity":"sha512-xG28GWzrxqjNi2qAY72wRSPFNG8c/N7809HweKEliIaWiw8ftSd1dd5UQMa7r04XmPEtwi2N1pJu9MBeBpD+/Q==","signatures":[{"sig":"MEQCIF7P9KmihGdNIzUR2hLU+VEDtzPxxrIn2AHUhCj8CgO8AiAxK4rJcmJUGIeA+6g0UQRhPSDSp5Z2uce3kL5d1cbqpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeucKSCRA9TVsSAnZWagAAez0P/1aJ9pBakcxtRHmEdTtb\n8D+9jKSku7YTU3dbD97f09JQ5AQZJVLbXMbvr2H7VLDyUnkujL3W7lT4bVJL\nQcFK8w0N+M+snoIBVQz7VBUvN6hNfTCzEb5dlvAiA/V5VWuCfHftIM6E73qs\njrHN54LicDbaFqwth3QJhi7MTL9ZTkk66wRexGSv9GDB9LzzrW1hY5WbpL0a\nd6gl5jY0ztmILxv4DMn/SWM1h3S0fIfbbhj8CC1HvaxKnAwkPQ4f4j7SoA9M\n8zgB81wBj7hV79EoH51lJrsxV7QgQBdP6mpi2/DeXL0IrN0MOdcWybuXFZna\nfcxz2lSAA4M4FKbElnLZYhJp/oRCSrOp6S6CZWc+IE9g8kv+qHO1ql4HDHqs\nVlPTW/fUz/YY6DY0k+xDuxvaTwiwq1F6Opcamk/nyeIO/ZMIDD9lVmtYq4gj\nFOK6tKSApDtKAfnl19uwyxLB9+IxM8ptYFYcMxfh0fxP9+O/5hwEeXEmc2xX\nW8LLgtMMh+t3BlyKrdJkzqEQbDc1EHtmCu6loUlLbBAFwvfh+D0ZH1M+nFxB\noat/jYazGNggaHcXHFwOyzn1OnhIiuwoA/P6ufLyw9xsQpRps/YrDzEWzTB9\nqCpmXGI75zjDTlLbP1Rk8ief/x4bd6zp5CdYJ3zpZkufQzqheGQ7cRMoZB2e\npEO/\r\n=yOB8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e012af26b00c720a751210639bef8379d1085234","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.058cfd23c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.058cfd23c.0_1589232273758_0.049340155684199694","host":"s3://npm-registry-packages"}},"7.0.0-canary.0a371b4fe.0":{"name":"@material/auto-init","version":"7.0.0-canary.0a371b4fe.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.0a371b4fe.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2662c73112a1f514e5cdc081f60bbe043b3546c1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.0a371b4fe.0.tgz","fileCount":14,"integrity":"sha512-zp5psamB8vbd32bgXA9QHPY9sbXp1CXY9vRY7G2moPHUqtG4z4e8MtWEnvSMU7XBaXwthjP2/cSqrzjxaycsmw==","signatures":[{"sig":"MEQCIB3o82aLrrw0MWCnJ07SXUTvy4MJwvq/kdwOA2aghrF7AiAZ3ieOswOrHQ/NHIVGdkQtGuT5akDu43o0d+rAeL/bug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuy6MCRA9TVsSAnZWagAAxEIP/3PajFrLbZvRNmfgqeYv\n7Q2Gs9zFWlqXs9jTrLZuyfBoafjDo9x9vkUfbsnMjpPlAsS0tKb7sYDwCmC9\niAljv3eLZFX1MPQT1EmEAtivQAQmvCLkgB3W5zpPfd+BgRyxlfr4sDv8MtDh\nliXXKP680aEg9sfkkPX+8mnrvyDJURcA7/AxAZe2EhrbZkSvGsxgq2R7Bq/Y\ncDI8mXfvzGG+wP1AOiHsQ7pV0Js0R3qEwZ3S6O2xErqaDZHtbGTOPDu0nPKb\n0GVI6S6t4cwSDfgWWpOoPj517n9dEM0jrl3Y9oHx3asYPn2iNA+hmBcaIfVO\nwKmxg+tbW8QLaykzRZaz/mmYqvt3CT11RmQv6XmWb1hTN3wp39kkknlcwaaZ\n6ej3Aj1ahsmSBix1VIdFLezR/zSwMSR8IULmc7hTthkVsSS8GPlD2WokZPOH\n1gy3q2WqGWwhp1yU8IJwoPd/9tqidJemIVzL/leo3aq28z7N4dVjCxey5Vv9\ngFvpOd3JYTAjLldV4fKHtuoQn+3a9vCE5gpJeu9KXsKEy7haw8SjIflI0fsv\nLnd1HOChlArjiXuQRswLNn5CDuPHpjfBisjzn24ZLEQi9VOG/Ns+/IBBHWIp\nCX5YNMhYlXqk9D1XL5aaeqaGnT9cfwQHEtXkX3BkvQrVg25Dfi7rR4m3L66L\nEf1t\r\n=oyJ2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c3c5efa159a3a5dd1da72a8e4e94015fb7984f7b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.0a371b4fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.0a371b4fe.0_1589325451745_0.29066255660159146","host":"s3://npm-registry-packages"}},"7.0.0-canary.2139200b3.0":{"name":"@material/auto-init","version":"7.0.0-canary.2139200b3.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2139200b3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"70d07b6ba18915bae8d38e836baeeeb02df2ce05","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2139200b3.0.tgz","fileCount":14,"integrity":"sha512-RtGrtiwuF5RdaQr/VrHpQqEiZHWRYWw4xCMmUkc2XoEf1WootrlGsBteob3ggiX2decW4VZp5wQ0WDE5PkoynA==","signatures":[{"sig":"MEUCIAuGO3z6sxiQJWh7Fu5qaplumAw+Uw3tYIzR+/RPtlNSAiEAyI5AcA93ajGVx5AaR7mduEIR9YAou6vjie4VVoDMbr4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevAhQCRA9TVsSAnZWagAApQEP/2Q7Q7xClSJsIqsK7/0M\njGRxQqAjUCehlxZ7zPfB2JxDoSC9mNXRf4uSGgBK5/f5PnkjbhH6UqYLoIBM\nSQOAW5zJANOP3ikdOUK5wwg2nPZUTEDYSe62iRbcRF1Mo021KzHDE9996+To\n7NOMW5QitIaB7k6QbTTTNF2spCW+zaF8q3sKYiUCwe9S55F23yxhWnESgqu0\nFsdx00bCBt1LnWYQqXvS+lMejRZ8+HqLJA2C4uwd74oKjJ/HmINjdM6kRnWD\nSVsJH/8D1a0ILY47J7caE6zAi7VkLs1OHzU/lrbq/CoIRf27WcAD8I76nL4B\n/uRzZaYL/eiATAqN7F1xMBH6Ei9QWX26E8vfeehABp2YRiZpBuRDFlDzf6Jp\nahDEERsrQxbwL7oDpKFGAC1+OfdGpP1xi8pwO/ww0pqlFHxE6FLxocSbw81s\nOW7kwV/4DO7NjB2y0LkhrvjggphLTAQ1MgyaxHevEzWH7msYMy0t10dALhgj\nYD+E3CpDXQOdfueO+QWbzg9etjFVLZs8Nb98j9VflFZnQq8NUENfvt++/UoH\nu+XLCaVVX4s8AFs7Mid8qu3oPJCyLsfW8fPdnnfr62i/OrRYoiKRbLwgrsvO\na0ZtMehj9B1KSTN9Qud0+v1nWx5co5X+0adMK55ppT/YI/dsngh1BAx47Xum\nQg9w\r\n=1yR/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"42c214d2b2b544f76002d71be276eb747a69d9d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2139200b3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2139200b3.0_1589381199440_0.6746341548533936","host":"s3://npm-registry-packages"}},"7.0.0-canary.744d751a0.0":{"name":"@material/auto-init","version":"7.0.0-canary.744d751a0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.744d751a0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0fb3e0ea771e99676142239309f5f77d8397444f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.744d751a0.0.tgz","fileCount":14,"integrity":"sha512-z6hEtdDBD2nRnvi9E7c6Ixuhe44TEB98wQOm4bKRdQpJdsGZdVQQEZLo8jawq0pThUj7qq5tosZUobLgP2A5Ug==","signatures":[{"sig":"MEUCIQDGzWj6LfK1T552qGbPSI2d2QV4Nu03YRSaIPdQINQP9wIgeTHCDOGaOJEXigTlOc5slF2fILghbe1rAU9SYb/slAc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevMwlCRA9TVsSAnZWagAAt8kP/3pLsZ9TAAP4Hkgz/uw6\ntfeCvVOND2wnoK7mc9xq7j1n6lPkN0fvwrj27iIMLtRVOWGCiSG2l1OSigTh\ndzS9GZKin6CEjzmw25nHeWuGvUq78hvWZVAYrfe+svYGBWNw91I8gn6+VnfI\nf5qQLd2mDJgHcTHBPjHeu08XHwfzEt79IcUiCM010ze122stbyR/Ut5kYnB+\nx157ectWEKzjkLNYI5vFmE6rr0K0tLFU2z/VSuqGiISUNHIqtWJEyZoVnkas\n503QVvIy42fMn1dxH9g87iIBxbatksHX+doSnef1pPNn+fMZ1VvaWFrByxNM\nzCAdQzkqpwVexOisszZQhWbdlcEnGlqK/W6N3h0KmwnKOrpDf8mbVK1DTjMK\nmhw7PvJfubnSmRJ9jngIiMRWhdUNUcq7XeIY04uyt1uIJ9xh1/MfCM3OfgBh\nBBQP1tvZGL6MFs0Ta5/qJVztP2xt9QHy4HwU7hrC9CB2SqJoJuZrG+o5Ckoy\naRldXK14OX0wqkjnffC6TMC7Ii68yrZgDdEtbJhi6c1JOhJTTA++dzHe6C1N\n4WqtGP04GINNSUttvMO5b2YuNFA2nCsEBgT9dZj3TAn634rp6iMkGfRkA0fI\n0FYOSbFm4X+dw8w1lmBLULHk0pt0HeToJnN/XjSqQKS3fMzJUPz1NstF6aHQ\nDeou\r\n=tJbm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"afc5bacf5330bcdbe874e652a8d6df5e4a35e7c8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.744d751a0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.744d751a0.0_1589431333218_0.623874081833294","host":"s3://npm-registry-packages"}},"7.0.0-canary.ad0c0c103.0":{"name":"@material/auto-init","version":"7.0.0-canary.ad0c0c103.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ad0c0c103.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9ec40c879ed88bbb8f80fa6a7872b3764b1e6e43","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ad0c0c103.0.tgz","fileCount":14,"integrity":"sha512-1YQufmnRUo/98dXmP5rnFKTFUjaSYmhhrQI84ZP3mhi9Pt4C2KG20lxpWzv0sKgUd9yo9YM6CMkYz2fEmpY8+w==","signatures":[{"sig":"MEUCIQDLTc11z5dkeCJd/0TrleBK7KwplmLzSzZZ2xoEp/FU7wIgYdMi0wr5CFRn7nfgvujFrwKQcjVb+MJtqcirOQBbcks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevVrLCRA9TVsSAnZWagAAmA4P/3DE3sMVJCKoobA9bYdP\nW11D7dyWFgDI2TiiJ9eI6qkJeKmgjB74/dBnwjBCRa0TXQqgwUWEcDCN7DVc\n2bLvW0oBUSk1G9s5Rg25ooQsl83fSIXT9Mu6zaEhx/iWcesKz4UlSFELjw64\nQUKw1jmrqb9wFDpk6W6p7GyXkINXgVqaitgR9g0L5KVt5wq9JW8iCNHsirrS\nwE3F7VNLkH1Srj121Bo4lgK9HO+D1b2jve2kX/ys0VRnGKLxwTLa7t8rwV8G\noEFpL8pTdpPmsMjPgBfUGT5/qfkI5FpZ8J61ENT320VSC8upEJ+TETbp/i0E\nAi9F3DrCIpqGOJ2X1+rFiT55pem4IlhyHh7jvo9INbEatEN7iEA6lNNu2Z4Y\nHm1e4QA0uhkCutUOj4q6sx3ZuG3Sst8nngybwKu7TC84v4DHsvo57FnAUjlC\nXaBOs92rLfh6Q0IApxCKkDZ2dgdUKja679R1np1foNDXb1mtVP7zvTZFPGze\nYBIYI7sYh1wYI0vMCrEnFj+UY0Tqha8qov02qpTHq5m9xQIOlxMuFKbZ/GNF\nMMZAYGQMnfKmDosP/8LDdHStAE6wY9PrxHOVSci68yU29LHamHspEv2kYN1e\nQnY+GXQcennRvZopdwqH/chObVxxq0AanxjnidhYdSsYOhcAq28AFFI8vO0/\nm7LS\r\n=vrMa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"76a0fe161f579d30f0d739918fe09f5f4eef04c0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ad0c0c103.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ad0c0c103.0_1589467850779_0.23417362895024207","host":"s3://npm-registry-packages"}},"7.0.0-canary.fd8f8f2b7.0":{"name":"@material/auto-init","version":"7.0.0-canary.fd8f8f2b7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.fd8f8f2b7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7575ae72b06f998a1c38bab6e9c17173fc4bf260","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.fd8f8f2b7.0.tgz","fileCount":14,"integrity":"sha512-UMWNqBxcRdShx4LBOY47nL+xDemufDVQ+OZqd2E/OqdaQw2aKSuXRFnjzhMKdWj2LLSZ1J5WJKlR6H0NahlgLw==","signatures":[{"sig":"MEUCIQDJaueN/V609wN99oUpK1XuUboQu7iJB6ynZ04+LUZjpgIgRJaKgBzJQSKqT5i+/adzkbeLm2m0EBSeYp/TWXZYuKM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewsuCCRA9TVsSAnZWagAAtScP/1ySGWwFkZELMleEsJh8\n+dr8I8fGq147kjQbR6n1YWhRjWCqJk3VJ42HQ05eYtLdUftJo0cCs734Oru5\nESYtFj/oMKB+EtJSykTgXkms0b2URWtMNR/Irn4bp1q5UnHtZWICDa8M64jP\n0bAT7atoWOmQuS8wlKfVEkxm6AgAukPofts2U8egmVm34IvNmr5zqY9mL2gX\ncRFMYW9hLiFceO/wQfXnsKJWO10kVHBvVguUCoWki2NAXAZzmJ1q/BIx2cSr\nJa6w9XyVkocp53NhiWApWfLhrhzSJGp22L+Jo6hc0W8HSaxmKPBP20Uut4Hz\nDUl/X8Peow+EJKvW9tVJ8cz4kSZUwAwFzb0eXourWopUpiGNHHV0cBkUJrwb\nh9kMG2zoz6XtqI7ex2OYdYVRb9z5IEEV/kpJj7RTWZxzYd/HTCcGf4w+sBaz\nVINPulzBd8N/+GTHXC321QWNpSqAK8Zkyd9x2e4MvMRIa4BnsOdtF5fxBp08\nDSTgsu5Sz4LLmdY2B9TBCBDRqptNjbECeLIZspmjJ32paBI81bmCztbaEIS4\nMdBjLxJtKe6ZMUNvr8XSi09WpZKM6rFF7XjeHUjH9SFFqtAPzcQABKr/hX0G\ncatd/au42qP6vmjOy2X2V08Uhc09BwqWXSnV8EN7POgfCAvPGgDsk4ZzSGx5\nHz4e\r\n=7dFR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"30fbf3d1582cc530b978714ab043f92bea7c4b83","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.fd8f8f2b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.fd8f8f2b7.0_1589824386182_0.6330897000383411","host":"s3://npm-registry-packages"}},"7.0.0-canary.730920fbb.0":{"name":"@material/auto-init","version":"7.0.0-canary.730920fbb.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.730920fbb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15c658b5612833f95fc22b1c2e0e217bfedd4ffe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.730920fbb.0.tgz","fileCount":14,"integrity":"sha512-4dLYzpG1dOwjwamWos+s/gHFRN7uofhxS39OmObJfTx3NKGQMUn3v6A/UYs9ni8RUt7oZbVcZvJJCqTmF6X3QQ==","signatures":[{"sig":"MEQCIHzSi8kYG0GobKYc2406tm3vunieycZrXg65DtfuGNpGAiBXXLpdzDBTtcSVavS14mJnOgsYid8m5BrFttkJEGchjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewuViCRA9TVsSAnZWagAAzCMP+wansPnqmXV5SYWUStE+\nGHn8MjVRX6s6AvkysFIczL/4co2BBIbMY2oZgL3inBRXG4Utt1nWsJaHykHn\nB9S+/5Jjc7QUKkCEXAED433caLo4CLjg3kH/6pnu8Eral2/wFoLMRPCYImov\ntkHQhJdr76bK/6sqK9WFwNDZ7MiX1Sy9EQ/WUWqbqG0TjC2NESVSkuBD/7bU\nO68e6cvkcmHir+csTXJ7j7oYuPeellCDBMKkmtUdpsDLrLFeXtYSk5lnfyOd\nBCIbaGbd5DuLu3vVAjOSaWMpv7PZhG/3zb+RCNNjzNXlPrfTQ13QH9OO0Drs\nrauOulxYnwmDPaLrZxXJkv/fypj6SJpyPO/+xrTKax00hU6aqqjUxeFzgX2K\n88adKoHq+7R6ss7JNyN4oSPPm1fK4tAyKNlPQko6EbYtyafi0F6lcLBvAjf0\nzJ7Dv1Wfywt8i0NzETQusWMt/Y+YGftPnfCVwolp281Nwip4usRslGrQ9F+p\nX8Nrf4y5QZDesAjLtBzRsK7puwKVZIXduMl2Z8kXXP5xlbNkX4kSMdP+dKEE\nOeSBR+TU7y0nRlUj4XBnm4IUnLcOWbZUIwaF37sHTyp1FBUIsjrhq+BOY2BP\n9zwgUOE2fwWI6j4a+qQuaupno5mPsjQ1eMPLDB0cKgIIxmThuqmaffkKDe0Y\nn76m\r\n=QDrL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1acee01a3bcc1944050bcc6a38a1846c507db43b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.730920fbb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.730920fbb.0_1589831008656_0.5651078719132747","host":"s3://npm-registry-packages"}},"7.0.0-canary.bcdad99bb.0":{"name":"@material/auto-init","version":"7.0.0-canary.bcdad99bb.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.bcdad99bb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d32453c4bba64e0068b14592f9e41b8fa0871bd1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.bcdad99bb.0.tgz","fileCount":14,"integrity":"sha512-5Usl7DoqFwTPrtl/omeqPWjHfFbUGcNzoIj7nghWUUvd++RnCTgvpuWedV3RkvzeLw6Ky+8qq3uIy0yzuvBrIQ==","signatures":[{"sig":"MEYCIQDtO9FqTJOSgsIw8QL/ViZ0ySqAjpuYu0+UAfFGSzJLPQIhAOVPWpQkuSZGbzQT0X4qD1oJJubmJrabd6ifsKpgyliB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew0/JCRA9TVsSAnZWagAAfSMP/j0rfvtNI0PDML/hDCa5\nz01wcxuDzqMCOeysSu7REP0g48KApC8f3wNoL3F0q5+ZD7yu/pNIKLigzDzA\nJj0ueppdSPdXR3Z6PvQYunMNkiyfVqcUzzZwyz+HK8J6sQ3K0EUPGcW0Q2hO\nJhUEDW1OYJG/SH1n2q/vA6KmKJB5b7sYsXq9az1HskKbHeBg4KKhBJhDYDIM\nMUlm3Lsdq+OP4TxZ8iiugJwYyNz1nEK918mmoy2FddQxI+EKJydRbtD0APMI\noq00I9c8cfngE1sNg2ClMkX3CJNHSj0GDV4go8q8iWQaK3ISyeExW2G4GC9R\n6kUCssd7Cc9HTuHaSlvQpBVI8I3V3X0kWJnti3XbXQ5hFi/cBRw3zt12T6GL\nA1R94G5DreAvrvBgu6Hcp6Uy8W8wbL7xlE9wN1bvIYhwPfRqXBLhnKDAsLmo\nfPc+xQseBZVmIsuSi0LMNTjL1ocZIbw4eSeNmGMf63Y0b0Ssyn5+8eXcxSEp\n8+AfbMzHGGegQFIJ+ReXFp40y98UbseZSLazry37GGIrYFXZ10DgsrXHCL2O\ntJHXCZvXRtuLqs1iy1kpRAfVozn7eJ8FG2dP8BnkG+0UtwG5mxQwp9jte/yr\nxEeUU+v+gefvQYG9I6XboI1AV1Kmqsem/hxEd66BXSRNNqbnS3XLJq6R31NN\nIYz1\r\n=GSxA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"33c3545075b4fec07083bb484fdd7245d0b243a2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.bcdad99bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.bcdad99bb.0_1589858248409_0.5484851626071965","host":"s3://npm-registry-packages"}},"7.0.0-canary.4497b86ed.0":{"name":"@material/auto-init","version":"7.0.0-canary.4497b86ed.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4497b86ed.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"16387cc7710beae94e8c68f9c36bfc9121f1eca5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4497b86ed.0.tgz","fileCount":14,"integrity":"sha512-AKhwoaTvBv8xyMRa3p1FugYcExa/hwnVFuLQj+k+DGDb1bYAkNvWkqBUGFZoOcin+X0aqLoZhIDxFATEfR+mWw==","signatures":[{"sig":"MEUCIDvQfWMDtc6FPpfFkyaJECj+pWDfuaRr+Ow47MeVeQRXAiEAi/kb+x8Jwoa9n7LZovU8q07idEBV9fC6v4b4De0WSik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew1d4CRA9TVsSAnZWagAAzkkQAKUEJVc/WqVEro12Rl3O\nFjp5oZLVZHUnFsVHi7cOXonQh0ydE1SqVLkb8QN/dFfCPRcaLOTiG5J1+JSm\nCCY5HRGTA0A1gZrbh50oqi3bYWOdzNGJtk9xmdn4wIWEdXgLYU1jEkA+Q8qa\nISWTAV+8F5Zb5EmFo4nodvWn5/Srrub/WAbI/op1wiHMcoqERtwCmtIpY3EQ\nkHufIYn+hudwDgaTK66BjcSA0sYf7uj7oALxzsxhXa3tBe/rxAEcpgIOLMqX\nieRXs1S76vU34JSs5rNFN53eh6CAeNsUHhI/FrtiCJiYNvYYfPIQACBtV2DZ\ny6AAU13KN9OBoiM2fH09sgkeej/ZaYlOVw/c32MsaUTpsLcsdSiNd4H5g+RG\nxk1qZPGDJ8nUR0OOAKWqJ7+t9MWSlwqbn6pAUMSOTpLJlwTTnqSasUDee6Up\n/+MEX0d5KtJ+UUIPTvwuEfjOO4mdB0GdE82MXgWQ27IrEiH0VTr1N98mJ2Hh\nARMjohQ3KGXny0EtnMv8xKNH8r30/1K3YY+Xecymw8SYcQTWYO8RP6Y6ODXo\nUokogOTY6F8C6ET+f+iCGYgG28TyX/2LCq+HWXLPNL1eLHmmHNL4Rbvu4NQ1\nxnyspVtAAtzTlME38HxVr1s6ZW6T+gNH5LbGDBU+j7fYXBFtDgX948KprAmW\nzjPy\r\n=L7mm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ffe8b9fd24f52b80e2fa6a7007881da7c29f885","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4497b86ed.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4497b86ed.0_1589860215601_0.6811302791996232","host":"s3://npm-registry-packages"}},"7.0.0-canary.2e60575da.0":{"name":"@material/auto-init","version":"7.0.0-canary.2e60575da.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2e60575da.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85931eebc054df6af4b7808c20c97a98e5af4b18","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2e60575da.0.tgz","fileCount":14,"integrity":"sha512-jfyLcHg9V4InO+k+sD0yJ59mjU/efMrcX3WWSmnXSzdx73AIk4SXam3CN+YgocMMm2WKd8KtpBNstBsNvd2p8w==","signatures":[{"sig":"MEUCIECmiEGZM6qNGCvFfI6gx/tcYNtvoh0cBJeWbiBS8UWxAiEA026KaTWpQRYQoLTSCnYXMVFiXoaQKdnDHb1xufeVYDg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexASJCRA9TVsSAnZWagAARukQAIo0mxsNk6DvwB105HBq\nCHwo0itnQmfQPdDRQ9GNWF0R0n07vbn0YuBq/CXdwPBmTWvlRiPUJN49tzx6\n6c+R8Y6uiZqtaH+/33h7YqLoO1w+1tSCv5cYlrJA79X5NcTpKUI+f5ljj4p/\noNyGYld9xH75RIrZCOH4i4ek3Bl5T60QndkDiADmskozofZj1YWxlYxM5yS+\nLVYeJJQ3Mi33bmAZ4DiqL5NgpWdYIy/9PaEY/doHbLa2mnDluudeAWPC9ig7\n2vXVV8a8xDUadXtHqKW9vI1jSTHd1wBzidVBAaoD4GDyVWQ6KypvLY8Jxldi\n9ivst24FOZpwUQdTx3zQnT5xXQzIGP/qSWG1DmEC1Mvpv/j/wzfzyo29pzRw\ntFxyQd+i/Ac8pMxu1xi4Ap66x1fuujZWGExzZVv2iJ43Kdhuq5d0FWdx7g7m\ngXQafI3hbvXzG3rrNyM9MMsvOYein4i7OYQJyDgDnqGsPqZDJ7BfyIviwUIX\nwwb49R0BAx78B0ZHB50PN1du7rgDGW+YmTtcKCX3tiql6/Jhtz8oFmqqbPYn\nT1wGGgOt3Q0qwNB820I7Th6Nu8DHU80Wdo1cxeqrBTZWzXHXWobfDGwgDz+N\n6qIv66pv90tAhrkITFbdgjI6rlw1FhwVXMyw9jL4N1uhoCu3MfjK6Rd7PVI2\ngOLV\r\n=uAZG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4b6f1d5a01445ae9c14845614630907beaad190","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2e60575da.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2e60575da.0_1589904520818_0.8636292460406514","host":"s3://npm-registry-packages"}},"7.0.0-canary.e3eacefcc.0":{"name":"@material/auto-init","version":"7.0.0-canary.e3eacefcc.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.e3eacefcc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fe65e0ac20abc9121e13ec1d685f432cf5287e07","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.e3eacefcc.0.tgz","fileCount":14,"integrity":"sha512-j86uO3uyBTQO0u651Ridb+EtsY7fqcSCke8RqcvUoYG/JvBwRKl+oXK1JSvTwuHgVf3HDH61eLyXBcZfw7u6Iw==","signatures":[{"sig":"MEUCIG9ALR0nAO91F03cmXARI30aoJC5c+hFaQPiZF7Z9A9IAiEAs9jgDDS3J0fOSwWRHavRoDGIzJwX7YQarcJB2l42hMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexBleCRA9TVsSAnZWagAAHAUQAJUOPSG1hiFO5mzB+P9t\nNZrPK0oQHmkjMxDESihWZflP04z6UaM3VceYUu2KZGjaTdfkCPN7at19NsD2\n+6MEFlOhRAQSUAWdk9MzjDghvjn8XH/I2Jbtm5Lc8hPgF7HDnpooLQ8I28n6\nCeQn7V/LkcnsqsTqwpx8kNo8eVcJ41yiQf2GRV2aRInUyeSf9pxwJ3JFK5b6\nhObYxMyEB4n+fZsbdxcTEym1hDWrdaWTY/IWn7jJjjZ3jpf+tTV8SPS6pKQ+\nLOCpt03sg5R76WuehH0L+UAi3dpkRr2J7DuKU2tIXAoipiiPjwY7FbCxj0H/\nX/G7pPvojUrZiGF55vG0HUH+XTAruMbZfUj40do+CoGYYabvVtA3qRg2ks4T\n5QZsO5i4rs34OoGA/GVA4N8c88abSkzdobGxEotQ/f7UN0nQZTz4I5SGnUhQ\nVKiBRnhPrG+7vR3q3Pdj9F09NGtOzbUZ86mv6aL+F3/YN9bj1zFs3c/bX6uF\ntc9vSwDa4u2nS4RwiCU2XrCkpivGBEv52MGaWIWl6o8kAky2wwVKlWh1WAc4\nrw0Yfz+3TtE2JmCcme1Rf6uCWRvJ07MSNT34XodmoXrWAglZqV5D3L/F8nZG\nayPrfW/sDknl2U7hj6tV1WHcdkUCsyd33hEfhFONjentZhnWUqOmY1Im9qqs\njZ9k\r\n=n1hW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a80846c07f1b98212ba692bf027c2003093d0180","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.e3eacefcc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.e3eacefcc.0_1589909853772_0.8339348198967831","host":"s3://npm-registry-packages"}},"7.0.0-canary.b065a4d2b.0":{"name":"@material/auto-init","version":"7.0.0-canary.b065a4d2b.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b065a4d2b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"39ee2a76bdf866a039fb79cd6172e3f73def3851","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b065a4d2b.0.tgz","fileCount":14,"integrity":"sha512-6HDbdJ++ZTg9MFM/t8aM/urw3Y6+dpi6J9t960C3o+Iqgyd1f/hnhPxnaAFvufvUPW8k74L1hR1bUvIBhdqL9A==","signatures":[{"sig":"MEYCIQCIDUEVhZ5JfzAZ1INw9NLxW6/CYViZfui503MqFnHycAIhAM7b00R17hbSXsVpSaHDp6nskvgWixLVlVAongayfi4h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexUBICRA9TVsSAnZWagAAZl4P/1IPBlK6qWdXX68USMeX\njWkQzugg4IhhPl0CHKPdjMWevpQSTCakLpLu8bj84AEJ1APYhexq948wEtJr\n6ohVSKtqHY7W3o407Gd20hqF5kiV37kiTQElnqEVjSUJTv6xskS7IbZxs/AN\nc4/Lyg/bAk1szY3geE6OKVvhCBt57EpeURJgdNAZ2cDlyXpJEiULanlmGMRR\ngxGrfsI2+3XhOMj9NKOdDs+257/SlSADjDAgPA9cODDE96Vn+yixqRf8zNbR\nmMtLCuMGebzLKDNE2P+j5ejAve6xHHJetSwq7PvcqQVwaGKblWo1zMhljvLG\n6JVZksdXZqFICcoxyL/AAjR5GDEnRGEo4DLYh98SCesZ1iLbobEOrNX1RBha\nq6Yp8GwRTzX7Yv7prAwTKixXblVPXzGvmb/5Vb006jI9hvVneGJCVZy4zK0v\nJ2WZdjCrZzpvtDPm8vILZM8RJSF0oMT1Tw9nhHh6krQIW+VsYIIiV6IJijG0\nGSLTEVKMNQFxvXNDXe3Xqhe7PirOUc51tMPOfS1D4Eq4ibvfytpOetwMKbM8\nnVpFAxy/wjIdYKuN48aDP7BXRwzHKeww7uj8fRUkopuPbb/apSYBYPgJV13r\nz+kQXhAHNV89pDcaxzkMbxzx1A4/54VZLbqqFd1kqMpJJ3H83/IMox5EOVch\nI9Zg\r\n=Gem8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7de80cb2ccfd67196d7be3fd614cebb9cd73499f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b065a4d2b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b065a4d2b.0_1589985352014_0.645545280708592","host":"s3://npm-registry-packages"}},"7.0.0-canary.4ebce8d78.0":{"name":"@material/auto-init","version":"7.0.0-canary.4ebce8d78.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4ebce8d78.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ab0e84ff7f0a713945e86c92d5cbd0529c949aa0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4ebce8d78.0.tgz","fileCount":14,"integrity":"sha512-cziBu6i/6fSSs08a40QjEUigO5LnHM6tDrzmzPjCV/AYuZgPK+jP4ydmKJNp0lIm7t1yZzzHuaruiYlN7MSlmQ==","signatures":[{"sig":"MEUCIQDkMdQGDHPMsFdHGOHq0M5Mych7obf7zglS56ZfFoVHJQIgT+wGbBH3JkYZOly4c30Sn0cuCak4zOUiPh9KUZTNxko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexZfwCRA9TVsSAnZWagAA5/gP/Rzm9woDwN4uDAwBAhqa\nO2LT0Lblt5TviETK3v9FTGd3JRVIDmk/5A00x27IotpvNlNXzUXpU7fN0x6q\n1gMcXXD1eEa+joMGTFk6tc5J36WkfWYLYA3Q+BWzuQp3HTlbI2Ccr46zVlez\nkUAbG/M4Znt+4l/i5UDXbq1pNDpo7B83Tvp7xSHKN8Dn7HCu7m3GkCncUdms\nXkltIIxYf3yRWb9D9k45VYW+IH8fzwuHt2Gp+3jyEHs7koMR1bSsULGzTdPP\n6Me3MVRxgFNYlqVqYnhMFwH6KaaYPuHxAf9UsHLnATD/wl6f280sBoUmofdb\nGx72LkwPzSzyT5lpCN3mUQvg3XolzKQ+J0UjGruFfjrXEDc8JHScO8S1RS7I\nFcFmD/gSEVSQwzqO0/nJW50pz4NuXgqoD4eaOCh0ZlYbGvn8v7a9JZEnzc2N\noB3KH8XlqCABk6KkkHghAQSGNhP7QeEiY/6YJ2S7Yhg+mcPpLaQECjOiNaW7\nCDDnrh3OAPx5SHQtvtaxGbHVs3PwMo4r/JYJtQmHZTOYMtGjkZKaMlN9Gty5\nsauB0nVKXNj5Eo/XeJpOrjqFsm70jQZ+YGiv5OOTqHeQu3AAJOAkX6Npv8FN\nJKULw4Sgo8XHDk4eRS3AKSbHLuSKmdutZx2fecaHq3vJKjLk5F2tHDN8fMTl\nNr1P\r\n=vSN/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7cc6c4aec24377070d4417765fa102dcd7c7e0b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4ebce8d78.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4ebce8d78.0_1590007791613_0.18065779446120978","host":"s3://npm-registry-packages"}},"7.0.0-canary.b0fdca492.0":{"name":"@material/auto-init","version":"7.0.0-canary.b0fdca492.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b0fdca492.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7673a4f75fa9d2c88af7958efff44e0bea94d0c3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b0fdca492.0.tgz","fileCount":14,"integrity":"sha512-hOzjJGsl1wwUvQTvAERqvMaNHMaiac+wJo3oHiiUG//2wFtvjzvj2EVDEVXzL4BfTFJfXDneHBxkkD6lERCfig==","signatures":[{"sig":"MEUCIQDVl8YtifEkEWfAvoCytB6WO1B3qiPu/KQ0ipoAA4Z3IQIgFEsyO6rnrowZ16NBw/jG1kPGDrTmBSh+bxPv9WoUKrQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexbb4CRA9TVsSAnZWagAAcggP/1HZVtk1bt8TKrF+a48o\nwoRCqcvw+lEnkj5zsSVjnBzM06uRFUN/NCrtPVwmhCY81xNejkWQARzlvh3j\nXOLeYHhoHYJAbd5KxPn0zymQLk6SBLWcCqPFTzbGAwqQe0iO73U+WNME/Iw8\nQ7jG6oLXI4vA+XfHnGccXO77kYpSrsB6LGFet3bbeKvBNtRlMJhfI/ec+om5\nvEA5kSA1nhs1j9ihhuS2sV4thQ28rfEYcauKi6sU9SHVz9DwE+psGyU1L38a\ntRVneYmbnP5ag4GfJAvnpN0/6a8FJ8K++NwqeEg97djdVqqWv1rsQ72pY3GH\nowDhMGPPDjqDCymC2jwOEWMtTKG5aroepMdz62GvkYpIjj0GaUK4jaI1YXsB\nym6woDstAzI6A5B57hHKw4jQUEch1JKy3/dVN9kOnP0XnIJTibSjnkyyN9La\nR8Av+/amDZl93u/V82QXcH66/7tUSTwno946Im2FKGyKCJ9NidK7qPX8jv6b\ntrp7SUvM4yLwGcB6hLFKfGFKddWAXKSOMOAvMDejPFE8n172rcgEOtFpJny+\ntGNThBXBRWbGCKhx0FbaTRumytZG3JLcSpVqmXhdyCpnnQ7QXj5dg4ixvrNX\n93kEf80vyLOlJmCzEbh6cXv/JcVKg49ljNkFwhNmgiVFhToscaSKGp5zraCZ\nhFIR\r\n=aiPc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"590e5f052548986555dab713a1bcd253b6dcd01a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b0fdca492.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b0fdca492.0_1590015735891_0.8762280014162254","host":"s3://npm-registry-packages"}},"7.0.0-canary.c67667e8e.0":{"name":"@material/auto-init","version":"7.0.0-canary.c67667e8e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.c67667e8e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca4d049b4e3f69a1003ac6bdfffa2d55a7496018","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.c67667e8e.0.tgz","fileCount":14,"integrity":"sha512-1f9JdXnLQuBAuEAPDOTj7Swm/jeu5yd5RLz1veWMjHXHfF4xzM8UasSLwP3cirykSsU4UP9ox7XEAkRAFDnpDA==","signatures":[{"sig":"MEUCIQD6xK5LzkrEoyssO0MclWJ2VQiwpMJbmp6w3GEixCrAjQIgBKBlU78PC+hbKZMySNp1bYatgoQUFpfnMb/G/iNiFFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexowtCRA9TVsSAnZWagAAY+MP/Agpv+I6wJBDMOFlpAa3\n1NYfDr7j50i2iSjcoscoiJ6KqzHI0qVKxvcuhZdcoxeWa0FhLD2gFinSWClt\nz1WskDEYIGpnYsv13bh+/Ra/YcvzTk0/KugF/fQWuawD3MFY72bW0fDqUvdo\nH91x0IrSKtUjFfyaskGt0WBYn5IbgvAAxUeGvGecWkrMkOzSmOpzcA/WYjJL\niICX2+f+qFCvqT+UplPIQVOtfrhtPGStEBwAN60aYPFzlsVkHf2zszzzfgVL\nZZdnsX3k/yPj3nbRimesFXNneq8MA8b5nH8zkizz50/fnfPUGt7/zPJ07WJ1\nwZ5hUL42ckDpeyXyUpiBhNrqZXlMHdRY4DDc5TlCQl6zzx4gc7HWhVI8b8RA\noZN7S18q3zInHdnlGJEtOUBvMhdGXOqFfCWgApQfNrF2KoLnsXoGJuXx66hB\n0ucSbk7XXiBVu7wrmLx3MBKloq6GpwqK5/4QCnyfKlAfE5nSJD38tAlLfeJf\nU3lsgpBHBND7GONhYcgA2p1K2ycp+glpIV5fFFqc/BsT9TsHa31BRC9RcXeC\nE+0IwFZfW7CGtRas2uhRKXGJOl6ONd+3udOdLRD5InudS6cVSxEX0qJ4GgLc\ny6njcNnz9IUrhSgpwm4EeDsOMGQMO6PNInJzIDsHm0m2rC4L7TwFXl85crBf\nlYOr\r\n=QKNC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"405f1e85ef85a7cfb12bdcba9816d716433463d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.c67667e8e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.c67667e8e.0_1590070316849_0.8575716824729209","host":"s3://npm-registry-packages"}},"7.0.0-canary.62b5f37db.0":{"name":"@material/auto-init","version":"7.0.0-canary.62b5f37db.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.62b5f37db.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6bc70770beaef6f75e2721eed946e13542fc3b9e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.62b5f37db.0.tgz","fileCount":14,"integrity":"sha512-7exGtN+uOLIGiWVY5CxOxQn1eIyUgnTAtI5st36C7gABn9XmeLHuSRZ8TYXdHigY7OhGxZTFCuErdEAcz/Sxsg==","signatures":[{"sig":"MEYCIQDAuilgGbi9LF6UTzQcwX9yLRAb5lrLV7/za12P6mBpzAIhAK3bpkJDhXkemj2skpZB97ugHhhvqBqmISZXtGGlVULo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexq8HCRA9TVsSAnZWagAAU9gP/15uOT+DmAalcvDwfoZ5\nhZ5cOrUXrj7pNnUXkFf6ZTv4O368+GFSVP1GLyiQKUhExOUjNFGXeuPHnjR1\nJiNnlzi8lhMXr1eodXbMy/nZUmOGWbw6OWdXhf0t8Mb/Ox27RxJb3KkucxsP\npWnhK/0h/1kGxekvo/OXPkn8lt31BDgSh9kHx2oR2harDxAo4eRTwSKygHL4\nG+pcP4uR6VbrTrDIxMSlNQuLGHInXVewjg79nY8kyyM5LDHCqzr/AQFsBGzf\nKWmhMvOQpSVucXbHmw4Xyz/bAp8waCR1LNh1MOeFstLNxWvQtAuZ81UrHyOD\ngTXc+W1tcZsE5YkvVBpkmO2DHTQwvJyq2vGW9Pz2+fiD6KSZxQuOMiTpmdG8\njFOBRyaSVbAMv0IRPZN8tFH9pQNK0e0d0H4/KcdjpWRw6/QjAyOSHkpxRP8s\nArICIza1APEzRhfrVL/BtkNdoGP4A7Z7dW1J+Q7cgtexgOA9Ew42oVy/0Br/\no9FfgyNLA+zrFXr2jMvSvG+zsotIj7u/iVMdnfprJ4TdH8pwuZJP5RQ/VT1e\neMAcrxBqpBb45CkBmpqEZdbwRDGNpbxyB8nNdFFjbVfZwq96KTIEgLctt7LJ\noGQrPkdT16+ueVOLST+r08db5aIAmsFLN4UjsVUUEqSlqP8dhklMRXZ3kDrw\ng3wF\r\n=PThP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"62c869c9d490fcd3f25cd87f251a83b273e32736","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.62b5f37db.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.62b5f37db.0_1590079239014_0.24562046809603078","host":"s3://npm-registry-packages"}},"7.0.0-canary.2e218dbf8.0":{"name":"@material/auto-init","version":"7.0.0-canary.2e218dbf8.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2e218dbf8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3666689e9e38ff032af4acd1d8f895d4b0e38488","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2e218dbf8.0.tgz","fileCount":14,"integrity":"sha512-X4AsStGW+WYSvDiMbEbxQclrNqd7XoReMigDKZ02Jt8786jDbtT8xCl5cfh3cTk4mf2cw3xNIYpJOGQOaGyM3w==","signatures":[{"sig":"MEQCIAb1/x9QWXuKKBFele6GvKG1lwZB8Yc7JRO2etuqU5OnAiBzmwRrp3MDC1KQ0ydr00nbGX6Ze8S/lDx/zoJhHLkKzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrPrCRA9TVsSAnZWagAAzBQQAJaWwZKr2fX4Xo4ng244\nU+fK823TW+WjA+9W0TDQoAyw+4LtCryZ/TxjS0RI7ibdXXhpXEGRNUCWxCJU\n/eMFyO/QwS9Zb7ZnGnRwYc2GKtbpmjE7WKGpD08l/YPC+6ohHxlOgv5aWRQ0\nbJggOru/mnvHTnrfVgzBvniwDTbN807HPBCeK7q+wBidC//iGesHsXEIFS2I\nCNvU0KA/z8J94qrYo6xMAmwNzmIcB+W+b7ZoAzP6nvHLqdKI0irMuyncHsoP\n1GlOkipoHmN7KwV7R7xlSkaaLMtGiNZhR3rqHyXx0gMvca9JxaLIOD8Vc7nu\n2cg7OmrzYY7dDFBJk6AjasCNZNH5TfgErdnYpz006zP27ahg/7midkYzM/CA\n9NGFWIBQ8/cIhfU9cWfsxo8EbpbB+foctRWb6lmUvX7bbkdPueHhlKh8UmXn\nXvsoZgCL+iVHhgsjORC/Avsj1oIM7qTnWeRHOMRUXSt2UEVrwLk3gZIFrSJd\nuGnrNyOqUzH2zBP0Gy+spu1bVk1nUV1Tfl8BksxH/Fox67/vhxMz5rAmJL13\nK4SOe36ezm4Xxt0Bwrkydy9uyoOJDT8K826svxaR2HgPmOIEsLf3n43eljrX\nPm7xOVXPG1XzHiN/Fsn9F8TKyavbkE76vJ64CQdXDmtYcaDFrpIIRPQTSwpr\nSCle\r\n=1b47\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9b76f9144a233e7569877ab8f0dbbb1be555055","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2e218dbf8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2e218dbf8.0_1590080490990_0.5218439172578653","host":"s3://npm-registry-packages"}},"7.0.0-canary.7fd792bb9.0":{"name":"@material/auto-init","version":"7.0.0-canary.7fd792bb9.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.7fd792bb9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e4ba3adca5f887165a1d715126f68a93dc26fd61","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.7fd792bb9.0.tgz","fileCount":14,"integrity":"sha512-+G/m15WBnCW43baVTG1JpWhQrulJUbKcqnhuDllOLBTSI6TatLVYSYSvprgaLAQRAF4MFVeQraih7vADZ7egNg==","signatures":[{"sig":"MEYCIQCzwnftQBOI7nm4s0kQs0cWXzap/oDhCRIj76U+p5DmYQIhAP1BUbDQk4kEM2XwqiMYVApfwICjxeOX1KQqIcnV9SHr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrbcCRA9TVsSAnZWagAAxAcP/R4Tf8p+T7aIogVjf7qv\n0STsPerOsJvMtSqLpNdCI/c1Vxm1vTBvlbCJ+h0x0aD/Z+CGcuVh4hvgu0Wz\nkYycJ0LORzyzUN4EcamgN27dlfwc64yzg94/Yfjf+tArC1qIdTVxA3WZqoyE\nfMAwWR7+tU0XUBEUSLLeumEWA8seCD1IgDARgXDUQLXn21L3cdh9OfRaYnZ2\na/FvNq2Km858yHQBUiA8wPSQ+LbGAw/DqYQSag842qYIgkgt0UZAgONGZ5br\nLOvkKrOenQRriBlNNM1FwvzYGxqLIkBBwHnHUYgq7SsP175LFwjbRIg1qhOr\niq7KTsJXHyWaBGpkVa1uFiF011NGdGiIpBc5/xDs4qEUHz/xT7Q6rZ/p0Zp1\n7PBvbDtFDZV/L2orv0TOHtOi7fb+n56lajnNCPHrwnJnNv0miyh6f98uDdU3\nTJXVysZXDvFMLJwEOduidDZYL8bnbEam45Zn+hg4LPyRH1ndQg+0Eja22q0B\nHUstd/cCZunzEh3QHGac6Fm3qEQX/PA5gKaPk6S/6WDX/7pGm1P8/fcEBlKC\n/k//ReS0M3aDODwmLMGQAbWydnArodAw0MGEx2OcBdL3pHCW01vTOGk/wKaF\njyydxZcdiKYDf3FyNobslJNMSpPD1eiO47npe2omozzLy/KY4RJzhtewUSNH\nO63b\r\n=o2lP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d5ce4b5e7914675090d101b10f10374783326ede","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.7fd792bb9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.7fd792bb9.0_1590081243708_0.027272789943525888","host":"s3://npm-registry-packages"}},"7.0.0-canary.a66493cd8.0":{"name":"@material/auto-init","version":"7.0.0-canary.a66493cd8.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a66493cd8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0fb474a775a297444b49b292fc05e20a1142efe7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a66493cd8.0.tgz","fileCount":14,"integrity":"sha512-vZinUVF9ZiFY/aUEqgMBBTjt04l3neJT5dRoLksuGImdXtXmKH3MU15qnS//g+wa2N6LDJmcmke76F8FMBaXYg==","signatures":[{"sig":"MEUCIQCrDKs3aFpFX+w6OXbDIlFkYoJKquVaCpoCAZZZo9X9SwIgFc8xm3UMNPgiTNOGT66B9BO4b0VCL+fR5LyGLVtkJR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexretCRA9TVsSAnZWagAAEdAQAIUckVUYokAXrJ4JUouM\nmTxg4+00Ouuczexg2Wz1fhYNtWJFJYHnWHCkb6EPgXI6jESq5M6egcNZpMqk\n8jnDtLVz4avgrn6/m2pvbNyEw9/cW9nNCfluXIYB1BJvTHBJFhJ851YN3Npt\ndqGD612AwhnEgjO8SAqyo6j3/Rh/iOWltfjx8GJf7rcRHDBjdAnhPgpOoe85\n+qC1TCGNqTQUemOA8LG7iIO32I2x/lOtzh9fx32g40iXnxzz6EOWuEgh81vv\nVWthrexIrliG3GhO78/O8aAx04oRXSZk59zuO+zhDnH01ts2JwIyw8b6dDNq\neoCBioUcxFEFuwaZQlwbCxCaTMpSYiDkoCETRqu0UoKl6pYrlwxK7y8f4RXu\nkfsxIMNbU6ZlwtTFNt87bqWZqGKAjtebX+xYPq1Sb+CH/Fbes4LrqqW+atHg\nlWnN45CrRvVZLIqpQQaXIcnX7A8KHSOAZtXXJlnBgh1MfLaq2EzGrX8Q1k2J\n9GY0WRfDRHcZvTXt908x2pH8ECRWaD2PoY54QgInTdaX6v4UiMIVWURy9Q4j\n6ZrMdUXiclKILLWUtfno1TCb9JCTpqW9eTmjRYuBHVf2BUNZ9r02zxCoYndc\nZqO16rKdeb0otLP2QD7Kvyay8meDwT2z3g3PgVoUPKGxo8MP5Nw1gukbaMOz\naPuM\r\n=tfzt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a14e3cae1fdb42680777a9a6b5706060924d68b5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a66493cd8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a66493cd8.0_1590081453386_0.9663789807061434","host":"s3://npm-registry-packages"}},"7.0.0-canary.da05f66e1.0":{"name":"@material/auto-init","version":"7.0.0-canary.da05f66e1.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.da05f66e1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fcef79a61d4854060b8315bf52ee49c7fb45ea82","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.da05f66e1.0.tgz","fileCount":14,"integrity":"sha512-p5d4utExj/VtOFKwSTtPNBphIuNAWecRHMfNMm+s+xps/L3bI5OPcsBaFUA0yr6N9BPF6vdXvmP3VQ7l68c5Mw==","signatures":[{"sig":"MEQCIH5F22pY6xu/IEbs1AppXE3xaROsGfAdTYsctMLsvleRAiBpo0vXFfh92phiLgVhHnsTM4M40kdYUCVHbTqeDtK+jA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrgbCRA9TVsSAnZWagAAOHYQAJM8de0LpUWATzBP755F\nKM8ttvjR2kERlbD7OinDmhgubWRQLTbht7Sdwe9TFJPZBilM+VWwRvr60X0p\n+IsUoA2Q/VjhWApkAvRXRprQmUJJ8Ykh1SOgHtdsTJ5AC8/kKp4UnjGXm2Cm\nMn+PqUvakZzk5QKZV4NurVnErZs6DvRNUbjRGCbJH1SjU1MosUa47x/wK33R\nMTCi9tJFQhUOe7k9jUQOxheXdxc/3KKog4vGnkOkcubPUJf9HJWkTH4rHHJ/\nZL+ZLbetBCkcfCgVFoKi4m/P2Cgf0NsTQhsZi/mMgpwKfuVo7QuBADv9RauT\npe9fs55F2Oc4Yk/7ZW2SgjOUkEGbsxgQ3xIyZB9ZcRoML8nB8DfVIbHd9PCL\njr63ea7yUU6JslUYu0378pB57WdYT7LUyiefca98DUzv5SXIVJPui/CEjN3g\nE1SH0MFK9aA7mbWQYnebDG+y61PcpkRmUXXH+cWIN9xEOjx6tzk51U6nqrsS\nIzJ7WHAR8yKVaA5v4u1CwxhBEEbGaBMmLBCIwV5HOVpVIkq5O1vLno4KspGV\nnbY8SPZxHm4HqUYPzQWAc3+acVqYfspGKlsCCfi7pu/E6HKWqqveUbkY9UX1\nwuKp9EUhPIAyKslbhE/b1Wd71a7TyMzucJwP0YLcoYYrEXL0sd5YVNBckt/S\nVCih\r\n=pT55\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"97f495e74f33645d8f066a4be88eaba95700a4e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.da05f66e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.da05f66e1.0_1590081562691_0.19956181307626353","host":"s3://npm-registry-packages"}},"7.0.0-canary.740860e78.0":{"name":"@material/auto-init","version":"7.0.0-canary.740860e78.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.740860e78.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c8f33d15eec7e91874d68c1e7adb024d749c806c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.740860e78.0.tgz","fileCount":14,"integrity":"sha512-kJH88yC59zsL1On2SLwIWYgvXGbNPBlwioMH2DWQHw5CQk6G+JyS0q3dRlNJsLdCOdV+FB3QZf0VWWqu/V+oJw==","signatures":[{"sig":"MEUCIQCvX600tfrFZyTxwHm8bCDBiD//YFsIBnSYLmo/pJSVYwIgY5vjTB7IIl7a4eoKjizWXB8TyDeEifW1Poveny1q5OU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrmvCRA9TVsSAnZWagAA9dUP/2BiRXGEXPhecaztD0yQ\npZi531BEKlHIM2l8E6fvkaJRQInc/qbMijx+EwVtDVnKzYaDVAScO3MEry5g\nRfJlTe8uxJr176hPvltdZyTwze99EeL5J0onkeiem9XcRDQ4jeWVQdPGkAm6\nIPBy75gZFJ61by3rGle0fmgnjjJD/OBhX37Nn+hPDZ4ZRB1tzkf6Xzz9L9IU\n41Q4mMrbP5jWKWwdzdeAjLnmlA8SidxueLOnZb8LgMtcUHcPqPaB9q0mIXbR\nNIcZwn6MOETTxxhqdM0Fk4BVuv9sbasGT2bIg3/WfskHNl1RuBnY1px2mqcZ\nFgwmHFfh93bUzndEEg2eeLQgXZ//XtPep4HcNNfUOqqklFBnL5gD6HWUy/dK\n0oGA4YmsaDrdofraEr4/kb3LNXlSdEN9FucYKzvG5ax6I7ontOMfGS0lLj/D\n3m2U6QyEtlD/MdL0xDlqY1jxUQ2Out3ySW+3nbnTz8DbqDdwl4g0q7xrk9kJ\nIqCiULPokSMD5RsZqyYfHHYOZuNsjhqCe+AR13xoPGMuZ5o4D7SlTLwBMHiS\nnkf20/ZtGLahTqVdpOpECRXqjUto4sICRuf6Fv4Q70NZQGcAZ72qmpGwcbtt\nHF7K7dMXKyX8ZWcMjxnc6zFVmmlGvtWZrC8AIOWrSkgcLiRi2wr8F72Ivm+9\n+rdt\r\n=C4FE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2319c23e86ed8e7ed27865b711bb6ea6970b98dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.740860e78.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.740860e78.0_1590081966936_0.7779586789953565","host":"s3://npm-registry-packages"}},"7.0.0-canary.5cea2610f.0":{"name":"@material/auto-init","version":"7.0.0-canary.5cea2610f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.5cea2610f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba5142acfce416cacf5ec2b124abfe4766f5d68b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.5cea2610f.0.tgz","fileCount":14,"integrity":"sha512-iaOdLbDq0MPunB90++366DoCfTOhhKq/QTs9PuuwwPhu3aqdNvKSyDp9cav66ysforw2QOiJpAvdfq9haNfnYw==","signatures":[{"sig":"MEQCIGOx12U0U+HXaSPDxYcOZoqHJ7KJIK+amdZCBMtIaN/NAiABglRzqTXklcZgDmj4xKC1PgTW9OnMGZ52JyJC37g9/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrooCRA9TVsSAnZWagAAQmcQAIT9VH4qvQxRzZLdqws/\nt0LvXaqaSGDcXHpfaperLQCWQReqZbBfDGJKZyDZwEwjOTgLv8JFW8H8QTiq\nZB8a4i2Q4hb0SW4Fu7uf5ySYCRcz05ytAmtpNL2fap1mGURdKnhvRroForJ/\nEhjJnwPle14y5R83UUJ6DlSF0lVAe48NqL1ioGOqIj6UOfi+vMOwVEVJSqLH\nyoIGFDwIg/IcHdrltpPLgzQo8OQt25b3SPFEqa/HJSg0a+3yvkeCANOojTFy\naUKX35aS3XWtSEWDgvZ+lZZGVLAnrrx9nhYfiK0dm195QgorZhGsCBAQ8MJS\nhe3MlYxMfXjWSlCfKYP4XwJ/fu864bXE9wOVU2mG0KQh3K64GsduXEhYm6nd\n2ymAMl2a8Q+dSYTHmb2PL5mFNpjxxeimA+swzND43J5+ZR5blddT/096FS11\nBNphWnsiAzCUuDRzppCLRpGZGlH6XHIH37n4ZGK49dy1ug0YkWImkMnDEbc4\nTu/pLQHQYio0qSYyorXMIyxWmW6GdtC1NtuDZ4bzN5v9Ej5SXgEn9igPvylQ\nJHNgHe2ETUnOleyEo3bRVuIi5S/V9wwuqODuBXIhosE96LWVbhZIyyMhzWHy\nWfsTPwP9xQQDgGkUSr3zBYsnvrv/cFXJ17NHNvkj9/C+lyn67J/UIBJurf4q\nAfqS\r\n=uscr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"647d4356b68bdae8879ed7384b0ed1ba4e1954dd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.5cea2610f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.5cea2610f.0_1590082087852_0.3539688496587814","host":"s3://npm-registry-packages"}},"7.0.0-canary.cf7747ef7.0":{"name":"@material/auto-init","version":"7.0.0-canary.cf7747ef7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.cf7747ef7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b86fd5676cf9613fb54f682c88391ab533271e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.cf7747ef7.0.tgz","fileCount":14,"integrity":"sha512-Sa9f054AoqkapAHTXBvV4aJNpnm1YFyaXekb/SD5vAffqV3k9WxSa0HnHB2k985fN8qu80b5O311Ba/FRDVQMw==","signatures":[{"sig":"MEUCIQDIi+fXwv59JLXx6mRv79IV5W+WGbz2/DmGClG7Nd1R7AIgTPAdYINGwoNyjn9dUEbf2EuMlbj8UUlpl1tvcNC7nhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexro6CRA9TVsSAnZWagAAYPwP/3TpQLqo5SOMrK80x/n6\nWRK/j8C5MJ+tTeK7lPrNkECbm0vRqpTM3CZwQAHyHwlejmUXK2WYa8NDcJnk\nDh98kMctp0OSVPHXbFlR+5cHEKEFWf9UXnlgHi7VxAhgGJJ/ZoIxS4wdwud3\nFjBkYi14Ypz5AlB/WZrYulB74VZ5Rnzn/W/mSfb0tYofizLmq1Lyig7WgwND\n/jW5i/gJ7eFPi3DGG/3On3jTGdwLC5B225JlwLeCBumz+bl4SP3fMHJMhy8X\nWYCYpJkQexmbLQfgZ2k/UuVTStfvVzd1qt77B52LBGxPXjmgVY72D5bWmWY3\naFBky9Wp4t0M+YCFbscgFKFmEn/lWSbQn7eD9S3CZ5J58S4DJZdPmI4NnpUm\nbKKcJe6yJMCf0vfyvaW+G3wXqvJpuUfHJaCSzbdVAXArWbSoxr/EDdxh0+sx\nGfcB2L4TxtxltvNxY9ocxNR3bQeC0QAOAhVmu1iqwP49g7WaqZHRPF+owdTf\n5q6+QMQagAd0gfwcS+VryDxMoESQzquZ/PKY00Qff2/Bkc7YC2dwyBi40lot\n9nerQ0ubytEfvtsUCA78SshNwaekz+BVJJ2vZyNESQwtp+XGuCTvlfYWlVqT\nvO2p11cwDdhY2NgVV6wL9qV2yExRwHC125++Mf5CpwcHJvckjLaSPJLwzXAw\nR7Nj\r\n=XUy4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"12d3ae46d64646ae020ede8b9ce88abc7efd384f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.cf7747ef7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.cf7747ef7.0_1590082106220_0.3721186380282113","host":"s3://npm-registry-packages"}},"7.0.0-canary.862d0d7bc.0":{"name":"@material/auto-init","version":"7.0.0-canary.862d0d7bc.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.862d0d7bc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca2a7793dfd0307c779b9ecdbf4a1dc24853ba10","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.862d0d7bc.0.tgz","fileCount":14,"integrity":"sha512-llNeF2OE3ypFMzWhl4vWh9lgMWLYdIhAtNFXCBQZSq4D8THnNr1uZ6TSm61dvrlLecBFA9WYCH7wxlRGqNOKUw==","signatures":[{"sig":"MEYCIQC0BuifE/qVVr1LxDPNl238SyHZKKiZH/BsVw1hRjFuYgIhAOgzfMMCknpsVMhGvhkSnrXnRizwz7Yw75z/63LCpLIE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrrdCRA9TVsSAnZWagAA/zkP/3nQ9EBtGp1yjMf/BLpm\nDnGeR3OPGwBDE1gMC/+SpPy9PXswqbCp/AmSLveO+ZI1WGisROnLU2m/G5DN\nvch9fOsDLbQWwaclDrZj68lVq3k3l+EFd3wlxNTUli4gFCK1iSDil4C5igsm\n6qxubPrAiIVnfc/XTO8W88iCvsfZmJAVGkdFYI9vTJb+DhD66ggPBVM97yfX\n87Fn/kebQ1+HR6W6p7rqimvfS4meWghrbpD7igTDgfPtIawJ5qsN3S986xGg\neeY9QBZPS5bE3cBB7G6hPVSROQouZICU5QaDRjB6asWXvcLw2lrKCFF7YUji\nvIhHVDEgiHJk0fXoFyUfDzTJxTtaairy4ZhH8vhv5SEbgRTbCsFJ0Oajokr8\nvvLng70jKyZ1S3OtFC7JQgj9CK+TNqsHVgQKkels31SAofKUOH+h0PSDLmx1\nvB1dd29xOcQdAmFI4JLLI+5tNFEfBCsHJ0hcvv+3Eg27cpC0SO0MMjYSRbAD\nqPdwO0LXeOKx1VPmljQ5PmaG4TuMb7GSICSO+/30XZqvT8H9qp4IW7ZWyFrM\nRoA/5kPSrpV8mYcsHlnOGrJGAanZs9tKhEOmsIXvuqNjHjcUi44HuqbxV9cg\n2Fs3kqdDmFST6tlag+eS5yuIEVM4TD7ClCMJHW6k/PVRh5NrD1vo9DV5pj6W\nolG2\r\n=lhlx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"534ebaefbbb3a8abf3be3e2e13c05f86a5461127","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.862d0d7bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.862d0d7bc.0_1590082268575_0.3112257944955976","host":"s3://npm-registry-packages"}},"7.0.0-canary.0008c8a91.0":{"name":"@material/auto-init","version":"7.0.0-canary.0008c8a91.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.0008c8a91.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d9ce25100167313e3c0fb044452785982263f0b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.0008c8a91.0.tgz","fileCount":14,"integrity":"sha512-jx6Ry77dWEgISlKAQuhLuPt5bNM6CHhTRwE2GzCr+PAB2ArrYwmGAv/VoEYTY4hYI7V4jCDrIItpk8F5Wkmanw==","signatures":[{"sig":"MEYCIQDqC/J1JAa7Yl0ScszTn+618u40BazbAq8OlOFPZE+/qgIhAIIxXogBbOKm4K4KZbZgXCyUEV0PPiApdxqE/z04qSa9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJextdTCRA9TVsSAnZWagAAeNoP/j/HSTjiAu6vfYskx2wD\npRmT8zbMiILgDdFSgNa2vhLDK7DoGvNit/+LMcBxokE9rMYyJ8YEwDmB/m4c\n5M2aABWCFplWSk4wdObmjSItnuZS1mLbxHmzPRYFvgo8M/sKNiTKNXIWyh76\nakR0aHFfphgrcfHLw5ftB66YQPgrhOGwgkEpj5OcflMIP4OVyuQ/1a5NKcF3\n3JXb7En9dg4lIoBXjif2V1WO5POMpTA4zW8dyk92cG2y2GHZ9KLLdrVng0lv\nr4rCBS+zC9lyBtyxd2TJfWcjpczHYTmDirFYPjI5bILUN3xNMpI2myOxT7pI\n7huYPOG1ZQPwoWvwRJmDhuDiSwIG/L/jAubHm6wrVhRF/xcqeg+UhcE42wHa\n0GOw+PU8+O9syCBnqJNLDZus0D7xZNxFs9IIbqA1hKas3FZeChgIYk0+uO6o\n5BDlGJWYM4DTWRShTrjtVpld737XC2iElrrJA0CcimP99uDxjHA+ZlOGWHNc\n48SWJyvgu49uLW+cwFUVZSzZKaCZ2QBCsuISffWjyOl+AGBJXMHwBQFJbr4p\n8c/GULS9XjWZMVHbjDYlUy4Zwc/VHQq08rmj+COhjkhRRwnR/jEuF5jN7Kr0\nnZedWS6C8RG2PagvwCbj1bzvnDAcZaAH5toSF+Z4b0yCiAWwIx2jSjjL/Rlx\n8YD9\r\n=Mpmd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5bafcd3cd9f6f60ca813af30e2b0a8974de09ec8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.0008c8a91.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.0008c8a91.0_1590089555184_0.13475604026119203","host":"s3://npm-registry-packages"}},"7.0.0-canary.541638fa2.0":{"name":"@material/auto-init","version":"7.0.0-canary.541638fa2.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.541638fa2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b7286d0cfa37ae6f20fd7cb96c363f125d1fe898","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.541638fa2.0.tgz","fileCount":14,"integrity":"sha512-d6rjrvWr7gKQ1oANYD/8ghgMceH6G9+F2RobWTWPkKPYTeZmM6V1hKS0j1Hx7qmYYGzevWgbjteDSlieJfjX0g==","signatures":[{"sig":"MEYCIQDoe0S0SKnQAXOxgIXNpRWN+g9TDdepk3kZYSt/w0VJ9gIhAOS0xP1XMuP7ob5PrcQ4cvEtxpaSvHNdgRVbZv2p/AOv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJextrTCRA9TVsSAnZWagAANIQP+wYPImMg1bnQzLDz1pPX\n0wnWIz/SJe0cmHHkuMpB725Kk+Zp5taN9XIADh9hyVC/7FWa/nzzh8qzjQrR\nLF9/frdRkQqz1vAOOft2VCTkISsfH9PNTZPQR6XXTyufH4kfmc6HVLRKMF1f\nO3C4NFehjen2qxbbvf6ZWGDes4BHTnF8oeTvAw+V18UzTAsc7BALWZXNBuGJ\nQPCILdY3KRbeHhutYoXJiqbCsy1j/loIp87z0LRmbpsADOuhagEWtK/t2vI2\nUTguqkmWdGeN2okCsnppSRmBa1HnLGHlbsgBuE4E0eueLaAMIyrYIHZq5hRd\nL5EF/5c2sWH8PyE/tgub1M+cAlcm/o+QNNE3ktEAsGFHmQYbeV3eu5uX0YMO\nkjF+g2gzwt3ckkUc3p/7UzGrdHUK+4HmipJXa87hQH466cX67RIu7NtL41hR\niyWf2phuTdzz0sS7nCI9FBS0Vl0tiS7NAFLed3p6HFAZDjfEaMR/vwivjKE7\n9IYszpG2zWjLmZpCs8re5+Gx1G+FsDgeUdJPttk8iq/EXdoIhMZMKgW1gty8\nhd2oGa76dKmvvEfJXeQ2Xbr4EUAR+/OuRUC43SYmHOXTZ5RwQ6jUueOM1pAI\nhWbVZyY/Tf1+YuPQzKGEybwHVKjGTuLQvSlrsneVgvHZgeC3CyB2qg4fbOV1\nULqp\r\n=646/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9634a8258477402629947671e06d007833e14f2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.541638fa2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.541638fa2.0_1590090451061_0.4254703687543204","host":"s3://npm-registry-packages"}},"7.0.0-canary.6167cd075.0":{"name":"@material/auto-init","version":"7.0.0-canary.6167cd075.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.6167cd075.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"93942107e8be746de34e25d48b873b7438026058","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.6167cd075.0.tgz","fileCount":14,"integrity":"sha512-3iUiV/Pjzfhln4l8Tg37Tocz0CtCVRAggvA8cTj/nLN8FOP7+6YjEXcf/1bNsuuDmanYT29QH0MMJ8ZpHwKtBg==","signatures":[{"sig":"MEUCIDd6NRELnFWvXPktdwfeg+iEykE91KQRXUjBXw1omuOiAiEAl5/u1O4rlUDsPkPUleT5pVb/CNIDecDDx/6gs/MHOgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexuKNCRA9TVsSAnZWagAASA8P/1uylXVCkNxbntGeOvft\nRonYeW708ovvOPNyinUXOaQ0jkO0m25K+5BSvtpDDepon5NgkAfSKYb1gVlx\ntJJi8uN1pcxaX49V4FUHfFmbUumq2BjjIKT8Lu7EHljVkQx42q3aE/JtP73B\n6w4gDCg0hRh4XAE1t5gnhK7OopurYvR/YorzRftdrEAAZvrZnJXXXbKyQIir\n4BV1sd7TuVkiV/DIa8onLU2uo+xeSZ1MoOWEespyPQvLPjI68pGL7Xu/mSWF\n+WrVusdtqlNzJbFB7TtGv09FcLLY2Fuja8IqmZxjwXh+flOH15u9JxqC8yCI\n177IRAwjOBu74FbW94YzGX4mb1mr6D+Ao8u3SbAo4LugEuN1ozFqA2UFSJju\nx5lL2Gmjztxyjek6nybk3qz38rvLfVX11kuGLzrHO/HKq9w8T3QC+s89o081\nbkZ4K0gXrNv+xWuG9MHyupCRePgx/p6EXb49H02ju8EWPgFmzNRaAOnffjRa\nm7MSfJgUqTIB0OTlCxPXn5SDqhzLsXj4hw4RTJ4W0hHP5Sj6wg883fKQBoT2\nylx41JYm/C50knPPfrNGrgFh0Yjln8TLf9yQPV0g9wYSL6ILF9rH9SDLqtfA\n5PgH6VNvVLX3o8u3SUUV92naS7kiJazIus/uK/91bSVEaSkeJr2VsBY1aPQn\nP+ef\r\n=PuQU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c86a924ab304fc32e4e6840c7c8962330b6b0fcd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.6167cd075.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.6167cd075.0_1590092429150_0.3793361579604737","host":"s3://npm-registry-packages"}},"7.0.0-canary.863ac1b0f.0":{"name":"@material/auto-init","version":"7.0.0-canary.863ac1b0f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.863ac1b0f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e44f1d36ca1650cbc49cb0a2929a4ab6c0dd7f73","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.863ac1b0f.0.tgz","fileCount":14,"integrity":"sha512-6H2DNyo4E+5gynwWn1ppCbix3e1qjMpSEoV5yMVm5zBggna5SgPijPY/ryHzAq2EsJ5BYmQFcTrfw2/o+FqLgQ==","signatures":[{"sig":"MEQCIGOGbhuUpGaS0QV13Ez33wlUm8WPP/NgUHJfDPy3S1rDAiBf60XJ2JAjlnFe5l7PUM4LEd0/PPTDWn0mXjv6sd1z0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexuuaCRA9TVsSAnZWagAAFJ0QAJ3oPCS5eCa56sRhnEh5\nCHdWPmhfKQT9aKE6Hv6k2LgDZsQTl84NT34xoTtIiQelUZogPB7zujSw2t7X\nQtnD3pput5YfU+CbKDg1o0BJHihDNqu54z91nuC509/BZThR6j1l8yF1NR1W\ngnZVpilVHHRn5tsmOykMLYxf5osejhPzac83z8R7h3GD/lfmprRA9FR/sWGW\nJUwn0ZJkGLa520TI766tNZDX2+7RSFe35SJn0HDW66NUv5uVlwWB7otSQD5m\nieOgzcPUoGxoJH3YgQDpMGNvuxihnhfao9yVR2EOzeiSHu2UM6/iQRBQKz8i\nmaQUhMHMlnfIImvTjqmbqe3M/Uxi6fOvpbNZe+uHjk5ZYuMDaQZ9OF7tJ4ra\nFD2rXN4WEr6mx3JskcWOiPboywJBsxQVwaRaRDipBNwqYZhibSSDIIrCVcE+\nAYjPp6Q4KhkigPQZ0ItQkYrL7yUhwgVIihXyurAheNLym0b1VcAW4DEHszML\nTlUWQuEOPKNLuHYFjFayhZospyG/7yt0kZ0hXxAY9rdTKlhVUX51VJqadXmX\ndFaVlUfVawteVhCmGw8wJHgOf52ZZDHjMwCCXE+xN7zBYNOyR78PcSePolzE\nWGHT/+JYDnxuaswjyv5Duht0wkaAIBjCz2DUJvkt7p0IojosawoOYDtkgTd5\nVlq+\r\n=biFS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c1e7026720dc12f1bd465dc892c8718b429563b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.863ac1b0f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.863ac1b0f.0_1590094746206_0.9859317388977773","host":"s3://npm-registry-packages"}},"7.0.0-canary.d30a214ac.0":{"name":"@material/auto-init","version":"7.0.0-canary.d30a214ac.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d30a214ac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dee3d4293179910bfbb1e0dbf7186728f8cf938d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d30a214ac.0.tgz","fileCount":14,"integrity":"sha512-IvIKJIFiCenRS8r67JqRc/r6vm+Y3fuQ75MVDXWgDrrb5XIJd8Efvxoc9dwrBFSOi5VEDrVPIwJuCU/KV8c2fA==","signatures":[{"sig":"MEQCIHu6CcqI5ev0CBew5Q6PC9WFtikaj47dPUMuz3LW1RScAiAuF6Mt0r4QYT/pDjE8e4V9a/C+oJS0PUFKEBs3b08CTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexuyWCRA9TVsSAnZWagAA7pkP/30HdvdAPK6WaU1FLVdn\nI5L8dMhzmv49Ptb4gUuouKJi/33zlrHmKbLvKbk9xGNVdEze2jSKEy9Yn6He\nsSxkh+2Un5mF0UZx6gRLkzoyuSE16fwhTwkn03/WLbzVZXKoP53zgbOqj03i\nnJjOYH64He62KIIj1ZHfSMy9zFKGMP0fcsu/krRx1xqUdZ5/gAPkX8cV313X\nkI//oVGYAIim5bzk5pcTHZpB+52Ve+F4pFGNpmzpBSDe9c8Js5XYZIdGfQUH\niPtoxn2TXmcKi2Rd/phc5OpwYgXQHSA2D/bYddWtOmBH47oO6wdp2t5c346R\nm0OA6Vxu2kKrL5I1vox9lIeJGCo/BOyAKizbxlfTNhSqDyZs1igb1C/sZvxW\nWLDzevYYIPV99LjC6L4IQ9qj5ATV4rdcqyTTgpaNn9ITJ/4SNmeoQdefOTW2\nmsbYcpX1jZEiP19ECcRezt+HZOSov6ZPloX6GRpF3mNxktGhtg8bfj3DubSx\nngxK04tztNs3UC/Cu4R1zAvEhR772ifZ7l4AknETd9uLEbd43+fyzoJVzkBR\nmxV68Swz2oj7SexchmctuARLUi/TpTUUqJPEBsTvONmE943gasblJrasW4iR\ncG08ojYSUEDnCNiRd2vVa0f0DKBIXthKve8cE5qv4T8bcDDWyFwtrPtzRNIA\nD97o\r\n=zSD9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"635c0e7c484f851d2ecb4be825abc36357ffc685","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d30a214ac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d30a214ac.0_1590094997991_0.39850469791685494","host":"s3://npm-registry-packages"}},"7.0.0-canary.62abbc8d7.0":{"name":"@material/auto-init","version":"7.0.0-canary.62abbc8d7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.62abbc8d7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f8cb7136415336aa47e9df9333f47a6e5b7c819f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.62abbc8d7.0.tgz","fileCount":14,"integrity":"sha512-5XnuL6/5njMXS+ZQ3DnIQLFkLGYyiSrmGlQsB80Jf5JGAPnhCRW7mcFL0gAeJTH1VlDPBgY8PLg6kfnfij3E3Q==","signatures":[{"sig":"MEUCIQDC4NqZn0vs1qUDlD6BWvzmoa5WzGRzuXClF6y1+ty2UwIgHfQ01u3OeImEAijEZZxprOkFyHlDFoQIbGClhfHlIeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexvJnCRA9TVsSAnZWagAA/8AQAJenU9RQSeh12GEshDVD\nfLo9rq/NdcDoTQUHfS5zCXbV7AAuvm9ASb8xjl61PyEaCLpPeboZAXdELa73\nTWO1hqTuJbQq2eaTNuvSDrSpmLdoOADUTe6AGvkELsRWGTjyOVFrod4DSRPd\nF6Iqkm+eTHHstveY1nlsYnqCoMhWQUkk3TKQmcYt1dmSC6eCH9DW9WNOKvK/\nWVBSM7FRgVeu3g8eopH0ZkDJkChQLny4XcKmI4o5GqCG1AE3lua3Z85Ms1I8\nhnHoQ+jHkBkXK/DNwqBwlzPrwfHm8/4GyWxdDRSW/QRFN/XV1QQzpVw2SRtT\nAf9xil4hGlQw6c/BsQPLqiHCL8Mvsi9z6BWw+EdLn4wvAnXoHIkUsvW4WnSd\nk71+6ZmRkrxd0Xi59a8BsqS1qZZSeD3cEY3JeHJCaWUpENFgt+dgUA21SbrR\nm1MV2W0/UOvIUPjfEcWdARD53Rpt/fyhRVHxq7OQkS7jM7B6r9CscxqJGLTN\nsAlR06IeV6lDzSo34B9UjYWma+AJL4Mmp27YN69ypGS+fmnfYOfeQ01eqpDT\n39HVGdtzBYM/b8GGpGMHSLe8mZi0btpIHAkg9c8cT1C2ZXswAf+QrwHRtNpQ\ntrScA6MgoACS6JzqqR3cM4cPXPQkZlkSMs+rm+6mFoTamK8RrMG9AA6sw04J\nWKeD\r\n=B9xm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6758c29e4b065e2aa9cf633b0838c4ebefb9f54c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.62abbc8d7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.62abbc8d7.0_1590096486423_0.8043744670158424","host":"s3://npm-registry-packages"}},"7.0.0-canary.49bf31d5c.0":{"name":"@material/auto-init","version":"7.0.0-canary.49bf31d5c.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.49bf31d5c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b8f950554f341420577d5cf9a80fcd0074e1d58e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.49bf31d5c.0.tgz","fileCount":14,"integrity":"sha512-njkuOgYDOLJ5p5XJSsV7xcTzlxera6bL3WA8FyfE2TduvXxi82tRmix4W7O4ubEEH0o8w3RHXZDilmZb+VBn0g==","signatures":[{"sig":"MEUCIHkjtYDVonOLjtfYLsuYMAPKyyz66kwc82W1nn+EhqnEAiEA88jGk7/TFSyPyt0xAQBHg1fk6O9f3K9mnCCh/z7IROI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexvMrCRA9TVsSAnZWagAARtgP/AkgNdVrNeDc0XLR95iG\noN14vBldDJcIJBAoL7rJFYYptxmPYZ+Eoxv35QaskXpUZk8QAKFz0GKRJGjE\nrkv5IlFFT6UJ468tu7qblKFSa86uzLM/lUqNUoeL8fzjz36qiuJ276zLVdQZ\nb107VS7tyHz5/ZoDjqG5jm0zAtsS6dnnt6d8wIDpW8vC5iETRnVl4xPvN+Ob\nX7hG0nHf809amVttbalHgnriyhVzbapezcOM4NrWy+G6M1P2dqMZfyFP4JOI\nL2mkqdA6XNSJomkBLu3UR2Kx/n4skHxVEc63L7CoJ8vK3/sWcYDTVEAaO1Jq\nmf7jRGhIbZ84mHR8MWbcsgkNYgeWIkVVZnxyX/ndu9D+6A5MUeYLNs1YAhUv\nOVbjwBp5KyIKYWkg2sLCeT7mDHZ/XPGHiGY6IZDYpMIzkF665TMSc3iaF8EU\nFwgwTri35aC0iXBB6aT7fbMqcYPPEJkeQxWKgbN1kquF12Gnzbr83yUdwZb1\n2ceNu/d1I+fQq0N8sDwZfQa0fVRV0mRK/0o4FiggM/LSFf0WNDXNruqJqoLB\nffU+oHz9OVfHvDKK5AkLaWo5PP3NCDmBN4DHlP7P+6NHPxo5ee2XMaSHlI0H\nmvA5AH/4E99b2HFBatGG5lU6LCKHpDrqFGAKFI/4JF8QzYCfCqny7DUniCMl\niQsl\r\n=WSvM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"01cd7b0082a754dfb042df35ec48efcd4aa4c52c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.49bf31d5c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.49bf31d5c.0_1590096682586_0.667143424530177","host":"s3://npm-registry-packages"}},"7.0.0-canary.8e17857d0.0":{"name":"@material/auto-init","version":"7.0.0-canary.8e17857d0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8e17857d0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"faa648007421c00d6f7be2090ff1f2a6c5fc5ba8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8e17857d0.0.tgz","fileCount":14,"integrity":"sha512-sETtr255UuBNLAe6LCbo95ChtAeWkGHFet4/W18Ap00P6Wdus79PSQ0AQ1J0EaUHinLHwhR6LTIS4DrdZVGttA==","signatures":[{"sig":"MEQCIEQ9gq+W7N4rNQWAsuOfp0fNF9tMkKUFMcT4snw0ZNKUAiBQ3oltsEny15101w7n6uIhJ4cgtysC1Xe1P8q54sKxNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexvNiCRA9TVsSAnZWagAAwoAP/RGiAOGdIJXhyMVQIKab\nVvNiGAiLv72TdlAYQSMG3wgwVgY6ys52c+xZ6bLt2P1V5XP8zliIEEss4O3i\n6md6ivEs0ni0dNxa7iTukOwW/Q9rTu9uHMBVOV5GE9jApUZ+EzmFF6goMTVp\nFHl7HSaiXF1exhb8R5fOV66IJEDZzL3gVBQ0xylSv8pa1N4nlAXb9JvhhlPB\nvVMmxskS9lLJnLArlFq6r70Pjq6pg7FWLtuhAEWaI8s4XYciEhD4exbf9cqt\nokeGhR421Zb9/fsa7oNaMr2gUFFTnxmiTsr6Gj2/WT3Afms74vwJf98YGpbc\nITi+OQ1NS8oVIprkf0laIEzxSjiljRaX4hou7zI+AVvWaf6trkAkd+i8iAZM\n9ZYqB/HRmuHp8C/H4E+eJ8KcwN76UeTf6uYxsJvHfBAp6nRYQdQKjAzEkjMa\n+SRGjnSvK4p80fXBImoa4I/GoHcm3Ev72L7C2D/6HyUGM/YnkPKM/eyFWiQ2\n/EjdCJl8YNZbMLx9qsWWS83+LIqQ9F6wwDZnuwBpQVBRrPII5ag0zLwC7F4N\nlpzO/2gHglrgymxOeuEPEhCa7Lb1WMi7lWMWkPcbkUOnfDD03HwDC3bRNhoX\n5qbSbcgT32zYSxUd0yyLqPNjd8kWz1H3Yo1fFTWp4pfJLJCuof104G2A7mQ1\nvY5C\r\n=rR4s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9b03d700366fd287f2ec053c5ef4ccf802ac600f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8e17857d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8e17857d0.0_1590096738105_0.3068109177656799","host":"s3://npm-registry-packages"}},"7.0.0-canary.c113fc942.0":{"name":"@material/auto-init","version":"7.0.0-canary.c113fc942.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.c113fc942.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f3d3ab6f0ed09dec716b7d901a8416b23603997","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.c113fc942.0.tgz","fileCount":14,"integrity":"sha512-c2XDX8Enq6JxVEc3V7WA3aMoLJLXySGsrcTKphUuQkBP28JTOboXLVKwHBPK2e+2n+MH/mlhKIMaWQnUOdKwTw==","signatures":[{"sig":"MEUCIAvIyoD8vyveLIiFo14gW5Lkews92+6dx8ymLQbs7MQnAiEA1UFk/SFiFW3VwJTKsUxSX18ABEE0jy1FHttuBd48c2Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexwSeCRA9TVsSAnZWagAApNoP/3nWWbw+2ijqA8E5Pb6y\nNio/DRbDs01UdDbTDYBwHuDDNR+WR1J92DS1CzCZkgtdMjngLcOSqQI3a0li\nLfpjOy4j1XtBOUX7vErSfoQxcp9TYzsLgl4nwKker4Vft+d8I0a4z3P9Aq1r\nE5rIkyCa0AS1GcFhqTZ3ICmE11H/u7JL3UgQ+CH5/UhlAc4tM+ARfdZp+eOx\nfwr/m+cgTD1c1R5MJhetoHqflJcZkkOubSS9oBHf9j773TzWBxwrotHTIYIn\nqarJioJVG8YEMiWxARhvHY+k8uvPSnNNw3b1d2CvnfhKcgm7pu1lYrFl7c6x\njg3ViXE6KPZiJLzL2Tzcj9ih8ljBH1TbH8SKqCD9Ai7iISD60RRNFNq54b3v\nw2JpJBvf1l083CT2hrQ9gjCeBxpWU90BDzkxi+84k2/dzXFteXDX+63pFtz4\nnRb+w8ED4DF1+3XN5Cxk0EUr60Wu827iFZm03N1jp+i+rAhFRetEfRebtIKn\nDh4rgAS9WPU6MHnyRjZF1KWM4D23wNpyJJTFLf9QeauepPBgvGmlIQUvTf5d\n54z/c6554XzpmNW2T3sSkmuzSubX9s1tNxMA4k3anTI58K/PkG7V/nmMA7eK\nJ1dnowgkT9t1llEW8IeHCiYW9mnY4T1zG/F4qVt4h478R5MX4uAXEuMTfqgn\nx+PS\r\n=V2KX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"49605d78c19f78dc1b28a35457efd8dd808621e4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.c113fc942.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.c113fc942.0_1590101149906_0.3068857234573077","host":"s3://npm-registry-packages"}},"7.0.0-canary.912d9021d.0":{"name":"@material/auto-init","version":"7.0.0-canary.912d9021d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.912d9021d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8145b53936a3b5e128d3697905bc64e1fda4322e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.912d9021d.0.tgz","fileCount":14,"integrity":"sha512-SVmOkeeZ2rEQqcVQTiOiZP/sQ/ykYj8NzjEpmOolUYoDTrEZ/qZJh14+VkN8cIIQYYw46vtW3QQU43eVxRaSdQ==","signatures":[{"sig":"MEQCIDo+EBWZE6axcU+2HblV58tJu/B9ZQEP0hrDs9xGARmkAiAa+l0NyJAdN0hAqr2jRRkGmQ6aA3TmjQB3EQJjR777Kw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezWObCRA9TVsSAnZWagAAPVwQAJXGWi6wFA0AdEic+d1v\nsAQ5r9VF1rHCVz11tqCHJsFUVNESZutxTAhiRE6md7YPw/lSA59ETqN5p/Ad\nhqnJRSpSWMGLKkRjiJvUU5Gc4glG9wmFKPNyQMC54SJJvWP9COLOVa1YnThw\najIWji7EpD2Pl1xJaUR7FQj/6pKvunw9eN6ukdpMY50v7JnA+Wq5J17K3nm8\nF9/zDFrc/hl7VdsW84xIuL5MJj2JNSORqOBBfE//JaoFiaxba9+A4Hg8Em98\nbD1blytceuKBwFRfyOzKxizYParwof22TanGvqsDrLxB27yh/c8WLa+HluJ7\nGp1wbtmXoJp3WA03+n+fK8Hi0E2GWn5oTNtdYPndd4U5WJfiGmj9bBdFbTi/\nxYaSx7F6a2aeHjoOEcdb2xQrIX6GbSStfi+UefphOWhI+7R2uV86nM576DB8\njlsbMMdTPDLbrueGuKqIylijmSMdVsMQYAxNEOJOtnR06vFJMIcaLjT+aWRe\nWTqO00bURUYmhvY1rWw+Z7ZNfNiwddkRBC1Ln5C2A09xHlVL0aeDGfWLchM3\ngnaupsffStoqBRqIZZab4j0HT7/wsQN3YNCcaWJKIBjCe72slxOO62HIZRmC\nz23Glt+6kAGNPip8zF5jAZge5Uy2DFSjllxn+7IyaDxxjNLaf4S2B9OCWGmB\nQFx0\r\n=ipUi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b7080ce5675d8ab69b7f361d040e079511499175","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.912d9021d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.912d9021d.0_1590518683414_0.694643814772183","host":"s3://npm-registry-packages"}},"7.0.0-canary.68a2af131.0":{"name":"@material/auto-init","version":"7.0.0-canary.68a2af131.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.68a2af131.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f8f6ab906b8a9e1d58fcb35b26a3094275a1d220","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.68a2af131.0.tgz","fileCount":14,"integrity":"sha512-O5U7YrwushxP7cxnCF7q/G9lK9Jx+0C4ITfshHyq8RF9SK+Ir+Lb7k4EFxQohb4Uf2jraeOV4t83mgjjaJxMYA==","signatures":[{"sig":"MEYCIQCFfoCEz3NZxMk0kO6BgSkkkOPa9iz4F62nJpDb7Krw3QIhANcHwAhG3+s8Z5bp4LkunuJzWwnzmDJMva1BeYcqypfN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezWjNCRA9TVsSAnZWagAAnjMP/Rvf3wn+Kapq5892nVxE\nFeruauMYpaA4ujiX6anNsti3gvhfIFv51VXvFCIVsgzHmz6BqaMjc+8xBSXg\nz0NnmcCFH93qLB3W8uIIjaB9cmqpnU9HzceK9sELqicz8NoFuCxufe8fzK/4\nGyXl+UgXX4KDX5ywnLu0fNyx456jazzQIhG8VGRiDFph9zW5egKgC0FMUIMW\nfM5w8t1RaULDEJ0ktMGb2H1AWMS48FCwbi/YOaag+AyZjLpw18b58vi1rx9l\nKjX+VpUJ6RXtBar2FuG/UIytyDM0CEKEZiqYw3u/VbT+4DhkwF0oLy+F7MXF\ntQGvzK7D1iSceKd7EZKrbG8Tl5Q5/oISI86LXDkJmsaPbouZc2v643GeneHf\nOi8YjvxKHAKU+Xxz5cyYbM+zS4+aLWMpasLuVF6nibAQB3ccERX1GwkXPfQE\n3erwCAfH0ehlsfD22OD57Hrmme1Tfbcsh1attM8PGDkfZ9ZptJwYEQc96jWQ\n/pnciCgk/pKeWq3ELuaZq/C7+kHro/8DfjLMEwwyRJH4hBmC713mutyiaI6C\n5hE4VhzknFt//Tjd4ie2QZcbTN3yo4wNQG6W8QHy7WsQ4lo4ME0N+1j0pHPS\nUgh4+xYn9EA4D6Nr37rOmdWDv2mzKiEaaj6ZxRKqNd5oiKzsCxBJ4XWqYN3x\nFGFY\r\n=IlnS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9fa697d39bb8f18500434764b1fd608819d2e194","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.68a2af131.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.68a2af131.0_1590520010238_0.2111078495715124","host":"s3://npm-registry-packages"}},"7.0.0-canary.01de07011.0":{"name":"@material/auto-init","version":"7.0.0-canary.01de07011.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.01de07011.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0ec87fa197156b821e8c3df2ea10ce4965c67cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.01de07011.0.tgz","fileCount":14,"integrity":"sha512-YtR3iwOoGv4wzA3vO8GBva+nbkjK1sOfjhf7b+eEbhcY/dEiP7AVfv0N+I472P7bstJbV12GQI6xxLQxzvelPw==","signatures":[{"sig":"MEUCIGPnRjrPZejND0DM9Q5CXRtTFk4kvYll0PxOekmklIsQAiEAk52R8D521hX6v5AEah5YQzolFLQBBVPFMTs5ilx3M3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezXNlCRA9TVsSAnZWagAAw4YQAIa94zbGBeQxwhRSOLEj\nOu8Wd1qA15Vi80kzzzIOEix+RXFq3cr8ppgFbgBosVQM7/2+8+d+L1FXZHQs\ntiY+eiTYd66JDNEdgNISoBCcwmaUC4HIxIsaMN3G1c+x46/EpGet4CzNMpBR\nqijQkR8qKaH6QMvYKdEGB7PsMLiLyvcDoHrzHF04bDlZt9tILUuySFYHV3Tc\nbbB33ubv44n9XgaTs+yabcoc7S7jdWbYeNm5dJc+eb0MGyCBoxQGGOVDsJBS\n1NrwD2bTAS3PO6I7AOt+S3dwUAFzc+nHfHn+B0Bqz+OATtC73I3xq2wjwIZV\nvWt1uEnIarEAE4OvJdqkMW8e8fhrqUhKFCWuG6GSqKHMTIcWsmD3rV42/j/Y\nq0NrkFKkJuDn0iujMVRYA171WwcMPZ2wpkhn+VaiTk82RniD/5S+CKiFyP9f\nN9qo3wwj48zGxdqyBS77l3qcSFuginZJQfgtlavrZwOixaiXAlM5vqJeTfOV\nYHpW2TQtGPQ7y4Pwu3TnVe51ZD2D9Gzm7VASKDdTZhg8uy3WiENX/go14M7g\nj92qUdB/eW5rUfyYhxVPM4PeVgBZVQhRYR0M1pCY1nJSJ3mt8rPJdZUyRzRJ\nHHZBnKEoCUpmWQnOmbRElkR1lGG8R/7utLqNEcqNM8Uxw9KzCNDBBG7L6wh6\nT1jA\r\n=efwU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"58ff4055affa7a1d66e79813fbb147990e5360e1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.01de07011.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.01de07011.0_1590522725185_0.9899549067035627","host":"s3://npm-registry-packages"}},"7.0.0-canary.51d4535fe.0":{"name":"@material/auto-init","version":"7.0.0-canary.51d4535fe.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.51d4535fe.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7f0bfdf83b0aacf99d267d5f9dc0905cdd266381","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.51d4535fe.0.tgz","fileCount":14,"integrity":"sha512-RlukQ11EKch6LjkykUj3cKZeeydalXzAOkPRA+UdsgSwv3zg7hTePNJM2MhL579kKawREgTbdRDdaPRHYbGUqQ==","signatures":[{"sig":"MEYCIQCcaF1hpjloTNfaepHvOesMXLssHd7lP+rnof83X/fl1gIhAPpxiN1GF0z0MSXlekD8PyOxaY/fKTWbsSgwCiR+vucM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezYtTCRA9TVsSAnZWagAAceMP/jjLqSq5outq+scNpZhh\nIlW5PyQSOl2d06oxhbdwmV1ykarV+ZdVFpIBPN8RE80faoA6zdBDGMhF/VU3\n5M2pgAUbQWnK+Mo5ozGD4NA3Zo9VrUnP0NNTJFRsFRqYM1EA0zRiM0/Fftg2\nEqQQs2wJOi89/0/6Dly4xqtTjNSi3dy03/mVAI7+GaZ8iqvZVwZmgKzjnj6B\nb4EOISjQbrtH2B1S8AMBDWDWk3GU3PdWtE8qjQsVS82Oy8dYx2QakUaNXkqT\nuc/UyurImW1s3m2GsZY0vs+Ta4Z04iPnEU/WzGVgmoIc1LuTnkxSlzlCll+u\ntpD5VhQMFn1/oRRXMrDQ2JxyAJJX24nKOLAozzV9kkYvWPmDxpQgAu9/CJbZ\nT+nJqa/L4HMR4HrUF5g6Utd44hznjlCrwBm+uySj2vIBwjCTANoxLBGOXDnr\n6KM0wI4PlOunPhHjcaR81R9BcCRtAp9t3e0LAImFqxCnOuQbPBm9ZhQpXt5O\nrHmYllKFc7/yqGhraiKoYblOKsSoDJD3fKSqYW0pUTFtfVEnemDW48vM1Zre\nvq3UeH9hq9SayAUWxmFoHh7iyRXjeZ77uWOV84QpR2lBTwEPVsZwNoKH/KYf\nhSUDktixsLN4BDQZqnXFNkfQIh2Xyo2nHGKGpvxmuZv4T54B9f1u8OvP/x78\nPZ4D\r\n=1Cnn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2ea346ccbcf8fe2cc90f893a510a194ad4f67356","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.51d4535fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.51d4535fe.0_1590528850578_0.3458848272587558","host":"s3://npm-registry-packages"}},"7.0.0-canary.b86d826b7.0":{"name":"@material/auto-init","version":"7.0.0-canary.b86d826b7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b86d826b7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"94359aa59f3dbf2e022937ff81c30739041b86cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b86d826b7.0.tgz","fileCount":14,"integrity":"sha512-7oL1+qm6WC4jtzAF8UEIdfP3NlpFXAcG30813UXXeESQ4j1sAG59E90dqYPHFSAJDfVBWrRWhwMnQFANjE9eEA==","signatures":[{"sig":"MEUCIQC2d9QawQslJ/pfgG5l1XDYoC8vme+Yuk4MSrjTl7dJ8wIgAryx+XoD+BZEj0qUtkSZEgFKeWs0svG5qDvRNTQxReU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezZRvCRA9TVsSAnZWagAAe2UP/3jCJLEndHUYxrEbvUZY\nCtltAERIlPITWf7qb1AFZtlNSS3tr4xuptciae+tD7UbCAGZnlyafrxtnrKJ\nWU5kEFzsAKGXArKAaxOpZ90uo6EfJJlL5KbLoHe7QHaBuOpi/Tj4gIoP80Q1\nCFBYrJh13qBB7vWkOnvgPHNyYaQ5V0baQH9Y0Z+f3eBjR8FdCFOfTum5TLUp\nQk94QciJHIDz3k3p9k83R9MPsNzluxD854CXldY9cVu0sRW3xiMcE4lZ/OJU\nqwlXB1ReQtWNltO8GS7VogmGTgMtkrUtF8fhi223Z61EUjgWq/heezORJVFT\nz7yA6ss29IGM0CNgcfu1fdMFKbZCczbc4G/MhD5F4+8/GXn7NV5JzWhTNExW\n2V2E1SvuPnadcW2vYa6JvA6wGVwqpJ3I8lbGvAxXd2UKKEKJ7TIZRt9kIhAt\njhnIaQkjiVgDpMd3fWnrIUkgGbpcUy8ilcim9UZ5OCj+mmMm5oZ4P4Urz9kt\nFuBMOg0WqMQX7abshQz1IUtx2bJn4+MY8vZi1F+spoLlH5n5AHEIhj+R/2yW\nZQcRPVqhZtg60DT39UDzToYwnWNgPbA4x4wSiCZ4V9yQXhcvZhNndqfkCG7C\nKBLgr3YEZD8Wo+Bx/A+psXgakpYhLvoE5UDlbZcg0rsoZpdetCITBsI9yAQt\nc2vR\r\n=jbzb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2b22865938bbce871e6d1ce8ce0129227142073c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b86d826b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b86d826b7.0_1590531183202_0.45317641643762396","host":"s3://npm-registry-packages"}},"7.0.0-canary.d91794c7e.0":{"name":"@material/auto-init","version":"7.0.0-canary.d91794c7e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d91794c7e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"44580b25ae2f99590415a57288f66f9ff186f265","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d91794c7e.0.tgz","fileCount":14,"integrity":"sha512-x2TWuIeE9bW0DSEzgAouQQOpjwgIF61iwW0TvKXZ3x1OgoXsaCP33AtRbgUBXR9d3jkFpQwEW44DjUoMiN2ehQ==","signatures":[{"sig":"MEQCIC61ytX0yMKNqjR5MyvbNYelWYy3ez3cRBs4He37qKurAiBDghXosNlZtF5+7dkvw2Db0I7naDa9R6JchG1JPIsFqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezawvCRA9TVsSAnZWagAAVugP/jwod1o77dgrt/wkRb++\ntuVSWP9j854MQrooD9EdOWSj7bHIZReQL72+GJRdZ2xjiYKG3ez7Zfqt6ng4\nl7KheWezavY5DlK1o/3dpVzdgITVUYjlfIoBwgG4qnfa5+dFWAJ0C13D2CXP\n1lNhpPB2O1oes9Nc9YZsurxoxx9BiGwccFZuQHlpr1QSeC/gRbzq+i/2IfAq\ntnJqPyFX1tOmZVSDe8c6HhYMzRFLd6IEtUQFBgePQctKf/XJ5FYeHT1iUKsV\nQ3/ZjDWUwt3+jFd5hwMupL+ycGPTkqE33AEAjEshPYMki2GcIJTu97g9b5SD\nZNyPiK5dQ0acE6cZe6eJ7QDF7xEi7r9PQzuvXprs2N0FIfjVMMox5LwXet1V\ne1NAU6E5M1GeO78NbVu2Z1kGsQCqtXFXlMKglPnAPF4Hn2OX+rMnfF1aYY0Y\nq3Vt9z0jqr+5EguSiNBAsEv7f6UUipYpn/rrGaN6C1CYVDBSQa9IkFBl8EQw\nNk2yI69ldrPH1buu0g+T22tIJ3tAH9ivUqfP4HnacgShzm+qdKeoJEed4HXT\n8JFfFt1iPOfTJ33PVFjucbqvC/Tsd2aXo91l5JgUW1xjoB1hP6sr+LTFnGXg\nZVGkl6a73yBA/GCurG4aOPPS86XIC8iNvt9KWckNXleNMnKDd8wVKB9soCeE\n+dHU\r\n=KTxo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f931cc9789364ca07cac4a17cef0a225bf43c168","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d91794c7e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d91794c7e.0_1590537263208_0.7367974023796269","host":"s3://npm-registry-packages"}},"7.0.0-canary.8c6d7e076.0":{"name":"@material/auto-init","version":"7.0.0-canary.8c6d7e076.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8c6d7e076.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4abfde3a7507cc957f336ec286e739948d0e3212","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8c6d7e076.0.tgz","fileCount":14,"integrity":"sha512-im5xoh+Pbe1gj7p38suPo79AKg878Hj6hSGZAzzqnLCoyDIXoueR0dw3SWuuei3TnUyEcwhROwEZW4fAKvrmHQ==","signatures":[{"sig":"MEYCIQDVtoAogqaNT52FxHPQBhx05kmZ1mQUacItLNGTdFaQkQIhANnamV3W62bt3RymF5hhcflHGBWYeCwrzzMB/7JtaZxi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezrhqCRA9TVsSAnZWagAA7OUP/Ru+peGOMUd+IUJIAoKA\nEk61TCTPR8MVIE3DM/Dd551LB2c05hnzvJ9Z9tgsE2MuSkjfdzmshHZ4edhk\ntmBe3V0Q8R9NUPPJdSxelucM0GPDJT7FAHlF4YHJdKitmnV9h4lc6Fgm4eBK\n5/dFSpYvUA7H4JJvGducICMT016ccSdlDlBAd51l3bFIA7UFfx2tLK0MfvE1\n5vY2VxFXqwRq/r85TwWuT+wVPeSyLUuDsc1mYVzb58ebSCxKQ7hRG/Q8KV04\n3NeZ6NFroarOk8ew2kmYOc6EHGnEb4k8e040C45KeVVhi53ZVMNJbekX0VRx\nGtu0uSh+JEbLZp3lobNMk+Hz7eA2lfREMsTlapYIhTjZQDN8mSlS6Pm/wj6D\nXfpMiuRFr8dZ/HH/+f1gur+lRzGjx+TNlCrYiR3hMaKQEkuYTyxCZ/MwXWnP\nVzFv2SAaA5BwuBxnvVziYAMBlBqKnEcH7kJzgHTONnCg/p/R4uemRPv5CQZo\n/yLE5qf2aRvSCbPehV6BgjGJ/Pclyd0Y57wiJVEP6LwnkhAJg2BzyRKmUUad\nDGIX6ovgQRDqaUAvwCKDB+zdcYqho2bjjKb+i5RKBJGpmMM2K3UMlND1ZCZ0\nqWvE0vUKWOQIfb6EzjT/q5Se9THK13ugJwGxDQDaUUt8jCp5Tuzd1aPMWxZz\nvBQ+\r\n=pmNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ca2efa9bf20bd3fd24c7f6ff263721fea798614d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8c6d7e076.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8c6d7e076.0_1590605929716_0.5404817847512835","host":"s3://npm-registry-packages"}},"7.0.0-canary.5b5f62f93.0":{"name":"@material/auto-init","version":"7.0.0-canary.5b5f62f93.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.5b5f62f93.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdf7831eb62f741afde33c2f4ca074cfe0451062","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.5b5f62f93.0.tgz","fileCount":14,"integrity":"sha512-Bepyd1vSWp3sAdUPWMqebx1a3MhE7naWCu1/f5ds5ABR4SAsrEA7zPb8Owxn4A93ckoaPNSJFSaRF5YBUnKn8A==","signatures":[{"sig":"MEUCIQCIRcKU5+kG/k8VPonLrrIJVVUdxaIPRe0A1Xfd5bA7owIgHzRUgXZOw49Wl7U4N38qdWrfW88FAYnf2nXqMkUU4S0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezrxjCRA9TVsSAnZWagAA3rUP/3sLPP/iTVZ8IC4trJ1o\nzibmioiczFEsiyp3ch/WDlKRFlq0Y206mduKcCyxcRII+cUMBazy8JPSUxz/\n4xtTBYARe8TjIEft5VxiDrg+iEdYzIEi480sw4oZXLJHhFzuu1O5x3hkpk1x\noFu/l8jKZbASvXyybNwu9tIJgcgqOWbbh2JEfiaRxPsppfWCoNGlIcy5dXA8\nHngH9Fdwyn5ikJK/OdN5iOiU2RtAZ0fmXOQsxZlkFqaUAiRM0JeYRGs1f7xk\nFASRml0d8fH240nUyOaGJKKJjbXVkOzidCfLn44AigX0qeHFuc0YgBwD8x0Y\nyFt1+6CMwxWHFHu5Kl/8sW4epB3FrnG0w95qqz3VJaIUs+pq1nixMtUS+FAy\nQYuJ0UseDtikjs7OAP+EnGtjq5RHu8pwVtDjWsf/mnt4ztXHnIsggqqaQV4s\no6Sori2vRCX8xA6+DfvCQhXZpfox5WXHAY5FXlJcpmEz6K6raJE2kb6Cq3xV\nRQLWEYDYKXkV2IQrmwLAnEqaHqbIfblHvhgYykA6D8b3FPKxGtHWm4v4bjDR\nbQj2reSsXA2kmNNRQCNHW34Ub8kpCHLD6zgKezbilk6TkTzeBmqjdbCzCNKv\neCp2D16aA/CST0MTvBIWxh0tcMEazP3EM99+mYNriTmFwD6EX71IsSDk7V7W\nF4wO\r\n=76Ys\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bdb576423b0f8020c453a5473bae420ee287c240","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.5b5f62f93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.5b5f62f93.0_1590606947365_0.054027696087322274","host":"s3://npm-registry-packages"}},"7.0.0-canary.d9972abb1.0":{"name":"@material/auto-init","version":"7.0.0-canary.d9972abb1.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d9972abb1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e72fc0ef41e69a88b9090a1d02bed9a1d6768388","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d9972abb1.0.tgz","fileCount":14,"integrity":"sha512-8b5QVxbIZhe3QmE85hOU+cv18JYSO6rh9fEo9Htg/2eRzm4wu+Ic+3HsZJcH22SY/uksybsvDRPY3mtVRPjksw==","signatures":[{"sig":"MEUCIHg5No1OzFYt7u26EoH43KRNtL1dclvJ3iz3AVF7WaycAiEAyeAHtOzQiH9PlwbAQREI+9eo5403q6RzjwMXNIvqRPc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezsuACRA9TVsSAnZWagAAsAgP/jGSJC/hN0F1e8dinY08\nCRaphl3o7aagBeytqPE66NiFmVei5YDJud7NNmaKyepFeeogj6/xtzcNobXp\nx99UVy0IqYHr4awsok7F95bIKvzhQyJ8ai8gjeRRGNyvOwM6zQPp/m23Zm/9\nUyLQhsDVOuLleobCCMn2H5qB1luxSbigLVR2vtbOBzPfrVgaOCpknYP1jUUk\naDNpjwwDW7skYBOLE7BV2mKLRK3gDqjwD47iDuDFgG4bO5vONH9X3RN9ZBDO\nBsbWkbUfjFxipBei5wEcvaqvM8AZy5Vxlt3VNBcjd3jj6W9Xj3+Cg8rrTFcM\nLe8omLsJdf287eVUiIMGlA1xi8AM6HLmPPe5XooM5SHjUaXVMi0/fePoPXr2\nef1UZgdxJQW4FaH5sVMRjk1UonwPoFX2B7FcGg+mZJlTy/Uyfg4BCcFNmyxB\nd69NkicD0ZVjeR9kq7+WKzzGBH00e0DOBNpRgO1QZaAMLqb4Iaxw2xXORrDf\nQZdm4XUUOs1KtvQhx4y+lBOC0T/e0bU7SH3O4CK/XWbIfg1ASLJCU157vhFP\nINa2uqv7i8BbTJMMweQia6WTrpZl7ATFzYghS37P43AciEnACmrkoEN13pAr\nTwX/p7cg7wX8VGHDRILa8rFmk2xO8BL3T8vkEqhPDRo/bkjX9vvZ+7yUv8hv\nXP24\r\n=xsHm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3db449915645c45b366327c8152342a34f1e10e2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d9972abb1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d9972abb1.0_1590610815476_0.9566352102543263","host":"s3://npm-registry-packages"}},"7.0.0-canary.6556eda2b.0":{"name":"@material/auto-init","version":"7.0.0-canary.6556eda2b.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.6556eda2b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"347ad9e6e68c795bea0e01e5b5d4c10ad6774d0d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.6556eda2b.0.tgz","fileCount":14,"integrity":"sha512-n+uwk6SBs4b56kyv5A6xI7NzQ6PmzDkJKSpDf5RGpvMK1nOlN9SLlYNb5zKbKic3C6Zzm8ZnuMN2qqYfNO4HTA==","signatures":[{"sig":"MEUCIA8jI2vU/eRFMy+HSw0qJBL9OcGrCWxu18QmbMtxb/14AiEA+RFJBaP3ZqmcnskQc6wwP5yKiIylPpU6AvIIZvdn8ec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezs2mCRA9TVsSAnZWagAAdkMP/3J67EEv10UsNwtsHHr+\nArWQInn1ymMVgq+IjWBoo85UWXaa1hv/leEIU16Y1GWT1qVU3m9EzTcXjwzB\nzz+Yt2T3YZ6UmSDFCcQguEklG4LeuZtdY2cSwclhqh2ZvSwCuj3iyRaH4vVV\nU+5O9oURCA+baBcpEtKx5QTJBEtIYN8DE/yTPlHPPfY4FJWJhqi0+QQclDeQ\n4pa5mQMm/QpRc3M38hBiuyjJ06iV6EUfHStWvkhTiNavrLHznwMryqDWj1k2\nmFtnzEnwqSuFOl9yg0kT6u181ua2RRECq117D7R59Bm5hD9UyAHAJvuzAPLB\nE+IxC7oJquGCWNe1RqlUDPq1esU4L8ysFO1Z0ApfmZiqZpqndGxgq8wzdYi8\nWnXOjzjtc7vZrrtMsnyJhvSMhVp+7HxwHQE7mRmbk2c8Xj9psBPQxzZcc6ar\nAMxqTFkuc5Pmi5VL6VJs0VgHU/rH74tMnyP0/IHyV9xG7P1ExCwGq/W+6/cx\n1klpizrWsY7+W9zgIFDVy3z+ibXfyAlewZXDnj5poUVxnGGRKkOqbFczGwyi\nzu4xBCAQ4reCYMsqbiTgs3ebNX0O99YLyCxzczGXGcy7VBUimUn1Ds9xeltU\n6ptro3aAeQfQxvbuakh9Zm9o9YN8doH4dZSrOj6qJUHK8ET9rImK8Pp2eTrY\nxc5n\r\n=FQdM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"504ec59b4b401d057e70ba4bd1bbef2f87218204","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.6556eda2b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.6556eda2b.0_1590611365905_0.07649770158995484","host":"s3://npm-registry-packages"}},"7.0.0-canary.32aa23641.0":{"name":"@material/auto-init","version":"7.0.0-canary.32aa23641.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.32aa23641.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"730cbaa00725a656ebf9ad7e04a1fcff2b07a699","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.32aa23641.0.tgz","fileCount":14,"integrity":"sha512-ukbqflin1AhMg1ysHH+sLUhKKfNtk63XOLZs21T+BQA8lj3btqenSXXJvCsyv4AMwz/JYgKDt7Palg4KVFafXg==","signatures":[{"sig":"MEYCIQDP/Vi/DIB9AANymAanxT6y1O2+2etUD6HsOz6IGh0OhQIhAPZyU7FRB8y28sTeZ3CjmF0I1IFI7p6BPTqrB0Phmlo/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezt2iCRA9TVsSAnZWagAABLEP/2qEqUeVzpU2eOVsA3AW\n1TTCxeCGb606wE0xmUZOdcGVcTbThs95u/H0WTV9pp/iyMLwUCay5dLrUlYV\n+z+gJRXSd72qdVyGg0WOOmzqGzhC46dj6fBcNbgedEqs9gD4dnU4VuQixBX3\nY4LebMceC8RZNGf/7NjTnXrM1Rjs3Q7Q4iAVl4i4d3Dd5SFkDdYefJrKc32W\nMkZxh1iGW9/uXH5/xB0fzC5LvnI8va9n5uoJVw0yeNs+9DVuGMFmDxv0DKYv\nWJ2kB8oY/GlkI9zlVQIVf4ZwWKssQX15ZpsTIAlFCurps3GrYTu3Xvw3KuZ7\nxj/nXLQM7rBCG/3Px9ZplLmnlu3938/yS/POCUD9IUFzVoyy2neKhuAv+6F4\n6ADnJxvsEK+1jDMKH4LtN3T1nDeogwAdgJUThaoo00N+1foQspXSHMQZIsUX\nW+ksDtLOZz6syzhV7oRteC1ZOPo4dCV68F89qzhpN2m9WJC0xB1vrGr9lUji\nrrOluh9sjF4eA1JJ4Ip1E0TSwl7Mass0SnTSayvwZVcNReZbKTncIwVpFHhx\nHMQxjcdzmS0gaTdPY6eVOWg6ZZxTaEQv6S6wxYu+X6L80S+4TkTIVPBlTsZK\nH5Wgouya3w9iEydeA2GhSrbG2CocNPz0rLxLCjHvveN2jq1fu5T42jYB9QZ6\nyB6s\r\n=99cK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4cc39075dabda7fb76257a3403f0bde13084b87b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.32aa23641.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.32aa23641.0_1590615457926_0.24901219704013045","host":"s3://npm-registry-packages"}},"7.0.0-canary.654934dfa.0":{"name":"@material/auto-init","version":"7.0.0-canary.654934dfa.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.654934dfa.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a492eb2d55210ec3c6ea361cc652731f9f098136","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.654934dfa.0.tgz","fileCount":14,"integrity":"sha512-pomAmL67P1wsi84aQcWUfLggJCB07eiePJFjUi/tHSfopDe23UoxoWRz8NOGcCInLHMlx+Wcgi68e3ce8SI8mA==","signatures":[{"sig":"MEUCIGgQend/qSR+sAPEbS3H6apEbqNdYxZcWaz+CGsxhxf4AiEAmDNcGsmCR7ZA+pUx5wj2/vtQ5e1VFLV+bvvKAHTIWt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezweCCRA9TVsSAnZWagAAr7AP/RUYc5ZTRxXQMKOxQTIW\nNdd8fD/cK5ES+NS0Mz8D1zyzyOzSnew3vHJCKv6VLy77C3rpks4VJTDwysz+\nCKtOCyNkrzL4SlXmoXht0Izx0xVpJaBnFOd+Xwu11FP1S2SgW5RnCGqvF/UP\nyETbiEnhnFEHpy5KOxf8T3tjeWgtVNlu6nVABVX5E/Uy7wXItpZ1enAKWDy+\nWt0FnK28J+FaUDOxNG/PLZ9D3UOK/DhJFbJ6sMXazP2XfD6fe7bWo74v+ZXH\n1Ow+kLMnhdCXwG7rXaIFZAZK4JlTceM+5o1bdSlgTM+2BcQD0R4LRORLagZ3\nwIqpaVAWrE3YT/NsiItEYY7LLrgLR9hIYCh1/Rq02KQLWG6msPlB8c0kUzrM\n7OjD3qZRYGH8mBES0S2tpZQdR65ARq8kh9TTQFjFcUBd9+pm4i0oD5BjVB9K\nmWJzft3dQNcie+EnV/XHb7QDYKEAR2fifCvOGeLOqy/ZSXhkR6xdAs0bu5Gb\nGvHx5UKGLXAUpTIYpiPla2WzoBlT93GwReSow88sEfSZpqOQu08wwk45r0qs\nxdGMPfYzp6QURSyqFeQ3CP4R1kQhj38RXgFXnzIpZ7S2JaUshNbAEIMgywVB\nEm4SnG3GNUWV4STvMp5db94ve6ZfUtbKAWcPpor5RyZwBIwnaILK3PMJn0x/\nkLl/\r\n=MkLj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"99e56121d157a5a30949b826c0d521a365a1ae59","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.654934dfa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.654934dfa.0_1590626178161_0.8772052175093534","host":"s3://npm-registry-packages"}},"7.0.0-canary.41910b8b8.0":{"name":"@material/auto-init","version":"7.0.0-canary.41910b8b8.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.41910b8b8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ec570b01aab8a395da1053ff4f6d91f0983aa95a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.41910b8b8.0.tgz","fileCount":14,"integrity":"sha512-xMNfCblODvXml0ogiddXAd3nEAunC4u63XAdTMAIsE+J5O/HwG42lnWG6k6FZliFT2xhTqNLH5WJNVISqMm2ew==","signatures":[{"sig":"MEYCIQDvq3JcMfR3pt6Pts1QwlRjD1Bpr7EH6fSvfems6SC5dwIhAJGEi2i9WjHvU+nQlTYd/EemncCy6RPV63RxG+iHTFSW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezwrmCRA9TVsSAnZWagAA5icP/jelSWXg+33fQDfsBYiE\nbxM06G39wJC1k0nfzQnepIHx8403kn5N0yDpFQJc+9d53dtivP5R5U6L+6BR\nUq4pxmwuMlOEsEvka0crR2jP4P9uspk/6STGAvjnYgGjIJpM9Iraoi67BWTJ\n40oS7tNJZ5ZspQE9lc8f3ho87A4TXLj/mmrE2i6K2GkAh9zQ7S8j8q1cjSfh\n/xQHXvpZbi2p1D+sGihkmm+qdL/cX5U8udIAQ75RtppbAVMzXUmDtr14Ywkj\nkMYnSlqVHx0gbllc9Qk9gXYIE2MHC5e89xlUQ72bb/rTTC1L2vxfYGo3i/O4\nmIZXji5NCIRsdXrTRbg6SL33TQvS7Yhq/Zn1ua16148PQ+px4fq8eIhYqjqh\nHLUIAAEHg/zY/qmgWB38AA9I36DWVfb9WDWzK/EuqmS2NDkQM5vF5l56IuiX\nvuXXGSvQQqH4RB4f03qJ/DPJsAunhH4gnw7y1m8aL/pQa7oOgxDavHhe8qXS\njr3jMqcpqw5iWCBoMdeM5KlxkfH3ulv0M3eQGpwD/SoLQQahNYRFqyCpC1RJ\n/V1tbuR4AD3iTtEjqjofDsBH4hYSl0b+xWD5uq2rc6dW5It/3P4apyEJOyWp\nsVSrsXJ2ggon7VyK1t6CHJmkRD4DhmIjXQDa77MvpxJOmXlWNSJDBpFkokdy\nbE+9\r\n=eMUh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"14656d5f31e9a410c15eaf9b47530d57a5901add","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.41910b8b8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.41910b8b8.0_1590627045842_0.3419196779375877","host":"s3://npm-registry-packages"}},"7.0.0-canary.d66d22bf9.0":{"name":"@material/auto-init","version":"7.0.0-canary.d66d22bf9.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d66d22bf9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fa65d2905c320a7c6c5024abafaa7391badd93b2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d66d22bf9.0.tgz","fileCount":14,"integrity":"sha512-cctvLBe+gZO5MX22fk9dcj0sRtXo7mrPAJqjQFwiUKgy+NgpWg7z13pALVgZiLSrTft6rAjwYVPP+MKyy6lTKg==","signatures":[{"sig":"MEYCIQCGY9oPKbp8fUgScUhA0Q0/YZ0R8uQIzwmqbvSRjy0dTgIhAJMXrrIi+YSzzDDN98wT2qzhfpG2PhvTBPliRT8ZkF++","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0BcBCRA9TVsSAnZWagAAfI8P/i0sC/yf4A2MCxYEA63P\nIVeEBP9KeqqzHy4tEabSpJnzjd5AkzG/3mkpSZaOB372FXl+1hv37Dt2Tj3O\nFjYoE/823/BQZP6ZIAksCtIu8gH68jKhaIHNXyGuIYvTg4PN3BzgCeVQLsQk\ncS9pGDFf26Bkgnr6c9DqEsB5nwdjtUKJX81bg8W4OjGdoChOBCMCIQwOBUDg\n+seVD8IgPnfaH21nhHMXikOJZ6Gylm/w675TKcJR4kzPL6BkYpGxke9fP5ik\nvwhDi8BVQ4VyFwvU3NlTgcHkiFRODTrw1qxIyxTOjQ0VF8dIb/kmOwIvS5Wd\ny+kgaEhe1aw0Ttk8DVJ3MINXXQt0o6g3lPCllB1TcowSi3qqawXam4QVRdyO\nk07UrULhdw4UGkF1Bls6MwUR3ZajAdbBTNhSILv1lvMxUKnIiNYVM/xkj5nJ\nyT+xZ4uSy0bfV1h2w5vRwiDEnJdB00MSOVPfTzmbGIHSO6DRBoIslIFBQCER\nEw5vPkj1P3/EQO4DS/+rZzbgJZ6/gCQ8u51dPATdp2Zyad5PoDeQY6IjIG7H\nYpKaCnxRJH/YWDd7/psBHHd334vbUECtg680718vI10PxBXHarhMUDwA3ivW\nbI7RAjMkrl4X2fC6EpU3PuP9OPhtymE+SlyGR7K3OyhpGxUzoleRhe/X/Cqe\nMbKw\r\n=cY/J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc182def4daea4d871df41985e6d893429174b3f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d66d22bf9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d66d22bf9.0_1590695680937_0.1501760818458302","host":"s3://npm-registry-packages"}},"7.0.0-canary.8904f3cbe.0":{"name":"@material/auto-init","version":"7.0.0-canary.8904f3cbe.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8904f3cbe.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aabd8fdb978d94663cf898e8cb3a3e1677aef278","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8904f3cbe.0.tgz","fileCount":14,"integrity":"sha512-Bhh281RvZEL8aHEtd9Jba2w9T7Sn6MG/nz/IR3qz55vD8n4p+YC6wbXLnUKkohufU7Y3Oeq1NjV5v3y9+Kf+Ug==","signatures":[{"sig":"MEUCIQDUZ2t9rZO8m5VUUDzJ9/7Z/mdET2Ck8yKmvJk7BJNzIQIgdsJQVnmVA7l/qptPlXlLOtpFz1xR8ZgfdgrHgVnIiBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0T0qCRA9TVsSAnZWagAAZzkP/2LkckKetJSFiRZzHRPH\ns2Y+BWjd5JbpJPJVJg01VMHXlC2XBFo7YD5Aw4I+qnnF+LGLzd1b4BGqv5yn\nia+fdY7V8UTz7syMiWMmsuQV5vcDKCtQNlC31rZQo+EkzRRNkiUlDst7ZaDY\nCIOcX5tfGuz8fXUbAegQZtL/I1VYcv56wDtJaOcfrtRQ6YSgQBEibF9ZoeAy\ntf/wALE6vojQDqgbEqGZ1E6a93lqU89Y/cG/mO+YSPMi0aq04PyiG01foLRL\nCTkbY24oQbGYpnHcoK3HKqgMgc5mpOx2pvdmUJ7HWYFfaGSl0XnQygI+IWmB\nEINFBYeLKnsvYbtYmCXJ+0NuapVbxq0gN/oqM8EYO9vNSHAwiq4sSJfqqQL7\nJRdVxsitCf6YfnI+V0b0CgFg1EBpgBKihGInPbtCNBJlvIsq9o4XYMlHiSse\nT24J40femtpRZb087IBzJTfIVzeM3SgjU6VPvsN+lPhzrQ6Z5V8L3vafu1Mh\nXfWVG7E91XJoLnbWLpRnEL9OnpDxhZmJRCt+UtIcS+gXk9B3JmtmIEK3E8do\nMYQIrcDwGcHhtq7IV2Z6APQuV6FmimgUskN/2eCYGXFqjJRDKxDCM7OjKfHN\nOytH7SO/rBpUHsFRil9lrfz/BIX0cDWLEgbFyeCmIDFbbcrOujdGmLyEH5Vl\nx+fX\r\n=lEki\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f78dc612af1ed0ba397842886fe5bc41e32f181e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8904f3cbe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8904f3cbe.0_1590770986020_0.9669157280561176","host":"s3://npm-registry-packages"}},"7.0.0-canary.51512a4ac.0":{"name":"@material/auto-init","version":"7.0.0-canary.51512a4ac.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.51512a4ac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c3a434a6d3a65de41ba7af4250505d6acb3e7518","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.51512a4ac.0.tgz","fileCount":14,"integrity":"sha512-et+yKR6oauKH7xmYr//iaY9yBooskQUowefGsm+qkFcl+Ww689nYAT8/jCKWGjZRYfsbVpzA7yUEIdbrNLx20w==","signatures":[{"sig":"MEQCIAZXzLmJF6KDbGjzFvgc5HyLFTzIDwT/iMK917pxgmeXAiBHd/ppWvKBYwQV/5AAh7B1MZ3BK78yfvPBoOSe8mjLZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0V8ZCRA9TVsSAnZWagAAnf4QAJINVEepE0NDZNfVvIe8\nj89+zl+pVXOpDuLAigFt57VQBtmiIfGdQfXRA5/bP+Uk+tuumwWu5bkcM7aY\nkkd0fG50OSl/5jLkVGm6Mw07dUWxgb53fmklEyfXrQ+a3P7TbIdiUDEvSOGs\nrHt8ZCv/ObzLpFuKtrxJPZEeW/F4s+1/zjW+RowYXtiBmMh5rWW7LoV4qk4k\nv9vfJjnvYckn6EK7qiNRpe36/KFwCDyUKMYVjoY2CpFGCYSW0CO9mglWnFt5\nAwSdeAIOtdGzhs2SvJxwzUSOzjA+gAOsCY/XkqE6mqPNcXx6/eO8WXitBCHw\ndPqLeUKZm+mN5TNszQyQR9z+6Gk1g63NS+tq0EHLw3RPZ1Pgc1MJyNJfmecz\nWlwkVJeI9eAPoDnttLuDKCOVAAlgYVSYapLD4z2GLgXs2nk29vAeKXkX193I\na9PQqWey9c9FievMwUwiRFDItjOK2pMNhil9cR8FjgHqtfAptGytreDHQNp9\n16Kg1xZjPRCk4mtOgCNYaMWP93TbAvxAo/BX2cCsPmwXjA1hgrO1M72o8y3G\nftGI9gR3LQMY5kfTDI6T8pZ0TTdJxeIyvXme2JPgGEK4S9kI/GbNjIZS/Ttw\n45DqS3sFA6zY+D9nO+/fUvOsfHWWLKwegNSN5QnhT8VBB7BLQfgV2ETImaLH\nqLsk\r\n=ChQG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d5115fe8118e1e2bc71fc7a491f672b079f281ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.51512a4ac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.51512a4ac.0_1590779672864_0.7758806038357455","host":"s3://npm-registry-packages"}},"7.0.0-canary.0743288fb.0":{"name":"@material/auto-init","version":"7.0.0-canary.0743288fb.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.0743288fb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"46c7f868333d492291e60e220d9793334f15459b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.0743288fb.0.tgz","fileCount":14,"integrity":"sha512-okeLxnFqi0wI9dw4MvkUeGzcpNpubEtzUKxMEAhrnYEBo/Kg71No7YkvBSUQLKeJChHwUlmfCiGjWrTW2kQVbA==","signatures":[{"sig":"MEQCIE13/v6Xcbrr71QUYydASas5546deo8qnvvToH5gWwncAiAacnTK8XdBaGO2ICx9ioMX5ewKkE0CsynhuNHE/m/JGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0WrNCRA9TVsSAnZWagAAySUP/A76o2v/HGWzpLEfG6cF\nd1x/WbM5EwpIqYgLQw0scb6alEqT+Jz7xOkcmEoQXRV1J1twyDPEnY3MPjJI\nkRYTMwOdKQP4nQWPfAjGwOc/Jvc7cBE5sfWMpK+J1t0lNUIRj5xwqRf9cUTz\nzclh1U8EqO0TiKQsw3icpuN9JXCuGETGLLh87d0JhOcAMCoLglAXOlaPzzxd\nSlMOt1UFsM99pjoeJUl38jY9x5eyNaTQTdN6pGy40fR9uQarpKT9tA05lOOd\nGB+jHAhBDQtOu6bSVHzIyhK7DdHR8cbrK/nQ1O87gnKHKjudM6LWGBB/PsBK\n3956uJGQfrg/HBLqMb/JYnRKQp62Tf9ec8FabRRYZzzb+S9ezAnCQn+hFTGo\nFqADq+0MokPAHda2IJlvIHHvWEgvvvcgR2+Fu2Ry0K0fpTLyW/V5NVoyN/bV\nE8GVbZI2O6uUhWfBhIOOeUyjduOxQxsSQkTqEpUwwsdF49/OKVJcIUMQH40j\nOvTnqEsoCa8LSGDm7+q/4fLdGGD5kUPOqQuo2f1vbz+yfDdEJuavtkvPq8I9\nFlQFY2bzbtrZra4s56PSBF1XoIw+WyhcPOpPDlL362Gx4NOGs0Ic3at02/ru\na2uVC9pE2MKSr3l2vsdEjnqWeFS9079pIO8mYppqmwHSsJ2I6NfttheU2nXO\nEfr1\r\n=zIC3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0c92eea0cf28bf0f2367fb0666eb8592ef2f8c8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.0743288fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.0743288fb.0_1590782669194_0.0908542097519387","host":"s3://npm-registry-packages"}},"7.0.0-canary.06ef147b5.0":{"name":"@material/auto-init","version":"7.0.0-canary.06ef147b5.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.06ef147b5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0a59686db85aa7a4599bc33a7a0ad92e39ea374f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.06ef147b5.0.tgz","fileCount":14,"integrity":"sha512-AA9oyehpFdWC7mhgDOHvI+IZG92EUPoL/IcHWI4v8lxMuzJk3Gkrs8SXWi7GoK/+M9fMyBhhL8zyvDAHzDfftg==","signatures":[{"sig":"MEYCIQD/22kDLDVjmWk/vkc5LYWSr5jz3WSpRwtXVOJtXqaq8gIhAPPR1C+ozDvg79nmOr4CvhC3dVey+IENdck045xDGZCF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0XMmCRA9TVsSAnZWagAAXH4P+wW1Hl0vx5nTZvl51ECF\nIEFT1ltzYSSJdHxeBPS0u8K43jGlNy2HVA258pZx0hDvnqMJ59u2xmOPWedv\nm4SgUd7OxMr71Mbf3bcrxNUCGrZ90hX/llSKOcCVkDHFbhOjf7oDhbspJFC4\nEqmpR2B9xR5bzB/gKBCI+Mxv6EsrZAVIHtWY6Tl4JQf2ytZN679mINRD4+Ze\ng16I8CPY1hoHLWnt00jtjWjn9HCkFcD7ap9EYhYZMdhUAb5sqa2eBLID8pTq\nNk2wT+XfU73bSe4uPqFPRt/5Mn9QQeQI12zmz6uHhwXN8fNHC9KecK0iG161\nlzs3UYtUKWATCEcZyFwbDAilUD5WBIqGnACuxoOEBLEZONcTD3kasoM6ibx2\nnoN8xigsQ0kEt53bU85yZ9ZIT2oZTchu4u2hl+menNjNv4jUzdX6Q2eE2c9f\nRYEFC5D2NnQSyU+7l0CMKgf/593Bd3O7L58SX3E89AQKDhUUV2vH1ad9yUp8\neeK3T8ojbtgrOq/ZSJ1N0JEJAnhXcRMAUw5Mq60H4Tk2GcKR5oDwDuVZX8vD\nvwK4Ab/ECupK0vNoqa9F9q0nHJKj3oUVCH80VB7gJ6GpOkW8ZSLLd8nCw+vu\nZFKhDtyRGwKcnsVACfL7cR3HxzI0Gr8kTA7MSJvxv8glQlBgi6wl1YVxjE4s\nf3/g\r\n=UX+R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"43f043010a4682138cfe1d453ea0460f912fc2ea","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.06ef147b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.06ef147b5.0_1590784806465_0.6680204912077163","host":"s3://npm-registry-packages"}},"7.0.0-canary.8073a20a9.0":{"name":"@material/auto-init","version":"7.0.0-canary.8073a20a9.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8073a20a9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8345499c20f05d870d2f47616e9dabbaa925eac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8073a20a9.0.tgz","fileCount":14,"integrity":"sha512-29YHwQe5X1eNRku1Bael/00q0KfkV+YJdmswmTR1BPsQjpgPN16aweTDBSkLLgYBndFNeBf+qlcKqCMpUkV47A==","signatures":[{"sig":"MEQCIBWf0J5mn7E1nxFLREjE2RtVCCuiLkLgM1auf0MWDTKZAiAR3q7ObXzXnjVvWKEX1poKqGaqrXO8enbE5KAAGYeTlg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0ZnJCRA9TVsSAnZWagAAEmsQAKLO0JrnyXJ5rfmpe6Am\ncZCctdDZlpchLF29L8XUHNzBIDetwSLOAHj1hl+O9WrIxPsjQBfMD3Clrv6a\nwqGKkH9mCT1qzvGj+qARXbPSvtRAnK1k/+8MBxjuv3bKbVHZcYPZBE0Znpxi\nl3SYx89IP1QmLh77+BbzUsWu27IY5+2NxdduZmQj+0kflKT8rrf2K7uI5bnd\nzScmNl2/KO1Wmh/S/PlG2O7djDuc4+GpyXbBpq+sps1xcsJngazhMvBon6hp\ns4J0BhGY2ZmJK73gDs6cZdlnAVDaK3aFRTqPzDPbh/HfSZgmsZmPY4064X8A\nGXf8I89bj7tJ7k2/tmNwjPWhdculpg6++KhDkh1G/oYOK5LVZWDUokTHUm2Q\nMXj+g2cXR6+KigNlcEsL9sUykXOry7DDo+TqlMX5+U87shXAQ9yu0zeo6QsC\n9uIitliGgIoMo0agEbW5knXWQ5dmj7PkCzwOwMYOwBUkrF17AeSiegfZxVOW\nrgh+GfisTLYVYojQz+4pb4cB+IvcIj47H75vD08rMWejdTj8GVsWoKiTrwEs\nsGac3q2pEwYDnBZuePqPSV7bDiJtMgUXe8ftVLy3C00aaHsgjhVDb8nHOvsR\n3g0iz9KNqkrbtLWYyJyhjxWgmhGtSFquv1e8GK+HdR7rMGgv7EJTiuQoTeHj\n88K8\r\n=7mzq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"576fa22ec00234b59b1dc4215b8dd1ae982c7c8b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8073a20a9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8073a20a9.0_1590794696662_0.24994310895083505","host":"s3://npm-registry-packages"}},"7.0.0-canary.72ff42330.0":{"name":"@material/auto-init","version":"7.0.0-canary.72ff42330.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.72ff42330.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8958ea3d0f53c257f44238dbb3b617b2d68dc4b3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.72ff42330.0.tgz","fileCount":14,"integrity":"sha512-G23EhAuGY48I+wqlD+IkXRHsIsNQdRLIaecUbgYEsAZBzuqFxWxZaBv0uLZME6YR069BZIOxBOu+y/K8G27ThA==","signatures":[{"sig":"MEQCIBzteuna4SZL9xhAuW7Uq28GbRjc1BgLE9qG75NcE96GAiAlHXYk9LPdVQI3SKdqqG+kRhA7H3KiwemtORi39pOgDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1TAlCRA9TVsSAnZWagAAhS0P/2WMlHpsNgWvix/RZY4G\na4kV4vJjQ1j+aIrWW1aJXChEIudLjLNiTOlKic69CWPMvMtLo54mPcBa5oFG\n0ruZCOTeSEZEKtrmOBeeBslgJDQ8iQiWOdgAkXG3BraTJvfSIzWRuXQ64e4H\n8onH+luF0HNhWQFvle8fDJKKVNeiWm1eAngsnlUe0xwnva4cAiNs+AX/0R2s\nXEmTjciglbS4GO0NawosxB9hQFJw0JPgKKCTZjEu/B1TV4Xcs1yvxnlXAdGz\n4NEs+ucMf95A4JUvifGJ1A+tiXxJH+MN8Bb/9zobp2LVU989QGvJOXRBu8Q6\nK/DsfAFaeOBFTBGhfnRrP7T5/9NlsusYzegvc0E6ALzhBXF5PWFn7hvJ8FOY\nbl7RJn0bi5leeZMxRT0i7NNyDdtQGdm2qN6xssSjfYaTX9+CSZRWL4yK8ZWf\n26oVk6qzhrqpbRSdbYcaYKo0ITS++P3Vyx4jyEutU9qH9bXzx7cS4GM5T+wq\naiQgUr27k0WptQ8Ncf0qUPvymw/dpvDMbSaHuhqiewVlCk2OB8RV1iCsQ/kU\nZFFZD1PiT/5xoC3WgAdME961UKh+84yb5xIiVIrYsGtNKk/dp62/0xeRGkoe\n516xwhrftyYA5x8AfHexc3OpvRt2kSDHduBnqVPP+T1hgUXQuy98v2fbpLQx\nht3e\r\n=pWJM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4c820e9d38fc1bae9a502ae78e336f0e8381f432","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.72ff42330.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.72ff42330.0_1591029797017_0.14474127199738995","host":"s3://npm-registry-packages"}},"7.0.0-canary.9ea52070f.0":{"name":"@material/auto-init","version":"7.0.0-canary.9ea52070f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.9ea52070f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"11dcabe76ce9dc5be8e8b371b8f7aa0dad35380f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.9ea52070f.0.tgz","fileCount":14,"integrity":"sha512-NqbW8q4LsdhMdjPbRvr8kAtWNUNNZG2D15LILBfIyk7rScJpeV2ApjRb1htdRgo7utQpeWCC6WT5TEgFBk4VsA==","signatures":[{"sig":"MEUCIE1xJ7BMWjJVNTKaDz/6qyv2Kuao4g1M0+eCY4wTO+DUAiEAhAsdbZ3S5d0Xp9dJgorlbOTS2jcSKumaBeQAtfWUcew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1TFeCRA9TVsSAnZWagAA2eEP/3o6cC1nzGMMOBasvqaM\nYMoHjYcXVPxJTilOA0woaVe0TeYERDraOlFeBfxXQlwN8IdyjlAxMi7vGGwI\nHlGJEId7q4K+jPLTFaDp0bAaWXL3re6MpCw46VyAD3gfb7sJDoOY3QGQKGnE\n2DfyxB/n7id+2uKxP0Y0HEJSY8niyjbru5gyk/Sg32xyrQY5/Hx6VWJOXkyl\nA6k5P0XMJgwUza/JRjFLmmWmRxSfvXQj24Cqyq5DqdlVBhaOmVyBKSN7i2ip\nDtFM9kNzkwZEHaF6Q6OliCpXMfShi9kIMOqZuprOLryJxHlSgDIPzoDbur1J\n+NCcHvQ6jvHyOTH2IidSt+LQ3A6epFTCacZcZQlxpQxCGOBPBp0oEWdos8Cg\nfbgl+Ja9fbKcY/7te+qG5BrdTcGPaNlQsCjUPRnfER0KPJvtAoMrI23pv/EJ\niJRkXuQgdFb/PB2/Ss9i/W9pMQ5Zj5/7zOgBF7zeAm2/JktY8pepekZjgXwo\nDwRDrLWyD8d3A0Et6thbDR5JyUr+avPq9iDjn2et1eM3RKOabSLxkpt60C9d\nvcKHPiayy8tGsnsCAQwxPC4ESJlDA5BO9eAJsLE34cqu7+w0Y6xu11Uk40wq\nDBkgspkTkW6x4GAQi1fVGL9XQufS3yFyDXZ7axLJkhtCYtX5RWZscXqITVRE\nbWtE\r\n=Ij22\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1c7aa3231ba2d87e7abffc33fbc156ee0889131a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.9ea52070f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.9ea52070f.0_1591030109787_0.6371297608884658","host":"s3://npm-registry-packages"}},"7.0.0-canary.d86ad3b60.0":{"name":"@material/auto-init","version":"7.0.0-canary.d86ad3b60.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d86ad3b60.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"52f300a3861e2c6ed887f8d9b84442edbd912941","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d86ad3b60.0.tgz","fileCount":14,"integrity":"sha512-ml26TaIi3hheMk79Z08Eb1/vtTZclo6VPKE+S93J2ckI75regbJ51LcsjbahG2Ere+NzUnEw+jAFfEdrRbC8VA==","signatures":[{"sig":"MEUCIQDI4+SseA3m4uckPnxrTa3UvQeEymn9eaowZNlzRdJP0QIgYxfoNbPebRb0PV7oPyEbW3mkYWykUTZl/35Xw/ThaKQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1T9hCRA9TVsSAnZWagAAURwQAJm/Eq/F7xxNrbOWjf+L\nboa2DbdYVEKzrHxROSqE9vUS46T6BcX8yMJqQMV6LfPuJgL+nBI5RkPRGbHh\nAVolfuZ4+X5JK8/FCUNNPnbbHouaikTLYV2sNVcd/XqzSjLKfjawnTnmqJCT\nD7bRqu5w+FSBmESP+83rzgg+w3dvDuK8ZWP60viamuFhk1crIeR/NemVKL21\neOVjWPnNO72GgqJg2KNQ5gnou1JrboxBy4X3/BS81GJ7LOexYIDcVye3hDRz\npM3l+BB7Zex0XtBGF//qtJTY63qCX1DYsdKQ0SGlhRvK6cxkfn4790dhP0FV\n38EphzR8w30s3riMxVh/NSctEcPuxf5uRH1oY+q9bIt9t8RwqKRfFBDiue9e\nlmGRnw6qtDva1pi2fTlw5nwLylQAI/Z/W48+MIC/IUF6+Jui4ul24kit6q5G\nJDnU6YbD8cbKdceln04FLGV1EZCYgsvizPRQnzbAkOE+tOrm697MiE+G5akl\nwD9hicL0CvN3BFuzdiWxwWDA6xwmYMhfOlZms+78vvSxV95mjufclD2/92gv\n5uhkzoJyQYJbeEN5rt1zvQo7azm7oMSAoO5eZU+lVap/A7U39O5WtNjzhZB6\nDRCiC7uDo76PYQiKHmB9cEoQRGE3BFzTUyiKodLeJC6sqz9pMl9pdpXcbJyp\nYdPC\r\n=RMV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff64ee77c98ab8a932f9397689714c078eb9fd02","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d86ad3b60.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d86ad3b60.0_1591033697190_0.9232036559408803","host":"s3://npm-registry-packages"}},"7.0.0-canary.b9776b1d0.0":{"name":"@material/auto-init","version":"7.0.0-canary.b9776b1d0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b9776b1d0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1265f8de74120857e5a3328582ebef5996762e51","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b9776b1d0.0.tgz","fileCount":14,"integrity":"sha512-6pcPRV+oOZcCbDwehr5EtlU7ciFRxKb02KYBVS5knAcPzL4itl0QcWXL8USEzS0+1mOedwni0hLJtEi0fHhJHA==","signatures":[{"sig":"MEYCIQDNxDHbArPvgI0TkGfv0KNzex5OEnKFIcFeHzoaxh4xEwIhALi538W+6Pf+xe0CsnPjnPrrDDtCushJmLshMeIjcMkf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1UgICRA9TVsSAnZWagAAAjMP/0+QtrAix6Xs9Jvgc/R8\nT26n1IEOcgdbuwfWAV4cf3rsLgi2EeN+vFsCDVQqpbsIYsVVu96tuTqA6tE9\nRcY28Nxrnhi3sqkn3xokBD8STzWpFOgm/Hbpbe5pm4Gx8znPsvHJmSmayR9z\niaj+Y/c2xrIxcSZzYtp29jo6yMEttjG5MFO7eDyEN+lXCYMC02lwICtI2IUd\n33zoGAEzR/S3AswXkBLNYqCM8ANte0/Z8HDPtKefQelcC4IBP5QAiRJjwkFW\nxPSqR2tUDnRSmnxHwz6xGspjQ3iY1ZxBUvh4RVjTFoNeadT7A3E9Y31KD8tK\nzttyYTCVvDpgbuQ1uWOX9UU+N0/5wIFriG2SwhN66U7jiYko3Rzbrnn6HMki\nkuFvjwJacv8ifKC+bBDqc75b2JroS1o7Vpu/0I3UAHuPtKAwWLce571MAWsj\nDty22IHOIUnz/YR2Kfbp7NCJBfsTrwPBES1miJL+33LeY3i4gV3CjPVac/m8\nqoKgXrw17+Q5P46w6OFRvjHW+gWy6yr/pXVuTWbeS0Nu98owWz6zYyy6Qiij\nXPTeQp4/TVFWeKePYXqF7SFHOtYJm9oJNBdlrul+glkUubahce1Tm4oys1LE\nhTYYIMfCxAvrYy83Pri/sHIMc7745lX91sx1Itkq67xd8voVXqb0bMqTY7mZ\nLUFe\r\n=OYk3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d43f6785558859ab233dac12d042ada9fb8c1b84","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b9776b1d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b9776b1d0.0_1591035911404_0.6631724539758508","host":"s3://npm-registry-packages"}},"7.0.0-canary.ba6f7c294.0":{"name":"@material/auto-init","version":"7.0.0-canary.ba6f7c294.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ba6f7c294.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"07a340df430700ce2c3d75197f687ade22be541e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ba6f7c294.0.tgz","fileCount":14,"integrity":"sha512-wi2HntBZG4Wyt9dpwvnE5+tbh/4ruZrHgHqyhBYwjO95zx4QvAcv2qhUUw4eUkRCWWXYfa/GXmDpU7zLFh2LIA==","signatures":[{"sig":"MEUCIQD3v/ezf/+6YptS9YT/KHXJ6qzadgwELkIDZZl/EgPRvQIgTRa8wRHsobNcJ/b8eQuIlnlYV6IDC5JsJqU5g9f4ga8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1oYOCRA9TVsSAnZWagAAdkgP/inynJ6qOxsrI8RS0ty7\nuOj8rhXLvGQ0KkhsR87lDOyJwql0hhvgvPQSHNZQk1qdSNbbCEoeNTNLdTmz\ntkChLBPwkK55/IJNCHZEScpWcf0x9RjWw77xOe0v5D7Gyq+uglm+KTsSm+iE\nRBi1OXGAhgirAMi1+9bHbc/Wmx1kZ9xQAOTf7f5+PYH7Tg7ggHVuLaGRHk6G\nlBvoQ+5dlemOsnUkbyVMfpDCt9gwFEL9VV/X8Zn0e4kIUivRVFab/BnTQJ17\niOwKNKkXIpgFpS+eEtZoRb7xk21XmaBBFcv+xlpOdL8x+tEKGK8yRsp+PKXJ\nHnfRSRt67CKCBXxxbp/MQJKPZy/n/b1yfKa8lphN8fjPEs2vPZuejZu7Kv6Z\nuhEM6d4+96wIGpPwshaFbwx75V/gTjLt5LOXXm9//KnbiTvEdBN+dg/KEG/U\nMCbRROoiHR71Q9NQqTsgZ8NJwtb7kLMIsu8YMPfWOu3bCr/3cBymsnLrxRGF\n5iT/wxdSYUU+fNLTwH21PI7XARyMSQyYJtDOwHpK9gpqEWNAeD/rb8m7PTdm\nQ9gQ+4og894jDrLKT/jJOTOdyzjjhWAa6gPyA1/RiXHkQY/tr6dCDs5Y4ypE\nhDJUffdfZTO+Apkt2ZN2UeTsxZbNbv8eCHS4S5hyWWluMrbDV9zRjy6hfiPX\n7dNX\r\n=R6pV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f181fece0cab022dd478b7c2f4b768aa14f7ebf7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ba6f7c294.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ba6f7c294.0_1591117325931_0.20983972128427952","host":"s3://npm-registry-packages"}},"7.0.0-canary.cf3b664ab.0":{"name":"@material/auto-init","version":"7.0.0-canary.cf3b664ab.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.cf3b664ab.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0116a79d06be16b48e9ea1cc1570ad91033b3c65","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.cf3b664ab.0.tgz","fileCount":14,"integrity":"sha512-8JSIH0WH/76NmNDLKdHGGxtvpWiaXZzjz80jCxZs7sN2d+1FWir8Q97EurW/5CGoscFwbWRSdibwEzAcJmTfDA==","signatures":[{"sig":"MEUCIQD+3xVW4m+SRRs/YJdbLK52ZYP7OO7ja+24RubN3m3tegIgRavrpg2sCY/TnYEGnEOT35CNRQVxl4FZS+9ksuFMhT8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1pkACRA9TVsSAnZWagAAjrYQAJ0H6d5iWDkE6ESd4pS3\n84A7aA20UC6LUNGKh9UjlQ+2aUzJB9HJVGsFZQjj4Im3IqeEjOUZZ3vahDyh\n/TQxWVDRBjoETgGTvKVyz/7d0c5wZ8sbwrrWOsgQ8IzYccVBVDC0Hwgzv3D1\ne6is4WO82INqy3191dyPQxeHf0HcpMVJMhSW2lzYoQ9SB/6Yvw3ER/sQcUOr\nntjSRWtn66ThHTvGpn1D0DtVOzTBDpuKZfqlTpwddGTnb3LKLOndrQEyvAus\nd0BhgKeY3DdGi2PfhQN8sLcBvCROHHmc1SqH/tABI1g95WMhvJ2ntSAbhSVS\n4u2c2kPgFSeFqI0CQrmkNjcDYygQPYhOzriWa3nDD1p++FgMaEU9KC8iANtq\nK2Kl7xDZyalIwnCEE4gxmHPxYzlkkOo7wLwvFP/QKVF4VGMKK7aVHhEsj3hK\noMr4w7VgsNLGUGd8tYvzlsIObA78OBvwpxCcLXTDPyuaT5q0PIXnspBWvlac\nsVdHqNEJfvaV24D00kWqkGYO/vxYbGTFyG2m08EGrVfJ4fwOcdIbNLJxyMNp\nEVTVAULv+AI4PvFQjDRg/JQJXcmUQ7jcQgxmmgBBJG3faJIerv51OCUDM2IC\nRcuG1TiXzsLz/LHF3R55Ce3qAFin9le8z5GJtF7xZ/s0L7AJ30zn6vBHXOsV\ndd+e\r\n=+tis\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"708ed8576095ca5e673311fcd970680f855a7b59","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.cf3b664ab.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.cf3b664ab.0_1591122175951_0.38790519709740434","host":"s3://npm-registry-packages"}},"7.0.0-canary.4ba3c9a31.0":{"name":"@material/auto-init","version":"7.0.0-canary.4ba3c9a31.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4ba3c9a31.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba992073df75992bd0624e7080e63063489e32a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4ba3c9a31.0.tgz","fileCount":14,"integrity":"sha512-Z+mfTyo3DSNfiRzzhFFe5/bkUrRCI9lI3jIR98ghlz85p2GSKpx7MRPTFdKpuErIw3iLyqZi1LOWtAl/TJHLmw==","signatures":[{"sig":"MEUCIQDosIUvwl9pXORI51+AVXLzO44sQxwyLC3ANVw4bjcZ7AIgEyT3CXJdAomMPssJ1I/m2ZxRSixNgqvsHh/Shk7tWFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1uYQCRA9TVsSAnZWagAAeacP/jJEJfrgXIWy1WVj9sI2\nXFxMHkeQen8kuPDeFFp2PRSJrnrXX9/YcD9daYM6Ka4MgCDhR9/xMNugglVv\nfTDrTYZvI/2k+ebyyPt004pavBInhbbYfuBt4F8VguxbEAoXDIInv3WZH5Ks\n978Cn++fD4eEzK2Ypqat0bG6ZmMbH7sL0kBRknmTgZ7SsgMBYewlgrY+O15D\nplnZi+mLQxhifchO2jcZkbDO6IeD+7aMQJB1NBqCgNN58GxnZvUvWKgtW10A\n/zVxXMMNCM8JKBEurJ1r3c6peD/ZIRCJRVJ5b5nJUONtpJGe1U71sFB4iYXl\nJoMkr9xyVbi3PGLAN/ZAX8yfkLwOqaJvT6M5yiJxA1MpX2H/i/TYlB2+FxrS\noCui3Z736u1obK1tMQDnrERR3DijdnE5XdieWplQLiEQLb7zMcZXn8TxrPS7\n1/HfqXuiv8PeuQMJmha0HG/roXu6/jh6SxE/9bjpxvCFCfZ2Cm5KkBHYE+tw\nmIDvZ1aAjUgCwuPXc7gfR5Q/T5vGrrp/VYTDH0LXupCDowZR5XwRE0ey9Rd8\ndQAAnOaEV7dL3c0xsgzAy4kOiTwMxs8/C3AkLcpi3gMow5/aqF37lWwMsGsT\n6H8h55LdQYAmj4Z+r6NdVIzNsDXNkm/2oBs4L2Wx6eNyfzQhsjVkXMnwMVNX\nrGTd\r\n=lH/7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cf7f823aac5f803db06863c865c07f432ec4fd09","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4ba3c9a31.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4ba3c9a31.0_1591141903510_0.11353548947633518","host":"s3://npm-registry-packages"}},"7.0.0-canary.388b042c7.0":{"name":"@material/auto-init","version":"7.0.0-canary.388b042c7.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.388b042c7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7c1fde7959e9e3150ab20f0ff119b24b2b018498","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.388b042c7.0.tgz","fileCount":14,"integrity":"sha512-scI0Kujfm3Mo/4eVWh+YxxnFEZPnc1HUw54jgjzq2r2MGcyXjapdTcLKyoKBJaZlbUcSOhOoz+q2PeSD/4waPw==","signatures":[{"sig":"MEUCIDX5VcxuxZAiMmMMmcn+k0tvXptQflY0nFKA5QcjwGr9AiEA8T6/S4Qe5Oco35idE/cJKSDARrUM4Umj3kqBOmL62FQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe16mVCRA9TVsSAnZWagAAeo8P/3DvpfAh27RcO8jgDemt\nNieUkPT0Z31o8BcjmUi4Z2PbNoGj2R1R3rbpQM0y9+7zaWQNJJ+OLWsRo7m4\nR96cGGX68JlsPS2+80G/lDzRTL6M12WbEu4tR6DZXt4ahSR347r3aXIkxSwq\nJYvGHMiMccfxqf/jWIqNvsNiINE7HUYq/hE/7jQufNtCD/wcmhFi5GCPy/OL\nuSSckfYvQxpU8cVqGvTiTwE+CEPeosHUOSjbAlyYq/iC4HQoOtlD+4dgeT/x\nAf8Q1k/tm0Kn+6l7WwqUQ8MPaDEZi9JcVm3XWQfAqsPgh5HTlU3LLvPs0iEp\nKGh5GMgJgG6J/+j0nHdia1IpH5na4w6P4Fqpl7LM+Aa139FEs+zxkvM+6824\njxTg0SA6ndLluq7dOGeaNRkvIkSTw9q/DsEJnxnYjzCoOZUPNpZpY8q2s673\nVQLTgqnPO2NRuLIMtYrnGfG2F+RLJIm8apZStwhaWMT0BvfHfSYGHE8KTEdg\n9KeltyEH6iGHmKNEISRWHtwURRpSFtmbW3LYp19hy2iQQXg/EcqMuiZ/A1wb\noTh7wz7yLZqGcEYG6mJSNLYMZiKIHJjo9ke5UpwUCtvXTdJlI7LGT53hTk8T\nU3RJtm+BXKT1MoKAqPqnV113GxSHp26QoeRwiD1sy+Yq5N7sP+wvroeeRuIT\nUhY4\r\n=ygdk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c9ddf94f1ba2ee332d7acea141e5022b58f79ff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.388b042c7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.388b042c7.0_1591191957109_0.3154795428990438","host":"s3://npm-registry-packages"}},"7.0.0-canary.cca1ca84d.0":{"name":"@material/auto-init","version":"7.0.0-canary.cca1ca84d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.cca1ca84d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca059a3281dfab16863b2310344383d8290f5376","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.cca1ca84d.0.tgz","fileCount":14,"integrity":"sha512-0UvvPMjRybIugAaSW0aE7kngymfGfdSJratkAWwsLmehTvlD481n1agkZgDO5INtaDQDaGoRdxR3/PPzMUxOeA==","signatures":[{"sig":"MEQCIHNsaaMvw+0HoaPDM7S9x4FQrtd5HgOhFMbBrqH80klDAiAgbZUyTHNR5SPhnME6BPNKlJDqD4kNPd88VvRWGgv+4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe18l+CRA9TVsSAnZWagAAW4QQAJ0OcQluHZ0J8CJC0s/s\nnIxf8Uyu6yAy099M7drthuyVr4cWFVYV/BNsj0x4T630On2E2l9IhYc1ruuy\neTGAJpZTbNWTnp2rhR4tQnt7dcKav9K/xeJhB8D9Mj/NYF9ewMfvhxdiNQmn\nTOuGuV/1q0/rlB23T+1f5CN7tdQRpHhzKc66VYt8itwFPi7tGimPllyIbLL/\n8xw2WAeEAmDnfmlEByes0Uwm1RC9A+ehC9QZHkgi7uPYB1bGFK0zFrTAKsED\n+XD8EBVAl8IYXVwWsJy1pAJJQTBD1qLC4vKMMm8GCxSW6qt6c5tyxVqwbhQi\no8oG6lvVyhyvu5S6qCa5/wD0SIGS/QYjzL+2O4ZeAy0LEocxTc5WVSasfiDX\nzhNuDgcaCRtQbV+RS5yJmlqJMO6TQN+rhj2e+DBc7hRhGIrT7JSy+KQtC2k2\nirdhfmLSFsAB8P2gA0Bd2ouWNuuycLbinbGw0Ae0x5UHNR/dfON7mIAdhZt5\nY3L9Umaw+MBmZm8POJ9sKdtOCE3yUeMQGXPIgBj3PMxlUNw+iJ+SAkCWrc+J\nO0I/bNYOFSNHPf6IUhoLV9yG2/w2u1I7dWc11v617gmNLNyYowy3gtlDzdR4\na8o3Dh1BjfvbByOert2EFo/Sk8G26hciB1GtkGAWX8BuTxQAeT1x9GAVtQvK\nd94/\r\n=WTgH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f154bcb37f9df5f07d3c6dd0c397a436794ed609","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.cca1ca84d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.cca1ca84d.0_1591200125674_0.5354225520051508","host":"s3://npm-registry-packages"}},"7.0.0-canary.9b0b5f2e0.0":{"name":"@material/auto-init","version":"7.0.0-canary.9b0b5f2e0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.9b0b5f2e0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c0902d769652c0e4ea23baf1728932df2522f0cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.9b0b5f2e0.0.tgz","fileCount":14,"integrity":"sha512-Rpfnv6OTPkGT4uti4wqtGZJL1Pazq6SCN6bkS79PbQBaE0N2yvrAXmnEFWzS2qWFTu1SihkQMjJmyI4ZxOnDxg==","signatures":[{"sig":"MEUCIFgLUR2V+BGT6IZymwSbZ3kkM6erjmBYG9tdYyxJVM39AiEA/ntawAlq7r4dBMqv5nLkCk/RE/iq55sImuPJOzAEYEQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1/J5CRA9TVsSAnZWagAAuNgP/13p019/sP/xj42Y/yvr\nPPaZQe6k32/sElCJZb2cSvp21s/FfeoqrBz5/L4nEKfEVFKvVIW4LX5v22Kt\nA8bwzgngbGKwGspcsGVHR72ePnNi5lX+Zzuo7un3O7bw55VakFu2G48eicmF\nanK/BrDC0jsnHhnCKXW2GFHxG2+EfOXmNW8u+7hcv8BuM///7O6eWKDqk2ID\nP+EcgeogmULc/qJSRaPc1M+r1g8V6TJxREv6S4uCSqdihZn+364OvFYQ2+R3\n/+eycrSCz7N4+/CFaY1osEovAed+eXjs7JnpQ0Y8tzcV++FTceOn0eVFAFT/\n4Ug83UErfToHpQBfn+8mV0e1y7Gja5Hh/7nx0a0ens09X3M4RVZiMbzl54gx\nDfSe0mI5eSYinapEloTr1aDuHAhr4d1MmHrMBhb7JSJr8yn2vAwWWn/acev8\nR8K+LDEfNxidlBida43u+D+S4pwOFcqH4A3syrZeXv6jZ0jLlcElFMnRciYf\n0aHMkLt1Jpt2tuUhFMldEZWOuFQf5stIOTo9Eb66fSiwfPDX2MnSWDz9TKeh\nQHTGIdaqAF6aYLFYrvlFjxBh2yCnbUHXxSf0eaUgxbcO2+MrpP2IlQckh5lq\nmqe+PtHlLvj9JjL3yk2GD3q2VrdeePqEJX2Uzgt1rXGz+3YGty3yUWq+Sq9w\nMSbA\r\n=V6nf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35348e60387f88e73ce8e1376b7f352877821cb5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.9b0b5f2e0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.9b0b5f2e0.0_1591210616835_0.296199535024279","host":"s3://npm-registry-packages"}},"7.0.0-canary.0a7895f4d.0":{"name":"@material/auto-init","version":"7.0.0-canary.0a7895f4d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.0a7895f4d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1187f32c8f5dfd417fd219ecbeacdb116ab958dc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.0a7895f4d.0.tgz","fileCount":14,"integrity":"sha512-sZurl9ViYYodSO33d+d0SGWs+QJZO7nB2J4l6bazoYHv10dLX8XzSqaAXlHS8q3yajEAxCJV/v0XoO/j9wEg4A==","signatures":[{"sig":"MEYCIQCsX3GW/kJeKzS7Xjpt5bLwfdSKZdpLzQeL6KHF+MyQsAIhAK9GsHL/3icPr/p2iG+/syHlqq/H5g8KkcgbHWl5RKVk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2BFMCRA9TVsSAnZWagAAMoEP/06mRQ8/xxLFNjUaPQsr\n2GK3J2gHDHXtAd3aB6S9NeZU15j9GmWEGAR4vzdvnfvo26XAVPw0yZBkJjAP\nyllW+1roFr1ywy/L51HlfbwWcaIA1ctwBnTAxYU5ON3cMhAy4vDcQ0t714ZY\nnDdO2zbnMGSKnDFB/w8XGJ6sYI0YS0iRmCzo18qpb7D30Wl61BGEQmSit0JD\n95xB68sOWZRSUI8rE7/D3YR5NDjQlPSY1movx7GHFUiEBcck6S5ha+r/+s/S\n4aS8Z39t8sE8ywse6vio65VbdA3xYjtpVw1viwXNi6kiX3XEThYB7mdjMxb7\nN3rR/37tWA7KhQ/xg4fAYSExIzkE7X0Q1b5BgRSj6OhwVXMtuvbZxWzHcHE2\nHgbXRZ2+nxZlMD4duY6mwr/BLnVlokClNkCnDBl6jHzhjItUr5yDtWPzAtB3\nmuTt+IeogO3RPULPzpDWwuRLYydDfId0jpmlYnfT7Mt8C2xu2pb0XEDQuyEs\nzjwY8/JZ742rlm3qkRKHMv7PmkHQGtfbb9YpR1urVOSwWazwrBFx7ef8EOTi\nOIJXelDOJ0EVbtvibRDA2BMiZ5RjIkL1yONsAaZuUz0vNR4/vDiWen/2aOwc\naQ3r38dfZ5wuDcGHDjSSVOhBOjF0dZRavN8F+n7kizY4MdMt52FL1ZfdUmMQ\ndDrq\r\n=9ZXE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"929c9bffd0636490958fcf34e0b40578b44a9cd1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.0a7895f4d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.0a7895f4d.0_1591218507934_0.5711244118788419","host":"s3://npm-registry-packages"}},"7.0.0-canary.7461aad68.0":{"name":"@material/auto-init","version":"7.0.0-canary.7461aad68.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.7461aad68.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e52615518a7442fd9fa7beace75de83c81fa4f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.7461aad68.0.tgz","fileCount":14,"integrity":"sha512-eBuCcKEUCNrsB0464Rc5GECUFWJf8rlJlZF9d5htV5vX5OoMs0fhluwMu8QmI/toiHgOdN9dAe5oqsPNDQtYhA==","signatures":[{"sig":"MEUCIBn8yqpOVNi4ByPaKMJdborW4OsUXuIU2X0mMifOkNoWAiEApynHpsnkGG1oK35rTdnn33AFFvMq3i8U2HzmBJIlLmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2CAdCRA9TVsSAnZWagAA9DQP/3WIzTFDm6BH6HXcn95I\nc7LmyW1c1js43JzPhDSCl6UklHeZbrdNim3snqvPz78eT/2D9S9dADk8dL3j\nCoG4mTwD6d8qMy5/xzJJYQVZKaC/d9gZW4GK6OkB0KGL9o8PXmCxuBrTH6HV\nvL30FtmBTj65t/mdbc6FStQb0IyzELz8Vo2pbj85yOrovX37GpjOf5R+vTAo\nvPX4UiGliEy5Trts/O6S8XIVjM8BzbJOqo3U0MRW/o8hjQDgUBxEh/Nr7WD0\n9mAcFgs6mkdRHZZkEQIDywU1Nyg0cx2ub4NBZDakX1IEsCX/zS9C+c/fUUBx\n33TvrdfBE0/PPP2M/JgK5Vs+wD9PHslvYFhKWhVRy1qyambSbBBuNdOqdP9b\nzD78Pe8y6q9gK2C7tq0b60Ro/03y5yQ30vAze3lcDKnQlmtlSVC9J3djn73L\n7vp6DwMTBIerUeIC9uEqPwzv9kKN3DhiorGBwX4+D2yMveC+ZvGeY8uC7uSL\nq1D6eEDeSOkLJCJk8/oaLr2aIQm165LPFbMdBPl3EjAjc1tmS6kIycJGwupM\noYT5ZAR8n1xXYSuE9oC30Hrxz58eoPCSBlx0HZd+jyjcnamXzPfbrlebqIzm\n7BAh3n/PAE1mMKxR4SFeRMbaqmt63vPx5rUmwsT42mErdBjXYBIY26huFQmn\nhUek\r\n=2jdC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9166e39b20f57c6b5cdad1ce684529ca891bd81","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.7461aad68.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.7461aad68.0_1591222300956_0.8497804110171614","host":"s3://npm-registry-packages"}},"7.0.0-canary.a0dc2b5c4.0":{"name":"@material/auto-init","version":"7.0.0-canary.a0dc2b5c4.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a0dc2b5c4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08801698461a4b2a32281c807eee195c766c5aec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a0dc2b5c4.0.tgz","fileCount":14,"integrity":"sha512-zMjsddflMIxGa3FZdZpqA/o1qqXtCYHAdnsmMpBd7oUiOcXLZMvbnmVZeDldd/hzojzaBl+KQvfA5087n4llrg==","signatures":[{"sig":"MEYCIQCJazjpWILeue15D3ZAdQ3WcHVOlRocT75yvKsWNvL0OAIhANGK1tsJ5PZcLm/wyRkGlSof3ut/Q4J3h/mCbHX8Rb8I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2WPuCRA9TVsSAnZWagAACPkP/0jcqpruXeLnvsy764N3\nKs1zxTcO8yWbDBLM752J9+/X2Xse4bszYczjwC5pFjeC15rf2guU0Uzx7BRO\nunVTOurOae70f6oOd9a/Q7NmwKrwisnajg4W/lojoTFRn/tuXdqAHlTC1IlB\nsd36MDfZJSoJVtyJbMzNXXCKmuo8NadPD4lJv0nYNv31qk+9PjR2gISSjW7T\ny/jY1OKVj/xZKD9Lm6u/2xWhhuz7/AN1r/H2l5QKwAK9zASbN1sXyViRhNhF\n0VmsxGCOZlXFVjphkDhYawjT0LBOaDthXbZyyFHKKTWH9MaiqgRr7CgglYAE\nb6nsxqTBr9tRFSjzQMBKsK6LXXXEllIuclCS1a421PqTEJsnW48qqmKDY0D1\ndCmo6G8dmnxaw2frSQh/TIZ7tOWJGdpm3FS43AhHDjtTGgcrIsoD40wvnbzd\nsvc70DIGj89ajDG7VobRCNO7HB3jMP6X1084InXzo4SwATAXM6Ap5Rhj9mzX\nXARYY3mXzHNpufkIqWbkJxPhkr00MVOwfXF60IhG0kuNE/jznkL2abbJvYoq\nFbSBH54w3NFIQPkjh4wvNA37hFpR7cJsJHdUCq8CfH8HnTPwMGhCdLyAgK/G\n9iPijBrLpTYz275aC/35ZkBYrLrmMGtl207uRw9GadQ5bFd56aBPB9MS+FF2\n8qaS\r\n=AIgp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5970f3857673cb8c032d0d4532a6cf1209f94c47","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a0dc2b5c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a0dc2b5c4.0_1591305195332_0.8899355115850607","host":"s3://npm-registry-packages"}},"7.0.0-canary.2b420c5b3.0":{"name":"@material/auto-init","version":"7.0.0-canary.2b420c5b3.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.2b420c5b3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9ad72509971fca30b114c90d097e931eb801108","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.2b420c5b3.0.tgz","fileCount":14,"integrity":"sha512-GQIYswGf4BSXb8UPexCQ2fWOohJbMxmGRnQi9Zj4v4t18JLCuITaHMTb6dvFsrpclfC9kBa5MVHz3G+P1kOQag==","signatures":[{"sig":"MEUCIQDynZEXqeNCw4pwhUytQ2mNSP+nxaQtOqdtvz7YFepxIAIgEOszLZY+W+VRHyy/eIElBaSlZmr0fPkp0EXD20Oy+6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3mPDCRA9TVsSAnZWagAABEwQAIBnSXP+qJMwdgzUkMs8\ndDUU7fci+JgxgBOI2hfM8D3KvwsSO4HCnMuLqAcUc3K3VO2B/YokZ7SXY9KM\nxxcZOk4AFWlVT1gTWSlyzK6jCfesTvzG5gJTV7uFfkl1/Kz+iV3+w8GhhstP\n0xQNqWp/UC662cZdJ3xEQNQVQ+NVvV8ZymkjqiMzK5zBJ5jiUU1G6i1KdPsD\ntUyHoOOLa9OlQAZcG70sc/+65stR/WcqPmWFsFKPFVAa0k2yiSW/uogj6CYr\nhlnLXhbc6ANfWeCO4CZfP6XU7s6AuZ+eAVVT0+Y/UAT4tWHE5Y4Ei+O4VclH\nzRQVQu0H6iK9DKw4FSJ/nlpth/TftM/xd2QflKfyZzxZ5MTO/shlN5ITno7a\nBxLvzR7Rf8Ki9ID+n2zVe6XqoHLqD19+bI1VTeAdlej/wJReodW3NnpLYB6y\nkzsxJ3/fME6RkUYGwlu/owb93Bwp5g2ZSNtahCqWtkQQzmYw0RDqFOLmMj6E\nxuSXxP0o2vAEV2952EW+fn4TT4T3PHp4rSAH9okgYw+3+DdTkxZV3fLmmlit\nfvyBNZDsbsF7jDtM2EJVypoGjrpJ5sSjYZCKV5AqaPUz3W6TE6sOo30uUuFH\nqm9/rs1EyQbrUOBdkkKkcwKtu/tTd72P2Qfnk8J05LOHZMCnIien7GzS52ck\ngCK2\r\n=ZfGt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"80cc16a27982fc781b2a68accf38760a98fdbe2c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.2b420c5b3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.2b420c5b3.0_1591632834694_0.8896784127396833","host":"s3://npm-registry-packages"}},"7.0.0-canary.8fa22aacc.0":{"name":"@material/auto-init","version":"7.0.0-canary.8fa22aacc.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8fa22aacc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9dc1bb5d582bfb562e928c451ebbc6f72a60a02f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8fa22aacc.0.tgz","fileCount":14,"integrity":"sha512-NZwS0scBjZbgvcWVpkveCx1XXzsffjTSDjIRvCVSL0Sp4mCbhGkyQzWI8V3ZDRRK/5xYNqGkARu0EgWykZ/khQ==","signatures":[{"sig":"MEUCIBhGnWr/UrSfwpgLNNc7ewIcxYh5o4ikYWNKd0TJgWdVAiEAuARekeupYHES/GhCaUl0NTNF5rzud28BoaPHxlT+5EA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3n2RCRA9TVsSAnZWagAAedwP/A04V0sEEiQ2gkTlfwFY\nvZrpQJ4f3aJ9jRdh2+FWFhTRQj3MvTEbEaSUceG2/JpBEeg8ZYFTehg+sbYo\naZ32zczj+rqcQuWsqlPI6On2g72k46+dzSbqN/j/dcX+XKZtXeRnabLfMVPs\nfxnoYFcnJ3UjJuhQxChjfIS5S7l6wpsPBQUhFC9QkEeXeZv+Br0Sv0SrgBU+\nAel8Lh+4d+IgvWqDp8+oRHX0EqrSNd3QZr81Vn5wG3mK3LkADcmyVkVJycJt\nvuAMVccMx5P7t+rxQA6ViFpgDQFAk7hbWuems2e/NMtu6hNl1o/I4tyQ412E\nnYzFSx0a8XY3cM6AdtsLN0mmG1dcmHGOpj7cFJE5P5hM16NYGLEZIotTyQDn\nA6vY6wdyDbtXo0WGBrehkKHT7yh1qcTKDUb4U4to3cLke3S6+QTyUBBk8bFX\niUSwJ/xGkufWelBz8GnYrjONGfGS3jhe32rrLHF8L58YgDqmm0wuwSvnsGuy\nfHNuaDBxNdCRr1Xc2mGlSy5zqFOnUcasfYlYAXwObVr01jlwRGfwmWlYvP8g\nw4a540139i2v6ehxhItIQFdEbhnktzTgc7zjN0H/9m44C5Q4OygGqKBsORBy\n5il9D2ZP1463eW2k84nja2qrpTp5n68b/oMuA8cfNwOJsp0BmQlVm5XeCHQU\nM+bx\r\n=g9ln\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c66b081ba582f4d58dde82c8b83ab1dfbed6063","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8fa22aacc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8fa22aacc.0_1591639440485_0.7879065686078088","host":"s3://npm-registry-packages"}},"7.0.0-canary.21c4e4ed8.0":{"name":"@material/auto-init","version":"7.0.0-canary.21c4e4ed8.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.21c4e4ed8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f4a3f43518d8ac4acf73d63302151923dcdc0a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.21c4e4ed8.0.tgz","fileCount":14,"integrity":"sha512-oAoVs7LfONrRtjHrEp+2ElWcGy44rrSArSLeh9Uh+UzLmgFOcwRl8kL0mUhBXywwuSIG/y4/uyxtksU/SKoTfw==","signatures":[{"sig":"MEUCIQDCOlFukj0lvfCy0HBVKkZTjPhBPxhlc03X1UBVnL+ZGAIgQ2iUj430vDvKssGnmoZeVwpRbyIUv4X3oyLywzehlAU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3obdCRA9TVsSAnZWagAAivoP/3cOzey7w0L3tIP/SnMd\n+FihE/yuHAYS+vUj9I9PeBhDr5PGgCroMH03xHQ0n6kMv6oJy+LxQe3DQK4I\ng+Eph5WT5gmUpX41p3mkldlAwbfpBS2pPBF8XNrxA1g2FgYzLTBNQaibbB7m\ncIIy/7nQg9DkpcxJxASJCgRQNrd2oPmQcR4K2DzVhxjd/W6jRDgDJbW9TDpQ\nMBU8H77T0oWrWEnuTluz+/xCkFVmMEz/KX3e4RVDBNw5xT2r2imytyXYSkWc\nSmNx8jvaBHzV/Qe0xfMgrpm6BKB9O38B3KZOcn/W0g1F46NxIiwdNPu2UbrE\nyeatLa3KOf99JL7wX/AWiBIOmK+qvxiUbl9znIh8NoMR+dcOrKOJWWvDynMf\nZUa+S2EIHToNyRr1Hx1hEopYFJoJx6PNJSVw5XWveU8tgxH1Yf6EqVfOBAqV\n9QF3d86axmlm/MiuupaPNCOOQgc/aJuabKMNBHKHjRJx60i5dZqe+DMGFzCF\nuK5J1hpONSfUXqAGoX5xmig4fAwmm+tLm8cAzXJpaPNfk+CE609QaRKE/ee/\nT+9MW0OBTlkGiw32xjpkDZm0iEOIUiM+TP4u0b93TzcCaUGZJ4+CjlZgOv3A\nL8tGg8UsbiBN9O8+P1UmrMdnIfCi2KoEInFzA7KSFgYEtUhoSei6nTiIfPnX\nNJCg\r\n=aFko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4028e059428ff6b13f79ad3f9076ddd853ec1904","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.21c4e4ed8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.21c4e4ed8.0_1591641820953_0.6944900391149618","host":"s3://npm-registry-packages"}},"7.0.0-canary.dfde46516.0":{"name":"@material/auto-init","version":"7.0.0-canary.dfde46516.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.dfde46516.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"687604734c8650e6683b8c0f3f0f93e4dcffd49d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.dfde46516.0.tgz","fileCount":14,"integrity":"sha512-a593fi8Ap/MnOmWjaX2z71xFxgMM+aIHsJneYqt9ydUXm4SKMY8kWt9UaTY6GmCJHccTlm62NKTdohpE8uGmGA==","signatures":[{"sig":"MEQCIEWwZcIqGlaBXKZK2z+bb89PsCLMV5uIstMoEIw+pFieAiAkhkkJc5rCp/iJxEkxgbamPhMJmCRk82gD13xO20bG8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pRXCRA9TVsSAnZWagAAoIAP/iULx6z8i55/Aa9RH5ck\nBxoLVs/cCrOnP5RprHTO+Bb/40IMhs5EEA3o77+k6n9L/ENgHq+e/T/qhg5s\nV8BmiLR2X9dm9EjlH/8xYeVwo/qWUh8/Q76BBcEEQyX3pWpbS006BATx9WiK\noZjEsmASa55iRi9Frd66uAvjb0sedR82qTQO9t5TsY8rxhLlY0Ij1dz6u6qS\nuAP7vYVsZI5mjmAw9akoPObjVJ/zqNvQY4Ljj15gF4IdknjBTRmwrt/DnIHx\naC09ftgdeqW3zG7F5rSZyfbIZE4/kpik6qxSZzhJLwcgapwPLQmfMPVdOyY4\nqXRGkfntZ0QP0n/LgZ9ekWnfjGxm0mg0Ffs9P3nzMBwGMt503Op4Bel544vP\n0WXLeA6TekcRP/o/vUKOSXYr0E+kERqVPpCWtl6M+BP4v7Ts1gonq8lY/dDN\nUGWx0H3c/0Fw6teqsVBjQcsnJ5Ed6SppbbtirXUSsTo3ZQsYIC+FfqImqbAv\nnVN7joeJsey1HCxcqWUQDuyZYRdmF+MLhFrw2jNTa8R5RGAU7VV4h1MhyEmf\nw0wlD0pYe+6JIRVaiWsLV9CAY5tVo4gF87VhSECBbvYXZPLqF/OgeXPYAfWj\nwAE+R0TzvUeIphKMM41cP/4QGA/u9TYJ18X1vbElEM/WulmO1RfGaHEwFrZx\n8Csn\r\n=Oa86\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c25d474d22b404bd6774ea12567f0916bd7fd165","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.dfde46516.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.dfde46516.0_1591645271063_0.4343682251982979","host":"s3://npm-registry-packages"}},"7.0.0-canary.05cc5c206.0":{"name":"@material/auto-init","version":"7.0.0-canary.05cc5c206.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.05cc5c206.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fd314014b6792329dfd8a4ca12d998464a3746f4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.05cc5c206.0.tgz","fileCount":14,"integrity":"sha512-AGUPrxDMI1e4svefrwG4p/Rc82VFFt5A+oVnQX7s27KWKT2xWkBJRB0Tt+LqQqdN+LZ8Qa/D3dHEqsbRQ+crtw==","signatures":[{"sig":"MEYCIQDE9JBxNRtAiGvNg0LUxLc/uS+E+zwqvGMPz+9EyBdqygIhANYM450tcDQ21L7nfeqGsK1JmNfEujBvCQ+g+kT3jn+0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3qXqCRA9TVsSAnZWagAADqAP/jEchAYzfzwwsdSqw9cL\nxUEkE4mIPkmekDof/VHn/EBjIXHwKSttDzKbyg/vrvBaPqSIhxBV2IFJff+W\nDZkM6qWFvGRGbb1jMa7WhLQPLDoOMK2s9lN4ozmoQJm+qROepSZh0k7fOboj\nu9cqlubS4gyAUba3d8f4bQ03T43Tx10FgOpF1NdFskr5RiJvZJ5AM/jhJZG3\n/CxuM1SDYarkpD5cIx6CQbsJheIAnDWC6FRfribb/FIHVatFsskLJnNNRfj1\nV0CbM6sAhTMUK6PdpJ0xjaMUJn9ywqP0rLDDrR0opIJRYO9+ibM367ZLRaGZ\nQoEiKQRX7MEQgFxbct1R48u9od4I2qCk0zPGYT7lva8UaHam3slfrk4J2PTA\nP4gnhN4BcIGXB6vNSSfBkwUaAFSR6GIpaVcRSR3dspze+lfHZWeQEaSq1KK0\nmzmQacwbgh+QAex8QcqiDOmRb9rVKnFtWOFq30HMSaoQawYeQCRvdtkmvYVw\nWpZDeirCGbYrMIbgRdABnclc0ghBmE8Mbi75n0FfSwQX6Uwbx7DrNxYubImF\no3y3UcFKhsBToQGthH/dorMvDiRGl1iIS5YnOdJmv1v7h68DO7e33+Ebsbr8\nvQy65YWKe/RpVL6ys3VYp9yS/R+TjVVsOnwadqQvoD8SKdgVs9PEuFqbDfHp\nqmYQ\r\n=tLBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"933ae32b3f02920ab3f6f1660cefdd6302297532","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.05cc5c206.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.05cc5c206.0_1591649770031_0.6502318606379693","host":"s3://npm-registry-packages"}},"7.0.0-canary.3ee488f1c.0":{"name":"@material/auto-init","version":"7.0.0-canary.3ee488f1c.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.3ee488f1c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b4e19fe462a8309644a0bf47c3b9ef0eec2e782","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.3ee488f1c.0.tgz","fileCount":14,"integrity":"sha512-lnCwYLh4tC307aPMiLRpl1Ab5/A+NDeDKeuKTjJDsh6+d6ZdPWVnRLAlgTCXtt5156LN9WpHKPZBGXsy4McXew==","signatures":[{"sig":"MEYCIQCEgYgADNH+NPrt3J1FZU8+LiK6OhAeuXhTb+DVod7iUwIhAK2fZCNfxkfNFLtbUtm5SFGiRWchHgH64dKQBrCbfbrC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe36JhCRA9TVsSAnZWagAA9qUQAKR95lb9ubi4VjCFt9Ax\nP2AZWJ9PGWNqJSsOi/j4YxvXLPwY+vxtQscqN1MAFKxooy3NsVW3bAHqQAV5\ni0300auIUhDrcdQnkJBTxtO7TLWn1J7BJ3bRw4sJz6xD2EWmJwreZVUx7N52\nqZ8YVWgauFB6oM3rLpAFyzvrDg0ZsasGSQiP48IOROpabXWBhrRmPDVCgXBS\nx5mnTlRZzmSB5YFWpc8jZykRaRAzYh5Fdz+LHuZ1g/yLoTeBimR7tXcRujor\nfHLrSFvsXy873y7IMVoF9wy1XbIG1nL+5fRrGIlJt2hSEPNYOMEY+VSazA4o\nzXtdMDH7ZE4KqQ0kr+wg1Aam52kBeMu6A4ToUeSkPT9t6PDklRgCUSkNUOWu\nfCu+cysuE7bK+kz3xO0pmPv1nMxO/xhwTJb0f7Hvk5u+jSNn4xxZEC1Aisx8\n7SmJQZnNa6b5sZ2TdIfrLrKqWMVXx8NmzCscXpAEF7kDHMUxyWi2osVc4uwU\nUhP6gRPdfgS8Ob8trZ6m7Qi26dNK1KnRTnj89iWVFpMu6goCpEa6yYtuiYch\nWNAgf1VqS73VFP7Hcvp4aCiPWuKMCCB0binwy2z0u+MpB9lN0Zx8AX7QwXqH\nzf1wkCoBXoKerJretFRputfIJ/ZyXfCgMIDfPBjcZvJ63OwRray4+cwUsb0u\nA/CE\r\n=cD2q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ceaac97d295d5d50e71137ff6d4b390630570b8c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.3ee488f1c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.3ee488f1c.0_1591714400902_0.5903805226784202","host":"s3://npm-registry-packages"}},"7.0.0-canary.b83d720ee.0":{"name":"@material/auto-init","version":"7.0.0-canary.b83d720ee.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.b83d720ee.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1f965b5889ee2cbe007286dfc2f53c6ec42a555","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.b83d720ee.0.tgz","fileCount":14,"integrity":"sha512-uyaXY5uqmzsK2PO6FlsmziG+yTpBg8dF1+BlqigIohG8BG7v+U/jqAp3JnQOpOGVXquyFC12zdMtz9nOnFmHnA==","signatures":[{"sig":"MEYCIQCukEwy7JviZKUMTvMD2wGtG9J2/pFnsg6/XRtEkLjauAIhAOWUcmF4vorjCnzozoQWGtaU6zIM6IUtDiqJb9Zhpp5w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe38YXCRA9TVsSAnZWagAAB3oP/i1+hVTaPTL1Ubl5VI44\nT2NCCTuy7zPmQ1K/H3y/UXyW4gr1Af+ckEUlSpLw8Rn7Y5Skpup2C0366fk5\nazGfyGKb6rmcHAp+FW235Mjc1hjGCU0x3u2UHFiNtMVocEJBpNpW4lXA9r02\nRAHuIpGjXNawP2zp7V0O4QPixZbyqMpWLClKVEGcNhd8NCJPZ/pOUJiyYLpx\nefmESOPz7PZV0Z9flfJaAOYSD+6NGeenU+zPj8htfumj+Widyc4HBm61I2RK\nVbiTcjjblya7BTAVqdiLFE74xxA39YgtvAIsBmmPaACFzKz6cvn3tBm4q+zH\nOOZtH9OVkxykES5nzmNVyXUOeX6Nz39rFq+WrS/Pt+GvnzE5Wev7J/GRBNsA\ny6U9jYuLiL1RfHp6f8FRClk+fZ5I/STmI0Xcj1c32sIgl224r6fOx5CUVL1x\nbpSqSOR+VdDorXc4Lr4BENtlxPY2iXlL7Q/6gV9jAetkwivlyOaxFMkX3uLj\n9GRdJ4HhL8FMbz5prvWjYPt3XtVrJHYtryodMPPPNQUoy2dh65AyqKkLXcFF\nB2A/cy6vyfUNMwMVI+90kgj3Zc2Uz76phZWKKViukR/WrOCgITTCfO3JcYzo\nM6cUpBN59hXWqs/xTtQsKLCsSnaD2cNz7+ubFZl3+oyekXb0k29rLUU3LkhX\ne6WE\r\n=+Tg1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3e998e476c86bc89c3bb626240ddd068529062aa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.b83d720ee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.b83d720ee.0_1591723542734_0.7648078279602393","host":"s3://npm-registry-packages"}},"7.0.0-canary.afb1c11a9.0":{"name":"@material/auto-init","version":"7.0.0-canary.afb1c11a9.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.afb1c11a9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1a390183660fbf1b23b3ee21294378c622528df4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.afb1c11a9.0.tgz","fileCount":14,"integrity":"sha512-rVa4EPt8giov5BvI2yZnA6ftqTGxMIC5HsDfdiCzw8YAGevJLDQpsYrJvXsJho0gzWhm+L8Se4E/M2ZMcsfBbg==","signatures":[{"sig":"MEUCIQDCSyKPVfC/N1fXmHkqhQ9a4Mo8faCAmOjInEenXxFfwQIgd5OvsdQfjLAO1BXTxLlvyMJUVDdDRDWYHCSk3SWomyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+36CRA9TVsSAnZWagAAmwMP/iEgl/j8YS7WxjvQwXSV\nM3sPM5j3zJiggHntKYiHUwY4uTIoK09f+cc29slWlj/sfyfEqyEs8BJ3OQ/5\n5tR6Qps7qJQq4cHap7Csy1L566yMtqphVKK+rxDNiDUw3Jon95ZgsPdmrWMI\n59Sfeup3ORYbMgJESMUQRXmOS+zZ2Uk28DqwptnX4/QpJd+87p6mlC8kTs55\n7BPAA7O0KE1L06ROjeNbFbArcnwsUAQJ5TVjSGhCYXz2Q6sDlfngCLQxv+zV\nVR8GL4GKSEhZwspMlZVTZTVmPc923HW1zhSldnaDSufs5J4nAf5DuzWqQSq2\ncDfpng7+zohDB7GjBuGOTmstbfLfwSD2kEWBQfu6SXmevojxruU1qas+cJcf\nhaMluUbsEYa/BEWxf9XgWOfNfUFabN0VUups5qQROByUiltGTsi5B82LRb+h\nWVN534XjI6ofwyAs2S+FMsc43zHW4AVpOcfzgoJ9wglb+egzpVvofh4K6FCt\nlRjlEr3rum2n397eJEHnSWhXRA8NbUuQfZxpBMUmIPspSN11W3BjjZgwUffF\nNIucMBkW7tWtyXqsPHvGf5pdOQrdPq5ChO1zDEY7y3HZlE5il3d53RNSyOvh\nW7CBW4oN8Hg3Re9j0AaCKtLwlSnBH98I66LRoQddjqd+JnRWv9BSHn4B9lo7\noTAV\r\n=Fhji\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"893f09ebba8aeae1b012971b66ce3c77c410b823","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.afb1c11a9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.afb1c11a9.0_1591733753609_0.16721507790625867","host":"s3://npm-registry-packages"}},"7.0.0-canary.39e6f71e2.0":{"name":"@material/auto-init","version":"7.0.0-canary.39e6f71e2.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.39e6f71e2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a094aa245a8efca980cf3ae909c1069c3341ca88","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.39e6f71e2.0.tgz","fileCount":14,"integrity":"sha512-nyurcaDDRmphzuOiOeUg60TYN4A5TXSDLxVo3ai2igMKmeIWt8cF1hFBOnVBQYCpBZuM0fnxOhg+2AlX1UwXpw==","signatures":[{"sig":"MEYCIQClS76bx03o31mb0ifwylx2dGlKx0b0tXVgSrZKJxnEnAIhAPAjnZU4bWS1aE8LN69p1mEkiEPHm1SymzGHcOdLKBgz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4B2VCRA9TVsSAnZWagAAiMcP/ibM2wTS5QLjt7qND/bs\neEdQd2y+JpqXxD9N0DNHF4CuqcROL8YWBPtGRkaESl0nNnDY20FPeCNCa9DS\nyHvxNe9cYXBq2AlNf5cnjt30A326xJ6z680oPqLPO5EhlnaPMZK7ywNv8Kmn\nqvxe/m5Fs+KyMDD806yYAw9pPoji4aIEoAVN/f/kfgf3ribTfaxM/JZrls8H\ndSHsewgg53KcjTEH1ox/+/M5roo2w+fn6kaeRp+sBZIMOlVWh6lERL4dK70y\nRRV7TPBfUG9t+h7LtR7Rq7BQFmBU0f37crsTYxvrl247W7w4e/QZd6INIGoV\nodCilaBBHHjFc6Ch55Y/J89LiNBW3RHhmq4eGAk7BZgAdHK1Sj8pR0o5r2he\nz/991+0uBxrYAC4oNSNBIz28Ulmq5yDSi7EJk4AKd/U/gOicpeLI4i2JCTeF\nIyxlCt5/+KE2ZejRukCOSbXnmJKxiX2u1nldYjx21qZfu7/Frfoc2exXT/7F\nD+tI9NdffH40AeK7dnacbG/F3jgtB3sTWaSx5LtawKspyKJRuk/iAZU2KSvY\n/eav97OMkL2ybMVtqZJur+EK4WgKg7AwtU1qudVAzkSzWk88Dc1SRMo28b61\nmaOkJdSLy2uaVVsFLvev42DcnzVDZqUKdKaXG+XGIOvoaAf0Hn0s4Jz0PLtE\nwBz9\r\n=U6QF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2f7273891cbcb7da6646bdca0ac4c5dc2ceed9b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.39e6f71e2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.39e6f71e2.0_1591745941417_0.9982807219365009","host":"s3://npm-registry-packages"}},"7.0.0-canary.d4c66dc7d.0":{"name":"@material/auto-init","version":"7.0.0-canary.d4c66dc7d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d4c66dc7d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a88c477e02d034faacaaad91d306d88e256dde3c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d4c66dc7d.0.tgz","fileCount":14,"integrity":"sha512-HgfEk72zwTmUa5YfO2iSweOMI/VOOeaX2fVJNhxi7KYuZ03TZALV7/NO/bonRIS/iJ52GRGSRnmuE3yCvCFl2g==","signatures":[{"sig":"MEUCID6zGlo+AACVUlG+DqOUCpxq+GtwXplooEvVVWNHMcH1AiEAtbGCMuV/O6BCVYUKVkB9d1nU1wQCEo6q14u8d/TU+Dc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4m2xCRA9TVsSAnZWagAAvxQP/AioMyq405EIa3zSIAsz\nqGQAhc6yAjWpwYoGOWNktIbuAArry2RENV0QipTeVt5cdk0q8zEMkPGKb3Se\ngVudVcVbwbo+gSqgAvHRWKb6iItmOxp4mpPTCKUb9pRldv/hmKFgJml8Eed9\niko5mLoNO94TUdzHS3WbVLu0GRMThemtoR/1v5YGEtTUuCJzfiN7fxImeBpW\n2mq88CVSd9Zy9YaJ5hBMXXEye4FjULqBxKMhIedKSUQ1Od5vEXAw9+eHlyxb\nmKgNSEU6J8/ttKbSnic0dyNcYDkF7COtF7mUh2lMHd2bPz8jA+wfXOYZ7x2Y\nX/LNaHUUzbL+Coa9NpsWzURN014wvgVGjb5QPIWajVMwmFxqKIkqASutdPdS\n0o6v2JuSl1NZJR5Gt8pn/a0Y2IQLWAuJXlL5bkywA2o9k4CxURboMQwREl7H\nKrRXA4sHqiRYyK0vsYcE0exjCiMJ609R/hEOhvbnTmw3t3foM+OtOGDz9Wlx\nxVqeGFt/Wvuw50Ij0R9JCrM0OfzPM/JHJlHREL9/IjoAXskQhggtJAgyEqI4\nuALXYj2ADFyEjs137xzoibmAIRRHjS+EDxCjHKFdRSEpYA57xOqt0FmcE+/q\nNdZnbnwqdzGK39wZAZlYv2QXnb4Dbx4PGpmTb6OQodqCWjSX5KWtQEHDINXJ\nKx3t\r\n=qHqA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5964d9e6836962528334c54ef81ac4cf4898392a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d4c66dc7d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d4c66dc7d.0_1591897521230_0.869828787893105","host":"s3://npm-registry-packages"}},"7.0.0-canary.be4a19f9f.0":{"name":"@material/auto-init","version":"7.0.0-canary.be4a19f9f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.be4a19f9f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dcbe75376cce4cd1455a8bbc8fa2f0913ab181b9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.be4a19f9f.0.tgz","fileCount":14,"integrity":"sha512-GCVS+UmRLiJ1VGk1ijKww5eKVr2s7qxMLaTdlTqlx0RhdI5ez2GBXXbn5J92av79OAdjK6Pf4+4mH8i+4NeABQ==","signatures":[{"sig":"MEQCIHDs0IypaF8WOFPNa3Af5CpZX6sASvaZ03d7c11i9FvcAiBzk6i46XauCEiyhIiCjUif5KlSg99V22OJVQLZRYaXbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4xupCRA9TVsSAnZWagAA8PkQAIIWK7BKcXUbyFalBmEr\nIdjkUA1n0BdI0UpNN7K1oQCMeGxmQv80O8DU54h90Pj8UtAD6yjithuV/Xk+\nCW3Lacqs8bnBRlNFUg4JYniisWNp+JjIISMjSOqwwx5MFx2tJB+DM0YdjiHX\nx9qkuNDMornhT9jK/O5vIbzUebwtb2eAgwq+rOor0ZH47TaPQAJeKnuERfts\ngX5x6eghBYLp5pGQLga5gB9JBzjElO6ohdGFP0oFLtRMg2xMszV2jVz4Fwos\nMTkS3uV+uWqK9YuILv7nytY5/Edrfn15R8vXgCAQgwpzQIB5FWTgQbn4BYjG\nOYjBqe2w6ZBekj/twB2c6qZY90yTQ5FYIIj7LpRYX4VE9qVcoGEdcOp07i1d\n6J07JC4A0wIF/etiiS5S8EixyhLQbWF7nTJO8fDkUqHPZvERTcHsFtMpi8ml\nyx29vz4Y9Bvfs6haNUXF7y28tX5f0uTUqQpO7GSHuYAJB0sAgUFxjvWzgSvI\nMsjas2TfrqZOz4RuHbyzgCUcGNWWCpUyH7muOGjyKBIuQnm7b9CV2jYhuauB\naea/GOjxNgjOqg6ZmXNxTScl1tSc+GU9U5c7YTU9wBKtrj77UxmpUh2yQ78R\nL2DUBK6udMll0YBfqbwc8SOy+hdZhcR3M45iQYrJwd+SmFh9YFA7W8q3QOhc\nHCGB\r\n=+GWy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7a0b89cd18efc7fec60e96de627e59883e3657c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.be4a19f9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.be4a19f9f.0_1591942057240_0.079343931675534","host":"s3://npm-registry-packages"}},"7.0.0-canary.a6ac8f629.0":{"name":"@material/auto-init","version":"7.0.0-canary.a6ac8f629.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a6ac8f629.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fc755097d0dd3420b6926047e4f2e5d0bed65c14","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a6ac8f629.0.tgz","fileCount":14,"integrity":"sha512-fqRpGdnbfRQpnRKkkXWLjU5T7Qpfkqg39FkOzbURBb1lyprvSqQTst/3ZLF/U9wwNdeK2li+/OWdLZyjKenT+g==","signatures":[{"sig":"MEYCIQC0AEDA7r43yazm84LegjZNu5pTno2x7kmXoPUKSo9AgAIhAMaqpkbJJKCZPY0RiAjEBfho2JON88Rp69pAwlC5bufg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5+hfCRA9TVsSAnZWagAAwf0P/iyMeJSOhpFZXu8M62fz\nj1RyQIMOLSig5k6LwMVijbwurajnZ308RcNSBkmhWMZ1CNoh6pjwDRp+VrPH\nKPQbZ2HXgs4/ZUAd6AhOUlwDl2sHYdAQ0c1IFu/oUJsiJijw/scmhZ6qDp3m\nEk+e4aE9Ai+YZ1XoxnGuCvo0qymS9Ikqwivp7ifSmlsD3Fl7/gOHGZPVJ+2o\nq1wJ+QNFvkS+t7r4DgtOpd3tUyl83JVQ0yU3Cs1Ofg58lGdcudIA6JacSys4\nKTXj/HXGpmqlRctylOsoGi16BoGrZhv3oRLmzRhZRqvkLD7GorWFUdTh/GOl\nP0sQrFMHnZb/YjMtNT5sbFijpt6OAFL80p4cDaqaUjwR57Aoicm0UXmoyyFN\n2wqVy/GiYo7vK4LR7YveQ1MtmvFwxeWvk0GuL3qPbHyT1o/jsGqYspaoJ98j\ngIZgAEkSY04qQXTO7IrX8b6zB9ghsCi+6t8QYq+UZ8SS2OUNUAS4b2kHooLU\noy6VskuvKU/cBUgBF9YkHALgvO1M65/VmYHphHP7o4ij3HY+VBQNI2H7a+ye\nDmsJRMyXaTUPjHT0GOkKxxCaogRknWySXTA0uEZ/jFF1Cts1R0gd1ORyl0Mr\nGrtlkGYWE9dcsYe7leJKKgI9XhO5QFP40gH2FAvb6TnGBe9VMgfXpmIFhom8\n+uG3\r\n=aPgr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"30d2dc59ec3530f0f21233e5b8e93c990a4a2776","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a6ac8f629.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a6ac8f629.0_1592256606984_0.6925571802152628","host":"s3://npm-registry-packages"}},"7.0.0-canary.9833dc287.0":{"name":"@material/auto-init","version":"7.0.0-canary.9833dc287.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.9833dc287.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"663cd44580f27e6b6e6c08276e500919d547b6cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.9833dc287.0.tgz","fileCount":14,"integrity":"sha512-DiJ7BskGKYaw78khINM//kqsX4m7XTmvSS4mXvpeCdptMc6Pou1NGjMXNZReDvxRTw4avfec2nTwBLvZKJvFNQ==","signatures":[{"sig":"MEYCIQCaha0KoGnISbd7K4YTsiQTIxMsnMc4jMsp6itSnts1DAIhAKTqqP3KtcQy44p8D1qpZlOP7mQF5Rr7p6aDN8ebA4RA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6SIcCRA9TVsSAnZWagAAkSoP/j+OpXnjoIww+NvqTZxd\n78n0qLdg3HgBVBnFJU1FvPqRqu7oMPwREKdLN7cHqbXRZRiei6DAQ8P1hILh\nnwwryDFi5GYDJQOJbIaRqFEwMs8vOGEB1qbyusZgP9Kw8rFK79KIxxkmwR1K\nywXLSaKVz8uuxJhYorPnSwm/Aevu2JKId3Z2BWdUtcQE50YqIxlcfbtLAEgD\nwJknuAqA0rujsd1xbJ6xVgq1jfo/f+rIgcwDJgYMOoFGLZbYNNbEpcBjwYRd\n6hJ4E65tkYAMY8EZyw0Ad7c5CD8BySzwxROhFSwMw3xflVlmnRNH6vSFeeTW\nQNmXkMKaU72d0F881v0csXjrhF9M0PEZj92548O3pDJXWG7WsWUggawZL9BL\n6qvmnmuCetCpLZG3jArkl7tXkSLXYmp3FAqo2aoUd7XbWaubwUzftvxgJV/C\nZvfi5hFK5Lldw2zHBwOl8gWzS72/73vNn1sIcrJlCt4kkd7koSPxuHaXPA+J\nsFsXG4IUGf2xpvneyU+rF4VSRLzvAk3tu6JC+kcEi0zuqMNEqiGATlHODcff\nAg5vFDv9SslpAMOwWejnDZCse9SfAGeV3nWV0NprZ6iCrk14HPFJAI7y1FtJ\nQIW3xvqBGTBczD2ThgvfG6nS7HhPMgGv99igw4MpilK2ADkTJxV7EG6+bkIz\nAT7m\r\n=H5FT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6852334e45da838c4140c1aadc974a39d80a83b3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.9833dc287.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.9833dc287.0_1592336923633_0.2545207961097038","host":"s3://npm-registry-packages"}},"7.0.0-canary.3aa33998e.0":{"name":"@material/auto-init","version":"7.0.0-canary.3aa33998e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.3aa33998e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b8d5f00e55aa79cd8eea176b76d79facc04e775c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.3aa33998e.0.tgz","fileCount":14,"integrity":"sha512-QrwUVjRYsHCFzm5IesMX7/AETC42z6HixSzUN7nTIXJMyp2XEfN8ieHh9JcJ13ALsuCmcZc0qrymkosRjm5cMg==","signatures":[{"sig":"MEQCIEyS5UUQ75oegsmO/ytLJv3o+19l5wFGTFy/Rbut47wTAiAWB7DcUZWCtR7mH2emkNZXzcl61Q2FtBk85IvZ6pfPeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6SmLCRA9TVsSAnZWagAAPx8P+wb3WTzebfFCUqoLxfI+\n8t6Iu+Zu02lohB6ubKdUbo+zK+nPRbXveW9lUcb8EpK/+/2l8IWZ6nyTS7GO\ndMndUhRI9cVfhNKAccdgDu0exShZPKVaIcJBHHCJVpxohshjx4osRrt1uGE/\n4hFZRd0A8aqJTkm6ovYFoBAdXaJpxIrIFsee3CYWUdNsEhzYjmXtlg1YuHPO\nwb6K5+fHNFbPRthy/ImX6u0Rxw4xkuKyv3H21bhdjTq9Sl7qayoVyuG08Lq4\n+ll87iziDP+cuMVBCFrWpy4WuSewxfKe2S5bPuoy5kfmDeTak7NndrelvQFN\nHzYWJHJMM59Yf4Dbo3FuU5I150AOvIm9LaJ/2MGVOLFtuCvJY+FvsasR6Cyz\nbbM8XbcINeNUhSKAgjWtvTb5+j+vYNzFd1ENHQDIrIKiubNNexr2Uzm0+EmD\nmBnDo2S0f1Kt2TMXMTGbTsR1K/5lNV99p8jhSPzjiSztjYZac6nfZiW10pnj\nqrMORe3TACQG5W7+eqCxI8FHiJMm+y2aSD8advd/e9KObA7oW1tHXmMjxYXu\nDr3Le6F7GpeaqTUYPtrQmiMUQGFVYvAYCoPUhz/dKzOwXB8WtYdJh7H++FVO\nlmkGJngvn3FBat5s0icOnGsyPtxjNdfoXh4oT4xgZxyHEep6/f1hKW9WNhXG\n2gss\r\n=7DqG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20873613db8172781d25b42fda84ee1fecd88558","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.3aa33998e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.3aa33998e.0_1592338827341_0.6354927139698963","host":"s3://npm-registry-packages"}},"7.0.0-canary.d2b54d183.0":{"name":"@material/auto-init","version":"7.0.0-canary.d2b54d183.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.d2b54d183.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ce36607665d887971f659231328f5bbd87aeafa7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.d2b54d183.0.tgz","fileCount":14,"integrity":"sha512-gFqQlexE9TSvbwhM7CjDo0ezCfLDAgvJBeTDsj91CFdfCKswGBHtX2xEWiuixbPt4SuDwo+j7pvWAuXKMRK2zg==","signatures":[{"sig":"MEQCIBIV8AaDZa0vyAXhdJWvE3vXBfndg0elyToGVGBegHXLAiAiwQCLXH5Evb0vpmrflUzOFxaf2xQ0aWa4b92/n9QADg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6sAcCRA9TVsSAnZWagAA5RAP/RKp6vu4DoPymiAacVE9\npnXDAffgqlPVy93DgAj7z7RGZ2HCpHCkPyx7NwfLKBoBmZ0awXvdmzqzm+Xd\nvWjyRWL7pGqI/a8FkDC/gVgP8nqopC7819AWhDFkmy1nEh9AkpdM7Y+00GTE\nTcioDWF9uoRKsMcfLQ8TvrX4jfukQAwisFNzBSs+m2EYhY9pl0d4vJ+cFQOG\nP4dDM9LMPQnFsP/guvW3rWk0RzdCLYbEG/qSPl3avTKQ+gqkHibGD1ncx/w8\n3AsrVCmdRyyqorfwmP1sr47FyeYUd1Vd1Cew4NLyWq9ill8OLN/CoIcbyEja\noP/2ecLuYigwd8AloB9AFKLxGRU7Jj/kazpmGtM9NUuTu6uCIgt6o+UyE2Lt\nDR/mp7tgm6HXhPBY9wOPNsEhbMZqpMbJHuzpMlMwbFCw74x21zoHur+BQNpx\nl/CJyqL8tc994n5Ob9SWSh4qZIh5tgfw8EbwONBWT62z6FmkYKkLhBTjXJfP\n8TXx0lkahik/wiqzGZwrMJfZLpi4x49aumyqadHSPCLIGVlUUrukRTToww7n\nv3xIFPyWVoUlpT47gFO7fJn6tyktQvXXH6P0gsNHwLszC2LxvtaifAlrf0DB\noUoDRz+C9GU1esl70bZt2Zy6yjTFfi3CYZ+xrhzLWr3DyLkcCaIEgsLrFFhI\niT8F\r\n=1GEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2941697c8abef0c194a923cf548ee231dc67a2c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.d2b54d183.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.d2b54d183.0_1592442908014_0.22259525862995133","host":"s3://npm-registry-packages"}},"7.0.0-canary.f2a488e95.0":{"name":"@material/auto-init","version":"7.0.0-canary.f2a488e95.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.f2a488e95.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"549d6f5e4d27e734cf6c170d386327cba9a01c40","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.f2a488e95.0.tgz","fileCount":14,"integrity":"sha512-n/OV1u1v+HuZzIKa3rs47F0WNDtVuvr5WesI+KLYi/LBmT7OD+7XqfHNdzXu/CmYho8EYrHTqRV9hAgVic25hg==","signatures":[{"sig":"MEYCIQDP16NnM0mZf+ZfYDM0j9rCXfYzTyScbLVvq+cmtEnUZAIhAN5cnzmL6+8JfvTViiBAoQ5d5OY2hRp45Q5xtKtSQ/fm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe64JGCRA9TVsSAnZWagAAQasP/17BPeSAIsvLNqR8yZPk\ne1jlvz8U8Nj0j3svPDD6cdpxq2RUgNF5fkLutkBQujd6Mrs/1wESEnF4yGcj\nJs6IF6w5Jom2WIKD3YQZt6w7INCpDj3aN/N5AQujE2FCAP+Ver4gMVDzfIkk\nq/aSEKkyUSLhVdO7DW5MWcwcrxOYPWo2b2rTrFMejF9C58KBDC1JOoPd7fRz\nkqGbNb62icEsbwPO9kBoQzyFSObnT5RCol7MkXTwLa/dwtxRdZYBPfMJ5WmS\nsEodEwFCdanl/kgR8Zl8C12PFgxRLAExaeKgI4JKp+JLFgLBmdfAcceVAR3f\namxsV+K+b0tGNMndAIe7Wd0VFUbT1R4nQjMnOo6JQ+9N2+/TX0F5JUQyaEIn\ntcPMpgIAXsK/91XH/lvCLtMwkM7SP01gApX5Ea4ezryXl4fA8WSKNdBztPPl\nXC+ChlNp7r5Tzw2X7larEs5hAD5IA+VqALEyak9lH59fC6l2wcSNkZbY+KcV\nCfdXYVYLOQCVknscXVpld+hamC/5i60TBK1nXSMktpdBpVS82AAo2OIAxbpS\nlEvtHWQTVmZu0HeoqK9pZ1Q7fgeMDKcvgyxClqj1SzmkvirA6BGIWDfw0sTl\nfJ8F4PTgVQPAK28TKCEawib5xDnbgBm6FA+eAA/7A1EoHdFp+D7XcW4Ymhqr\nQf7T\r\n=dPia\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bd7f6aafa23ab94aa2f862ece45e1775f1895b88","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.f2a488e95.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.f2a488e95.0_1592492613570_0.8086213247892968","host":"s3://npm-registry-packages"}},"7.0.0-canary.bd8d1aafa.0":{"name":"@material/auto-init","version":"7.0.0-canary.bd8d1aafa.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.bd8d1aafa.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"de36dde8da9f4e2e59e02196cc104d2eddf07cb9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.bd8d1aafa.0.tgz","fileCount":14,"integrity":"sha512-oJ23HmN2qVM3bigQBN2uTAxyeuO+p0z0VOwXjxK880a2bXmnNnpiysjZxm/Z3e6Vatm3jiKYqP1uoD0COnc8XQ==","signatures":[{"sig":"MEUCIQDRX9yHRgJ2ymjvxGTjiUxHgfqp9RN87HpWxIEie3Gm6wIgZ+ARhLfT58I6q2n3iIvMyvZojydrfCkbJOVyMt3E6j4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe64UgCRA9TVsSAnZWagAAhO0P/24yQ7quMkObAf9G3zRq\ndMjxammMIJY9KgyXDR/68tePwF5DrRyrsPLwxErNukEWfLx3yecwXfXMlG/Y\nTGDSP4kbZ6R49+Z3DYlnpxjL97ulu5tyBQZS7iikafJqvPi4ni+7cJ4UA4Op\nzE5ct+U+EaqR1LKZ62wBlaTkvBTIIZeotKq4NQZaau70AiCN3KxEekiLIkrv\nlKhPh86PVkJh6GHeKL58LkvkWWz1rij2iUxKKhF9EIC1Wjq0qgrN5glrfeg3\n5tUxMxEEBcC5aLFgFEbiDfdG5eUw/PzikmhXrPdGIqOfMKbbahzSUJ5vcZ11\n1xaNmL9OB2SD72gOsg8zt1qTakoBeaZuih/sjxWAfr2embkpymYOCtBLjyUO\nRx/qC4f8k9eAJKZilzDk6nhTY8B3zMy49s8TvLI5xZ1jr63EWtByhLuWyTmT\nE9f2AZ5kel528ts4MqcKi2LuY4VCQEUbea5JVUISfLdDiLm1W1kpx0y8FGsZ\nSD0j13+vX27VTCIHCgbMUOe1GZEDVA++Hb9F37OUet7nLNRmetOzSsjKPSjz\nSWvNu1Vs+1lZJ6eSRyBVSUdftjJPsKVqY8vB+LkoM3D9H4BAkh/BuDICpiy3\nWU8ywtR0l1IiDygcGyIl+MhrG8xqyF8nQKbSbeLW5367WEKoX+CMB8cdQuuF\njVeN\r\n=kGq8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"05dd265c139c96ecaacbac16c7128e4a851b00f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.bd8d1aafa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.bd8d1aafa.0_1592493343767_0.09983965733176858","host":"s3://npm-registry-packages"}},"7.0.0-canary.1321eb968.0":{"name":"@material/auto-init","version":"7.0.0-canary.1321eb968.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.1321eb968.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6780b31bda8dd4b53a2894a5585e1b9f7a4093be","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.1321eb968.0.tgz","fileCount":14,"integrity":"sha512-0uWQh/tdzV+fFWducj8lrq8uKajl/iiFC+PoW6MJ63eNGISt2w1SoR9iEPyfPVTEbM8rn1XgIquANpSCSTUzlA==","signatures":[{"sig":"MEQCIG6t2eEvtcb7BIqQHrxXIIFNXublNzql+MAHdclBXP9CAiA1w2GAEDBRiK3f7jqk2WaYESjwHpFrHskc8KRbR9e1qg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7RAOCRA9TVsSAnZWagAAaQoQAKJHmzjQMmjMA3CO1MKy\nIB7b1DIwNCPPDg538QM9qaZy3HjrBtZq5eLgOSiCjydfAQIkT5l4XgguIYcg\nS8ALDzAmFwexb1NvVGNqRjfKujW1/AX2Kk9hmngp8lWUBf/maxYnkOMtfymb\nDY5bcAuI2NacnGwGTahaBM4mI/46XiCuzj+JMTzTWwkua2FcDjWjZcgmf1yS\nWsdmkduZEEpaGQV1ve/vyrWdS/r8coFtfYJZXoK10qz7O7cBKBRonHj4odMt\nhrYx0XzaBYHXzfHF/sr3qXRp08tMOsYsNV/lcqekHWanP8tZ/R9gspmdwLv3\nrUT7k/53SYAY+6gz2XwpU7dU5SgmrXq8aVcNv4KkwjGEoNHuhXxQXVDKEVcF\nuUaHjqNSN3qUpbKPRnBZvn0h+wHZ0VzXLup0p//y+cRqCEBeQtjnYpZ9aeGN\n8wCaiGyzE5M/3ttXxtzC/xAXWNwdW6BvUiaLZleZjO6PlSMWQs0DL1DJHoxL\nGvuk2+sUeSVq0yegY6BRNZoAOvtykNz1xQLZkL/p5v4VHG3Vmkew+KpMh5HA\nLducaUEm99vUDTv/0J18DKVAvz666IcgJNwMMY5KZtH4L6ifWDy/KjQRte9H\ncWhaBDnJHDBDJ297MiGpqvTQpc2QAZdQ5a9OUf5EkVhUlcMsF1SgtxHcQy2t\n9ll3\r\n=cQKF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"41c074a3370c2ff9b4dd6af27f2403d15cbf2832","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.1321eb968.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.1321eb968.0_1592594446358_0.4713423879541534","host":"s3://npm-registry-packages"}},"7.0.0-canary.db5cc0382.0":{"name":"@material/auto-init","version":"7.0.0-canary.db5cc0382.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.db5cc0382.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bda3e9040b0c35a25c234066bfa66674a4aaac0b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.db5cc0382.0.tgz","fileCount":14,"integrity":"sha512-rXIWxNndWjzl/NOR/p2YYJOX+oaJY7A7XSZmni1WoDEXy6f2w4tCem1lq2gR8JtUJ3wFsPRILSq0UPTyddqlmg==","signatures":[{"sig":"MEQCIAY4Prd8PhlTMMWz4PaR37xSPDmU8eZFfT9LgrxBK0g+AiBPix8w3buzntSX8uC+9cB4GYgasghmL8OKFj122EeJag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7RGOCRA9TVsSAnZWagAA2fMP/1bQPpqhGA6TLmAnNrIC\nVISDj/JPfUm4/QCea1+Kuxx50vUdFvXbOZPGorE+UMlPRJ/lwqImAlFregLQ\nAHqJDnVz6OX4rIYQPZXCMLOsdnokW/QcVMRhE/4r7rbW18yZCmIDgT6YKrdg\nYKwidT8Aje0EXrM77d6k2dCwGChu3lOQbwt0hYju4S6Xv3hMLqrw4aGLjwcM\neIJAhcM9NWe6CaUhnpsYHVTUQo9DhDE+8oRxDdTLgAHkoDr0be33564BIC9h\neecx6GlsF0oAY/227sPlUYB7efkBc41nYn5f4ahJPDceszy3DZcVj4JQEEa4\nG2jJg3RJ+Ysyn4zzUH9569ni1CUu0JxM7iQY84KLTIWKpD1xdz+z+9rVo+9G\nvRDNLBzNgKWmkKudW4/5iAJuz6uvwBHTHkqsb4wSoN53cStX2N86uJCS/KAq\nfGoMBAMZHVoZEW4M+AjPk8M3bG89j5fyCrjmFhbdc3eAx0e1OMKzaS7FQx2d\n8edSx3CFr9z4i4Aq/lb+CTcyEG4y20kV/BvsR582edbKVt6+9vqpPBwN7kZF\nz7bil3ifovzhyeeliEnhrOELiFoO4hhetryniJx1PKLhyVeZRX3juVYiZzwY\nn5hv99QeG1hNmQ6KKH/uezTpziWXtIlNNZHzCV6TTr6ocTqb8kcXdex7FnYM\nCrlX\r\n=8OR8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"698cb6184d0d6e6823147f7d050c39efe9b8e3b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.db5cc0382.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.db5cc0382.0_1592594829001_0.07121921268522624","host":"s3://npm-registry-packages"}},"7.0.0-canary.6ac9bf031.0":{"name":"@material/auto-init","version":"7.0.0-canary.6ac9bf031.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.6ac9bf031.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"79045d0b17351ae9d5035531a29ae18e673ac144","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.6ac9bf031.0.tgz","fileCount":14,"integrity":"sha512-0rApuNMtqcvT1lt8J9/NHKIgRxBMhnKUonKqEZxW2Cc2NUT7oLmHAni/rNY5ixtjjzKn9/8YFJJPkRaGABXvvQ==","signatures":[{"sig":"MEUCIQDBXPGzfOjYjeZjn2/vEPYUyz6QuKXjjXt1/7Oy2G+g8wIgNw2Q573ijnH6hIZvJOruVQHanXnjAAxvKnPM4y5JGQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7RZWCRA9TVsSAnZWagAAYOYP/1xSEpJ4ttSkszDp9QxU\nIAtKAQdsWFxU/Y1XrKBX5Sx6bpgUzlEvvS5PEdq1Or7ebP7A08LjNDbym+5q\nOHMqV7ZTvDg7yuiOxwuTFVQJBZQyg6L9hFYwYqALro0tinVoh2z49SCn4kTk\nuxPJ7d8PsGMlZ4TVccfLbkdeJ2RzZ1vg100V/QSS6TghMszmYGggEFht03Rv\nGjB4kywvQHXpihkGG5+NT33f4bwWniAt5OP7i0/JLJ2XQ6zAfefsPxEzZnHW\nECItZJk7LP+zQjpt1g+TxLtm3jF/LbzwLv3lZuDjg7Ngbu+XFTNu8R2WE470\nrI470x1Nm+9J5Mlji+s+VLEcANwSxvUUh46xwEsisJ3XoPmY8JiBdjkd5GJE\nrsZK+6ZzRLwKy91NpEHZlUP2zf44dLMX6NMAtAmsoIGOmDqAekKOHzYPdnVD\n0uZOhj8Efb4u0TY8CMSGLgHEGow+cKKLSUyMKYzT98r+hPmHCenO3efecbaC\nn0WsE0coDpTNz1ajXB+c0ZDN466tp12jrleqno83AenAsSbyMbi+moWWQF9s\n9mu+x8XUdCy5Gpnc1GQdxQeCrUQVyvUXszorMQPb1EKMqxcJPr/p0Z3SBx39\nzjmg+ppeV5vD4SKAXRdKyd+M9LNaRcP76D2JhUoN4IkJQP6sMYCZbor0anvS\ncy7S\r\n=azv/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e80b52100d3a9ae7653579d78250cf18752ea92f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.6ac9bf031.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.6ac9bf031.0_1592596053454_0.255364789715256","host":"s3://npm-registry-packages"}},"7.0.0-canary.c21b5c367.0":{"name":"@material/auto-init","version":"7.0.0-canary.c21b5c367.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.c21b5c367.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f861ad8f3c33f15e2988fdd4eb33c72ea1cfe483","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.c21b5c367.0.tgz","fileCount":14,"integrity":"sha512-QwnfwxdXTywM55fk2CqmiKpPK4qtRJFRzC52UY1dHb0ffV4E4ophyC1zloExY1r7KUqbjumH5RrKFFpfhPuD8w==","signatures":[{"sig":"MEUCIQDQxf7SiphC5vgNIPQrtMtRdBrnZtM/mLeHOfnYwhzTDwIgTP+9xe7phdSPdtGsnhYibADkN1/HMqmCJsXBjSjAnws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7RuOCRA9TVsSAnZWagAAXKEQAI1X/FeP86tcc2W/QpCF\nNI8SdQYm2tYza48LfcRmKxjrk6O228P96WjIZ3MxXQYGuA1FnhWXFORlYZp6\nkuq6Md32p1Jzuug2F5g+eo+fohnUHlE/n7A7Kr0cyU7mrlD3NCNwWznuNIz8\n8JM/0OMT4ZOkUjT1RQ8xqHWu4sGTBOxqmDWsf0jfFSOtZDxVTiLIAF60unA9\nxOL3myt9wIFA5jkGDzVtUH4WSu8416EBkp1/huCj6VUY44M+JMA4t4A0bb04\n8/93MIt/FqdebopvEoso42zjQKnbcPsFV3uw556yuZLvsRpEd8g+jzMIOEwk\nIQjg6YwSm5uocxs1pxr7AJETEp6fIwarnbLs6kgzqEybfbLDov+l/o5yK41O\nZ5TSRwPHrFMTnNyudQ7Yv6WRiT6KdJGxEoLXna1HAFXbYJWsGRcRHcWGhjO8\nSARcikaScv5t1Twe3y5Oi8A/rK+OpXCvzq1stp2knPPZxokQotqUwDM8/tEt\ngzosxLpxZnSpG4MdD5+TvLig3HBb5hW4ws6UrI6BXx0QjCV+bPlEOGzhZ1HK\ntCPFRS0ujUjbnmrWwS/OexWvu7Qnfc/rHDIojifoTjC2WBXtDKjcyGny07HT\nZRCGijkUOTsUjosWOloSOuON2nDGtMSfORxZPjFnhTqgDy+dJcm7TCRGwklE\nLr7K\r\n=1QVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"08c734c10ebecdcec22cb27e38dd9d3941fbe847","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.c21b5c367.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.c21b5c367.0_1592597389350_0.9732869503312989","host":"s3://npm-registry-packages"}},"7.0.0-canary.bfdd7fd39.0":{"name":"@material/auto-init","version":"7.0.0-canary.bfdd7fd39.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.bfdd7fd39.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7bc99d8013e3e56d34a2828ce2aba05d6889f38c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.bfdd7fd39.0.tgz","fileCount":14,"integrity":"sha512-K0dQ+AziIa4V1QfbbibhxrDSA9a4+xmXGRWifF/apnat9ZLOdffkZfUUr6jRw2uaaTCte4stXkBKw9hE4MMkJQ==","signatures":[{"sig":"MEUCIQC1tMWe4BkeDQEw1RgDNzl+BF8lNPtN5JQG9yryUQ2eDQIgQWUVUzbF6hCD+M9rETXfN522iv/LhglDvhGHwXCzvZw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7R3JCRA9TVsSAnZWagAArzoP/2plBRpopc7ovjJD9eIX\n0QFQgM87CvSSiRBnpcfsqTXu/Drdony0gWSa8M7SkD5VOZ7qcM4JtI372ovW\nJy9ouNv+5IditRXRW2iIt9XFtAWW1G72wEiu2yV8RXcmqNVY2Ob3n3yDV7sG\nljpfW17rbZGNdH5siJRANF3gn2ugZiExrlgh+LbUWaD2X58pxjmCTs1QyTQy\nZ2q+ity7wotsAm1R280pswltfyB+sSugSB27tOEn+GdcQW39LA34aDcV6Ps/\ntA/0UUkBeTuG1AVhKoYPJXVXTj3DZAtvJse/UwCrrDAUsMgpQ8IRsSoPUrQn\ndxz1Aek8ODGa+nyo7ZgGktjXL9B0dlFSD6ATpORyVk0BgzLFEaZ3DBHHhDlA\ngZ66g3SVKo2sMIVkhbDGNdwq8P/wbWYKEjEmWhtnsKQC5ZZyc/scxSLiZGhu\nCh3hlhsfqR1B1cihekrn/vnSlJof173ohUP9YKI4BT1xiSWxRGeKwkWFMoPn\nrhE6zc7ieDEhPKCUuNCiS+Se3k5KPnIj1tR03u42BgkbwCah3N18Vo+QykYO\nb2jP0bVNhr2GEL2/Lc36fvjv8wKyYZDxJAkzUpLLetguzP8zoDkIYXzlO3pH\nboPuHdjYKuhMAgxNPv6aC5+qIjn+Wv+nIxCVq8RglgynqMP29Pc44+ucsa4k\nenNO\r\n=4Xir\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9b865bcb7a8ad91c21f4b1cc433f6a49dc627a2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.bfdd7fd39.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.bfdd7fd39.0_1592597961177_0.917664985950404","host":"s3://npm-registry-packages"}},"7.0.0-canary.10b505785.0":{"name":"@material/auto-init","version":"7.0.0-canary.10b505785.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.10b505785.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"137d5be0ce656c30c00bdaeb9aff575b3ed13880","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.10b505785.0.tgz","fileCount":14,"integrity":"sha512-bvkzj0oZj2Lwu7+RP6ZaZiro3ndUUfubXqe7i/c0jp5mQYlbiVsJe48wgtu8sIVNXqDlmXG5RBpsn2rhcgIHBA==","signatures":[{"sig":"MEQCIB3IXFe+JB6n3ohWMprvAzVVONGSE9PMlbJHeRpCeRctAiBrCMEVEtVTd+P8dNvWq8wGAT2YHQgxupa8IU5fkbvPRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7R4fCRA9TVsSAnZWagAACuEQAI0LNEW7cDgU4vMHp0Uj\nOUi5Ddto1zY7cJBLRrCJ5RE0pPiBTlgf3ePBGNYv12FKckKAERixdntd+X+1\nOB0cpvEQf/v5J6CR+8o69E/7FNbte+NhJJS9kOAabboLgvnghYEgdG3SIeZ/\nqYj9lIPo+179BBeCW8rsABlr8vqnECEo4lTYCt3BEYHrKyD/7cpv4+K8/QHv\n1W2MquZs2FRZOY8BZ9piaDNkwExC77JpP8cl+ANyPDAsVxrvH+XpDU/MrNpS\nVpZf+P222a5lMryuMI6D1aCglcoBoUAHkbFM2yk9OEfcKlcc8/E1CZWxAC9g\nAvcd7brXy08/zT9kGvgYbuXLfHXtUZstaLbBBKJqgNHd34znopxFmpiODSwC\nJuUkVBvmo/WxlEmiAc+6zEtECw9rcLONz/TFq/EUltOJTb8bFnsThIb5IZYJ\nulbGwBukyuV5trdJfnCgmYj/OKn9S5xoqmsGkmUCVHim4gyWAZY475OFks/s\n6wGcsXuVfEbU7Wx3+6m/oeEsFUzyDMEZcfG2k4q8ep+3qSAV6BxX/Atjf8Re\nkkP0j+iFcmgNiEjZDV3eCmWERdZBF32fgGx5XZ14pfV0Jf/7RZKkVQokbp2K\n3w+0Maho0t4aemXW5WBb/18+rUxLVDXBHh2FUFKjVmE546S7Ie69mRiQ2zwc\nivOA\r\n=BX0M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed5923edcb43bfccd9d40cf56cd605eeaab00d1c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.10b505785.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.10b505785.0_1592598046648_0.6685486123496895","host":"s3://npm-registry-packages"}},"7.0.0-canary.6483d3f44.0":{"name":"@material/auto-init","version":"7.0.0-canary.6483d3f44.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.6483d3f44.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4653cf38084556a22c4840ecf99b5dd808d18cba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.6483d3f44.0.tgz","fileCount":14,"integrity":"sha512-6oYfKzjFBMJnJz5+fkipka1qZi8jsIR3sVEzuoAAVygHPPPmVKL7CFdXvlS3GnwTCNoJ2kbPHZaK2VnyWgTiUA==","signatures":[{"sig":"MEYCIQCRJ/ll+22Rf+Z7r8DwFhAHlf8zCQoZaVKTMmpE8sHA3wIhAPMod648E1MOIvA26ED+QvL5+cv7B0L+0X8YZf5LVQSG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SHqCRA9TVsSAnZWagAAYBwP/0oMBUANxgNiu0h2hZm6\nue4iEDh/1GJcm8suAUN9eTep7jjN9jUKrVqjwAI4hqnQrpqnPHbRmELJ/2AO\nVdUB8ne/SjMI8+DKAj+fSk9J3OzNR/V+zFC+GOMvdufvZgFIhRSAUVaOud9G\nlx+hph1/shqluEu0Mg0Qdoz64rMxXM+A0EXfaR8zZVrUuJ4Kcck4qlbfLkWn\nGcisaMVkp+9RJuFEu60SQLY9+WdMUZiSufvWVrLhv0CGcK4Ve6uC93cPIx3v\nABPyzQUquGpbmA8Tkray9V3j34El1YySggtP/L/Hngs8fXyUKOCQBV7KgIod\nYbqcUJhu5CJgUEBQZcY6H5TOVVR5gCRmpi8DDto9AgMGK+/GpObpM0GDi0al\nOgBhcVJXV3ILS3OezbwjVfryCxz95QURE8VrLXMF8k//EmU5Xx65lF1bRfFh\nwtk5j5rzz2WlBPdOnEDzvkPPTS/zwX5PTuH8S3D0zDyMkIWPxZJ9uFFCPf2q\nv1R08A5elWCDOdkP90R3V5plnen8q31Bt3ilTEAYCG6y0P+pEF6A39vH1QOv\ngK7yNKoUo3r3xsYjv9PSAs5trczlblcHdJuE7R/NnLV80aGdwVCz/H9M6PtT\nJgCA/yzii/tKNRk/z2UNR3F4GOa+MHojO9vQ3T0lWGLwCYrNVxU6PRv2jdux\nc734\r\n=qNRZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5c831da018408423d31c9c4813c507ca591a010f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.6483d3f44.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.6483d3f44.0_1592599017683_0.3730358406479626","host":"s3://npm-registry-packages"}},"7.0.0-canary.30a74e921.0":{"name":"@material/auto-init","version":"7.0.0-canary.30a74e921.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.30a74e921.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"def3a4fb10f2b37646351c1c3cc2d5ffbbe8405d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.30a74e921.0.tgz","fileCount":14,"integrity":"sha512-YWnrpIbA3e4bAockp4849oMeYgbYT9o92bepLSKAxZ4RU3PrHj0YNP4ZT5MK9QfxtNDpD3TN7LzPPwAJw3lJJw==","signatures":[{"sig":"MEQCIC11jkc4lKoBkR2Xc/R1Mc70ZIP858JCxN8wx927lPFRAiBrkShH6TlHmm3/KXCMgEcpWajv1Hpw7orQ8fHeKShdhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SJzCRA9TVsSAnZWagAAfZkP/0tUylQSGlQJ7X+NEA1v\n+DRsRXF4UxBaK0scqDMSrV/h0tc+CUQCmb5xNA4AoPO+ZKHHOyzQbtFtLR3d\nqBu2MGGA8W0IiTkerma//Pgcnzzi2zGmX+Km75NgWgLIfPNiewh07xGz9RXB\nGlrIOVFQoX3wEE9k0rksPlVZb2rkf3F5Lz0aU+nRsyYgrbFx9mbk9NncU8P4\n+D13OoMDcmBeKKy3BHAM7dHG5QLhbhvx957khFr+0DI8duwsXsoUBPJOOvEb\nkFVV+LNGVoaJvkv4UjJs5cmvZzWaCM8AIiUtqL4aThiqvVnXNDMksuB5V4BU\n6ca4jZMMiDniCRyToaGkYqfqG430JakHA39f/l9T4trZeZIfHr1ekmUhOSrA\nGfOmV3ah4F33/dhWxvwrzy5LsmGaHDfWEJj3pMeQ4iFlBNppbiLrSep8ng8o\ntGEr+cNUuTX/FlrX/YAejrVamFkZYLXI9yvgK/LhlhFy5Ds6na8bUjO6GJXk\ni2V+bW5cvOt7BLj1D566f29g/457OWKmrh3nd+xDaLx8GOppysGLHlsJoy+U\nNJ6oseqJDFH+qJXphaAAVeyZLn14D8Z7Vonxc0Q4v7p7Mx8k+g7b98XeMVgD\n/5oB7Q87k0GnHDvy4LmBdQkpe6QqO6ZiI36apCmYC+jz3hlviN0WDk53gm0D\nRUp8\r\n=eNad\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5f983e004147b05efcae5aac51dc16aea4a18a8b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.30a74e921.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.30a74e921.0_1592599155122_0.5076835130546102","host":"s3://npm-registry-packages"}},"7.0.0-canary.c20727498.0":{"name":"@material/auto-init","version":"7.0.0-canary.c20727498.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.c20727498.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0cb5f46d75316e031501b3918c613c06d17584b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.c20727498.0.tgz","fileCount":14,"integrity":"sha512-wzOgfDT4Cyr7FErPU9ZdOoceBM4Otpi4+pMOJ70my7cTKkCSfzpNNwGaZn8c1uaOFKZqBLc/NyTnIeBwO+SnjA==","signatures":[{"sig":"MEYCIQCXurqEGvb8fgK+AOLC4UR4DMWmiS/0oy3Z2UashxwsqwIhAIu9nE592PK9RrYd9KsoHByvJO2LtAYJBWXOROLDUTQ/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SMgCRA9TVsSAnZWagAAkUAP/0621tW72QhABU4MuM/K\nDaBspoDBNn47Mj8cKLN2ueANPRSB2Z1SbK73yM0uWBhi69n/EsNORjnHnEkr\njsjpYqmV3hZ6GXV3BO/cg/P2p3Thqbov6ZF9CMYJPRQjZY/lW/8UgcD03ZE0\nvxjdx36h4B5BLFr3lIClMsnuwsXU7j60V+LHJ/F4B0mZpYcPQfPOPv1/vWXu\nKUP66QHTPUfcvJSmGE9QVl/zEYhOlwSLQ+1oQOZ5bWnSfMjjMz1GbfewjZbN\nSIyH29RBhBXclr33KIZrqPtBrkVmt45nc5iBKzcvmDBxTSJkHdjvQCkypdwQ\naAVKOxiCqmygqKM1yHIu7+AfhcKdQPw7oiC8B5PTI5tJIwzRntD0kfA/GDE8\nJENoJygTZMjDoLUlxNpCpb0ZUfvFP2vaJeJKqBkEMlPGmkvTi2tpE55uGidi\nUysqUIMdQKgBhDPIThs9JnXV+/I5CmTbDulKu0htJiOftotb23BxFynxvt5W\nzQ8B21Y/KxPE4v60f2lJDq4tm85HqTWqcYKo4VpzmS0G0i7fbDYW+prOLoX8\nX3QrDUW+6Bf9IMiMfSiRFrbN9gsRJl5rf4YA8PWuMN1id+Jao858wt8RP7aU\nIg2Pbte4ZoG2bqXPj5mYnIsy7fed71Xi92Ljey8ceVKssxTg49MBCAVilKG7\naCsD\r\n=ZAM6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9ac75746f7899d34903c19ff758bcadb9ce2d30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.c20727498.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.c20727498.0_1592599328136_0.9100718749818313","host":"s3://npm-registry-packages"}},"7.0.0-canary.4e360ae94.0":{"name":"@material/auto-init","version":"7.0.0-canary.4e360ae94.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4e360ae94.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"abaa0b3e1793a7fccc410ffdefb6bdd5e6af5981","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4e360ae94.0.tgz","fileCount":14,"integrity":"sha512-gnN46xOFpxh+/pclDGdwfLbzJOmhCWMEhZ+KfLK9YI9Pbdf1IRKvPk3Qp2+tadzT5xxEJzHwwWJ1LtXIOaxGuA==","signatures":[{"sig":"MEUCIQDsV2g5J1NjsOmLxoG/MyUSIldDdqeJroJZJf0jb7EvGwIgd66n0RF4fPQ7I7s72IZHoQWbJEHdWlS5FfYtmqx0C3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7ScOCRA9TVsSAnZWagAA2KkQAIJZKRZ1CSo6nNzenZe9\nUbinRZklITnbdZy3Gs26XAiko1L+4+X3/PICF9hpmkxXwiDIEwtBv+hmROMt\no+4sBaiDsK+9M5CcF7fJbjS8iLDDhLnKZItzEsDK9iyYJqdvz3l9fke/EJE9\ngA/8q36UCs4PX9kJQum+JGXwKAvzS3vxBweKYFmT4OnvWnyoBSG5V+AavSyS\nk4WS6H9GOlyiWhhILrPXhV+zhguBW2Osy/g/QQy2/o8hnmVUed2mLY3GcH8y\nF6ddnX47W4sIt+0J07bLfTAoiH4C+g6XFU7+YdBdM8MU5+AVVQhWjBpdZP8A\nQOabqCh4x55vFsNofMNqxDFfSc6iLsQgbA5HY/LyZwLamInMPZurwh+PHrfs\nRnAP7f1zqkphkCbfiuekvslvdlxiz3CoF/f6x+j7qARn9mN4pjaeH+/DJaX5\nQV9OYyEAzQqA785JPrAGqCZKSAN8dJxDIytXpulYHM91uAhbcfixLaohybmn\npPscxg7lOKCm2PBYs4JFnryN7k0aCYjyldJBdQKjI5RTfwihxZpNgTg3g/lk\nyvtZa1w4sH7QhSR29uL/6kIyB0dzRCLT/w/wgW4MqkWjrcnKZ7UfnJhVULr/\ncOASndJ38VFVxKbhCnq7OZASyh7ALEM7Vo4j5AJACxN8HL0wAm+Lrh5oLrZB\n/P//\r\n=59O8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7bbb3adc3aa84c4095304613145fa53862e147a7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4e360ae94.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4e360ae94.0_1592600333574_0.6296522235017716","host":"s3://npm-registry-packages"}},"7.0.0-canary.8550fa53b.0":{"name":"@material/auto-init","version":"7.0.0-canary.8550fa53b.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8550fa53b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b71e6ac626879dfc162262ca4aa35e4cb2441df","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8550fa53b.0.tgz","fileCount":14,"integrity":"sha512-2Ua5+8R8m6TIj8K19JzzlrbLdPBcXwyAOVbD5US2+JQKDyd1coGPDdS4Uiww+YBS4q0Sn0AGvAye1lvtG/GMaA==","signatures":[{"sig":"MEUCIATonMIvDaZcbFrJ+317oE/EF++pCMoNug7z/CFq3x0VAiEAjzGRImP6nODqLHC9rmAv4ZDH531H42BZV1JlYA7u7v4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SeTCRA9TVsSAnZWagAAzxAQAIXJmnaY4CsIm1M3ljFQ\nbnuLXI6Lqc6rn7fExpsQQ1bF07sRAM1OMhebQlKlT5SQalGYnS17sSdGOixK\nJWeQauX+Au0OrekV1xsMNf16sqwwGFk6vnZnONxmPh7SGIqCHcqdD7JG5LsU\nQUyJniqJUkq/IYxH61DHst/QYb5hBu6WAml1VqauhF932yTJ0rfAA1iTn4qT\njo+YX5yOvKyGRp6qhLVCc+6/iM0/J1ZcuQcIx8XEQkpjHMItrfGsjwGz7kKd\nFiGgGBhof6ZJr3yjqdHalnHngwZEZSGeLPUTt8cIcEYk8QwSCRDlwyX1l7W8\nsCfUQ3+SUALO/c/9WRqxItSIrSpuffdrtD/hxB59p1cUEvSJBcUadjq+W2S7\nEiNr/RRlNvk8gUL55ZC7sQTF7wMXedoT0LRxpPqQnJX8kLS4UveKojw4hBkm\nHefHssCDqwwV801xYIS+FroT79e/yXARpAb6B0GzDQf+ioEElI07HpgRS7Jr\nHieE9y3MnMx0vD37oyK/PUJgxErAGMy2KuvrS29iIbpEMkYQSNhagsC9nvp4\n2tMJn542gz5FjKGfLIKaVsHfLaacfgRMB33DepKAU0+du5izxPMNOWxLC/MC\nVh6y30o0NqwwJhe6m63L15NumupErO0iNnB+tpnDwKmLRPvZxs5OsCewsfrG\nKEbF\r\n=6LKz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9d8529cbd579dccb2470a1f19fac57883cb2a5ef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8550fa53b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8550fa53b.0_1592600466427_0.44086433217022547","host":"s3://npm-registry-packages"}},"7.0.0-canary.93ade142e.0":{"name":"@material/auto-init","version":"7.0.0-canary.93ade142e.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.93ade142e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d29cbcd6da427989c4971dee2d4a957982a2814b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.93ade142e.0.tgz","fileCount":14,"integrity":"sha512-a50KKR/02AHbJsmK7IGYD6+3uvlCekN06kvbU1p4t1by6yYOJ4WEm/mnn0sAo9PdnjQ8N4FZPQXxeNstOdHtGA==","signatures":[{"sig":"MEQCIFt3oF9pT+RWMm6SQnXcCy+v7YppW09NstckgkEyT+pxAiBLBz5NzyW5Y1UNsnO1jFQDOg65kL0Ody4qW3beo+xAaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SfYCRA9TVsSAnZWagAAyfsP/RmfSXsyzA843v2KEg2p\nMLGJfFF4w+Ep5q3+vbwzT+UjDNZLVhfOLZsrW8X6VxBpr+Oy+xVsA7tPQ4iH\nViz+JIRrms6UGv9WuaFZP8MuyFRiyDlr0gwloZ9BUPkkVryKleWCJNrgNhNP\nirtAC6XbgyR59pMZ7bVyqH67DkPgtBlSLCuoP/CtHVXFQKJIVWCkwH62lq56\ntI6+jUHT9qD8eyoNfff78+uvrhWWfb77lnGjn9eZOP0F6FhXQ9gDVwmWO6R3\ngl4XIMMBoCj53EaXnW1xaN9Gmp8lJQ4NfpawltAo5Wk/ZKCFaD4qt79vOUsI\nWSFY9sMzx1Mh780IswaXixYGP5POgmpr8oQ2CavQaTuQXPrztfu0JJt5NudJ\nFPnVdujNKHVJEnR3QiyKEWvdjtHhI4+uHrXkKlUp2V4CIaaN62GydcHeQ9h/\nagetdh7RtVsJgiorQ3KM8aVct+ORFofY2qHLfSWVonowHyd1VdsitA2T3zrY\nRcVKYKdIkoC9fQai6rY3VtrPniO3zzf7lIRUSZcQJX1yJd/xFDNjGUve7f51\nR5UfAkYZc7Pe5fG7lzobWTH7BzUyth+GQs20fUus947qBUNcd10gU6v3jZUq\n+HVBWEi6ojMjZ5PPDSUjnN6TcXqKzQuZ/VJ9Cb5GXiq5YmVvX2NF+uhbr6q0\ns8Iv\r\n=SJQQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fe392b7ba8c7033e5614eb91a20bdf2e6d7d7936","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.93ade142e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.93ade142e.0_1592600536476_0.5019657596685545","host":"s3://npm-registry-packages"}},"7.0.0-canary.a0032f5bb.0":{"name":"@material/auto-init","version":"7.0.0-canary.a0032f5bb.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a0032f5bb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3e915d2f9e7e82e926b79ba51d6768c0586c1453","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a0032f5bb.0.tgz","fileCount":14,"integrity":"sha512-sMKxTgj9kxyIfKFjq1iIZSV6KXmx8iaL4uP/ZgJnVgivG5wriUHqiwtlWmtvO3d0+EDUlVI8YevKTTYIweO3Ig==","signatures":[{"sig":"MEUCIQDq+tT0m6IS0IZWV7nSaBj3YOrWUI+YmoT5pC6oK3FZfQIgF2ESUBYKpNVE10k2jrn5Pg5a7jchJBWw1Ii9jNBhE/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7S20CRA9TVsSAnZWagAAADgP/3Al1LoxKTHkcsNZJJBL\ns2gRJZIkwdW9deJq2Pl/mhWyB0XciY8H8acTduxUb3TD1XMSh+H2bfOm5IL0\n4lyOoibojLCg5c7AsmjerQHN+dXiuezE9ebS9nGl9+lOI185PtmV2wtcCY+M\nvj2pEyuhnc/mlC1XOdg57QZLemPTJcs+/nklUuqKIeLNrIHxit1Q46UflQ/P\nS9tiMu+7/soMgRfBd4oOXI/iox3bS1b5JGmWrO+rp8Fh743n9JBfol2f63MV\n5XXAYchlLxi8eKjXRRDna2GWyGv2iiEGdHO2tZy3MDxHSfp0fTacMA08/1l4\nKCfBlRbPnXPqqcaZnKiifx6dezVDIaHIAcrHKf2D+e7IW8VwiGCYTTCecJSZ\noWG4eU77kc4mOfxQ02n0WbYfxXIdV00b6zPhZIeVJi89ztfYVHRsv4sgKVen\nPZ0vdI8S1JoRIULq29LkezcA5LzRCyMLbk8sYqwNUHmwRhwLuPCJiAqIaXOW\n0s5ymY2qrdnf4Z7MY7gXoQY7v6c/E36jeuMUlHiJZjzIF/WZLLTTaZo7dvPx\nQDE3DfNUzLry5+PGgdrIQi2Y1rSBaH+LiLTCIfXx+8EHu+2Vru+yPiIa4Ttv\nIz6lyCjes6SLbVWSBtppA3ZKH9ZXRFw4L0UYMH8EeM2ceolyilFx6lgPenH7\nolkQ\r\n=Xb/P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8c0789d8c409d91f7f4e13675ac80e0f355bac02","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a0032f5bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a0032f5bb.0_1592602035611_0.3372897320337822","host":"s3://npm-registry-packages"}},"7.0.0-canary.3f342e721.0":{"name":"@material/auto-init","version":"7.0.0-canary.3f342e721.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.3f342e721.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f513e92c2b7d40a0ad1b1c4bc622dd0854f9607b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.3f342e721.0.tgz","fileCount":14,"integrity":"sha512-kuqg6CykkQ3gXUviXhd9w0UfLowBYQiHecJHy9ozRBkNr1Hwx5kte0p55xlzHAnZc5dtMbnOaDssZDlDi59RVQ==","signatures":[{"sig":"MEYCIQDBseC8j4jDp4JaSkz96673DCJfXoqW3AOeMjkP64MN0AIhAPuORRRMPZGmBIjB06vzajzsZtzw7c2Y/VujN8RABshj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7S4uCRA9TVsSAnZWagAAGJ0QAIxLtag3HN4BTJghejJ9\naVW937KhU5Gc8SU42AEEojDd3Hz2cT9kFzeKtgn7Ruu8UTeos8WvENYodf0E\nFB7TPBaSMTqDXRIqtiT+BgS318F7nhCJa8mRs1vmRfHBSHV1jien2/fPcgHA\ntFceTECPh/TmZ6xTd63HwGyvAr7VdUgK5VQCdv1mXFkKO79R0UKXpdNvRama\nk9U5mPFzCXV/lwoWWqSwNeCjtT/Q1uujNpf3Ba04oWfTQ4yXmOxHykr99M4I\n2eAi9oJUuoqQK55Ms4E0DhK+DnT2QsdPfwDD8xhTFZh5BBhUh3MFY3jPAtWZ\nb7CwrCzuyLrxXrHC8DQrpu0I/Ei8i0bZPq7tKhJongpAhnZcUQwrOubNp+jw\nKOPI1J9mwJYAJjTYkRDPAutcuqRuxVouqv6zhLTq0k7qXk2KOwXvGsvdPb7R\nykVbKyjggRrcWFn7DZxMXrunxyI4SQNSu/H256K/aOtIC9jCfHIxqtuwX+j8\nqov2mYc0BjslKq6mBVkqHgYIH4NLs3LA0GgTZRvh0AvGIB0UKAHozovutQ7T\n8/5u2yLpSqE+zoqAabu1Rku3JqgQnX8nLC0mLbq3ADkLTQrfllF87VOOQ5O3\nWhzpAuJQw1GUGy2aVPzhfwZ7p1xCkeTvO/UaI/634803BrNqOm03q1CFwaLL\nzYde\r\n=YXsO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e972042c8ae08ecc8469492707d55d647e3495e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.3f342e721.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.3f342e721.0_1592602158044_0.47078895054007686","host":"s3://npm-registry-packages"}},"7.0.0-canary.ff89457cc.0":{"name":"@material/auto-init","version":"7.0.0-canary.ff89457cc.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ff89457cc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"214c520ea092e4a23209686655095a5dc27df6ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ff89457cc.0.tgz","fileCount":14,"integrity":"sha512-Qnggto7DbejW3t5OQOO9Axo7WB88bU6TJ7gV3wT+Coagk7VE7huy2HVWeZsAy2ggOHSVa9jamefYafMbf0nM9g==","signatures":[{"sig":"MEYCIQDtaQ9K3Qz2tMM34JHInczgcFzpgoYhu4YbsKNkcHcJ7wIhAK6mBYaZVF5GrffZOiLCGsfnn7R2DIzT1sEZQPIrD1bt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7S6CCRA9TVsSAnZWagAAhOMQAJ2VhG1jkitp7m/LpUiA\n044UsyM5Pdw/+f47yQePMo2ke2LWL7WdhBgQsE/Cw5GL6HRJmFJnczGzIOms\n2VqmF6TEQqgj14UJyNeDg97zH3jz1qv7eAXSB37zSZVOgIekAfSVu+JraW/5\nm/pvPqgR3VEWhWU64IEnmNC7yqN7G3bQb3CVk7ZNPGRDLss13APcMQDWm5un\nlxAyVjWUH3N5QnixkX3ua3Gy6WOkpK+Oqs8F/BNuEx9YcupbzYiesPjxIy9J\nYjT6ylLZRLmws+jXnSBlW0LTJuwlNaSh711ND1cwVHmH/WpK34UB8hUAVcxx\nYH02JD7jqpPm5gIkGS59bTKvN5AxnibthZvUQsnFChW96X3J36mUGlN7956n\nf1Wphq/IIhomPeMyV4x3SqStrtVhUJ+phue9eVohpholWa/10pyws2lGsa1j\nobDdH02ekohm5TGbrpCbGDrGzwWYSF5U9bIqE/ldV34HqV8+qyziohy9yQQg\nt4O+pB5w5C6KDHei7AXDNvZrCjWxpSRJBc51oVlfXHrNnM98byCxxqRvftfI\nb83f5+A4K6pgxdxauRIKR7W24qQa8JY3hKav/JW8Y3mGLSnIjSRqDJTXXn5s\nU8HqV+BLzCyS2xhbVWzEJOZO23TURflTax/Loe4JFBctlzEi5rIYKcoIUHj7\nPsPz\r\n=U4Av\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a3ec64383e8afdd818b5edfb74f32f6acebd044","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ff89457cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ff89457cc.0_1592602241883_0.6824836349268768","host":"s3://npm-registry-packages"}},"7.0.0-canary.4a1855cf8.0":{"name":"@material/auto-init","version":"7.0.0-canary.4a1855cf8.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4a1855cf8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7f8046e9d418551df1017815a57be0ed6f8f7396","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4a1855cf8.0.tgz","fileCount":14,"integrity":"sha512-JRU7ZZubsR9BK/ST+F48eiQR3rP0o6Jg9q/eiVflTRAG8I7/cvzem9TbNm2ejyj5iZK40iY3YiPTzRdpKW8Dsg==","signatures":[{"sig":"MEUCIQDfbBdyY4dgkPDWpJi/HzJGqt+H1ZaGv8MTcFhM5PCchAIgS54jx2oMu44QHlBLZAcFgzn1uUiDmcvlYKN0qrGHYws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7S8lCRA9TVsSAnZWagAA07cP/jTvxGvyr9C8H9D3h//7\no1sigDGlFphMrzlRhKH8Fa8WjYeVyBlMHF7gqGYJjOJwD/WEDu4eaSO/07FP\nCbcLpt3xc61l2F3R6V+xVRlxnp2pSl4UTV8UhDl77OqlYx9sc5q5lyWIvA0p\n4wTKzwxPMwXf7icAO/jZeAjAP+eVzJNLTH+z8UQJhKbN4j/fSgZgSi0BFSho\nniezAgd4rHjRrxALYUdhMAxzrsrjtYvh0ubYwFa8eXnUVb1mBvDLisnw61af\nIXuwGCcv5HYu1HUw6iYd8Nuchh5wnpaWgpG/MqmqWkf7gI/4MAPQOaoAJD1/\n7e+hH1uAPYFjAFxjx6UIvun/R7BUXEpPWCuxpL5EcKZ22e2KxjAvljx5STP2\nhwgoleB7lFUc7GqEBgGJELyoYbFWCKBO7LV0d9tNt15EVVmX6gTEJa4rAazE\nmVHbkhj3409E7nYTWtz+NbDADcFZymHNZ1/3NSgpXVIikHw+9DwaAEOr4aJN\nMtlSnyXO/ASuwmQcwvWz6eJKnj8m78u6eU6CHK4b9pk0aNY+bcsOQeeE0qww\ngcm5DD2Cz09BPHqwEN5EiCuOFXYUQHTttukc+J899nSXs/Lj2TjGyooV+exM\niTa7Y82kFuZSlvpZn2NF7t5XQgZFvlhhWRGyTqc3bu34zKNq0ybUG1psg4xP\n/fu8\r\n=Sl5o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eaeac5e820cdb30fcedba281da8c2c4a846f0e73","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4a1855cf8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4a1855cf8.0_1592602405190_0.41452109083657507","host":"s3://npm-registry-packages"}},"7.0.0-canary.8602f1b4d.0":{"name":"@material/auto-init","version":"7.0.0-canary.8602f1b4d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.8602f1b4d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c5770e838bedc9b51de676523232b23bd0e87a10","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.8602f1b4d.0.tgz","fileCount":14,"integrity":"sha512-dfQ5ngTysaKg0gz9t9RAl4Bp3N4czaSzVu76k+UXuiNIt5q+Vw7RHPIUL6ylhheZscKKTcXpk8MpuEGakUrfsw==","signatures":[{"sig":"MEUCIQDSGL0h6hIpF8XBLfzb9ZuUHG7Weh+fpm1AaaXKe+HfEgIgRcmyqxW+kSJwA+MXtd+KytJmr+aLxeK2YLk6ZJZ1rYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8Oj0CRA9TVsSAnZWagAAEHoP/ileTJWnoacxTyfMdVAf\neLf1Y3zjhYbox1hWO8QJRqKIr/kad3SxNDVzDUvlvNeCILWtxG8NX9ixbaFP\nbXJRxsu1/cX9YefYDF7Gx/RQI0VV/4hLCZUb4aMRPmTYGPZ0llDJgG18pzw1\nwXIM4sBhf/rfxrBaWpqhUndQPmyYpEx7NPPbLVUvo8MaKhw4X4CvCskYhFQ5\nmNn0xQvz2vTN1xoFI6G1u/ZkQV3HrF2+V94wh4hMqiwzKCzsc8BEa/TRWVPJ\ndkhKmvVqxjCO2wwkus/GkjR+DRRxqQyhloRQoA8ijHB7aM0MF9iD7PjYm57x\nWwVLBqeojJNprfQXisNAjrdI9m5MNykYX37L/1yN4ANPMX9yCnZbdrXV7369\nKksndxM0ci5aKIkpIdyn0ldp2hcF/TZ1Ma1GCCsMZzD+3gJm9UvDy97jCcB/\nrodm8tJTwCJs2WSPCV5FjcF+Y/YnkmRtMtOJ/P53kVmG7fxkS1xSFQCHNMwj\nhDamy7QLkUwPNd75IlNreiRqNMv63O1/s80cwgENu1uIfqSlr9koJeFNoFRJ\n5J3zVIE+lCg1Zzva2HQ+4EUMmTi6HHM9i628c5MqGn/EQDKAIZdi4EY083PY\n2jvJD/zLsil51ayb+EqN0oYW6OlEk58BC2zZBbe7b2TK5FMm7kyDYZ7MQGRZ\n4NM/\r\n=bn41\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"07f6372c5a2f6f8add971db62aba74793d912f70","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.8602f1b4d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.8602f1b4d.0_1592846580032_0.38827393230251106","host":"s3://npm-registry-packages"}},"7.0.0-canary.69f9f0982.0":{"name":"@material/auto-init","version":"7.0.0-canary.69f9f0982.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.69f9f0982.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"896c6d53cdebf95d3cbec627398f5b8595fe5c96","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.69f9f0982.0.tgz","fileCount":14,"integrity":"sha512-IjAxMc98k44WtCDGRKVEGkYJZbxPLfMD+zKX0L5fK7QLBEbH8V6JRHAHAx7WsiLx4lGPKoOhDH0H8sc+5Srs9w==","signatures":[{"sig":"MEUCIQCP2NG38pf6wEGho6axpnoYBsvjYmi+EC5Hpf1SNMX47wIgRfQBtnOpmiB77CLXJmf/EEsv2KyPEK8bm+QX9bcT+Nc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8R8LCRA9TVsSAnZWagAAZAoQAJgsjKdblCFBhkOApvQo\n+q3W2DusxsEoP8XFyS8tPWd63+VRlM4MIOIYUWkLcx7cIbvCakqYt57aQznW\nyOhyQ1PbCyUo8nwgqyudcbbT1dVHBNASgBNe4M7L4NYFe5olpWgLMDYkR4Ds\nfePohNuNhimDzKaVcRmCpkD74XzXxH4A0CAzaupWxA8/y4POec9PdT0u391B\n7Ol5t+IALuEbsjRR7AIr69jE+NEwI94ZA0sgpAul14aWvO6zIRtzO1FvVYcA\nCOLN1KS++FFTkIcRxgqqaVdypnorkkbT8eaQHYPwhg25mW09SbrFAEqePLJ+\n+9w5b9+C480AhAII8I7aKF9x93RMuWts56fD9hHiGHH0PQD/SDOAG5JwuL2k\nFl6SFxIjkhtTi62TOIEmhRLwYRtDOs0QmgS27IayvAEr8xh/VkL5S7jY+Q4q\n20Mfo/5j7+1whttiUg7vrjb4SPG39QbUi+8kloGjQuk71m+YsvyTQWbCMpw9\nWkn8g5iaAcjAEoXMv++ocSMfsAguGEoH8nVDGElYSOM19VWc+2vxYQNbanW9\nckvFnOZMQCe2UIDZzuBwnRn9l8XCzcn2N0sU0c00Auaq3btYAb6yxWwal2AZ\nscpPQygyMOS4XKc60kKKvouM/ADI33y5m1by8/fj4cKs7y0BibsVRCFv1ZZ+\nE6t5\r\n=Kp0A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3aa0430a8c5f21a2aa9f3d54afe07b1c1b1cac09","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.69f9f0982.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.69f9f0982.0_1592860427494_0.8478149994564796","host":"s3://npm-registry-packages"}},"7.0.0-canary.369a293f0.0":{"name":"@material/auto-init","version":"7.0.0-canary.369a293f0.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.369a293f0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b627249ef88425d14791666e33c61bfd21cf19b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.369a293f0.0.tgz","fileCount":14,"integrity":"sha512-ik/R4+XNjL1YPy/mdVnePXSihXTcWxNk0ghQ15mSodA5bH7AV/YHwubFo8O1toBEJoTBnfFZd4ine1yLoKxX2g==","signatures":[{"sig":"MEUCIQDHzDjL6pYZxSgTI/zF0W+zIJvhO0u1s0QfBbcgS16/EwIgSxN5kx41hEQsJbHts1+dytBOng1Cp2WiBFwIp16iHvU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8R+RCRA9TVsSAnZWagAA/jEP/Ayk11qKACUCeWQ2XKjM\na29/T75nQT4n16CI14ErjvIyWLv2xJ+4OYJVrNGAJVaZ2EoMUHtxz9DtKYnq\npToF5t6jKI4ziQs7j0t4zlh5Zzk96zQpZkL5yu3j0f+g43EMAn007Gh53GIk\n/FM89kVpW+wDtFWVgwUTgWqhDWH4+cvBhYCGFo3LXG6TZFNMFMCyhb0ohrCQ\nnZ6O+Hbk3Qc+uhq/bbSzMzxCTPcWvj/SuO4B6O4BKxYpycSFO4CgQZAXY1QU\npX2RVBdz0PjiMnF0a3PVB7VmhxrktodqBb0nHXHJVw++mZmwfI7bXHRyYtwK\n3h3ZPAeO9GSCqZKE5X1p2Nfggrdqf3zQIqrBbgXvNxHYFVR68ES7eXBs96xY\nJQvhA++Tr/ywEJYcHau64uXqdetcj5ZNFJ5kowgpW3yUWu56m+z1nNluFJ62\n5phUX4CEM/+mSSAcMfd5JuCcTEhJ0RipD4NJbMPfiOFtOHbL9O3/t50TCJS6\nEfYrYZjaui2Od1002K9Lx6FM4blvtKv78W1IYRMvWSmEisDtCVpwUlRSy51D\nIjXvO6tP2Zl7yr4uqVfKmGsqfDQUrLbYWPK/2W6bJO46K5cJKjF6MZ8fQZNj\nrncZ/bld8DqMbD1whSadDieY4mBApjoX6Sg1MtZfW1b3AbFvLB6r3+lOUV7r\ninbx\r\n=viFo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4b9943a16a4fab61aaa8f5dad0d4f7aecee862f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.369a293f0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.369a293f0.0_1592860560548_0.8381631782656551","host":"s3://npm-registry-packages"}},"7.0.0-canary.f1432b5c6.0":{"name":"@material/auto-init","version":"7.0.0-canary.f1432b5c6.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.f1432b5c6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d8f6d2ed26196d299df8f9f654633da326154a4a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.f1432b5c6.0.tgz","fileCount":14,"integrity":"sha512-ec3AtTmU5aN6ek4sumJJrg4LQwRuN8hnnNJoKDacqjeurv5lspQ2OYsG3N5wOzVXXN+SQt2eivR7kp2DyreO7w==","signatures":[{"sig":"MEUCIQDO6I45R8D5VmvvgjChLvAEfqwQybkjPxfFbQuJ2U71GQIgdL0mrcOVILYwfpleJ34gjfWlFCtyiFZtGHn/ZUURHkY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8SGYCRA9TVsSAnZWagAAn50P/j+FnfIuR9fUupW3XA8X\nZCdbfaFP85e3nNbj/5Fzk0hMKjAWmvpR3DDhu1v25lqAimCVKPNTqxnJhkMV\njDOT36ArsP4HyRr0GvKlOnxlJYSR/7O2s3P28H6B0kzfOvspdRo+p6Moq7yw\nilix6p+zKcWfo95DyQKYac8m9Uhq2L8YDVTP/DtBX5z/IppIjBgOb7QjKr5o\nlT2OfNFA8B4qH1zFPFE0+RQ4EhRjIv96wbNMg6nDGTbdgIMiIbrVIGvZNsoJ\nnfnJFuiShJlicJMB8CqHFyq9SGDl8aaQnbObO0laRHnyM+vOrGNcISZvnxGY\n6OPWplCRDCE8o6ZHCPmwDZkkvyZw6H5lpMlMvuvN3BgKoN0bMDasrMRIB7EC\nAGlr1hhYO+e7azV5oTLbE1JFD+/sb93jRVmDcZ5tqNLj942ygnHTiIW9Wy5D\nJMjEGdn35KWuD09lV8/Eil5YzIiWz/CI69VkBZyuQp62jDV3LTPcUjzl0rL5\nU3zXx4jAcWL+XHMxo0VMGI4IrZJcpDarZlcK2BteBchKcxtmuW3xgwJCFX+0\nLkSufUu6ar1mZeoO7SyoJ/5CYX8IHWMeB4V7A3K/e2c1Gajew6whPtG6ZBpz\nbaZwkpUiT+sXQmtLHZ9+SjFY4QHZy5b/ESmgyRW9AzrxzqEjOCdGTwfyJqGj\n39TN\r\n=Qmdl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9987341fcee9f9c549490bf6cf1a6ce57b5a83e4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.f1432b5c6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.f1432b5c6.0_1592861080290_0.5582393781769215","host":"s3://npm-registry-packages"}},"7.0.0-canary.4757a16b4.0":{"name":"@material/auto-init","version":"7.0.0-canary.4757a16b4.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.4757a16b4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d42db9e678ebd255efbce19adc367030e1f2520a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.4757a16b4.0.tgz","fileCount":14,"integrity":"sha512-CLJlksqhJXM1nOVSlTigY++Eg3DCsv4kq/lg8QKKicR3Rw0XVsNf6SFhKpnawv5QlVSNN8yDXkgpPFukI8S5XQ==","signatures":[{"sig":"MEUCIGEJO2xXQhktJm5t0G+Rq1TwZVyctyDkap6JCJxfYRq1AiEA/9fCioEXWW8a6A71IoIE7yTOXNMgt8kRv6rs1N0O/Eo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8SgqCRA9TVsSAnZWagAAQ8wP/07nkn8htZAMSr5yWiwM\nJDo82j7pa/xLSXmipCkugAg5NWtgaGlr4vCR9556PPof/D4zExdsUTDX4N0A\n19tAyFnd5yxNoVWo/vYFfi/j/otJvsupGxd8Ft4TbmcDsgFjQsk46re3jLt8\n42eEsdJN8zduHcUL7WwL8NODajAyyekdtyitrdELBwulWJqscUu4XE3/iomw\nkpgYNaCeTyUQ0zPOlA6S8qg9TPfnhDH6XuYLYr3NyjoSHGgFRHgYFLRYrkkY\nHu0LMarsP1QsmS4WR61i82TI3FgkBm5UVlGgVGvQwvS9fuQKFQah/Xcv45/q\nW6oL9oNxXPM5bjGMalh5Ql7+yxpgdHMwxVEb0ooXTcpNPUWnzdkDau2mIA4T\nE5j7/Fk0/UgpS8H0eLceSg03QEETwMPwUQfEj9ShHJgdK9Z9tPNqJpN1cQQJ\nrz15HljNGyDLgIDvt3peifW2au6ebZ6s6XdkKag/5dOd726eEcg1qaf++CpL\nLyJ2oVdWXK+hFu0NRUfAs60gpz30fyPYPdq/mMX9LGFRSOOq2AC4sWNEIgFN\nlEPl3fLkmKbqlw+9zf8BT7tAdr9jhpqNXRVQa/JbOriLSBA0gBdGoS3nbDyv\nudEWqC3H3QibMwLVS/XjerfH3qOdPCUnZw5otfVXBb4Wdx7SI/YAgBfA/xRH\ntzrW\r\n=Lj1n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50b08262743d25109a9cd3d4c87d82d0631d9c79","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.4757a16b4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.4757a16b4.0_1592862761139_0.4252029633810166","host":"s3://npm-registry-packages"}},"7.0.0-canary.f8f472762.0":{"name":"@material/auto-init","version":"7.0.0-canary.f8f472762.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.f8f472762.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"daf6d7bc15b556382e5aa0253536a24addda8632","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.f8f472762.0.tgz","fileCount":14,"integrity":"sha512-SekSm1oth3mB6F1A9U7K4/Hr3rXc6fsypw4KkwzOFGg0yX1iWP9kIt7OvsfAPGOZca7XvxZPxveiEmuTKkgXRA==","signatures":[{"sig":"MEYCIQDE28AgRFvrS8K0LokVrE3Kz7gpIZoL51EEamfBvNxzPgIhAKN5BKLry/4aBFS9Q5RO19KU8V0OvV11tQhio2m4kEO/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8SkfCRA9TVsSAnZWagAARM8P/23Pj4t1J4xslKvlv+ZL\n2rXcn9A8FXcZQzedRZY3dnQx21FUWUbLhjBHyz2sFH9r4d/6I2LmHiERKMPL\n+4pDcNoKEFk03Q05AYqPquEZNWuzNFR2kSeIHw3vbjnyjtytAcD3K3ZkOw0B\nJAvXg8T2H928D2Wr5i2sEkzjlsZz4m/fzn8yLp9qvb/6Ms43dKzTOPNRejkT\nL+t5wvGlVF1feX1J7K0p6BeIfZZKoWG4J26LQgHFQetCESWqAz+zwF107FXZ\n57UTSIINwcwju63z/+dX13X9BhD4oX/AM9sr0RGqxmiDPAl73HdFkMuGbB0w\n4YuPCxh9GZ/Wb35HDH/TCTJILudJ94P8MI+JYUNypatA3MV4vz9kVp20GwjO\nsoEE0VuUiwVCSvetwLt99JBeaPFbEOV1FIKCW3JyqJjuwLNy+5HSkSKmvD22\nNqaFyk195OG7Ib8FGNIZS0xmeWgrq+YpKf72/ulZmKVI+aM41AZbKKxnHok2\nF2hQAEwnAWUZEgXHl0LVWJ/uifbbdAEHvrHc6A0bqJrMrVbn/EEQ+geIR07s\ndKP66BEtd159k7eJ5DoMOfPd8aAvh7c0KNMGXzJbG05Fev60b8XM/tnVt7+7\nZp6qae/fwcIXsZSaLWkRYJ4oNOz0fVrEEdoL3fX/zimJlfR04ZrptgRAQFth\n2rZc\r\n=r/Fv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b72e40a4e5c11a670f3423da9ae1ab370f088535","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.f8f472762.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.f8f472762.0_1592863006787_0.2478677419221298","host":"s3://npm-registry-packages"}},"7.0.0-canary.7e4d55c34.0":{"name":"@material/auto-init","version":"7.0.0-canary.7e4d55c34.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.7e4d55c34.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1bc5bbb0db6802e37aaa3c77c5ce0efc6b944da","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.7e4d55c34.0.tgz","fileCount":14,"integrity":"sha512-6hzbGiIMwijhRl867HdpCCG7Z1escLDrqEbUViTOr1DA1zRe1GdTlrxGph9HzGi+/B7SDCtAB/15z/rjKL2WDQ==","signatures":[{"sig":"MEUCIQCB5ZutP/XoL4EUCmJxeDKqufNsjnI1k/zyRVr5sZmwkwIgUdiNxA4wIbTABHx52pBeMSS+Ev7LYa0+e8Dzf/aVpMQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8TCbCRA9TVsSAnZWagAAJJQP/j0bSSN58rEEV59O4nuz\ndcQOd6qF9OtZv15Dm38g83Z2fmRWyQMGhOl3YtA3QfnGybrJV+zBy/VQD1YN\n4d3oFTy7UecNUq/fSEahmTeMK4DQsXJHi4VT6uvr7DseirBQxWi2iSoUH2di\nx4pNb9pw/CFK5qhru9woPucGunq61QnYb5htmc+iEWOHAu4XNupNqNt3+trn\nx/M2PsZeUJTVJxO+1gFyXZNNETy+yVe1D43TA+Sb2vsrAALGF02z2oipyiOw\nVsER6Ff2E+iGC7n0BET/qEuDP7HLWPxgDemvzksTwxy2yCC87qhJjTCWida9\nBbZqhicKNxZxYpyjpETgYcrJgv9sTAjmjs22ZvizJKwKsJi+PBPkG3ynGW9g\nAYlCa9ICP9W62fN5vdRhmw7ENsdPMKb9YkssM/XnaUa4OBfPPL8yrmnmOill\n6/2Y/3K5+Kiz2rVAxBJHhOsTZSts4Sq/GgvUf+bEZR424MlwC0ko2S+tHLjW\nCYBILFFQzzUDyjsrFzAQnIq2BuGTAqAz9h7kIeWu6d6pcjyQUeC5IHhi9PcW\nYpx1mYkohiu5ewh944H4KHizTE5amNQ4a7WPMDgdJnmpKyMHJ2bHAqCb6cNG\ng61gZlySinUcS6Y6GmfuS0EsCw3kTSxrV06TltJvLGmgJNnRgvq7xgTLiP4M\nfglD\r\n=e1Q9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1dcee78d27cafcaab3b8f265b4f1bea83600563a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.7e4d55c34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.7e4d55c34.0_1592864922893_0.44540949714866307","host":"s3://npm-registry-packages"}},"7.0.0-canary.bd1dbc91f.0":{"name":"@material/auto-init","version":"7.0.0-canary.bd1dbc91f.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.bd1dbc91f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c8c5a8cbb06aaab4441276a55a6741e894b88189","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.bd1dbc91f.0.tgz","fileCount":14,"integrity":"sha512-0HYbyEp2GKWCdkKl8jCUJTBQmrUq1HNE6HM7CfrROb4BhyVaRG4kLN+zXd9GyPtAUPVa2eIGJmYoXoo98/sm1Q==","signatures":[{"sig":"MEUCIQClSlzYdVKUQJNPUKN7tBXXoynYu51llQCkIdQsI+opMgIgMACGeXiroXUbwLnoRdKPPEQ4jtxeQdlDpSDNDmoTXg0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hFJCRA9TVsSAnZWagAAqjgP/jqW/zDiciSn2cL+1AnW\nP7Aw4OJC16IJZx65ZOZ1D+hJw1e/m4ZvJWCq5oFSkv2b9Uze4ObEdzSWe4c/\nvvHoIpYuHP01j9hQUhroomXsXASo6Oe/f5ovM007UQWbRv1zC7b0yBYakDGb\nbHjXQcw4foo3tXMEi1NVUo6FIHuy1fYd/EAQMEArjxPBxn6NG7lK+jr7QK5O\n0Gsfm4oz2C7Bo0P9oJ/2WgbQBKzUPOAopk/t3WYWlQiP5HWMgJeYl3ZHKjox\nAu7fVAFtMaO6q5upKJvX4wNp+ByyOpVwbBFRfuwVSs6F9J+oPC7xVo7Q7l92\ni3GhfhsO62DOokpqiQis+d2UEJ/1ipvkvMUND/4g9TGt460Ev19tS3SXcKqa\n5LFwB4x8xBVdvQ4WwxNv90HqNXB6+JwXPJKsCEk2oh/8BMycZuPGOPRKCQDN\nIKpNgss1NEfOF2C7GqdxnIWK0gz9GkamAMDE7GFatSxFc0zTGlm3T2DcDOk4\n2SZba3mfqv/CTpYGswvJJ+TCoOBdfR/0Lf75hASa0W2ZjN4jvoicCVDuNNwg\nlFhN0y9UBxAIw5bapbp+dSy8FCtQ4X20+94kltTEBMYFHstcaoPpuoMl/bdA\nLw6+DAb+abtjyGz/Olv3hHwcYcG9WV4ISpbh6FskAtC5gmHlIe5heOOOjQ9F\n59pE\r\n=eM+5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b63b8059c82f418a3f6134124de3ad8bbb08976a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.bd1dbc91f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.bd1dbc91f.0_1592922441013_0.5758148615969261","host":"s3://npm-registry-packages"}},"7.0.0-canary.31523bc62.0":{"name":"@material/auto-init","version":"7.0.0-canary.31523bc62.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.31523bc62.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d47a8f687130978868eadfb8321f1a518f1adc6f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.31523bc62.0.tgz","fileCount":14,"integrity":"sha512-O0TQf80SHMUJfXLIOAV2hQU+KoU930OtuPaN6CHxwWb2+W1eNi7uaHku+YcYMcYjBLBhoykuTRs63EhJixpngQ==","signatures":[{"sig":"MEUCID4u+KAaz4jp9aMP5g32tgvum8C7wi9pg0s+T9WxJZ98AiEA3dqx80P9ixaNYvxAFdnAvukRMmCYpe8qNvtEI9iYF/w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hKLCRA9TVsSAnZWagAAgvYP/j2EHfMasW/XB9UeVp1e\nAyPUerWepjM/9IBhoBFmvwFIFCGDbzIgmCBeYsS3aWRkytELch4sBkz4nzoE\nntq9RD2mtqGUpd7o06Q2u5GALQh+WIeFSRx2gk0uzT+iNppnUx9AyIPj1Iw6\nT7/uTMisyao2tbrwaakD9PLFUjx04Tzm56mAqFLkAIRO/eQCCau0lftEfmSN\nUGknOCedSRDSpycaFYmcLebQjX0iE9KNAq3pvejSfY7ZrC6OI1bLM5aZJhSU\nfAMPUUZX/mRBA5Zyhrg04QtV+v/Nn3AsSdhrywy+VoCYwN2kbUDzU0+CY+Mm\n8oiJCCytW704MqvRNBp4E2hrPS+XUtH40sDyxh5zSWi5kbx7EH9uwh2cG93d\nMvyKj1Du4AI/FmE2E3PmDm7lkdWuOVZgalns5TQa87xcgKPhAEswQaqbFNti\neln7JyFZ6dd66B6eh/3fBXrTs383nmT2q5FOpPGRsXKLXjS1aJMY3eS4ak1q\nlu+5mdpwMLv30SDAlg1zz/YdL7mGMOk83JEqFn3dLOxtRcehCiqpJlEKla7l\nfg9/o27gSZ1Gl6Y9OZZ601JZLAPzEIMYykW0N2MgzUm3ulkNmKP8lWbxtxYM\nr9Qa6zwFly0oyg3OkIy547MIYtQO8lMwoXCmofcuVYNE5juiTvgVsr+SeOuY\nuqRk\r\n=iloi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"035ab4d41a8c444abf721e44192fa6e10bed9f79","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.31523bc62.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.31523bc62.0_1592922763470_0.06580211825477478","host":"s3://npm-registry-packages"}},"7.0.0-canary.a96b6d4d6.0":{"name":"@material/auto-init","version":"7.0.0-canary.a96b6d4d6.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.a96b6d4d6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a25eee247f689d54d4a3fcd43355ee98d6fa42e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.a96b6d4d6.0.tgz","fileCount":14,"integrity":"sha512-zjKYVgSZoBtg7Ox3vtybmOUDXvkRz/cOs+P9hn9Gb+fkUnMHn6vznKepHTgA14s0vgcsqDPOO0w3g6GUpvEVsA==","signatures":[{"sig":"MEYCIQDrlKHznRYjZVz43NzDPtrv+gsQiFdkbmaSK6cYJlxQ2AIhAPn4nc5/TP/PQH0U46m4G1zPBDKm36fd87fKTpig8lf5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hQWCRA9TVsSAnZWagAAtuQP/2JMez+Js1vPIbkCt7pQ\n01ILdcCZ6j1lzuh6sjm1LZS6uDE6YKO/VyfCcQgTjX+MRLTUqYDF3+2a1Fqp\nmRBby3wQqBr2KvuR1JO+tt4E59sD4gvF7NpJSQzDXGGf3E4DUDdvv6vQ2b3k\n4pfdV4cv3+N2mzAAA3RnmmY1rw4H7jAX20MOETedRsKQFUbp82xz3WCO72hs\n8KVZDMFj2oSOStW4NiabvR8GjWSggWsrMYTllmMHzTx7gNpNjyfglcojkZwZ\nCK7ztWLe72Of1mpw/Bo8dtI0dVF4uQ4MiVfmAOo8wq+UGyItHKlMzYzbA704\nww7GwMNDnrDMbot27xqYiVV/sW/tlHWlyad3iMn5MU+xbWf+2/f7TXa/kOzF\n422kgJ0MaXg4chhjUgXndcnTHabneaXnaeyJlveFbEfFjEyGPg1m0wcUmbhI\nrYJsvaUDKytAyxmUXre10y9HEZROFU0G7LeQfH9FG7ydvggS2IuQ+tP4toKq\nTJwo2+nsdLTUulHyAV9KKrYnu7QP2ObMrMEW4iS+O6c7Bo6Hc5BqnwtnswH3\nRwE59rUzMwHBlQeq2AHe1o49RjwTTBFSeh/vLk9wd5Ek1pn/MTQEs7VFlI94\nfyteNmEUbAtQ00P/I+Is6CYfKfpts0plnEJMgu0lCKvqs3/ny9VEG29D6oyB\nn0Yd\r\n=AyPU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ddfc88933cd9a6210bdfc449fd3fbed391abf4c1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.a96b6d4d6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.a96b6d4d6.0_1592923158333_0.9168670770026075","host":"s3://npm-registry-packages"}},"7.0.0-canary.ef3a09533.0":{"name":"@material/auto-init","version":"7.0.0-canary.ef3a09533.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.ef3a09533.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9668b6e35011f859d11026885781ba2dcbc26cec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.ef3a09533.0.tgz","fileCount":14,"integrity":"sha512-1uvWoHcsIPifVfuSxRoOz79aF13nyiCLHJ0cGHJfUY+L0j9CYzI7VKaqejnf4+0g7DdvNFjB0h0+tWc7Aa34Qw==","signatures":[{"sig":"MEUCIQDoYM2Otm7Sn4twaO/WUPYPo8XEXC7EQlFtqeyBzJlLhQIgW9pqUHmExY504kUQxotj4H7TiFPH7KD8W7EjSUJeBWE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hX8CRA9TVsSAnZWagAA3cgP/1WcGb/aqKuGf1LFiVxp\nZtGponJpWB7S84Ldz7mpnjNxzttScAJTOlySQQdGyc1PPLBx+TZcd7WhDaUv\nzfruOCXEufYC9NohsjCH2IZQSKbk8GcncnVorgttZXlUWgfGUMC4Z9pLVnzI\nLov1HBXdhRKVvw7Fbep9NAb+eyQReR4OlOr/5o74dwgGgd5Vyqs/01fbNAE4\njOLaF1XHJR4M6Yj3K2iulH6pBwqc4O/w/7GaCbk0lKq1DBSB53CpNDCjMz9u\nwcF16J97v+JLotn8KUP3J+5WW0uAsTXbzdwdx24WsTnC47U1AYXgaq4u406d\n4cl+5cZrT4I+aS6pGD2o1bWEydBlzDVcciwwH6e/sncHT9GS3zq5ExdyOQ9k\nNaED1LJrCZNkBwBc+5sFI9nNnT7iiHSE3wAAzFpz+hC7IA626vdoEuybpDqh\nunSgPQPEFa4s0VhRRhHQHbV5supFeJ7UevhQo4eAzW4Ro8RDwTLnr+shqzIr\nWyTmBxtWHtIzDJTb+IBj2sjjEZLG7QrmmMJNWhZccSU3bppxHqBcAKeGSPas\nOmkKdzwWIhTeeoB8eD+/yBIvSV3rCrUSp5bDf9RfZFKATfpmWyGWy0ctPvP8\nsXUvA4KgSgB6vz7Ctv24dIb0b4RTQs5wzwmaG8hHxBixLTb1k5ept1IG++/e\n2z3B\r\n=t/nA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2af091492939e0fee42736977683591ffc221f15","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.ef3a09533.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.ef3a09533.0_1592923644162_0.6030534903197853","host":"s3://npm-registry-packages"}},"7.0.0-canary.080965f39.0":{"name":"@material/auto-init","version":"7.0.0-canary.080965f39.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.080965f39.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4fb2d154fff61d8fffb27d40876480b9b5ce2785","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.080965f39.0.tgz","fileCount":14,"integrity":"sha512-nrU4qRTg440Fl3rmBui4fv20yH8T3RUOIOUMd5Yso0KQHI3BTGp8AsDnMIP2WCE7OoAaHbyYc4my1NIRgp4JtQ==","signatures":[{"sig":"MEYCIQCjj33NbzZaZedDgURZSbp0/gyOrKQOvbLN4VOejJHZlAIhANBG4IMui/rQ0YVMeasRjKjUwzXFo9YdFXrMsO81J6la","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hznCRA9TVsSAnZWagAA9xcP/RHHDv/wPPRlif3Jsi3Q\nAMGqcom9V/LmzrtsJ8vbggC9zNANqRwxW7utKDO+JoBqTDN0w61GtNFfmXc0\nn3rRTjrDKrzF5lmFxnKW723UkjCeY6eSvi2RF33n8HC58YtQO6BztKTwSERC\nBAB+NnbyGfE31nyEhQB0JmjayZ5Mce6qtUtAnCDXYFh3SkCexJ+NisgGe1IL\ncqWhyHOYvyFAFVf/TVlgTgq0vxXW5yjWaJ7Lhm4VEBRKkAkCUD/Oo3/6vfa1\niUFML4n0r+4mqxDZ/v9fVWK59JdBpECMyKvVFzjrD38HRR3cfm9pFUHNGXPi\nbYYefXSd4pNA1TjdfIFlA5tAnqeaDuY85p9OeNoKDjtSGNCPD5N9w48R/S2x\ndTN7eCPy8P6hFdurHwiUcVyJDhJdoVtQwkRXnwWtTBr9LW85kRe4mzqzxB5O\n7FoA5ZGZ7pjEZv6uQhQKo/9Jth0ETKGQbNzJb3s4rzmhvBr1RfiXmKvnZHlg\nxCmxloZxu9JfA7l9HHgKFGlnYgPNnDNC+MgXib/OL2AidIb+QyEWJL5WA2sq\nlOmqYDs6N4KTjQrnaPdwF6ePxXBTpgTWl73y/KXmMePuNvJa2NOmmYFECZXr\nWQfjRhrSl6YCXLL3+nP4uJa7GXeGeJfKGpgFO6TyaLYMKBtx9RCfaBx1nF6u\nRGD5\r\n=ljgM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c0d7c5371df46e0114aef4ac9bc2b3aad1377f76","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.080965f39.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.080965f39.0_1592925414961_0.8208926816203643","host":"s3://npm-registry-packages"}},"7.0.0-canary.1bd67b65d.0":{"name":"@material/auto-init","version":"7.0.0-canary.1bd67b65d.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.1bd67b65d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b2cb9dfccdfde314501af666eb8617173e5b662b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.1bd67b65d.0.tgz","fileCount":14,"integrity":"sha512-Pa4IOgzj86pohn+zQjyeXORLY/YOrMhWOlCFGfuxmAuDEseJTfqk7oqiYKicqdFzh7YFK1lTPIsyLcKRlkIBEg==","signatures":[{"sig":"MEQCIANRyU2svyM1hKBccMARYf6rrcF6y68f5UCex9A0Mx/6AiA6xSEzDsZEde4ZSXwOKYqP8/DjuQwboa0EN8fVf1OPVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8ibWCRA9TVsSAnZWagAAYA0QAJ0RTITiexBFVrc5fYih\ndbMnyHC1XNdR/KfsQSqzVPpFwdcvdl/OOkMV3cGyeZ6JQQvpEHbCbo3cny6j\nJmHFkMQE8MPrFg8BoB8RSIPtI8uha7vADTrI8yw2zxKBFtVkB7poCjWZtbhe\njPBVBUnQvLW2PbOYZr3WQlnyOzlFRGWeveVwLa1K2rm1M4kM/r7F1H5CDy+E\njnF1nJ/yf0HXXd2/LNwTzpShOv0aAJgh+2I60orMBSm00sMoMd8rKZ7ikhkv\nwuVe7M37kyr+Z+1guNsgZYtydZQtBi1mWuvab4cpBCyaXaRV7M2Y1KjdrFmF\n62paGMQWGnr7Il+elQ7cYSyDhg0A0Z31+DZpHHPHZvM5CjTsgMICHK+xQWGC\nQbSlorXku42gIhuYxd82nRBYJJ+cUaRXJt2L2xwkfqgiAcNEx4owZ7OB7fhV\nvXjGo/WgwnNLzaR1DZ/pxDGmbiBltp3Cz3oUITV1yy3CJuAvutFyXq5nrqP0\nd2t4WzuU7U6hnl2zWMixDSIDtso/4hQ5c/1qgjN3O1MxbIlRo/5J6VHx+bcf\nkHMMOsDwxGHgn/BGAiB7e7Sh49E5/lZ4MhSQ/fe4EpKFtzOHO1baiMJzO7pc\nEOI9uwAoahWtBj4KxPH1eiy3LLFIbFp6+Dy2TMZnNrHWf0oMVs4CkNt7U6m6\nmHnb\r\n=7sim\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dcb3206c3f6c1567eec203025b36bff594d66678","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.1bd67b65d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.1bd67b65d.0_1592927957368_0.5662257043872443","host":"s3://npm-registry-packages"}},"7.0.0-canary.18ca31248.0":{"name":"@material/auto-init","version":"7.0.0-canary.18ca31248.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.18ca31248.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"680b61e561c19d6dfb96490fa741b76d04cdd3dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.18ca31248.0.tgz","fileCount":14,"integrity":"sha512-hbaHNJIHt8ovCFuhBH6jFTQQ84PC/C0TNtqme/ME2R8y9F/m7PcdlpyfAVv1MbhaapfDlOcDy+vkVUg+lCJZgg==","signatures":[{"sig":"MEUCIQClzkFTcJ61d+Yjzgo7BWErZJlL9Cg6etFgYv4iV7QghgIgGRbfz2Hr5r0HsZccRjF4Shew1gG4BC7ppN2V6p/dRV0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8kjGCRA9TVsSAnZWagAAtdUP/RVkV301GbXDXwYN5SBu\nQi0bNnQ/cMuHQbm7G/38SdHXQIL6QAnSc66ja0Xigx6hXcvcwGXFNYLxASbA\nCNbBY9DaxKPdBfIdJUPC9yutNRwG/OORrikKdofHwXk2HeUiIE0tKqzkielK\nB+dUTht3zjdX/5+4jBeMEr3pUDFcdPisQy0Nz6YrGlthbNpxwp97ojTC4YP/\nbHgr0DHQNucI7FFAqskyZb+13SS71E6tezjUuY3rYW0/clTn2lpVsdn8bBcm\nfIPXjpOYdrHTB85QOQZ0u+6+7rHjc7ZRWfoewFpZdMxojbelwji3jxypbxI7\nphx5aKRaNSTNXz2PIlAXQxhug6hfgegLVROUDvQRtcPwNMHpUCeEsjZJHWyu\nqqeJ1ERIcnLW2856IxeT5FEjknwg7MNvsCCpdB7PhVfUKD+Spv1/BPf+Sfjn\nbR2oEWDdT1JL2LG1hLqLZh/Z3b5MtqiuLR+/O5hZPzE6ui1pEG2xG/r4DOoX\nAOGK15WJexCyqT59hszAsrwD8+ttLdej0llcRcpLG+0jjnATcR5YN6gqnzSk\nRL0JRXsdiVjI5Pip/ktiJRRnJGztMRgm8UlURtH6Hg/IwLRWHDTLRpkUTm4L\n2olbVztPv7MO00uBlu38JzXnS2eGQJaNnpJ80jLce5h+yeMy1aTSZpHe/2Q4\n31zI\r\n=RnK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34a77f9ac5b41ab1f71969d01fde32c58ffc08ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.18ca31248.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.18ca31248.0_1592936646288_0.9535646747348374","host":"s3://npm-registry-packages"}},"7.0.0-canary.39cf00836.0":{"name":"@material/auto-init","version":"7.0.0-canary.39cf00836.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.39cf00836.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"29d9721b1a093cac2c66e22e80939924abf22d70","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.39cf00836.0.tgz","fileCount":14,"integrity":"sha512-yGhnmCzHKTQWHFo0G8k7CsOw5Btg4HnOILjMTePlTfoBe6VPlC+f4QtjLT3C1QIbvI5z6uC7LAdpgiqs4Rx3HA==","signatures":[{"sig":"MEYCIQCUXY2o3dx5DSAsZ+dGqfa4dZY5Mcr8r8hJI4FxZwy/ggIhAOJ6OStjvH4DGtSeztE9rmTkRxwrvjhrzN30PfzEJvGX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8k40CRA9TVsSAnZWagAA0ZgP/AxagvI1TEtLSrx/sj6J\ns6z59VnC+nmeK2LEpz81XSVwBaGpvsel1uM4PWTsRIPIXlV5/czHLhp7lVFK\nIy10ALGT8Ni5RuPKXwPw+zI3u5WjEdeAjbiWh2V2XOS/rLOO1KDfBLei7Di5\nCrqeHuvPsVYG4Sd/1vBcGjpecGp/Qv1L9vhA8yD/VTJnwCywDB3HpRoaoqzF\nDoi5M1E3aFfMzUx5IWZG2/qBlnCOgxg84aiZahzDf8YVWxrZ0+KQ4PIkitB0\nVZ2QGAbKJ20lhdCaPqzjjQsjgxZCs4EdZtyzpDfbrLn/rfvdBBs0Fl8w3C/E\nZEFwAWmWb7dVm+BGwwKMwMqgOaNDeSrDntMGX3TRJ2JakslA/kH17EKVd5Ri\nfD7EgoylbobgV7GT6Ny9Uevy8Qo3OEGWrkelJC9Eryr5ZclnWhfBBejajM6D\nP3LFKtqyZGkpWN9FDUC+151NA+K0q2s9XNlB0p6fSSuNva6IbafZmbyycul0\nXOWnYYGmWH1p3G+9/wBAMZ00ek37GU6VBKEjZf8k0ClhijaqN5GcbQ1nHEmA\nD+kPMHRtYxPmLGk71wp5AW/vG26V3VU1h7EbUeTngcxNQvsmkeJe7q5wnBDh\nwThLOXqJ1KLGJwKXWZovt5VFYdI3arFd0oARe1sxJM0bPhcqHdyMnWfTFnJ3\n0N1j\r\n=DM1t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"490def2a6575f8ae6a6151f024a9af3fed1f5215","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.39cf00836.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.39cf00836.0_1592938036048_0.20119803410368764","host":"s3://npm-registry-packages"}},"7.0.0-canary.1bfda9e05.0":{"name":"@material/auto-init","version":"7.0.0-canary.1bfda9e05.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.1bfda9e05.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"77e38ab6abd4bcc188702164cb446167688c3c20","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.1bfda9e05.0.tgz","fileCount":14,"integrity":"sha512-RH8vIpD8tnKPfYnr7ORAbJBZ/7Hj3h4J6nSVZOIjHcgvrYnXiOxN/IzCkN8AA2jB+crVxsSjQp3UoCzBDdrmZw==","signatures":[{"sig":"MEUCIQDCO/t6CcMGLzN7vxD0iVzq6CA6c2ai5A/tTQ70moduVgIgB6KA+CqTFKneevy0SgfbB2M/dYNHwWl3e69HEJfIzKQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lEhCRA9TVsSAnZWagAAelUP/1qAuLLYXvnZxTb2eGPc\niUPAvIasGXizGMeFdNgPU0p88a2FKLKPbZ0An1jSC7kyeHwtvu9RFtEXV1e+\nxx4gmCiGHNJZSS7ZHzIXEx+AuHyVYTQUjHoGKHuMA4X+CCRDL16Ab0bBbPgZ\ni9K/nCs6Ir9ktjNrtKhI5xQl8CLB9S/R7cIh3+21ngpRNFa7haWxrHPrUvDc\ngEa0mLYktPYEET6Zx6axSW13mU5Z1PO89TUUCce190+bP3q1wa7QhQaCKgFj\nuoV2jWRPg0gIpOBsCsxqW9LMqiYgJYMO44jhDq4Cly9vqRgjYDWEmt3uqWdo\nG3Xzt49f6TuMGlxgdT0TghqXD2Z/9YQ4owavOKwN6jzzCc4Fve/aO1R4GcB8\nd43mv9xFyykwVKsvn12oyeBzeEE9Y3BmlQwI/iOjOcgQtvZtnVlCOjOtHP/Z\n6JntWDQL5XNXRfBUgDvyriVmISxXzamU/wWZJz2cVLPEJZQbI6hqWFUkE7B9\nTAD4po6mvysW/w4ZvJzBvi09E0/T+WCJ4wauWSPYxlF2MM8JWi4KOLhEIAXM\n1nvgBO5CWb/3FFO4xf12+hkc1b7CuxqDwqhetWaXa6GqgnbNGzHo1jhYQx0P\n39ett1KkrJF3QHAjeXDmTpzUbItmU9E+Q6dyL4t6A6xHg80MCdrZv0ZvA3aj\n7sHc\r\n=00p8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d858287d263a004329d22036ef43b63b8ec8eb08","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.1bfda9e05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.1bfda9e05.0_1592938784696_0.17626777240432712","host":"s3://npm-registry-packages"}},"7.0.0-canary.08731bd95.0":{"name":"@material/auto-init","version":"7.0.0-canary.08731bd95.0","license":"MIT","_id":"@material/auto-init@7.0.0-canary.08731bd95.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"29a2b747f66edcdf5aa9ad94ccfcbc629637334c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0-canary.08731bd95.0.tgz","fileCount":14,"integrity":"sha512-/YzHy9mxkXeoX3tel/cDrWY8SgR19PG+hV43nDh9lh551oldIVgAx2pESiNGZDNiWP4jxeG6QUUWnAgU/rhF5w==","signatures":[{"sig":"MEYCIQDLjxTYZU8dXPvvHSQ4vmKSYl/WxOCd+YRzQP3P1arFNgIhAPPef3aqp0cKD/4HNyQsRXGHyclGwGpqdejvMrgD32WP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lG9CRA9TVsSAnZWagAARi0P/1CWLq45bYRXUwIOznx2\nmRA7P/E5ljVzHcAl2m0/vVjnyYaSYRltnksBKdTty5Oh35MNEiyxMetZqYP4\njO1tCK25pMn8AYqdMmz92Mdwi4mDitJd2NvNHInHjOiqKqiYO9nPpM/oeCwv\nstfk1kBQ8kXRB9Rz6OZv06VC1fnRYars0lfgvRW3SPZA+n9dgdWYaYf334Tx\n+wNheYqsFOWgoI8mJOwPTdPE4JrWDo21G/UfCuXOYUYHARxrUJrGHLTD+BjR\nDlyEgbr7BFjF1BKIE7SU8LhF8OKHUQ0lElbTu4vLoP1ktkaCsqvGL5Ce2mGG\n50ZMCLOuUnse3GM86kVxE/YnOrcqjKmmVcPcU5WVBH6NH6CLgdUCyhEFa6Oy\njhkkS97AS0KQv2Y1Z+HdXxKz3z2lqW+be7+A+tNLqrwXm8Z4D8eb26OYbXMB\nZIYj+ivRg5XwuYdrQN4Lnk+JR0G0GnUqhXwG5zrGFCtLsNPFOAGeAUZ4nArG\n1OD+OLDWzqsrkmPxVLA052ujFVDNMXzDSA86yTDMeOMt+CXiRx9JHkoI6DDk\niz5h5LChSQt7Ca069oR5+2GMGwyybjAH/AY5stFuNtdlpEyn65pc0jZCW2qy\nAYkQy3AzQU5WS/Yrnz/55YccOo153vjVnlEBZY2eBOqaWt1kfIo0SFI7bsJB\nQHw8\r\n=uNhg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e24a4ad4b32b05eb883e0de21ddbefd3c8f641a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"7.0.0-canary.08731bd95.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0-canary.08731bd95.0_1592938941396_0.9777702517519535","host":"s3://npm-registry-packages"}},"7.0.0":{"name":"@material/auto-init","version":"7.0.0","license":"MIT","_id":"@material/auto-init@7.0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb4171eeb335093e5344e2bd021ba03a3949db09","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-7.0.0.tgz","fileCount":13,"integrity":"sha512-G39UKumGFTcpqfkDTGpJ4iMF/wCS4P2YQXbhVEvxPh2Zt3bn6lGWt8+/T2/ddqcsR4yhN5CgEN4QAisXa076aA==","signatures":[{"sig":"MEUCIEOsK0ik5fQ4oAtllAUa9MWnSWuD1Hg4ewQ7+RoENGylAiEA/t1RJC6n9RNDChsjVDf4ploEvoHaftxQc+F998AG39c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lONCRA9TVsSAnZWagAAE9sQAKNVk4BaF7P5EDW+JO0Q\nM7jTgYiAXEN68rOHLQhOavBBQgvNGv3kiTwbwSMg1sigQfmZp3JP9yFsnLAA\n0cpr0MeHR29x4hvNTpiLGCgATEdmYgZNLskeIonB6ZoiIlM0BmCqR2FPZfiz\n7uUdSY+EXQWhiR8ZT0IimAv8Z1hvJtr106yDJ7U7gLn9vSLXCcFvVNaoPsq7\n0Ms/6X0Vnabn58XoeLFKIDnTPaTVICqkDqxDqo3r6sxgF9ZOX8DQ1n3IJFJr\nA2Ym/9sJkg+RJ1TRa9HxA0Lb7MQcZY/+6PEWI2twot6MVV5bpWSWjEu40JL4\nQXeWSCsbPoZwd88I4D9ymnN4ev/zK/zNj0zsQEoXJ0NzIKzzzPqDApKC3Qay\n9dkPoluTv0xKG8e1mEoP8VEYjU0wrVA+zFuHT9FMQpCtGtKzCQF7ianzrKA5\nBnGFNEONG73S5wl2dizgx62QzpyyTMT819Q7Mm0PWwJaIjvOMolWTEfF6Kf+\nOn3HbKiSgte3Fl5cU1p7ig3gxW1Vw5d1KQ6Z44ceoILq+oAbLtVCIUW55evM\n3T7gSw6qNA4s/gcQT752UgZWS9axCgi/zcXm3R4tURAaevpaeMeWorzWSv4U\nr+/VuFS1B5CO/eMjHvVPH+Ny22jqjRYPwzjGx+Dm/dYl9Hja5b2z9RftUpbL\nPFmm\r\n=KNK/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"a3212b2099765947f2a41d71af2cd95fcbca4b97","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_7.0.0_1592939404835_0.89266413198998","host":"s3://npm-registry-packages"}},"8.0.0-canary.a3212b209.0":{"name":"@material/auto-init","version":"8.0.0-canary.a3212b209.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a3212b209.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a3d6b57280fd2b1bfcfe20e7b42a2352854c6d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a3212b209.0.tgz","fileCount":14,"integrity":"sha512-TxHMgh98FTQgdyWegZKLhNwVnCLIU7a1xwiUUvfnF58PCbtRnFCE5cFqAUrm/pKxZKAbJQN1mV7uxfShsYiiMg==","signatures":[{"sig":"MEUCIFBMJXC5zfp3oRVMAt3HgvoOQCmxDXwo2D4W50lAxIe4AiEA6Llc+Fsyv/HtoOEsNt6u2aMA2hk9HY8259dbLyNITus=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lPBCRA9TVsSAnZWagAAgNoP/jHrCNhcTP1LqjB0eGur\n4w+iiA9axkQEjBAau76lRS3jbaewVjIsKqvAVlxB+tji7Lbu/W7szZzfeQ6b\nrt8uuKEwHzGLMcIwU0AsY8g+AMFYWLvbFv1RB8mxF/2D4gd2QzmWJ/Cjf6J9\njIy8vXPxoZMUChXtcbdkJwqPP/O/sUtDxVxWIHpD2BdokYQsW81UdRxaTPKc\nwPFmoXoMFTJ9rH1/m796HhEkPhP3RmCLOVcqQ+i0YJZWaicSJzqMD/t53VrH\nAOwt2VSJbhTtV3Wu8BSpeLhqpTLCHxg9rnycuxUNRhfs7jD2uM0jY8E+BQV7\nsCdB2+nOAQR9btEVPoHD2bpphEqA4kojr1lBbiwk01ttpNG4OJQ53+BTxIgo\ngv3qtSjvuO23Ivd08T7mgfnss9e37vh+C1ZTMeNeNbrNKA2xN6uaPoNnj/aC\nldjFR20MWNqugr9aK5oBASf1a9h19D7fa9Wywr3rIqbFr2HxHigahbTzeoVf\nJ+CjNJ0NiLNuU6eSJajSZyt4h4gMZan1GXvg5CoNi6l0Fy5ug4lggEMw9PAw\nYSo45yKhFNkL7r8eDFaZuwEtMEHevQaLujIqz0hGr5XhGoGAY8zyEla7+0Gs\nEZHrBH35NjzF6OxMo0EjkKgw80amyPYfSBs15w7t/bYRGQRirouUBqHFH3rp\nrBp0\r\n=6E0U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c48f67451e0470c28a2a044f902a31f9fca577d4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a3212b209.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a3212b209.0_1592939456907_0.7042304944010276","host":"s3://npm-registry-packages"}},"8.0.0-canary.15e81fe98.0":{"name":"@material/auto-init","version":"8.0.0-canary.15e81fe98.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.15e81fe98.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bc3eb88f8b15ef5173977b7fc26112f4fab6a871","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.15e81fe98.0.tgz","fileCount":14,"integrity":"sha512-5FYy5IubRoE5frwJBZsj2xAYbvACbZqGtwKE3gq4Era9j2YV2l/Yv4csTk+GpViaiPqVh3tbh9Y4kGLdCkQNeA==","signatures":[{"sig":"MEUCIAk81V1EEYoRcgi3T0h9wHLeOpDmj9tfbhQT7KKQqkp8AiEA4m/sUYV1NrStEww1wNbaf/UZ7X4pjbrPpl5kAO8xoWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lqMCRA9TVsSAnZWagAAVDQP/Rdrm307D4Z4dpX/PkIJ\nWIj1afIv/ZmU1VncDrJx085s+r0rnuqUZ0WnNPPxThSChnZuVMitod63nM9A\nGLYCXlDUyqhcubsEIMycXCA8HjMS0f1RJt8cxOmeM8Vodlrp8ndgQw6ufHG/\nxrcJN1yv7Ke9KCzKlghyvu4HZs7+sQjRDidEBB0jTLS6kSRmM6aWcszMeLIH\nJ4LVZ7oioKNR2/1XS6tuVomAQRaYvp6Yb4Tlxv+6RBBrXifHfCvC9gpYNMNH\njteAeSh/kwcAVH7SQJZ3o9JrGh53nSrFfwSPvHvWhAvFEyoSgYDJofYNFsxw\nINmaDP79k1YNZLx13Ibxyz8TEYT85josFMe20XBLM/lnBdA8/S6PGqHreeOH\n7h1zCvRWrBxivQ8XIUktsS9EaEGJ1Jt7Gald7DuHlF5QoLcrmH6eXID+HXbA\nouHiRFg8r/ypB+SKd+nFWepylK0s7tHS3NQJBbLR3gNhCdI0e2utaN4RQMvd\n6Q24RssisS6NEwHiAxSxtyere4cdiqg2eFlEjjQKfKBjaEPjyi2e9hUjt+Yi\nObdZRNS8VUfcJfPL27FUBr5ez9lCRe159ccUBYivjHCOe9em3nHv37SXZntC\nm2Ig4BhowmrTopaMcCRWf8Uqb7+WKvISVPiSwgJLJb2V1fxXnVg2AzjG98Pq\ndMPY\r\n=+KNO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c7873baffc445c3cff5a006913ebf1bf53617ac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.15e81fe98.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.15e81fe98.0_1592941195496_0.4726580009468977","host":"s3://npm-registry-packages"}},"8.0.0-canary.004c9d392.0":{"name":"@material/auto-init","version":"8.0.0-canary.004c9d392.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.004c9d392.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6a5502a4f33d5e13bff0cdc7ff14fb91d19d704e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.004c9d392.0.tgz","fileCount":14,"integrity":"sha512-9y/bCB6IWQScUxmx33rat20RS4nOC8aKPc6Zf+iIaTA5nHiv07b5IF8TtwPsHdalikNjjMaFxoV4r0WiaRLisg==","signatures":[{"sig":"MEYCIQDnZ+RGJBCb36q25Ne3xJGCUq99LHjAWuurEfuXiGtPjgIhAMkDPvC4Y6GUsiGXX+kyDAZOsghzAPhb4Af199Nx47Cw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8ohZCRA9TVsSAnZWagAAPW4P/2bQy1zbA+vL9425IxY8\nbIKRv/vKbsa8jGjnwjaRC/JLRCI+iQxEAjvRCPogpgvk0iWPfdvNDIpVq4qC\nJ7PIN+puF9nRwK6ZsoRDyNmuMLra0gsTwEchL6vCKcDeqFH06SEJbiMmlpxA\nKJVVUc1CJdiKt6nIolZb/LXzYM3D9g+5K2AOeBCnEPWnu5pT7zW8nLvsuJ7N\nWmVmg6UjK9qMiCmaFWl3JUypDmDmDUiyr1X8mdKBkWg6XM/VxywIVihYX4eH\nIe2iBB0YHlBIrQxzIm3jOADscDQmrM5E8hpQTDm+w+pWvOSJIj6z1oxinKGo\nZsvZb3VZW6LH1qbfLKsVTx9EmcEU0qN1rpIy7Yk0AuOevKmdrrfnajQKAUu9\n7rHR82xuIFlR/dDQ7H1gd7SEzjPMrOfiS0VXbVwb/u6TBaxsoriTyRqVH9wQ\n5kWG9qPguO2uZZozZvbvvSwd5v4YRrYaj3YEIkF3tPpKi6hl0P46JHsf2hx4\n7ElnERoeZEwYSpgGtUEjuI7mBXBbPEK7HoGvg4MdAgM2+THypo7a8sArxpan\nhw5JoazB2vd/1jiw9uXoc2AcTF2DcT0SfV5Q7gzcdVTOT3a1IxLBGjDrl9nU\npZoDp9XMN9XJofI9aYMd75dtZl0JbagNKnKerKGvVZZ3vQLudElpQmlMxU/P\nXfbK\r\n=GZvH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"776ec8815215499686a6c5d2a13543285c30a7ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.004c9d392.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.004c9d392.0_1592952920636_0.28110366887006033","host":"s3://npm-registry-packages"}},"8.0.0-canary.03bde00f5.0":{"name":"@material/auto-init","version":"8.0.0-canary.03bde00f5.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.03bde00f5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49f407b24b3fd56b5be18eeb8984de6dd282c5c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.03bde00f5.0.tgz","fileCount":14,"integrity":"sha512-AxHuiGUk+B0qMljtrOcP8N9h3EgSoCfpNcLLyz6QD1OWLJqGcsQVN/tVD5jHBY3d5hM+pC25cHDhhnsJSFIqPg==","signatures":[{"sig":"MEQCIElzJnSroFGQXoZ6oBS4ohI+eufVPtX45vOCI9X9lk+GAiB3HFPElWPDWP9Dm3IlhBnBWJBpzUbmXPbonG2YpdlfQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8p7ECRA9TVsSAnZWagAAnF4QAIh10I7pE1n1V7fEh5p5\nTaMJb8rU0jpc4UUZ6H+c3t2O3tQzWUYXULawDuycIFWmJo6RKXCVFcbXDaLJ\nRAV9SuLqiB8ShmeOu5GxnaEhgC5k53b6suua92pjegUuA1oirMROlPHwNbaW\n+RlridzRhiTu7K8yhDjkNLrHMHFgXSrbn6Sv0zo5sDSWIBfOyno5dkE66STv\nYC/pw501/He/P+rP9DFLXlT0cwHnfyTfVpWvlqnPsCrsessRfnC7XISExhyN\nIzLERrjo5LBN+t66zPuL/Qa+0g+TtJymocnL1ydrVtRvFYTsVXQmTENlrcfe\nVdyJthXCr6q/8M4pwoaePmDDY1hiWEpZ+uB1dlLMUPGaWVHYdhUCjIhrSMLH\na/pMBlIGpADNSOizqGVKE26ACBb7bux/Uz65UlV+xFS0bfCBkMc+xLv3kp60\ny9+h9ApJEWkgNt1hyMHb5VjRcmUFrVQMifmkJrGiE3084UigA3BU9aSrmkhJ\nZv6+LT7I2V5MkuswEYdkBsdtHHMl418YoawXM1qw9mvgfxJRWiAsHqFrIGyo\nakawnxNr1NqVSrz7CrrkUzGDez/GaOVpWB9CEclfqf9VJtRvHpSYGTN/hXqE\ndyA6Z88e6g6yJOHbzOY4nzxWP087o/WWfreF+phkWGn5V+FPfBA1daedW5AT\nq7Dd\r\n=Y6nx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c3937a4069800a251640cebe987bd7911de089aa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.03bde00f5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.03bde00f5.0_1592958659786_0.6805258787776565","host":"s3://npm-registry-packages"}},"8.0.0-canary.599b8c319.0":{"name":"@material/auto-init","version":"8.0.0-canary.599b8c319.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.599b8c319.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"add7627131e8c4bb81ea7660c478a4d8bf570814","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.599b8c319.0.tgz","fileCount":14,"integrity":"sha512-YhZW1GYlfxjiBPhwt+bVCKjaRq/R+Zw/jG8hL4wcuxScxaxbDiZfQBQxfpMwU+Ty3Hw7vDY/QrauDLdBS4/G7w==","signatures":[{"sig":"MEYCIQDs5qGN4IDY5t74fEa4ZGpwmTObJVJQigfFgX7XmHolMQIhAKkU4JNvGhiWp8t9hxn6qkEuso5FVyvRSoOxgIChj8mY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe82lnCRA9TVsSAnZWagAAUm8P/1UYFmwW1aeHxhi9fYay\nQO4DWcZRe/89vvni/dJLLPBtXw1OwOkjEksVRAxufejDyuBclhpPX/wtSZgu\n0rkQZx66GoYyPOK01kDNMicPzJaXnn6f1HIaOr49lE6oGcj7pususn41aUQQ\n29V0djuoXnQ6U2lmbxlOnSV6wQKxWLp/vDnyv+vgT0rbr9/ivDWHrM2L6QSz\n80hmERDruCcbvhTeqiGxFOv6FnEBVwsvOyPAo+aNzOet7rlrNI/+VN0UceLf\nRESidlSHr6ck+k6ozXW4SYnbv3ucdqs7HfAyYNj5K8W9e6fLvJiDcpaIS58G\na5IvY0pbCd+VyqcC+Qzr5vRT+rSGWpGF+iF79G/jBkAhAsCOulFauMbgTpr9\n7CXX297Evair9MAelflmyOTjke72VHOdWQ5GGNCbZNeCGZXn2R2d09+fWwrn\ntCy6QislaOFuiTjaONBYBvyEBMDY7Wh8QUmMkenyJP50O6NnJT8f+2bVPOmd\n4Kt1IbcKy/EK3EubMXYbs1g/SuMc3bLKwltmV5gtMd/28U0k1bDemEXjdGuP\ndO1rwwmicULTN3HlUqs5xfd9MWTjXBlSz3cBzXqo07EZQanP4MXDJ1shGrTX\nJxBNRXq3fcJcd2pLr5TiK6+lf56sY+PW2cTqwqGEMGFgdru+XdAUn/YouXmv\n1n8q\r\n=xQb3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc6dee1190cd8d60caae49aba599e9d7072433e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.599b8c319.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.599b8c319.0_1593010535329_0.9943589685265293","host":"s3://npm-registry-packages"}},"8.0.0-canary.87e3be418.0":{"name":"@material/auto-init","version":"8.0.0-canary.87e3be418.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.87e3be418.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8d742ca62c9ec6b9cbee9715d3ea374725cf25d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.87e3be418.0.tgz","fileCount":14,"integrity":"sha512-TLUSreGDThNQ9Zph0onXbk6Uq9W7Gxs8EE8FkZNaeDKG+z/DM7SuvlNRqiW7XQ0sSd9uVrbo3tF87WPOZtiSeA==","signatures":[{"sig":"MEUCIG/lMuw8fEr/cyT5ChJAzUPOUl1kDWiqNJaEMjNe0GDBAiEAgILgOHEbWHdy1H5cleKSuYxiRmKR9VttMMQV1+3L20g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe85LmCRA9TVsSAnZWagAA3zcP/2WEXF+3B2uSSlXn2wOr\nvzsVzPCMI7fnSboakqlW3MJOjRUmCmodcsGnxrvvWOOrO7MkSTJqZkYd8FlA\nrmATGJJ/stNUuxC9ik+ANEkzFWjZenvPls+U0tQDNqRxR85+5/ZuAATl7Lxi\nEomsYPuCI5VqDwDRY1RMWQvZrcqmJXcbuVqwVeOQGqCfZDgMvee/ivBZizx5\n50My1CUs9UrR6UlCiSQUlZ/tYedDDQylMmY1huLrpjcv6KqHeshw5DS2G980\n2Wv+F9tqC4RoCZltJNTb9K8XcQzJd9Loizd0234puFujK739pxubfrtMsJVp\nzoYht8N4wYBK2GxJbXjfdGIdgCxRWiFGzf5bSH21beLHNZm1z1esNI4nbAPp\nVN1O70tWUZrZRUEKDmWClI1uLYmNyoLA2FakQ5WoUFtimQZfno6QQlkKyRBc\nrJw1GwazLwGk8B5ibH7VhwocqW8S+Lb2n5WG0TBOihuZPGHdSLSf9x3JzMw+\ngGU720UcNex3GCRf4rAL7l8iS1VBtV/QV4apGsGfOQ266ocGTqWnQSo9OYm4\nQF5Ek2BSn1i6Hqr8mJjFS0cblQJ/Cqtvpczu8/LUpYNZIO3rsH1/J0lf5Wpg\nzU0iMZq/hPml6M/Saw9hHx0QVlGKleycx9JajDjFGmaBLZ+hOSj/nAVsqHZ9\nwApy\r\n=9O0t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4f20e6e641b48a8ec7f7916b83272bb1322a3663","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.87e3be418.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.87e3be418.0_1593021158244_0.20691132619543473","host":"s3://npm-registry-packages"}},"8.0.0-canary.035cf2a6f.0":{"name":"@material/auto-init","version":"8.0.0-canary.035cf2a6f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.035cf2a6f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ebc4affdccf8eff8f87ea4fe08c99cdc29af185","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.035cf2a6f.0.tgz","fileCount":14,"integrity":"sha512-4mu0JK3RgVgeM9u5BIYAjSiZZ3kG4Z2PXH6o8+pfMmkMPs35L6oQs/sfFi1HhAqNyGTsfiX+0Xyb02vWbU3PAA==","signatures":[{"sig":"MEQCIEc/0XZHQnkUOEIxGytr64qrwj3/YI2oj5IIrLtLrIHDAiAHiEjqXSkVe5KRjRGo2ocOABiIYCp7Wtd0cgZ91vNcxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe852KCRA9TVsSAnZWagAAW5MP/jLeyl0DhLXBPDkANWNw\nWnaGCDYZjZxl3lg6EUW8v08XeZwQpjJCfaeRc6Gj68GexhGXJbmlBY9kWSXn\n3pyiJJTR+brY3iteeBl99DFYrR8xI4/f8OIvqpoXI8TP+GcOnptkWdCRVS3e\n7cURtxisRlQQ4W+Xz2hFB+8IgFcTZry3/B/YKLE4rrMUv61o5STsjLIlrblI\nABDt9bV3W2WuyZJ5C3DQ0g+ecu9hd7cE0jKKZEjw4jfKw1j2b+RETndjxehD\nN/APli1C7fDaOoPFIP9q9WYruXD4LXoGgZkHNWAmiM5Dhr033gndvfz61so1\nU39eSnr9rVyqfmODrpv4Ghmjyx8TfZEWqFze7Y9onD976BpcIHBWd6U4B+/z\nKzbIzaU4iIBH9By9FIOdkQA5922O2ro6tc83888T9tIcNRZF4XJE9RdspH8l\n+TV6P3TivWjFqL2HfeVttrWyYK6l2eBCVftGQbWfum/2YhvU3KiFSlbg0vY5\noWsFOvfPUnqEI8DLoItaYNuzINnB4lPDjbs+qWnGczAa4Oapgsh0YpkNWKXC\nkcQwkLAzzIk4sSgwAZmzYC0sM90/TrWBL2vPTeuuvDX/X/MnqgnSUeUAPH91\nwv5t/HZT86qpKbgXJtih0VhUZvxcLve8rRVFQWF/Juo5sg2egOgeRWJKcpKg\ndWfi\r\n=53CC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b41149a9f9767b120dac2367ee34f615761dcf3d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.035cf2a6f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.035cf2a6f.0_1593023882399_0.09354234349609714","host":"s3://npm-registry-packages"}},"8.0.0-canary.2fed2c12f.0":{"name":"@material/auto-init","version":"8.0.0-canary.2fed2c12f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2fed2c12f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"72eccb4bb10f08784a23bbdbd4db0c0d66defbe9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2fed2c12f.0.tgz","fileCount":14,"integrity":"sha512-QpcFhVyhXCq3Ve3DXFOrngEYdrFQd1l9L1pEMZ9v0/TvKWBMgiFBtVq57SREuqdBSXMT/LzvskozZReN9wQk4A==","signatures":[{"sig":"MEYCIQDyjdMWk/WklYsGmNcyj2QZqpRtQag4UFxUaqSbU7ZCJwIhAImq/0l+GbqgnalkGjwjsXcPHlVGtpJVSNMvzzMN5hHC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9QJICRA9TVsSAnZWagAAgU8P/2k81Xz9Ofj2IHWXxuKx\nlSIuUa0HpmFXwxfqDKddCcmRO9aH1oHvL9oH2K2VUe2DG1iNB35qEu5Acbxg\nNsDrflIgnojZwvVCKmYuH6bR/S71fu6P6rvEHGVHZj7Z/IB+movNEJKBUppF\nuxP5lQgaxAetfVwzAusqJe8+lHZEZT5SvZq8GOKhL1rZ1qsRJAdbWQ1FmfxS\nl+bfGX1X2iRkXsGZ5R/7VVhlXNHMWSVhVABFq5VWDR2zTQttRdZf8PFFAxsD\niJ3XFFTpp52ogYK/yvC26824ITunBEhQoxAIfeHh4Tkg4kEX/JfvhA6FQl5I\n9U2MrSS3b/b/cW4HX2PaKVvm5vW++45p48A3tg7u2bVcHfCnokad2XdqwSmy\nVopt7foYlMKb2tir8pud6y8o+oC8ekDl+gGVj9v2estKqPfoDaeFQJmTUzM0\nOcqKowioZsNxbAFrIPLRcXfHB+BlqZve3VGED7TvBRkXEQC3xpA8Nw3DmaD1\nkCqcFI39Ha6pJ9wUzyI9b0AL22R7U7LfH9rwSDrc8YEXUYg++uXR6nNSUDnI\nQZeLTEPxGQuF6Xuw41Bw+U7INJKbio7pjPi+sWNZgmeh6t11YE5kWBJaX3ik\nt9LiUpdFiAMh/9EYzNO8MkCiMBGxEY1TBnv/A85YWkWBcVDIBPcya5wCMcJq\nnjn5\r\n=G2ZD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9c7b4d7bb8c365a3b1a4408204f63c124455f635","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2fed2c12f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2fed2c12f.0_1593115207962_0.5719756085622216","host":"s3://npm-registry-packages"}},"8.0.0-canary.38197b443.0":{"name":"@material/auto-init","version":"8.0.0-canary.38197b443.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.38197b443.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5865b0bebe78d8e0f5fcbc8c5a263e2903cbdb01","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.38197b443.0.tgz","fileCount":14,"integrity":"sha512-eHEl330xdN2+52ovuHaf01VMbraGMpT/PgIdxHXjqk+/yJazBXJmyZYLy4OiWoHA1VRFPt1s4dlCnG/n8xtJAw==","signatures":[{"sig":"MEUCIQD4omNQTfQSINATV2lEYRQl9lVT8K92h7CjDDqQNGexAAIgdJzkdPn3OwZeltrmBd/DG9cXTfIjJ57Gz3bTVJxmjdw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9RVyCRA9TVsSAnZWagAAd4wP/2x5ETolI2Xq+ZFa/S7E\nd+qr9vExqN5++AJiQXyuoJYvXwCkO+biJ+gsUD05drcfQ6FMMmHqHuKNMCtu\nDcXKBzGt/k3qOvMG/K+aw7DZAPjEmcO2wsJ1gCc403k29BqfIh6hXISckGHD\nU6V/woV65/BKvog6AYnH7w4n789KzF6V1jvrwX+CXiSfPFhYilu6rYeX8NOF\nLxkvVawfIvQp2sNdGCYUCQDs206blLVCKLXva/N26fBKr73A2jucKRO88oY9\ny6Adx3uLpMHPfBAV1EZR2Z01MaMup/1NQluxQReJwEZsrBll1GHKikCzxxYN\n9qz4xm/X8ZJMTKnaBqZRy/37M1MucXdfFLVn4grK0yXqzFIV1/JjI3sCU1Jv\nD5Us7uV8E4bXG+RleS+JVl01uAwaLWF1r3+ITRPfB1Vg1mtAEbD3LP2eRxJ9\nkeIrvjhnJU5rNLx4u9GLxui2aKNclwO7ngUtkUDxV9agH9v12S8yTjjlsyeP\nctDq2O6+SNBO/RcPaclmaMTt46C+ZgzedpxMmeuk3XlBep9D0MGilXKLLl7T\nYZqiLa206aV7Vei6yHyT5hZ73JJtk9RiADsma5/owY0ZlrBR3muVwMc4cJNw\nrWNrq4R99c1ALf6l92ggjE7mNkYhiPF4sKiFGxtD8FM3E9f6Y1rk7VZeDRmJ\njuDE\r\n=wpE6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d5e18162ee3d69aeff0d489d4f3f73bb1cad7b1c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.38197b443.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.38197b443.0_1593120114112_0.2505936071908119","host":"s3://npm-registry-packages"}},"8.0.0-canary.69a35e80c.0":{"name":"@material/auto-init","version":"8.0.0-canary.69a35e80c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.69a35e80c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fabd4453b8f67a62477220d43e4935a63b87148f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.69a35e80c.0.tgz","fileCount":14,"integrity":"sha512-0Bfn3iIiqEUCRvDtzyAsKJ8vWzeCtYPxHHIF+72dxv1s9b3BALebLWw7YfCzNzcfWSvWQ0gggtsEUTF5ztyFfA==","signatures":[{"sig":"MEUCIAqBL+up6nhReAMnmX0WJt3bo5WfA3tlifXkwCkR8UM5AiEA369J1v8WdteCUh2lptk+Z6oRxFqWUuiVC5pk87pdjps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9jJ+CRA9TVsSAnZWagAAlmAQAIMbEpsuvOqBdiL5LamV\n7jg+BKRLUuyEWN8kdos3ZHkmSg/U886S6VPBjEVJ6Bhg2i3TwKJjD3qKOi/6\nxGicn3BKddcjapYP50wNzdwOTk9PqPpY05GFFuaE48AYyRS5cJ9auSqTq2SH\nUdgHBuba/Fir5TGAyrBKjhCD4JDlitbBXnA74y0chCtJmg7t/G+S2SPpV/AV\nkTJjY/MuZ7AX8G+MmfYhz2+6lCC3i40eAZfRpur2zpv6VgEQQ4NQ+cso2kaQ\nDoRK+obIba2MsZyyQSpE1YxHhtN74rrPKB4K0iVW6/Pw+aPjH0MXMStggxbV\nvSoscN5hxsyx5NaxumkWCrZUTuv3C4ew2g6Nd4iWRJFAHXesDvK0DRJiEQOO\n1Yx+P7mB4a8w64VdJTh7+geYSDtgescppGBHj7W0pHZK7w0iQHKbGtr0e2Vu\n8DUHEt12awRbkdETA8UHg1jR4bOqwIev+3z6sTvRk5deFVYay3st6R+KT4zc\nnLcAITZZg7VhKBBBx0rhe9jNKu2DGskpI3iOQFqln/St/7GUOk+1byh+aJ6E\nMvwQeIr1yqPSfciLz15KwVPkQVWSHE9UHYvlqazncS3rgZtnipiT6OvN7u0p\nP47YkN5awO3kzqG+DsnTDgKNnRpUBQ41/IWi5xgZs6Yb9qRSvYwCedjFnNwP\nd8ds\r\n=za1Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35bab77d7ad4b820da5ee4944c2cc2b7fe1533ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.69a35e80c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.69a35e80c.0_1593193085431_0.06015457456701423","host":"s3://npm-registry-packages"}},"8.0.0-canary.df7154fb3.0":{"name":"@material/auto-init","version":"8.0.0-canary.df7154fb3.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.df7154fb3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"208bdcbb699469310d7e4b680192aff4cc99b423","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.df7154fb3.0.tgz","fileCount":14,"integrity":"sha512-DfUHFHGM6P1KjAtyGT+bN9vlB6zhKil6j6klGl3Ng5Jf63QHY0QMt0a+GjNeHBEnU5ROjXRL7p85X858E1Fk+A==","signatures":[{"sig":"MEUCIQC5rqCtkdzafySq+PLx9sqMbXOTpmYOqBiZfK4IOd5AWAIgdMODolKUrel9vHLewILrmnS6pduL617BT2waYe6xyGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9jtmCRA9TVsSAnZWagAAaukP/2FFRleK2ky1dDV4fjvC\nyLJB3iaXW0P27ZwkIpaPFvQuq0JDR8KmAGkZjvw3eCSm/D8uq3GzEPMQyePB\nvrSoSkUMjMcAsi+CJ8AF9h3Ke31mSzQ5jBmxlshwidoC89ht6JQqUzXZyh64\nh1b2B3OLMsaytXuuQpeBhOH9HkmBFuf+NTRVLs1Wz/zTrIx4QSEI2+we22/v\n7L+TVV+wGZCUaacb9NNN2tRvsFSUavpP1iPIQl5tIiQXzhNpR2DPMVD3ONzd\nWW+jJa3Gw+ov8Z9/N0SYXElv0RTpvy1Q10mAmGSS1FaS6maYbqJ2TbN0FW5I\nBzazXwW+iiDHp0rUFBOwWhM3A7xNEmUCOgE5nqBPg5RHe5eABMRFUbE4m94n\niAZ4Au6pwV+7moJay7ooanos9WIfQ71K6h0Sm41dj623k0eLmkI6ficFKlHF\n1Sv0y4ykU/FFD8F/z4psRMH3k2Tbb5dd94Rym2P7by/uPms89d341xdU9y8J\nk+A7NwWevzIbsdvSyhJk7Q/DPIC1CbDyi9y5fe11k7RDq+66JCYy2p8JE8gH\nQBRuTVHqYPBENJLEUsMt2RYOAgd11Lj8bbhvSA60BF36lKBAdw+Cahoegiqf\nPoylAe0TwB3qr274rNZXdqYOuhaqxb4fb02GXH3jZ2nr77H82zWx6MMFFUPP\npyoj\r\n=Ko+d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9081758d517c13eb6f120c62abd9689f1fa99906","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.df7154fb3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.df7154fb3.0_1593195365570_0.32079413562523285","host":"s3://npm-registry-packages"}},"8.0.0-canary.d5618602a.0":{"name":"@material/auto-init","version":"8.0.0-canary.d5618602a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d5618602a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"30763fede9d317caacbb9615699ccb8afd05015d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d5618602a.0.tgz","fileCount":14,"integrity":"sha512-GGsC+BV4XsUd8MBi81p0vEDMVjyinO5WnP1MY9l9j09p05reD0xYs7Q9K2KFpWWyXbcjpfGKZgAlPR5XYMoU5g==","signatures":[{"sig":"MEUCIQClms2FylsYnU+dURk/uoJ5LYIa3CjJcYSle4JmWNvcgwIgdlXUzuxpVtBERf6Qk8wDj0pZLOIj3Z7dqVlePPsldQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9mz5CRA9TVsSAnZWagAAwBoP/1rz0zRacicrVDvxSMKb\n20sg+dw+rT6mHL27BSmi1q93QvYdAx04w4umGNMgb31kpI0ogf2E8JM/V8+o\nWGVSbdNqL7Hh5yrlf0dMch/j43ipXF5MWqaEdBaSFQum7ifkdAdsAp4K8NG6\nkCUpADJ2yIGQPnf1WQFrH07NUXZnkCQKkdF2oNsaQbOUjRGUlqm9WTfSs6Bd\nO+XJHUv+1UXeR21WY3G6Os6daO7H/2ORfpLUomG7sFHiXiaa31MwJrUSqfmP\nAMe/bi6QjRZoY4/9oFCqOfQbzlhkpaWJFAW3OX6S4MNxrHma9CUXfYEO4jM+\nntr3Ehb7scBJxTkSg9S05KIGP5Bhgvi7csDKun1Z/mwnEggqIYB34gXLr3T8\nIprjcev0QmYgl78wCdsrEjk0flpzxmdhOsJ1qFZxVXwAKsvQfVw2zsgm4h+N\nSVpKGdvpn1XmBYPI/wl+16F0rH/YpEOwEbW/Qk2V6RLcJ9mTJvqBsdvitp0Y\nkFRryMOyw8XFAqviZids/zpsE9pgIx1DjhclzPNZUQB/a2O6jV7+rVxPjfpL\nnILDNOyxSxC9KMcDNptj08oWHlIj1X1MJuPkOK5xSkidACav0vZ/z+ky0ZQE\njZpdmurbVLQORTG5HYyPUgfXDYVYqmWs5kNTFQ6GGgbWFFsEYPs8LvCxxCyO\nwRCu\r\n=t2Tz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ced8c184e8043c7ac8faa813b76b9661cbe247c2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d5618602a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d5618602a.0_1593208057448_0.6711408613061125","host":"s3://npm-registry-packages"}},"8.0.0-canary.e590b376b.0":{"name":"@material/auto-init","version":"8.0.0-canary.e590b376b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e590b376b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2608ef5cbb228fd9c0aaea5ecd465e147f9b84a6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e590b376b.0.tgz","fileCount":14,"integrity":"sha512-i2Z+RpcKtKt+/1RcUxbP/GB6nopTdBE6xTLgchUBl8Up/xEn42wzCzgXehA0KUmMPsqRmdy2eiLxu/QzKd8UYw==","signatures":[{"sig":"MEYCIQCpsSJ6J8VZ+b5kcgcwk1V/v0YZKyKYPCchwssDkupGhAIhAJKwksdSBwMkoUh5yPQZYyWfwssw2vAMw/84M8pBjIGg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9oNQCRA9TVsSAnZWagAADEsP/112UmcjcBDeAyYL9qkP\nrBnfHNhsG90h/dEEY1j0MoUFpMHAgyG6JE9GDZmbGJHTgKDJ77q6FDSFTr2o\n/TvVT+8O8USrUV1bts35p+7uXr6W8+iO8cssXYBLPyNQQJfoHJztDqXknezv\n/4rn6/n/GsHuOnb9tma69eZVutQ+pfF2wTYaxt0dvYeBYFLolpfAvGza1/3q\n5talm/j6HBjmVlGGs06VYGVLmUJ8OHqzi9VdU/tOTcYLUjH0IUFdJbOeNGEr\nS/SZ8P9Qy2McQEPZznyEa+BLYYunShjUUrcvqJC4KyMJ9JChlQi+Xg+3B+7D\nXeeDw/JPatGg6DngEF6WSCv52EHrIF4PJbxQmm8oLy3mOsilatieBGhBGQqm\nHIxbVvLS8F5Oz+lSG1YKoLNR2OO2/HRLPBvWJ1XAwcZWombo+o7gVr6K8+NB\nfpJDTej/P3BT8/fi0/LK5m0UITOYoCSLm588ER7UyIu1tPJhXSfDnNPjWwuh\nMAKbinNYNCykktu7YadYRRxRe4ifeNTePOxgLnN71HJuK3ZLjcWv5hvqFw+t\nFKYttQJp0DI7TiINtvDsKpaAkqNAumGBvEdiQql9JhPrRx6QNHUb8O/haFRt\nmqbR4Zp9SJVb2oO9GniLb0XTaLoK7/LPtvwEJdCEbnR+yu5kldmEYp+jTLHx\nx1fa\r\n=a+7j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ddfb390b804034a98ec0b8e7741dd3f3250b5ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e590b376b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e590b376b.0_1593213775702_0.5243352559723431","host":"s3://npm-registry-packages"}},"8.0.0-canary.0c9d6bd2d.0":{"name":"@material/auto-init","version":"8.0.0-canary.0c9d6bd2d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.0c9d6bd2d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5c9945b9a891999e08389ef031588e8a068c7e8d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.0c9d6bd2d.0.tgz","fileCount":14,"integrity":"sha512-Q6TQTX8JJfsGAhBLE5XqRbmbQDbTL4iDbS/OKHR1ydnBrJtTF5L8iwD30R7FbwKKJOpj7+hcDrxKzzGsqf9L5w==","signatures":[{"sig":"MEYCIQDnRmeyoRH3FwXZ14EsVPqP9PJsVolWVvB2DxTMc1V9cAIhAOZfhNQr0jAAfQepY5k0keyOv9yDJRDg2ZkoFtNX43al","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+iGCCRA9TVsSAnZWagAAHfAQAJ1lmn18yR4nzkwhAoyL\nNDmX1Jx2++hA6iH8Xmee1QpQdEPa2ePXTgrghJnu5UAYXG8+Il3li3AxUILN\nfT9rA5Gi0vuvRLK7IUmcM15StJbrsXuoQrUfxcm9RqF0IjLKJMf6eW88LQcK\n2pR4CDS1X87LBzERH8xUz/eL9SwgG7kftXkwymMg7tf3v833BT+y6qCfnQHQ\n4yTaztmZgQ/XBW4yD3QuZsIRqPSxZuxSDNg0BF6pGoDcMNKJHdRTnYs1ddcs\nul/UdoxMsEBginIcH4hkEjXVIL2jYHOQ1WJZY66VZn6y7vHT19/HoWualbAL\n9QPefNXSJAXIcWI8y0hh9o+B3P/R4D3jlwWT4wqTcB/X0RwhbhzdHSHgvKYj\nyV75I33be3mdG06t8SnjsQ3wAPz+j1DTuCsnHP9+h+A/bevGWRF2Q0Lg6QPW\nUQZeltkUwJZdA0d4b2I7r9EoxdYRLVGs4PshR/jEe9TJR+Lv5diwFLdOWpGa\nBdRCBsKPp1Q3TVxi7v2tREk24fGUGbjnMYL/e28C0FasZZdmRFyf37N3yURY\nymH8LC4j6Cvngq3WvQltcUZonSdPG+iPddlPCp8QOIbM+CQTcrhuSr0d94LW\noL6ZDzstq3nOIXQ/flH5iPUMRk2OSqA/qc3UA6i5rKBuIlWLwoJWL6Y+ekuO\n8hhr\r\n=jOLp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4f171433da859f637823aa04bc12d72783771f90","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.0c9d6bd2d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.0c9d6bd2d.0_1593450881899_0.5030312994983912","host":"s3://npm-registry-packages"}},"8.0.0-canary.c1fec4246.0":{"name":"@material/auto-init","version":"8.0.0-canary.c1fec4246.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c1fec4246.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9c18c4ed7e8fefd6a08616d89641f00a59ff9654","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c1fec4246.0.tgz","fileCount":14,"integrity":"sha512-+TfKuNwBUy0ZZN0zmgcKiTpc7v677Ept0/qaO28wtx/tv08kGxPocKrTF5MViYaqPDd/d4WPEu8Ucnn7EbJQ6Q==","signatures":[{"sig":"MEYCIQDzLvXEptcMAAKjdESjYbKziIzV7xRAMLXZPt7vphRyvgIhANqFbeVrO2eHOgBoPZMyeypdoQ7+vcYL05DZ8iG6W/Xh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+iUMCRA9TVsSAnZWagAAhu0QAIXO74AFPbzLCGccOFNR\n6oJV8JtQnUY5soHeIj1TJsxImCxvFD52ZixenYcxHFoQK922gnFmztV2Hy6r\nc6sTIcOr9WQ17oQh12zcffnWHvod9aAr+9bcxnDFAc4xGZOfHYhpMyRi9q5j\nMAOHhfJY5WPgkpZ/wkx0xqmkaCMOc5B72pyg24O9tPt4bm8k7vdMAbWsHfGv\njTNgJIlEmm+itSVtae0k2XUVoRaTAHcStKfZBGFiaG1pgGnwQp3Vviz40N3X\nLKL6gvJaVNWNaHjVmZykXyY5/jzsqF4ZIdSR3dUC3MVzmX/7rJNT4ZjD26o9\nGO8LUf6R4YhaKQ1ISOn02FxlS1aXWGtS7dkbRN0imGqcfv32lUOb/Ag1Rynt\ng0RpImUo4oMX5C6slYzFu2vlvWvsYo6q2ockbomXIlyQLC6lRO8IIUpzzmSX\nR+WeQGbjkiy7ZyZse12v3n5eHKMoGWK5eWRkMtIo9Rs4hBNQXaAIVmQeyvxn\nneYx/kQna9dWI7cT9CIKThr04pruNngQZ/cDxvRbg1pdhvcPBulkfaI48Kye\nZhMDBmXRs6UYlmaAzcn6C/m/BXAEbEtoitloltVfLO7MVVCm5KLwVOhL6aR/\npmH3mmf7UUfc4qO8NJ1w9nvX79723K+IuD4T16C6UKs+Qv9JrZw5yljZTpYt\nKvW/\r\n=4bkA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a588e37208b314f42e946ab4add50d0ad1ebf7c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c1fec4246.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c1fec4246.0_1593451787982_0.5611254231960339","host":"s3://npm-registry-packages"}},"8.0.0-canary.c678a9d34.0":{"name":"@material/auto-init","version":"8.0.0-canary.c678a9d34.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c678a9d34.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"053503eff62ac00f055aadf765b160b894381ef5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c678a9d34.0.tgz","fileCount":14,"integrity":"sha512-sIMwZocsEnP493CWo/Zmpaqhn1nLZXk/hQAPdQMqs+xWtq3e4V5nZ0kQmWgAgJk0vtkyUdCem0Ht51kdQGuUvg==","signatures":[{"sig":"MEUCIQClQjrvspO1nUa/gQnNBm8MddVW/HlHiBlSgR9u7+cW/QIgGZIhMTbAw0QBv2URNX8RrSG/yUacCpZOTOSZ7thWNQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+ioKCRA9TVsSAnZWagAAx80P/iCTZNon94Cpt9V0HMmh\nzNXOwmj/R8Wnq3Qb3uJEq5ok5gXnnoTLvDFlhceVbaB33HKwDFiKOlLmFuE4\n8acIfF/sABwbIqSQI9p3oOPGFGK8QvkDic6BQgi2ykfLhRuDj/CZsBbaBVjS\na7nIfHP0W8aZq+hxPlZ+AErH2OoDPp/5fiuXdkPqKNsfDa7rLSTbqK9dn+lZ\nYi+344adgQjiFDsH0DUJLYy7DD0mU1VvWrcyVUrWPV3xpvx+i1P8jhuecYNz\naspyvJy9LuBCUoFZK87nuVNnehQR0CRXthnLwxNumJ7YVOPTOt1I1vDIBAzg\nbjDQmd9QBety9SkbX2pR51a61q29PKFMlOy+w7lfA6pr2SL7drEBQsaWupOI\n7sWTTjVJDKWtkySHhvOnTMzFaX7hr9RPr/ffcpKbua2v2+z4wZ7dZMCh3TSf\nP5dOxvLO8iUvx4FdZn98ZHp/j6lxFm/CT8dOLJ1zUJC+ounTxUWFlv5+sdly\n9hl/bl9KxxKx4KuI+8O6SMbRUQMQ4CqTITtWNGIAzGWPs1YQfmyrLAaNP1w1\ne/j1g7BGOHwJu7cA6VBKhiX8URsZ1ggkdLgN4YMAfMP6ijT/PrFOfNK/zSqp\nNtkYQfD7L7IqNWBizHr3+MT34I9NOya1SPrJacvKn0Rm0eXLSYW3kDAtmy6E\n5bIe\r\n=Q57f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bc361f7c6bcb498f3a6dbbe6255c06a66b7dea5a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c678a9d34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c678a9d34.0_1593453065435_0.9866371155298961","host":"s3://npm-registry-packages"}},"8.0.0-canary.521afaf6e.0":{"name":"@material/auto-init","version":"8.0.0-canary.521afaf6e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.521afaf6e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aa4f8aa7f133b661c61eae1b13cd4aae34bd61fd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.521afaf6e.0.tgz","fileCount":14,"integrity":"sha512-1zGggoFExYDdmtm3/jyydeN9zZsnXYpvj5KuZ/grA0010jnnTjC4f10p5Vo1OqQJtRuZR3M2NX2LLmMDIJtKQQ==","signatures":[{"sig":"MEUCIHl346rGYzyrwKgZaiTtmnN44f0NmsT0bvsHs80ELtsXAiEAvBqYdFY/9sYDV5RwgZzLFnxX3/fcECMFqvk9+Uk6A1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+1SNCRA9TVsSAnZWagAAtIcP/jZkS+0s0i18KDdzcxy2\nFN5KYMzZNRBAIPPCidklYulW2U/B7ME4IHWhdIl4MOCP8EpPK5FfIWckWt5h\n8FvNFXebkmDwJS7h6S9grAFg24O9mpR/mdvGp9vptcE/+xgu9l2IMIeO179z\nErd7ARZwjrYUEvi0e22XpXof3x1b7/O4/YCR3qn86uAsqNonUaXBgnGKOWjO\nOq/7C5nDxqfWaQpIvLnEzQPrx43JvYKuVV7M8xitvd1u5GMfjBwN+F+NjcHB\nOc12Kl0HVYR/kRmUsTZw0UjmkeRZiNqS6Ei/X/uTR7TUYVC+Rnp1Fp2uf1lL\nvnnaqLgH/79yNojIuu/ezU1C8tyEftOawYI+Q/IDNfJTyQ1+rMAhcPYd/9e1\nGqNXK5bP3Ih9dv1a3/MDiSLXpIm8bR8q+bAtF20BQsQR6N7eS5QFJ58BdqLX\n2lr5235dYYFdOEo6m7pqVjuCbORnwotaqBRbiw2FQeiJa2uPusSFIqmyLoYg\ndA6P2thICPxitPw/V+UIgd1MZXXkXZxikr4svXuyZR7c4d6UVuT+eJsu44Ew\ntao0p0fACc+2lhWeuEEdJhi4o+yC+JynCFgdDHlGtF1yUwoLO1k852W7gSEo\nup/GwDcvpkMsgyctrj8zxLOcDE2SZ0xp2TKCgMbmFHdWkpvpwe4km/IQwtpb\nkaNl\r\n=3MdB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ef14e207a6031cf299541a4dd72c2eafba3ef91","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.521afaf6e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.521afaf6e.0_1593529484998_0.8724854891671132","host":"s3://npm-registry-packages"}},"8.0.0-canary.a2ad48839.0":{"name":"@material/auto-init","version":"8.0.0-canary.a2ad48839.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a2ad48839.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"83347f87bcb2f3ea81880b17dc2d868f72368512","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a2ad48839.0.tgz","fileCount":14,"integrity":"sha512-mtYa/CBCloZV2EmY5na1lc8JgL/oUhlRj3LlxQyFCz+wTdSX4gqE5R4zUsFksCpfaEwZjsi4qQBsMFcuTEWDqQ==","signatures":[{"sig":"MEUCIQDPqClc/93hYBf/mf38Vb2jz3Tbh+9X0vhA2CxxC93IEwIgEfP7CRhzHSNCpK8BmvEOucPw0JUiHprvHwAI6x0IWJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+47kCRA9TVsSAnZWagAAyl0P/0jgAv+fUqqjSmF7EGzV\nLVy+nclCRvXddkIrnnEdphtI8a6bBS/vHTqTTXGfWg+sft4ytpUaF+zfJCBn\nkEmgfKza/iLz2Uw9x2MD0YdunIoGk43umowq97P9z8dk2Irxyac3Y9L88P5v\nP131WuOsQ2HJgsLHBi2qv4TIp0zUMJzaamk/z8L9xEHfOZTefJt17b/ku6pi\nAbGtKQ8eRnf9npuoAWrAyqFN8A5b/5jVeZbFSsRMYm2v8PdZ6Sd2jAQaOwKE\nqu+hkANUmSReiq31obiXQLOtxWOR3ln/dCDVJX219+LrF48AORme5juq8IRb\nvomMuCG/mbvoQvpu+R3CZeTkA9QboRSTJ1ZDxwUZoF9t5EhPtzTleOQoZIrK\nxut7zoS1zilruSY/fXAwscah3oV2WUMRrrA6/UStqCgBuk4FWsnPx+xYjoD0\nbGdJ+BPVnN8Rc6TGMva7D3n64OmKQFGlGQv1OYzIor5YjQsQfhZANyFElMRm\nKkrILCDdKamVHM31rfa9qubt/ouphKJZzKv07GWnWV6Lf96tO1fI7iSJ7PzT\nJHr1gWq4sw+kOQhKDHN4Hh+u3keNdMhXw1hwfAsvJTdBAg8lL76AY6iojSGA\nNCnwRa6VgQhvJFJiT/88PS2IBDaN+MkeE4mU5K2w3CQPnoeAiv1cuvWKH3wJ\naYOC\r\n=0nz6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f7f949a98e604fd4cce2507e8d63c145d2f34e55","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a2ad48839.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a2ad48839.0_1593544419894_0.1181116894758083","host":"s3://npm-registry-packages"}},"8.0.0-canary.ec2385881.0":{"name":"@material/auto-init","version":"8.0.0-canary.ec2385881.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ec2385881.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"366f4d66b16e5bd7d13a0573f90ab8a088496aa0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ec2385881.0.tgz","fileCount":14,"integrity":"sha512-KLqSm00GAHbpidmVoHe8PYS92BfEYWk4b38I+YTheF5Dr0UHr5SEMKndMRqyIKaxlIUYxmAJZrVN/tx/uHU0rg==","signatures":[{"sig":"MEYCIQCNlYK/kts7BB2RbJUtvRQl3kUwtCQu68ANFN2LqBcCIwIhAJCHUTQZ9Vlp1Gxq/OO8c4GiPl3u3i5AC/BGpdrmnojN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+7KnCRA9TVsSAnZWagAAu/QQAJ5WFyiVka7d2Nysg0Ri\nvK0KWfBFAiG+kuaaZWqVLmOe0mGQubbsigruPc6vNOCwCJQvwqt1oaPwplJp\nMO2tJ6L6QiNSgk8ua8CH1ES5kvwxnsmtxTBi6Vd/Xw9Ycz20tp0ka0eYYA8s\nG3Wt0WIOow81/FuTP2Os3MNE3JetIcpBTdN5B9HmDdOG0QGZ49JU1Nn0RLHy\nBM6Tbqfvv5ZyojPb1+2pWl4VEhRkODuSRMZ9BShxbnBbQJ9FnBk0ZrVboD8W\nLKEY9I6OZiD1F5E68I/gI/dZRZlyQ6s5zmoFvL4K1pYlMGil3Vm3ET+3+KoS\nx/8TXk6161BmtIQ+POGwshJXPLI1rwH9r5vuCKL3LK9uFpPNCoLVsPdJYyTg\njBvE3SXAT0FvPjvA9Q1pgTLa5G8UitL+Ct+ZdBF59QfE0gvpvccW9ZoA3Qub\n6h3M5ZgzGGFheXf6Jit6Ki9IXbr5CsUouVnGQUEMsjsfyhk5ojmiFrvIJ6k+\naUzjP2bA6Sv8XYG7SRJYFhmpPLJTV58RBj8zaS+gj4FoqV0ni6tHhqATlLrV\ndxg+4kEOJQl4Z0TA9IiylWWtX/gE8RSk5sMI1Tl23SctmREorGeY+MNEX3L7\nk6UOCGxj7X9aC+sV2RODQFz4FCaly700r3NXFZZjoCKTjQpCEZVm5FnLdwjY\nBT6D\r\n=MNaJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0039d314b5ff29856a2f17a5ede426f3f01c80bc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ec2385881.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ec2385881.0_1593553575480_0.3776075831015753","host":"s3://npm-registry-packages"}},"8.0.0-canary.610c26c4a.0":{"name":"@material/auto-init","version":"8.0.0-canary.610c26c4a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.610c26c4a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"67d48db4e2dc59b940f30ed0368693977a3c5730","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.610c26c4a.0.tgz","fileCount":14,"integrity":"sha512-cTiCyCvH5uBLQTxuGeOQBhFTUkLlJe44g5daZYbnJqxUsz5zo5eOLfs9LJ9NqJJ68Ky+iTZUNsOB4NB2/cOjdA==","signatures":[{"sig":"MEQCIGkur2gz0L0a5KCbNI/sjKsABSbcH+Q1aiHiZDWKxGzfAiAnLuFHDW5eFRcN8n6tbzEuPjVPR66ai/K6I2HdHbfIbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/KPdCRA9TVsSAnZWagAAh7UP+wdbtiIXNVsDktnoDPWP\nMPog5PVxE9/OHMOSW/tjIJcPZ6qkEXwyh0g47dIoQFGuXEyXmpQ5qfbcSctL\nyje/C0cIIBlcnuNcgOZdbr1W1TcBpOBAqNmPnciC9D2X0WjbAQ2KIweBNQ2i\n2493ck6ujjrST8spNZn5AcX8fXH618M1lCfONbuY8Bd1cBfs4bIDJsE/R6yS\nVb/tz8/NYzQXy66OpFLjyeciNpqEbLSclW5YV7lL5mG25fdHhSxltmG4w/Ve\nK2brBCcE7aUgdWBGWKHPr4gJ7YMjJNBlDC3cxl7zbgCONVreIAvKFk1zRm5m\n5QSowlncZPDWpkez4rKOBzvvqZeIZl8uXslkkk0XPWDKsJcTLa0Jtphen6FM\nXrLBj/TyZJzLOjLmEQ9SXu4lFsG9hDtyL1otctNzR7KXwLXWsZZtC611oD4O\nCoIJgUhrHHvYfZ8G7WfjAoOAq00WShGVoxoqhorwIVongUmEMh5VqOfWBExR\n4M2YPBjDT45nIOwYq4gOACCNPmzw9m4GgrX6pDhY+hYuhKucR1LYl2xNn/aT\nAthJPNrBdjpJFb85Tz7prN9nc2O8HwFkMVzrjNxRYvi0o8Hpt7BrfKgYwN/k\nYqzr73NI6u/sIAyeqQYUkmXcohWXBT85m+1UKDuC9TW1/qVc4Ff8vP3f5w7W\nIKdO\r\n=FEXV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"84352d6873c8f275f890267635fa416189f57a3a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.610c26c4a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.610c26c4a.0_1593615325553_0.3989154250462916","host":"s3://npm-registry-packages"}},"8.0.0-canary.e2ea4a99e.0":{"name":"@material/auto-init","version":"8.0.0-canary.e2ea4a99e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e2ea4a99e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c29d60576f2c1d8ffd6e155df4f839e669927932","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e2ea4a99e.0.tgz","fileCount":14,"integrity":"sha512-SkVyp4rpvYUnPrwuEpoFcJkgRbDbjN/TwCpjFJBBUhiMef+xZJr2r3rr1vnjodW04exGuBML7lXjmkj3MsldYw==","signatures":[{"sig":"MEYCIQCapCW9waSs6eH3IvINRW2N7og3dmeBHhHnEZ0HpP2MUgIhAMWC1YKJKZR4OwrK+WEvYmY1SAeXeSfF6o7PhWBYCjx6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/ONkCRA9TVsSAnZWagAAaOUP/2whGlQNwECglgCIhtgc\nMGFO47Z7lOPDLVuf77ERqhnnJUfysWp8pg67WSPdC9hCPgciyKj8FUDXAv/Y\nDpPDKuXJst3LKGCK+Xj37wAsXsv5MSmmtXLpztp14apez4rT4C3BQ1k5t0dQ\nTzmDomGQIs0b2P6XCu6L+QH2sEV40O7q7VxJICmI+QlUDgwv05YPhIqFeVU2\nuqrFDWVEFS3DHZshY358hvqNkPjXdg+OXl5+ARC9gaWkeLXsgxCskHpuSpvw\n998vU9iNa1Uow80wnuHiORjKayDKPHbr9JCsYoseQa01PBxUjgAUQ5R+wvFR\nMhHJ8g9Q7/f178u9rSMWCX3fyRotoxV5hg8UlnQwQk3Typ4Q+bcqz3PFfF3d\noSBbipiUMJGJvfCtgPtQM2oBlVTpj6D5BWZV96/fQ0SpLqxWLBYDs6Ifboma\n0O7fEKhBLWSgLs1Pg1/rYUT2ENGXuq85OULCXeJ4Ppb4KDbS4JXijsdTdjoj\nQxOoAK0n1n+Xyhy4bQzEw58jdBuMxRDiSorA3fB8n4t8/c1SO/H7nZgHZBzO\nt4Ln/343mNN4bWtZtU53wSWIgfgoZcjYfQnP+n/ApSIbtA24rFGVnTiSatVV\ncj9r51jQ0jZyZfuktafm4uqPq3gp8X3omSEPcAvAGzH22U1Gs3Cp5h1r0Non\nIY5R\r\n=lhOp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"42e9f40d91c643a9770e5a563a204c7f36196a3b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e2ea4a99e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e2ea4a99e.0_1593631588354_0.11513634770771475","host":"s3://npm-registry-packages"}},"8.0.0-canary.a78ceb112.0":{"name":"@material/auto-init","version":"8.0.0-canary.a78ceb112.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a78ceb112.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb5d9a5a4373480e29bd51bf064a2ede14edee21","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a78ceb112.0.tgz","fileCount":14,"integrity":"sha512-jJtVKcDbcikvd/V7wt8LDdq+6J2VeCHyHa4PqWC4EsBWF7+vrqKpDrC1aJXW7VDLfycuHjvHni+rORoTGAO3mA==","signatures":[{"sig":"MEUCIAztIgK7T1jrcMJftXVwpS6/eOU3x3O/KBNXZ8zgpgL8AiEA7KTOfpOmrBuV0Yd8YQaiOYEhS1MLtZhYnaBdSa0vnBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/OYnCRA9TVsSAnZWagAA3f8P/R0uP+/YVny96L4v+EdV\nC1ds4PfOuQxlLXlYzW3qlEtMDMUxDyNj2EamdIOw4nfktQe/Hk71PTwScWyP\nLETx8sbKP5pm+ec++0swLfDKm9Q4PyW6uRBelHZFY538GrZOFY/kyvwka6Cv\njEdEoUadbgcAKyFGKaksTioaYO9K4LaZ0+pvLccU07gCknqkGXCGd6z3xU72\nJ/L7rTU9ucgHj87wVOPkqlcWTqkJ61+dzA+h4AzTzafycI5a2O9YRmjy6pNQ\n5uJwW9CTAQipPuoWToGS0fnAUCYZteuzvYwMVyHiVbV8zDTolGJOEumoANxP\nKXW/n6oHImP75755WF0GnjvkXELCFnrLTpq0hO05PzuzejSGYG1KHtrXm03t\nczbIpFuu5YcXTN+C9QcVn/rwJ4lcVQDBSic8JZdaGbFHhR7SGW5Zg4fiGK+L\n8vVZM63dBwycUTjU8F6GPJXxvWicxln6MMdQ8gcUMNMsBZRDpooQJo1+zyKq\nNHQgn6KHOI2rMGkTO7GJ1QSOoVK/PGhOQLV698bQ/VSo96a6ZNP+xkG3jF3W\nnCMORe9f5mYYqduwp/E/dg/Xk4neqYWYMtXvEMmN4urBmRfeZKhccCRQa9AV\nOHEPiJ2bpgKqtlrn/1zxDHlziiI/0K4NZTBi9/k7jA8yxeweGY6Jq4DNxBEl\nPUrK\r\n=bubr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3a38e39f3d172dfa99254185d8b0d4c03dcc61e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a78ceb112.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a78ceb112.0_1593632295445_0.15931873305714817","host":"s3://npm-registry-packages"}},"8.0.0-canary.b0c456d33.0":{"name":"@material/auto-init","version":"8.0.0-canary.b0c456d33.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b0c456d33.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c319fab72ecae5e59359fb8defca4a9bf0495256","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b0c456d33.0.tgz","fileCount":14,"integrity":"sha512-4N5DkEXW6qtDuOFZ5ldT+khQtCd7YAxhAToTfpYeILp45uDkQedaNdvFO0QS2sgB9maDQHzxpWY3wGjAGaJERQ==","signatures":[{"sig":"MEUCIQCUc0cjf5YSb3AK31GgigYMlT7ywqvGdHiA+Nv+lMaOugIgPNmRTWOGnDoqGvQcq4yNB4oEdNED94tG/4d8eURYmZY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA6heCRA9TVsSAnZWagAA6DcP/27LIqlTQJGidasCXoFp\nwG1zUh/+dExSmlSlRilkSK9LHJny80SfrtK5kinU87I4xEIRdJqLiHy5U/j6\n1J5Hpy3Tzn6BPDgeNMaTDPWk81M4Mrm2XrA3k208e9mSmFMBGiZ368/kpVnF\ntM60GdCI0bkJVJ4fVKiTVfIkWogCoH8E1Fg94aqQYVNb1EH14ZCIdHcqY1rx\nu49YMf66WBICBG2wT7mABPYn1qrXX0QWtygO+s0Upeq+Wr8+9wTCA0JwMa19\n8gAlzfqQ9SRDjRLMqp0249GnwYObrP1HkGyPId+KyCMiLZNrW8Lpz75lBsy4\nvgz/Z1PIXG/tezkMbZTPh9upigzIm9xliYDMsZfkCJXMmgqbrDyz6mffqa4e\nWLi5zazTqV9yM5t6ltXCQPpsAgq7Z/igxkEhEK0ySYu3MOSGvH3OnrqjBt2r\n0KGvJ5R2GY41jeUzP8YYlSNwfH0Os+kWdEGJVxmGvdNSdgDeiyT4UdPEJOjr\nRgAMalAQXOP+Ydd0D6C/V3BLrf7yA19rcsYhBGVaqTV/Xo+iSPIw1BS8jf2N\n2qoNE5UwpchnvNHFU4bGKhz5HRwJv/XWEdTvriVIXYjVX3CIyPoEz/VVtH2J\n5UpBdz93s+4BbO7AsfvNcLZdbe1I+Na8raH5ZpeclwYTigN/vzIvEI2NeDb2\nqqxc\r\n=8Kkj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9a540f1489e069a2e5cd262f5daabc034039d2a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b0c456d33.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b0c456d33.0_1594075230121_0.8030964362432982","host":"s3://npm-registry-packages"}},"8.0.0-canary.2e5711e04.0":{"name":"@material/auto-init","version":"8.0.0-canary.2e5711e04.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2e5711e04.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dec8dad5946ea9e6242552543321e7c4a40daada","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2e5711e04.0.tgz","fileCount":14,"integrity":"sha512-tPrp170NQKLb7K12Z2Qxhqcwlg1/Z7bPKp9MOfoxPtqPKB2nXkSoAMl9wIzl4Qq6KjJxrf+hGas0bj7nzeGDZg==","signatures":[{"sig":"MEYCIQCKv8pkc8+FJVj9aVGdamVw9CjJnmp1Fe0Piq/nQKK6ZAIhAKoZcFChj3O5DseMuRBvJHQvZjXHTGmv5rr7vemz5K2O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBfiUCRA9TVsSAnZWagAA9CAP/32vxrBrLRXuSNlZsE6f\nvv7lOOFXSJOrlh3axIFCSQ8G/59VRmDq9dnhuN/5ebBZfWiuzlGMJ1619VJt\niAk3bfAC4TLs42eEuC+DPWWGlVGG4iNQDoe7ST3ngi4GUgWF0QG3kTB03gxZ\nEm/SdQOR2/ukGBPqK0GG5mGnwiX1VVXBMBUTZdsQ/MKmlFdvPtHBRrduInlE\n+y1Cg3wAlv+YMWIdo7a35d1LW0gqzUTdFClDlvdJ3cvzl8xfAQr9/cqDLHqe\nCZDslGap3oh1rFejuT7anUqiQtT3jsoibDEQB2DdTlFcj4qdNDxdEBkSd4KQ\nV4jVDkcrriKggNSbyiEp0pXWp41HH+Cl28or4fN6kk2FTPFNYMQWnoJMNzvN\nL3IqAvLX8jwMJSrMdqYczYIaD3I1Szes7KV2GNp7dsAz5NNwY+n5/zBc27x5\n1SwLYX34NCjVcGO23+YQ+Jg58W5WKRHD6vBccKpzHgqhCb3wZFMQ/QN1VwWV\nGgAbEoY4jyzj4QHF942FtoghzEGWFUGswC86eoP2yk3l+0BVynjYIXgeWZV2\nYMi6vH1RgdXjHxm3QYAh7GCfWgsrOGo1q95PdhXY5RJPJZK4aYewCofIfPkf\ncdj8nY/iFYr+OnR+NrrcjtoaEv8NpASD7tdAnPiDJr1gV4MnjXdsNZ9z8mPp\nUacC\r\n=Im1y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4786b99e99bbd4c7b7f10a9111b884c165f1bc7d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2e5711e04.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2e5711e04.0_1594226836159_0.6084215566440037","host":"s3://npm-registry-packages"}},"8.0.0-canary.811fc5d24.0":{"name":"@material/auto-init","version":"8.0.0-canary.811fc5d24.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.811fc5d24.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"451187c6c6bbbe231c7ceb96cb31a23c8e91a978","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.811fc5d24.0.tgz","fileCount":14,"integrity":"sha512-1/QNqglc1vijEZcIFu3Uwit29Pr1v+z3xFXT4W4ymPYZR8ds/8Ary0jBdDPC9F9MM+96lySm0hWHlHwN1uRnxA==","signatures":[{"sig":"MEQCIGrOADsHkdcg4xlvdt5KTfHklPRyFEhVtXY5vIoDlRvaAiAoVSkBg/5owGv4ZrrYltjRrcmjG2qpN1KRPVOik9uXnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBf8dCRA9TVsSAnZWagAApCIP/3UOuKLDMCY6tvMxD3Vl\nd8mz3Y81mRr+2cndRTJ+i8uFN8a2w3ob/GhaYDc7iDn7hsidHTfn79jQ6Mb4\nRdxkyky+9OwmfWzK5z15tRFL3JaVmLbeK3IPBgqbnqTXx1CcysmtgiQq3Not\nEsGtKnlPCJ86ljzr39guXiFAYXQdOAS8KQtpeNh0onQhFO0kbfdUdC0+yJVL\nRZzXdn1PQipghgvNMTL+nWNI48BMRBvWQZzmMGLoTacggkxFLpC0LNGQUcA5\ncMTspGgQ/9dnj4kw6Mejt3tdV9jqNdOF0fxZOvBpz2RN57oc1esPKnOy34/M\nnXI3OpSuV/DkiA/XBxPaFwoOwuz/3vRWCYKJi5LFcZuMmNPwnaxvSER2W3cy\nMtgIt3ApYh5J/VuXYB+upippiKkmLAdidBSWeCnuYwtRzN0O52M1lqxVrBWc\nlMBdAu2RPVDy18pF2CdNqk6Ihm0L/EfydRIMmLEgotNNALU2cxvaQ9YoXOIw\nBJgKiteBcBY/R/7J0nt2AEMAoFGiBlpVOgyHY8sJNbL4iSuD1+2v4t9MKKuH\nb1y738IZniMbzrUaYJGYHaAC6kJnTud84JiYIeOd4efgnt8FH6TcJSa78A6I\nX78uJ/g6PzqbBkRWvyEsEiY2Lc5GnpM9emhKCuKDv1DACWzv944xmUktD5RE\nJgv/\r\n=KYrD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d1a1abefb8800a6dcc0cb20f74923403ee1ca66d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.811fc5d24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.811fc5d24.0_1594228509191_0.5647318187798571","host":"s3://npm-registry-packages"}},"8.0.0-canary.6ed717ddd.0":{"name":"@material/auto-init","version":"8.0.0-canary.6ed717ddd.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.6ed717ddd.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2ae7a24314e0699d3ef7ff52bde44394d5d62f63","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.6ed717ddd.0.tgz","fileCount":14,"integrity":"sha512-ZEO9I5WGgcBs1IjRTDHhDyp0Kv8TZ4JmYEfEDQo4O3HcJU1hvMlnY09Qw5ZTQIPbmJ8sRfEEKb3QmWBtT2hmXQ==","signatures":[{"sig":"MEUCIFBeOnCe9/SUb330JSo1aM0SQUT5Aathu1lkn5YJ/nB9AiEAlukSEi4KZR9KFil0nkpyS5oKisNOwzrVRLU6mZF4FaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBiHbCRA9TVsSAnZWagAAzeUP/3yg/IyF3eEz1OjZ/Ifb\nqPGBKATQdG+wGrYoucUWX9dHMr1iocDtud0m0hh547PTg5jHEKz0ZflH0YuE\nMsWqWbLqosnQpkU05AUo+8BJX6XIT8R+BTiMnKrVRi3vMVlAkhkaa1VibEJ9\n4MkdutB8WGrJvPUqFVznEDIgNxYf2K0seXQT5oadLg+MM4vswLNiErro0uqQ\nw6yVuNVbQOZT2oVDJhNwJziJP/ZeAgNimtE65eQluoFbTdXRLj/t5Evnv8z3\niBtdUAGmkcNljvVbupvApttku6onSieXwe7aMg24HDLgl/rqJJ4lf1v4dQAm\niYzRrycQkFJF4IccAQH3II+6R43soHOZKMvY/pzmTS20HLy2TG3PD8BYfYXD\nICB4eIsg8DXVOTsIQLFPiFZqNXVkFB/nc0BkK8VMFN09il8ZXa6zDvvjUaZL\n9Ba4pJCnlT8Mb5EEpBsDAPEre/NF2ipK2PpywRoLDpFbfTvX5FB6W7aoaRdM\npqIQoYz4xRhY2DMF5xqYG/DsTyB7B5QZoeVYYgBg4No6qLRIL+xZBo8aybUX\ndtlHNVp7dxkjrGxSKisrs/3uwZFfvKlKC+97TzVuimjmVtLqDI4tAsiCB1WJ\nGNWUSEBwo7bkTMlCHR60yrHVkm5s23t4ffoWw+8X2fe0zcahE3rdgYaqetrm\nobcj\r\n=VBx+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c9c6df731e0edf42938b11082973eba27e870e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.6ed717ddd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.6ed717ddd.0_1594237402903_0.4813738615573879","host":"s3://npm-registry-packages"}},"8.0.0-canary.d850de590.0":{"name":"@material/auto-init","version":"8.0.0-canary.d850de590.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d850de590.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"243eac4f33ff9f74c9e4f067644324b4ce62b1bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d850de590.0.tgz","fileCount":14,"integrity":"sha512-3VAsmWIUivNz7RDw9KJ4ZG6FIqAHZ4/wNSnqlUs6wvtlOHWj8TKZDqq5pYd42oLyG3VAmvRV8dY4JBfTv6iyhQ==","signatures":[{"sig":"MEQCH3GOSZqHo0WrOIYDFAc+0N/8p52XfL6BMGUNgkGXAk0CIQC4yYIcn0xwntQIRrsl7qxwiTXTu5w/aihQ0Bg7ThmwaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB1xACRA9TVsSAnZWagAAzJwP/j4DCIHbVK7uqulqKGMh\nDefNr8S1i29dOs+nlK9QnKaeshyaJHdjsLOz2pVt6I9UG8FrehRrcdvo7oMy\nvLfQG9JR4fNsfbI2bPf+1vnnV5ou6a8nlKU4pOXm3ImF1f3KncQSXh4yBMeO\n5IRu5bXLpJTTkee7/ILRVcS8KXjjYPB9nHSEYtGFzF6KmJYJPWIm6qMlMP7w\n+hs3jPTHVpe70JdKjqHAmyVSvSFzOVlik0DGXrRqJ290bIfkNgsxamEaMZFI\nNIElVLKrwa6gL6x5IAf9mwohJSaRiNtdLZdpbmy3DbmPwqgLSDrXvLsASb1V\n8j3df3dMRKUMGmR/Ciz/HZjXhA+1oork/0v6eZthpiNvg5p+8k5IlYtOOn8N\n8nCJyq5M6/+1s/X8MBr61cozer4XqZLonkZO+fEOyN9TJ7hmi9QPrXtnUVfN\n1zRkdAolqiNGCc/nOyQPwWuQvQiJ1Ghw4/RJpjqcYA3wJUb/OGeD6WkxU3Xd\nDWsAnxLSVd3DMITqxanRI0DyWl/oiy9FfNihhWqxTfrpcideBYHyaaoFnBSd\n/z/8Z53KPhOgg9pzev+OiaKFse/7vkM3v2hFoqMH02aGBjZZEvRyiJvFnO6l\n1jIVpXp8WM2+wUSsUaloxq2a3/TMO4SHyWb/170DsU7wSWM7YqMhhFyQswnF\n2VVW\r\n=VGef\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85039ad97bde95db4d57918266320d54c581a680","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d850de590.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d850de590.0_1594317888189_0.40523878923105605","host":"s3://npm-registry-packages"}},"8.0.0-canary.e07a70841.0":{"name":"@material/auto-init","version":"8.0.0-canary.e07a70841.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e07a70841.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"adfade54203b3253c6dc42f7f7aee2b04d58e724","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e07a70841.0.tgz","fileCount":14,"integrity":"sha512-9V8jPK0mCu12DOgxOECf8dsaYSaMmKgXgU9ms7tkRgA9es5XGTPbyrwSdm+imDMYlDU/yKJWlQdLZ0n9qF0/Ww==","signatures":[{"sig":"MEYCIQCCJSVygcivHkksgmNbBIkVILh6F+0DC4qm2L0JWN8RKAIhAJtB5IPGG2VOkhwWhq33ww1xK2RDGFYalJo8rp7bdbuR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB2M/CRA9TVsSAnZWagAAy5IP/0BvLzOmHLW31Lap5TGt\nj1Ofz2L2YToVmjl7yWTz4YDOiZYwn8ya3KLouDOOb53tyGwgLguK+wrLX29L\n6JsQ4k0P+UluzFkeplwhV+6c6ShelLBTJ+fy8luQ+GkqOwIK/qQFX8ODRrXR\nYunhF5cGcpY5OQ145/YOD7iDW8GQN9MNz3RXtKW/AekVO9HMCZHe46WyUczp\n4Kjs9gmzCaQEFNlvmpZ3S72fIVeRbMlINhQn9FfzAugOxwWt7tcEgwoiRJZW\ncj70/wQamjBtZpoql/mcbgI6aU93o4roR+6ohqKQyN6tWYJqmg+Ep6GpsNa8\nJXBGi5wp2EbZ02aAEs/2RFafhnpUxSchCypya9W9DjHx7QHcvuGBM3zvPYmU\nhSQEtFZOPE4pjZOeOfX1WnKGicEMXTbKfr20U7AWNYJL7AW64QLp9juhfEVM\n5V7LP4FdjO5dxtB+VC2vgcriYnv5ukrBpqc2bXujLHC0cCU0fCjGLk71FMDp\ngAr3D1rCsKemlR23sX/CT3TFN1W8LiiOsaOeL9IrlTDStLcUZ2csyPrnayzk\nna5QAsZRcO/oOJk23IQvaB6M9LAh5szTWITNOjTVQjSS2H7b9moPRyjXsxiV\np+JIiF64jzl3k25ESnJg0yPup8tRrJQT/OctLVE/z6xOzG/tLEbFjwWb5h+N\niecg\r\n=jk1e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"105e9fd32899b2c9a4309baf6e879287104cc0e9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e07a70841.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e07a70841.0_1594319678625_0.6307608438310872","host":"s3://npm-registry-packages"}},"8.0.0-canary.37947ed6c.0":{"name":"@material/auto-init","version":"8.0.0-canary.37947ed6c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.37947ed6c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aa7c973a484407061d655c368b0e651daea351b9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.37947ed6c.0.tgz","fileCount":14,"integrity":"sha512-mBM8X+r35lALNrU+Uoenqibc9LxUaecUMWmvxOjGMhjPydN0Mix3WybOhrj/7FajMuw07wVXI9L2DXTYoEoCMw==","signatures":[{"sig":"MEQCIGPK/WFTs1UtFFkc2Utr7zfBpmq2i2mm8UsNxmUbAtqLAiAmf45V/bt11XPlkhorbkfeAekmbKQZWgG9Fs2UO48yFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB3+ECRA9TVsSAnZWagAAom0P+gOPmuUIO+T9KNR6ArFo\n/hpw1wjo5fwTJJdonYj5tuoxC4Bq+hWyCF7iFGwvdVazfq+znLW5eVcs1iGe\nw2QUXoK0nOU1baAxrjG5oVX7qKWLrKhDozHMBx8Q0uajUPOuPo5koTOebrBr\nQVR89qBQJMFew3huePfK90j16fGQ04bET/8sTX55r8CPRN79Eul2YgNUytkA\nKmVg7G7pZ4WIB/zvAkX+aYBz8ovTYdc7fPL85d8CONB1XZr17p6ou+U6sxe5\nijxJ5M0+TXx+Fr9L/Vz4GA+CndA1VAUkOBoDyjH5Vsj6NVuTQVqASNyiGE7m\nClov986zKNDcBEsWDqiZraIpcFQA0OeiruAazWFCeaZGS3VO/+QRhYp8cBKL\njwtFL/uXBSHm7CN9If3g5I4Se4xyC9lHHKFs1sQtcXg4ZtqCzkETKTCF1JMG\ngLjEZpWqqaQGbKkkjwgOcwUWdxwNRJqSf7gSVzaMzZAsOPxIYT52EyRe+1nR\nGvolPoJT481e3MvDvDh/DjL8m9F2Lx3u7d+/nsF8XuHIWLzP1lIkxWyNk7Cj\nDlb3NARCPEKR7YGRDK3RosjLU443kWQINSqlSRBBWnB9Yz6GYQH+tgqdUPc8\njgbZNM+zLZxbN9hfzh01QuYTGhwtCbjwSI6tZRLvVS//CdcDOzeeZ8yWe6lv\nDBgZ\r\n=74JI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"80c4a00e688d5a2b1a35ee55744d879b782effed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.37947ed6c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.37947ed6c.0_1594326916309_0.42257724151645193","host":"s3://npm-registry-packages"}},"8.0.0-canary.5d443afec.0":{"name":"@material/auto-init","version":"8.0.0-canary.5d443afec.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5d443afec.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3bd844ea7faa7325d9e529900427dabd4dd14713","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5d443afec.0.tgz","fileCount":14,"integrity":"sha512-p2ROETwfIPxu7FJ0LeXdYsew3fzZIYmwv9KOC/T/zLcxxpX3VM+Tthyeen3cwREX55iA0TAQuauVLs96jlunPQ==","signatures":[{"sig":"MEUCIAxEOcbZA2CImj9dyYvIlEernnpUWzDjBm7rgi5GQmeKAiEA5uWhTZbYQL1B59uOICB/aA0ipyPL45L4TBHfozKOz5w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB4M8CRA9TVsSAnZWagAA3KEP/0ZxB3NwINzpPmANTXW1\nLDYyfFNzRFHbO1b/W+UajwMkk7kI9zUoU8SCvV/Onq5uCIAy7zfaErMTF5HX\n7hNoR13RH+8tI8lTfGthEmbEjJm8e5WHTiL6FgPA4OFked6b772TieFzBA6m\n7f1QmkqL9weyUKFu7qhdMQr2A9qecUbk/3qKIjVZmOK/q5uf60wavxXcEM3K\nD6XEq9dntyS/Pkj2HLRnrGyrEwQaIh/bpAUoQZGrC99rNcJtcMeF6RJLClmP\nPCKucSaQDm+eiASj4vIbsS+Dgnidu30I0upjoDFxkKN9jhaQYcRV6scMszER\nQqRAZtZx25Fc38CL9UkAX1NRokBe1GKMo+v3gAzJ/uuDQSePendaxDtHlWT4\nHhl5Fb/b73vuvWVUx8GwGVna9CwpOsgJ+Lo7EQ39YWBkXhgj8aSUQmuwzjFX\nXHvTKo0Es2/F7EYakPcFtycfHrWxwxRS5b5befxoFGGS4RoHGOoTYQC0zzMN\nHFvVV3NkGSHm68e2k/fK+bz2UTDrDSu81ZoJgjetgGYzw/g0I64kjOAAYtqY\nSWWwIMfxQ7yZPGjfUW3BUxLNLwrrdMRoMbD9jMNJ9jrnR/VD0MObKPH9HeLU\nCCskUoQpjvr6AceUsjocnWQ23SDE2VOvBNBTvc4iV4wbocfOHKUA9lOXyYCA\nvGri\r\n=IuZA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5c493d15f89898617c3127c53145bc51e8e60930","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5d443afec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5d443afec.0_1594327867822_0.040384324575243546","host":"s3://npm-registry-packages"}},"8.0.0-canary.9ac1ed914.0":{"name":"@material/auto-init","version":"8.0.0-canary.9ac1ed914.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.9ac1ed914.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"932a469c3a4dee24fbeba6ea9598b36de2224720","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.9ac1ed914.0.tgz","fileCount":14,"integrity":"sha512-thEFwtnESDPMFtXNn2ehMVvBjoFrbIAb0xBbbEFIqcPU5ejo0QFYSKRVViMZT0cS5T7f0TRBCZD2BafHGoUlwA==","signatures":[{"sig":"MEUCIEwFpPmg480u2ruzUs/q3jvi49yvG+t+AsTH88Fb3wAuAiEAoBLuk5yvDP0X2PWSzKxed+dwbwp1rmMnFsdEuKVisbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB4oCCRA9TVsSAnZWagAAJMUP/29FbPujGoiiDQ5a53Mq\n5hngAF5XMvJWUsQYPEExn8UuqR4gRwLGgzZPbzqEv/HKPZQkvMOK0viUarVp\nF2l/OhL2q/f734CkpfhH35rZfKhYIWfxxitz8jPLPqxa7QsUmqDIiO9DvwWb\n7+Tuxy78UM6eskDiwtd4mEO9vkVUAG8OBrpM6TlIgwGMz5EUWuCNoeDTug88\nhnrJNd2akFh8AWxAFphuKd62tb2SYcM8r2gW0VVVbXXujFyo0V7vWBSdt0j8\nx6IHQT+kpnHjwCXbvX6cGYwcYSkfTzY8Wc20q/FGI+ms/u8nVtwQQSdRLvBl\nzuCUAj042birVG7WscQOI3bDoOYkcx7wy6HL+pUi0EiQLYacile3coNV72Lb\nvucdYP8MuQkA8l21nYwmE1NcUMNPXsdc1DkhHGQrtrLPsU9N+oJgTuT+uPaf\n5gNuauJJkkp7LtHs6f2mHltqnUc4YnFGYCpBduy92leL9bK8H2a2dflGqxly\nW/zWrOhAo7eFnraJVvBdmfN81v0BIvmM/ujSDlRYVkxb5L53BzOnxZCsTgbq\n7ley5X2kCBFzrjjhFG7mce1ktniDa/xyPfsUXlS6oohEOGg7v5RgHB7hvKD7\nPWKf0wC5N/6BPHySPZqSZJapbqvfGqiQyozk6lDHzV1NgKYVfN91C+p+OarY\nktBK\r\n=mGCa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c08d3c600bb022db1bcb4efe520bed724e653a77","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.9ac1ed914.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.9ac1ed914.0_1594329601816_0.4805909500363079","host":"s3://npm-registry-packages"}},"8.0.0-canary.1e7cb6198.0":{"name":"@material/auto-init","version":"8.0.0-canary.1e7cb6198.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.1e7cb6198.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a9ebe6315572fad3af2a71168f0245f56c703233","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.1e7cb6198.0.tgz","fileCount":14,"integrity":"sha512-uNz9PrO2YxkqJOtg9GQ7zQMv79OhMIOgoTooo5DxTxdMq5oY/JlQlxV26zCV0Pm+zjrTRB6XF4kPfG862VgNXw==","signatures":[{"sig":"MEYCIQCTjZXO64BEb8gK7ZYCosUm74/UXLudBKIuIs3zKy3bpgIhAOO6mz0YjBzqC74JrCMvbvzu1EMM5lFvul9LdZcGp6tP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB5YYCRA9TVsSAnZWagAAV4gP/0q5caMYKVrrt8z6+t71\n3YW/0TxUj8iB5+UR46M7nxsTLLHdvwygy8nIi+Hb1gPfBJdxqd8dsrp83Cah\nj0TU+Y5+W/eHm21mBhX2+eGW7+pHiwCOAto7s7eIFIeVrifUfN3YnLDeidJT\n4PZJetMRkCLlYdd+GWCmO37ZC0ci52CcgEyVA7qrSW/SlyYBjhnmgWwGBMda\nLIWpMoWTenc2+buND7RzOW+KQupj2t28VUMqPBgUHM58gc1CU+lPsUkju+Dm\nhnfXVjgG/g9hr87hKHkbM9PLEarjIoe1ODfVdRtmJX7lfwh/ufe8eeZZTJuC\nYD3ItEQoRwKYS+jvCnMbLIzrPulFhEAInlVemdK8pFL3g+y2QTRUI+GwndsE\n2Nt5ei3avJRSf1TFXabXTyNUDJEAf39Sq/fsvG8ToCy5ABqHKmYNX6y0r8VU\njRGt6Dd49WMKG6Z5jDZ6kXpRe2zhwwSidyV1OJfv/pLv9M3QiO/l5E0vya6V\nGb8VmseCNQp5xnIWUcsKgmKOn4OZ/8viSXHv3D48RbQ0OC3tg/zaan2Ok6c6\nF+O9HVCsSE3Wa39A92NqYC5ypHQE7tWfpNLY5k0NwQR5G4WZMIx4EOXAaDgk\nsJkgON5O28jquD42SqzZYcSJ8IHqqIijbWj2FgMuBHQPVMSy2/3sEYsO7O4w\nin7r\r\n=DCcL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cbdbb55d01ed2f63aeafe8d77fffd1da5fcfc011","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.1e7cb6198.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.1e7cb6198.0_1594332696449_0.35697258250001584","host":"s3://npm-registry-packages"}},"8.0.0-canary.843f636c0.0":{"name":"@material/auto-init","version":"8.0.0-canary.843f636c0.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.843f636c0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85473184adfcc6ee1b19a631b0ad8c1054eed27b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.843f636c0.0.tgz","fileCount":14,"integrity":"sha512-ZhMTP6AtivhARyVPccrJ6dVPmC+VkWGRQ96nPdLCp85DXO8idgMztO+5x6QLeIbBljihJLbb+wnHmMA7wfTiSg==","signatures":[{"sig":"MEUCIQC3dRO9K1EIf2SU2g5uzsesSc8zrlW5hs5qATQHAW9hrQIgDQclLDvZJP4B2AsJ/XbJJbYw65CsPkQ+zKhEtvZ+bFo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCKhnCRA9TVsSAnZWagAAPvcP/idLdugFLVXm8U0gfbIs\n12D5fxYJowqtNkzY6ncyKjU1MZzdgVsYYUTAXAU3HEJA33qMSw6vcsPIpm1g\nvvBKWvzQ3RrwYnWI5ym5iru/SuB46xrHS+hN6xU2YyvzPgkvpwjceYv/QHSk\nNRtcUG+yTDrJ8XHzs94CiH8GVqT4SPe/MiImjussvjvVCLjIo62EsPD6oCg3\nFzvKGuko49YgwnYYcRadoOpTibG67V2zsjU2+GyEwfYMGh5hxLrLrqtBGLur\nx5i56iGUQJrbNlysC+9n2INUoo0TnzUbzQ2z9VJ2nSrzeI/Hkpbj28X+908O\naIBEpJZ4VDGnwIDv/dthFa/m1BGo24xzVr4YxbzfUQlcKxYWv9KJ6GesT5rV\nRH73wZYCM6tqg6qhiTNJ5Yv9xp0L0P6+QpcpOV42QM1uvAHJ0FZ9elZ0o0Xb\ndAyGagwx+1HYUkReETXaxVh9UMy8JqEhV72XTnhqI8JkJ/L0oJ5Q6kRkqF3A\nImevEVEFvdvIorTxflDI6eHM2RhPEuIk1SZaQGLNL8Crsl6UoihBrYofDpOc\nkqZ3CZQ8sgEhLYF5OYv2Nlh6jP0qX31jD55E4dtG/DJKKkp/NBTewbz8JlJl\nyuTjvrpQPB1etfCNEXMDQYEohpjnyD/dl39n3oFpJQUFSTaiEbOlUIZ743u/\n7fK+\r\n=UcLl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"641b40da40cd73b439cefa7fa18c86bfdf31e497","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.843f636c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.843f636c0.0_1594402919233_0.2671405740415915","host":"s3://npm-registry-packages"}},"8.0.0-canary.b2edaeead.0":{"name":"@material/auto-init","version":"8.0.0-canary.b2edaeead.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b2edaeead.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3bc3e5ce7475d547adb19a6e2482bc5ad543e798","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b2edaeead.0.tgz","fileCount":14,"integrity":"sha512-iV5/0afscGEi+edAkJQIHNNTt6a2H1FokZjHlDHqR2o/YzgeC2AAgSF/6akWYXnZ7VVZ3vTfqTkrIf3DWZ9J8w==","signatures":[{"sig":"MEQCIAtXn+YQsjhQp8gZRoUN9Uox072mdPAhbzxnHxa0+rvRAiAb0yI6uTtL+/Yd8fo3of8unGlKzK0usSL4pm3BhtEjwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCK4oCRA9TVsSAnZWagAAegQP/ivCs84Ibh1Zg3Ubk3TN\nW0dJwGfoTdo2F1OIu3QXfVae9ISdJrVhANxPPAkSLhq27CWgbCPWFIY9c8S+\n5iKrWKlLkDZ5v+XHeggIDrajrezEEWAlt+rTn9oNULsJtypVP9a8JKmdtCYq\n+Re4Vk6mzBeN3Z17S6aBqRmnmhDawOc19SAYqHa+ff+qnvx9KCyrd3Pvb3+y\neh/kSUqwgnahd7VGrOlhhM/d+bAAnPye6ECvCsgInvwwMvr95WpO0AmHMj8v\ntu7oigFxAJgCUdAD9wyZqaQxmAV6iPr+ttGE8L8v+1s9MwADiQ6NfSceaIpm\nHn/6eVH5gUyNauTfm6ROyNvPMKncloxNSlQzRFbMlRlcRxWmQwpZgBDaxMQJ\nJJ1sTZqbmJUDVzqEwG13x92crfgjBd7VlxrDPe/SEuUF7PNdsDd/ryPvPo/5\nW5DFuvdC7Z/5mhW950jnhCW98V40bZNDO/nGflwxw3ylY/Mard8Xbl+temNh\nHdf4Gf3LEoO6jQsN5Doib85n8ERM51VCPd2zA/cng14BZJf1oNSoL0qUy/yR\nou9dXyCkIfxzRinXYxMPAFI4fTzqnC+w7s6H5mxGlhVXthENM0r0ReYFL9+T\nuBZvAXd4Tqemi5QG/i/aPl4OleH8TuTv1ZqHqqoB4sWmcSS9IkcyqLrBZZEn\niEwC\r\n=Hbwj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"874d83aed6fef221001b68d44bfceb30072cc18c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b2edaeead.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b2edaeead.0_1594404391787_0.5582322392594439","host":"s3://npm-registry-packages"}},"8.0.0-canary.5dac1f624.0":{"name":"@material/auto-init","version":"8.0.0-canary.5dac1f624.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5dac1f624.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3bf3bcbba515742c64fb92fb44e38cb7340c7aef","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5dac1f624.0.tgz","fileCount":14,"integrity":"sha512-ChDtjhUPkXLmnpOhpqnsMfz9sonM8kaPdEgaL/gElE2Nub2oEtYMED/odDHqnfp07vNY9EXjgCG/jT55+fc+bg==","signatures":[{"sig":"MEUCIEw56lxQf57V/72j8+9r3Ywg6nb2uIAsQoNPHUqQt0i9AiEA6L42qBYtsmf+NLvDcoBRbY5oKaO/5L462CECtCowoqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDIziCRA9TVsSAnZWagAAahQP/jc3D/B/u2ST8o/zGJQ8\ndizD2F2p2IMsBdqDtySAvz4woksTwo6Z5Hs7n/3zXJE+Xk/qwqHpNnoepkUm\nbmjB0L6BLmPJEB49VdKiFFtdvoMDdmPdtD92wbCneC/AraZt+mUcgInfiIGT\nVcQQdZnPOA655XSG+m+jdbqgCgzp4fzjpKGTsMOwvMEb/hSf7CDUdmWLI75M\nwHiF2P5bSBn7uQzRafA1H/84fPU1YXn/9yzKmJ99DpgT3033hvPaA6CvhrJP\n1YhonDI6KwiLYgrccZ0tA5aHYHppJLuIFi3Hw34D2Ennf1XhSvVqpzJZdTR1\nlVxh850jXIxHw1IuSxutxF+sUO2bxe5b9+ttAU/H6qxLR9LgC/tRSz0d/t7P\n8pW/VRaCquq5BX28dLXFmaL6nnjzNX8+Ls5xmhTZRpuXQVBx9DjU92sRNCXa\n+8jFlyLNYKHYNYFYgCWiFqCjF8PIP4sU5Fj3tkpN6OvfleUsVOpMlJDBN8kT\n3faJT8WbVo+BKghhzdaBXeeQeJ7D/CESXLfMSDqNLvueGWcSt8q+kpKZX6Qc\nP/tYZjc9cV7RIlnh6UXoSWBvcej54utL7yeM21+pG3yWFEGHCgg4YfETPlIL\nDCA+AWmQz/RPbxP1hdhtwjBq2yRmgIbA9OHOZucyO4piUoRnvBsqeZPvPeDJ\nBm3u\r\n=HyQs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3acf16b30fe876c0d319f5d1681d177bd0089cbd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5dac1f624.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5dac1f624.0_1594658018539_0.4695069841976369","host":"s3://npm-registry-packages"}},"8.0.0-canary.4497acef8.0":{"name":"@material/auto-init","version":"8.0.0-canary.4497acef8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4497acef8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6944757a9c7461de82845c8b4824595c6607f882","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4497acef8.0.tgz","fileCount":14,"integrity":"sha512-GHBtyygaFc71eIVwJXQXiUwfjZAaC1FkWtXstkEgdwHsR5i7v4aqnVmG6SOXgZ7+o1BBWKHhUuwTTVwpeNDH5w==","signatures":[{"sig":"MEUCIQDxJ9AWZBfOaglbKvAALrXUcB/l27fjKS1p7BhHP6wMQQIgC0vVwokPDvKgDHr6fDbj90kso8c02bmF0SYos+H1QKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDb7mCRA9TVsSAnZWagAA1MgP/0IbaPvMeKq2EEY9NUs3\nc9QTHlpDgaEM2wqbFHR9Dsy6P2odLvNnGr7AKnV3B1cGnGR5xfF+tl7ozSvd\nkLuD4EMM8LbnFbEZ0wHegoSqvDyjf0ypjkplUS4OXNy6Zj0NZgZa4pkWO/Br\nNufWaUgCTT8zWMkHuHZfnEdQpKYOCgeIJYV1Cven2J5vZJbYOs/bSZBZ05aw\nj98dumChNfJXv1GZ+NCe66rXgQWsEmugrpAztxX79KEVvltzIqOsAq1nZr6W\nuEsocfLBxrnCGzZrv/OKQUi0+efOiwTD1BcBYK89ULRnkpl7APTFVKOg8KfK\nDd2GNmtsQpVxuK1zx8yl8eM98l4bBveLT/f8ge5yUm1pV3APfNZ/5D3zAOFU\n+MzidRtGotQTp5qEZgHC9jLMP6f8Mi90/4O/K6fLoPz1beZP0W30d/A3u6kg\nJhQvLoqmGdSZkaJHJLKa9d4wZPjEan6o43OXoPuQx0VcB1+4kEJY8Rz6Ze+F\n3yiqnGQOtEeMPFhZPkF0U+vQLS4UAolhNDqK9OvObRijx1CLX1UYcOpj4fLb\nIyuSxLEcqTWwph6wm/I6QOokDO2A7S2eRCNFdSrnkeXUVQaOfpUIuLIOXufM\n5vjbggT6bujvV7m1QKZvnYFmVAohTnYWMJJVdHIGc1pdXd2WZiqlrTEt4mWc\nnstu\r\n=hipP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc90b63c1737c63427815af4f6de59841a57a1bb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4497acef8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4497acef8.0_1594736358069_0.47340542642589667","host":"s3://npm-registry-packages"}},"8.0.0-canary.e6e23019d.0":{"name":"@material/auto-init","version":"8.0.0-canary.e6e23019d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e6e23019d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d1bc215bc1053d7b83bb34f5b5a20c0fe6063b93","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e6e23019d.0.tgz","fileCount":14,"integrity":"sha512-JOsS7tnVouJ/+gM5MOQVoPPAhEwAc4VRKXN8i8dpIxnZ5fcQSEX6EpkvyJlwp7bWy+ejol/NnoK8i5bY2zP26Q==","signatures":[{"sig":"MEQCIEeWMcVwbZIoemdpYp2xA6/mfVBHQMN8YDlAVbcH08iYAiBTEDgKF+J0wQSpWGpMQXkdUpaN7UaQ5v8ayVJywwmmbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDhELCRA9TVsSAnZWagAAMRkP/jn1Ogxu7ynlIh+ub4vD\ntHhvgjfvCJVQUYfz42KS03BduNpiiYVjLF3EnskcPuilKqJZ9qaPqUJso/9V\nDhiL0rM/lxpxv8A6e/zCdsCMYAARkpK1pZpgrXU4aTa4K7e5fASlXNNJbLp/\nePHNoS37RF8Jn5eQVH4/fIeAAJi+sZR1WnwUdvXjsbsQqpESZ5sA8fyq/w8n\nrFXl660HkS+rLeoRC0/vnAGzeBzpUOtby1LUGc+Czs8FPmzr3Bl9BQmCAIJB\nmQ112vXyOH6Jo6lmqo4V1JjPeEWAFy0c0svayFcKZMcnRnZsdCmAiw91VJqM\nqe5IbSi+GPGolJD+XgWQJLsiHSxUi9HvninqH+iX1vnKo0NQQeDx9aC2xooj\nvVcxT5SLbFhgmBQh5IrpFZmLbJoOXQiDa4Gk3Tu+RedF9LjwB+WWN8NOCpy3\nOpkZQXSmFGxqdbEH+onZMOERqnAsynyPFiFCFERdf2DcqSw0kLRpuiTD6I26\ndiRRxi5hZEXoMDaCac5+1tRuBNAyWbsz92Ckly9oUxroMJqbbJLaT9QWOa4M\nh492ErDhyYVeIWSYwoBKD+F79ldlbSa30+XPq4G/ATTNhoanwv0CcV57vUK+\nkbOYLcivGQX7fOpPNwcLv5W8aEKpNgbDp2XQiDSiG0HQOtLbKEYohdaAbEGC\nqksO\r\n=dM+m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"db31520d2bb46404d9d5c364a2db4e2bc564e4f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e6e23019d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e6e23019d.0_1594757386880_0.4353906916463668","host":"s3://npm-registry-packages"}},"8.0.0-canary.d548d7a92.0":{"name":"@material/auto-init","version":"8.0.0-canary.d548d7a92.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d548d7a92.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0cefd66128ee7933ac9c6aaec2519940727d4d0a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d548d7a92.0.tgz","fileCount":14,"integrity":"sha512-RRDsBGSBzbmIYqvVFBTcwxvCrn7Eqwlj2e/7gh3DhBOxSEKdRauGPbVrstQcFtobQSQvmqwnpl7c7tEqWxTqbg==","signatures":[{"sig":"MEUCIEjX2ka2Jq+gAnNNEeqbSksSZPIEJxmuAj5BkKnpqTTzAiEAjpX9olooiCbW1Bkgw8OgI6KvHXdVrCw1b3GNI+FjytY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDh+5CRA9TVsSAnZWagAAfZoQAJqZ5z6o/jTKnRns68j2\nYmp7gdr2E7cA9I8Y50J1AQsHLFKCV4OZkOQlstg77t/RpRk5vWS3kXLdIs4a\nkpdhMuXg/Q9ySAPJzY9gTdlYZl/W85R4+i+oRzL1ZIIiFS1n9zZIkJ5uRmut\nk1+vjSTs3pczhj5cZY0U+rbPFZSps3OyM/VVCD3r57CcaHwo0FKm1YhcKfy1\ntusjYgVsZDdXb9LIsGQcOPuOrQdogF5CJKaKN0xej4QW2qzFypcjmV2Out3a\nkxYnNH5ORVEnHSTWkeGRlu6io3gE5PH/zedcNtJZs744hmc0Wha3+EdQwuDu\n/XErZh/RIe7Ni14bnqvjb3Yh+Sx1zGI01T8vnAU9eFKkfUYWKdLssSet8ft/\nlp/42z+EKZVQzrq63SdYDDvCYgu6NaH+5ZCtY3sg/77cbMMApK/x7hL/vmUN\njeky+pGUiiaP5D0hG9N1zaIfUc+G4OfQPjc/9XmVxGjZGb3Ns/oWM8+GfyBo\ndQWFV+O5K7D5DIYQdnkBFBDLqsiVQeRPJatB2ecGODReLCAbVNm1n9eBIpfC\nMZ57BoGsnhbemWauigwgKROkwjdTrz5bNgKKsp7qgEd6QPTnOrWpfKXWSxb/\n6+/4+hSvIJWvp/8ith0lBUViM7U4FCuTlVoqnku7zbI8bzQLlZPLjvztKXSh\noj53\r\n=HHZn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9ac3956fa3f0b35d113404de60048e8aa1c1a0a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d548d7a92.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d548d7a92.0_1594761144584_0.45519163720423506","host":"s3://npm-registry-packages"}},"8.0.0-canary.58ce529cc.0":{"name":"@material/auto-init","version":"8.0.0-canary.58ce529cc.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.58ce529cc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b8aee4cac84dfd3a37cba7ed3072cec18594f7b7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.58ce529cc.0.tgz","fileCount":14,"integrity":"sha512-q7WRkGCACHP5Od/D6v7Vts4FjwJUdgksjY+1NwXAWfnHk1J2HATciMy1pjUoP2xuZJ2e6eMCkeVq/OLlhA6Cdw==","signatures":[{"sig":"MEYCIQC8WYGXLdN9cbGvIBF2kGh0QJXEK8iYwD7hGe+RSci+QwIhAINX2fogj0vKsNNN16EI44enBXXnbNW5c+TM6EhRtsd8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDiAtCRA9TVsSAnZWagAAr5QP/jzgE2RY2gHoV/8Re7Pp\ndHphWgO+pA3Brm2jsUoQcYr+QQuoMmMpGbQXyBoxaU80bySWvLP7QY10HV/P\na2E/j3dtT3f3A0Kw8ezX/k455c2ZGvAQuAb63rUQ8BUOlBJlCVcGmg9XxNuf\nDuUErPL29tf8BYAQYkh77oUW826lQFFvxn2cwc2NwIlAqR5pXB1MaxKTD3eL\nbDjeBVgmantJKl1rGzp3iXCgwGPZTWzCGdbz6vhQafRH1WlnnhX9COfPBZzS\nC/YAS6yyH+c1OTsogQdt/XXsSs/afGPPhTXas4Foz/O46VrMbJnjZeNDgumO\nxJYSE0fQz7h/5uEmVKyPw5aGOSWvRjJDuDyKcfmLhqi/xSW+F/8XBhQRkA2k\nVr+9/ourUzoYikScY0Jry1/U3dDTNqgg6SsVvobe9lbfDxnAZw15WrK8lvKf\n/SbLZ05U7Kjd9puDZmOiIXB6VLhSMBmqgxx1qJiYAapgeprk/vfNFQIY2Msr\nB4VRqD5/TiTLbQRFOgDDIkiiMvPPtQAKbXKKSNg8y58l8khLmIz0Uvumh9at\n8dzvQRdjePNUchcml+ZBXoOSh1vcNBK5UMpTdac3p+YYlLRW+ewBEbOiV4gv\ndZ4dKfyeDHNYCGqxABOzEugjXZVOe2lpsjcCDQuCH+X6pN3RDC2JurzrFHrG\n2bzg\r\n=2oxh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c45eee764d94f6c07b8a5b3770c89c8bb4ccfeaf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.58ce529cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.58ce529cc.0_1594761261457_0.6166599474391319","host":"s3://npm-registry-packages"}},"8.0.0-canary.a0f1202dc.0":{"name":"@material/auto-init","version":"8.0.0-canary.a0f1202dc.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a0f1202dc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d85f74e5b55e25d32e49329ccbca644a2da104e2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a0f1202dc.0.tgz","fileCount":14,"integrity":"sha512-qk/AAYvV/UgszxWKautc2Gul+Jn23Qci1ZhFmXzc+TKZNKAkmef+1282npUNmMCFPMnEVZO1G9gX3bBhc0VMbg==","signatures":[{"sig":"MEQCIAHC8doFKSyGdwVCHDfuIWyKa+vlwGiQ+x2lZu39WdZWAiAf+hQR/dyOsqbZaSLqvkyEYNPUGLII9enOJ5iuCXiVlw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDiSpCRA9TVsSAnZWagAAfnYQAJb6jxDDJakRsOwEFoUN\nPF+9CWY3oUE79qM4MkOeD4urDsm9uHgzFHj7cUD15nZcgbqwV0r1OiM5avG3\nGOlTCOkm7BBT23J9Ou0VOuHHT6jL+GZ6PXUkZX6+27tYmQTydvc/Fe9X8N4y\naULIaFFaLjLSed3DGiCBXGNEq/ctmwKryHqr3VvHWQIKkxuehtQDm13M1/mV\n7V/TJtTLkkYs4khA6/WFuAruladpS7GLYPy+099uwlzHyTrAyLDv9DYZaA53\nTCW+XvrFoiaMtRNPS158lN95Rf5BbVJ1LdGcixDzxD9NeBp927Rqw9RNPeQd\nGHRIKz33OMaZtHpxZ1o4FqpLslZcH+6nglzIShCMidniBPMtel6NfOLUL7ry\nsV52pPQbMN58uzsdHvquU/+xwL6nSvmx3Tbn36rOf6UVyeEJ93q70buo2px9\ndHV4tQ2bbAlmtaA2QLIJ0WIJO9v8jmocBosonl3ijRbtnM9bAzcCWsQid2dv\niPSDGdct4wKNGWBLip+9rLDNAmHVrmi6hrdMISakVAsQyl1II+paj8gqBs8r\njYHeONbp11+aCqDkQvNpiF0dzEIf5LmEl7V0GrOoU7nIizYG/uKdSZVwz6Ow\nc0vreicuQ2JGi4NadR3SY8cK035aXgJJZqfxZ9OcsiqQgTljm6CLpRAEPv4Z\nQ4De\r\n=myuV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"93fc447a8bb5a55abbcf4b72084f1c65147f3cc3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a0f1202dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a0f1202dc.0_1594762409281_0.750273783366328","host":"s3://npm-registry-packages"}},"8.0.0-canary.ad4df58c1.0":{"name":"@material/auto-init","version":"8.0.0-canary.ad4df58c1.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ad4df58c1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b831cb339ee69acb14781c694ecda62c3fc3c11","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ad4df58c1.0.tgz","fileCount":14,"integrity":"sha512-8P0x0rFoipLIENxlfSA7tEs6I8pevyudYXHBi+uS/G0Nn2TpAyAOx5CvjlTriZebVlg/NeGsvDm69RZ3CtctOQ==","signatures":[{"sig":"MEYCIQCGY9kJAdSXOiohj75jzMpn7A0Jz2IfFIioltvSUYZ8/wIhAI8Z1/TfKVGGDzTkLoxr0rsCy3RqAmWebwZVcsz097nX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDkkMCRA9TVsSAnZWagAAv0MP/3LzzPnQ6GLcVQpfbmZi\nkc+K4PIvBqt7tKKNz2dTn/RugNdsOvEVfIEffq9RQ9O0qnURijem+5dllQFa\nb00xgsmO0AoVXrw8gK4KStPY7NXtMzhxkd+9dsALATON92YMrUKCRRXZVxRx\n5TwDHJ4HkeNlQLHfmbNiWMrEIH2xRT5V/gCXIKTCSQLQZ4KSFUBN7OAd63pn\n+DUpw/xygvtVVaA3xsvzKpq/6QGdV111EuEfTJ4aeXWlTuaxzhE8FWJ0J7Bi\nuXyEF/vBpUzXYnknwXaDJfZB4FPtm8lk0gVJFOFmf9w5QFitN76wqCOvvrrZ\ngoQ6OhFuxjvUaTx9mYi93F0LzxIPssbxQxMouhjhZyU0CsoYTraERBscnokg\nZKoOH/COazqLyK6Pi5jVvorgBGBMPq7uVIZc5oJehzsIPcqbY8FC/r5VNsY6\nhxz3BAdMhV63cZYuL4zWZK+L4dgUnni/mxKCDCwsew91Yr0zhfBV3xGxyWtL\nepAULQ/IIf43klNUKvmezpEJU+zKDPLv2iSGBtgwWBFEe58LwgRxNcgQL+nN\noserZL4w2UOYsppgNWGqFG1JOIIxK9lasNx/4llwuPWLFYZd24Yrc/KRs+tU\nr4lb1qcbA/sj5GufSx7dHgXFqproJHYJNYEYCtK4DwaRvIGBtMzzTJqzNDqH\nzrZL\r\n=kKzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f3541b13d081357419478232ca7ae0021f2a6b43","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ad4df58c1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ad4df58c1.0_1594771723552_0.1322684185816836","host":"s3://npm-registry-packages"}},"8.0.0-canary.01db89053.0":{"name":"@material/auto-init","version":"8.0.0-canary.01db89053.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.01db89053.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f3d03bc66159797afcb3ab65abb5edd5b1f1d6a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.01db89053.0.tgz","fileCount":14,"integrity":"sha512-tT+Y7U8HTRGTsCPjkR0e4A2BHyoobkKU3OTPZBr2nPli7Udf28WHYLl5ZIL0qouJE3lvTSBI3exzSL3dER3T6g==","signatures":[{"sig":"MEYCIQCpu3aB2C6LYSx0eiaKUQbnM5+faNY/ihOO9HXaZZ5DAQIhAMEKDf4xl76mawEt7x087N4LRvwNSsMXkeOlWtbTanC9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEIJ/CRA9TVsSAnZWagAAnZ0P/3dLOxR6Y+hV46fDWDtp\nCgzsl50wd7PG3KWMo2oMSTEG2lwAxhp9QCLsX1Ai8Sb1XamZTQZQhNIuQS1U\nnehPZaapQ6wAhcHeYA0hz+99mWdvZRV/T3KCkD2IyhB8GyiZ4RAJCzhHMIqu\ncYxePJAxqhoWeI5Ca9YaQVawfwUSMGmAR17AAewdBTtCgw9Mhb6wxXir10zp\n47KBUbR374kpV+Pi9fRWpjyr+9UosxvRNcQnmES5x+eEMJadDcSfJoZdRSpU\nRum8qaYRhQGm/Lxi/MRySDQ8b6NuxJN6yn/qF++ESJd5hlpk3WLq4tTsNs7X\nX216Vm+Ffz8bE71l4224RSZjONj6imgxDKRHrXfaBy3V8QCVFG2WvD8MmRGT\n1PjfWz61LZDwwQa+YXQoJ2TOQ6/aIiRZ+pYjlI/qnrCNOAXpvHmYCtRqLSSM\na/Mz+/GUop+qIjo6DmPQtbCo/P+OK0wL5fXDz0l0fjqMRBSOwX2Cs/96d5iL\noFcU+Lwa7sXSDEvc5ZSX47GNFrcLtaLjdusJsPe/kTi3Kj0KzQLbdCKADrni\ndbrT/SMb2ldjd1vSUo/334AFz1i7c2zkFRGCAk4m21kFs1cKXAJJMhsgzRGh\nMjNQmP9uvXWmb4ThbBmUo4b6gNYPNNLQyCLtovRY160Dzohr72FQzu2zjFfo\nKtiG\r\n=CP4X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8780c29a82c64caee37ec22f279b264af42412b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.01db89053.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.01db89053.0_1594917503011_0.44652545158491574","host":"s3://npm-registry-packages"}},"8.0.0-canary.fb5a4cdeb.0":{"name":"@material/auto-init","version":"8.0.0-canary.fb5a4cdeb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fb5a4cdeb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1d97fbe4562c50902aca836d4a98684044b26a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fb5a4cdeb.0.tgz","fileCount":14,"integrity":"sha512-HcIdlB+y9ZdVwpZJk96zKagu5cbKtPuh4D/cwIp8YfyWAKAu6rqCFHtyRG3YLZHJNlmfotaDZ+HaD2JfW2kxsg==","signatures":[{"sig":"MEYCIQCxm1uwCh2BySdzqEr4+9l0Tu4dPV5VexpSEjoKfRhb/QIhAJndyX1kZ/nn9IySOtM2ZPbY2Dz/VTk96oHsFJl48JC/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFe45CRA9TVsSAnZWagAAoVwQAJFoHbojLf+bq91qLt8W\nxwCt8mgFxZLqit6N2istdchFJOEc357ha7fgB+Q6JcMTKXmXqjF3Qixfg91v\nnFT4OEH/KIZqTm+6YcXL/qIOlTzR7hm8WGGPpHQiPibQfsDNFk5Yasa/S3A6\nNlXwZOkYVc98bMHctD0xrmnHDrG03C4hff0I9IpiSVb82b/ip3EzKaUKGE2X\nDYI3STYfrAgFdAyFppV9wH3XEi3LQ/aXIH7ocdvmndq05C7AxFizXMeygMsd\nE+LmdmvHt8nAoW1K3ivJLzAf+9VFIraDqBo6qzSA1ng+9CgTsJznZCNUNGhc\nVYYT3OPulbOxUUHJbJKjh2Rd4SCDlOqS7mdA59sy91lN00rZnr2ah2wmDnoD\npoyMJ5oMW8h+70X3VDnhEcNdfg3rnqGiyxlvpcbEwrAd/lD934f+2pgJwGQX\nv1QMvZasi/4Lx4pnSfuEWSmMWAze2LW929smnY+uF7uDdDaa/7+5ih3whFPf\nA16LAQvFQABVZsGlGYa/3zaF/+zcWld/BuJK/KM3yQCtPEQ9efR/EDjClz9B\ncLVXXPe5KvJ5dl+TbgdmuLH3BIbJrdIDjFR5r8Hx3aeSNVYMY6ILhvzGhDNm\nAJ2yCD4DfjctBNL84Z087VcFPX/hiQ467wx7Flw9Kp2GcZXcF5f6lcM8XzE8\nZ7we\r\n=CCxj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e80295b6b3e0ec36934f8d691b193c740458d1f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fb5a4cdeb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fb5a4cdeb.0_1595272761177_0.3038940406113091","host":"s3://npm-registry-packages"}},"8.0.0-canary.8df0f517c.0":{"name":"@material/auto-init","version":"8.0.0-canary.8df0f517c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.8df0f517c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"763e7d41a8c5e69c374c679636a952d6e07b5999","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.8df0f517c.0.tgz","fileCount":14,"integrity":"sha512-nT8OsL9oAv2SHiwbb/vNWXNI/DrdCVFHJDxNxUeXclpvIU6mTZrpXU3aKUb8z+Vu8vN9bKk5FNneUOlyc65LYQ==","signatures":[{"sig":"MEUCICLPyng4SYhTRGilakZIXiTLxGmQ9VhA2FqBM9DZxrPzAiEAmJBpDsR1Rpe16rh4vZ3vz4cSoGjs+etYn0hke5DtcUA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFi7UCRA9TVsSAnZWagAA70UP/RLFkPuFUOhUdB+vP5BN\nrHWdgRoLp+UxW4JO1MLc26AmCmJnu+KjFRYfglNxxhYYQmcGyuCVT8h2t2rq\nuwWA2gdYmVIAtSp81br/D0hV8PWnoWPFBCQbVXIWcUdTf7atPgR4B+S00+71\nJlTgp8/ZNzt+CMayLaRBtxEOsSUw9VHmxlEc7/s0/BbPB53+X0GHUdmnEgVp\nLaYZS+zKPInaw2BwWu87PXpPdbOg5gY5xeH5n9O4hZyzp19DMVPG9PlQozb9\n6xghsERBshSjC66tIpwLo2MPgsTmSdruqeZ24OVURklsY4RFADOIxZMFkkhh\npXvt1V5KIKqA2L0XJ+w4kQEKKuB7NlRcsza6O8eIDVIKGeQUtYaMe8jDQKod\nglniTqCWUj76fSPX3EdjUxlu/LpxP8oRvjsPXQSBgK9gZjbwFAyS/lSDyr5R\nsWCnUG0AiBe7hpVhD8ljyGDk9Fr7F59Yy0fnmwmb8AVuJoUChSSB3BOn+qlM\n0ycwgjPAj1Opf2bblihHFlFF7xzfhnvlctRVBSeoOLAJleTifKWwMA1AHkun\nR4RhbA2NUzTay+tz7zhNJDSRtbYS70pEhbJbH8PIalENhsKqq0D+7xK0LEAn\n/4yWAoU7FJ8U5QvTUVJHOMEZst2o7yKXD9OzEJgyuzqQVowPW97GsBifW8rw\nOyPx\r\n=Emne\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5fca8679b0dad51628e898ac223795eea8e54d56","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.8df0f517c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.8df0f517c.0_1595289299551_0.48133540390632534","host":"s3://npm-registry-packages"}},"8.0.0-canary.abcdbcfeb.0":{"name":"@material/auto-init","version":"8.0.0-canary.abcdbcfeb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.abcdbcfeb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c93dbed1ade60942edd7e1fc94dd641539f59c02","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.abcdbcfeb.0.tgz","fileCount":14,"integrity":"sha512-+PVsD8I3GjzkEgYgSb76EcNP7Gf5fFbUCYT5CI64EcDUqK5RH65oCOb60HUZbbx0nBxGNxhrre+gP6V6/90hzg==","signatures":[{"sig":"MEQCIGFEyaOBp5pne1fixIh+exTVyPo81L2AfBPxVUFDNuImAiAUF584igi0hfdlaGsuHeT7i1anRBt8+WhFKBKOGDENMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFjuZCRA9TVsSAnZWagAAMjgP/18Nakc1t6fSBLkTRGB/\nSFEOnE8mf5IJyNkqdyuByqzw8aejNUQgZl7VnRW5aorhKOLAIOrqZMdMKon1\nMBcVK8B11HCt1YERUyhdZzRZInL+bha5a3pYdcFPliTLnz9BmoWB6t3eu6el\nQ4n6ZeHAMqTNApF0AOaTQWW4E1On5RXzMDBHIp3AV+LG/3W8kH4rBdlvpu6Y\nT/ewVwPMXFdzFj6uQpVzcG4mKh43Hwi417FsxpCRQUobwpNfAYpV/iocuQCn\naFUdWB8H4Xq/InU+8TzaNB77puWqrNBOJA3nbgXGhXo+qKuxjZj7f8Ks8Le1\nZJCecjmuGbkv32LJHiXrauApmc3oDAupQCFR0y4tCCg/qOPql5Qr5M+YGkcU\nGCXbs8VhzZwpBp9QDnsdVAIBadbGsltbJ+woqBa8NZDTmRBSnW93SFYJx3PJ\nSyDL9W6Jyma4IJqE8CuBMg8v/3wL4cs/Me5TafARfABtzVBE0+44s/PJsI86\nkh9plk9ojVGQNPsN1nga9AgaE0A2HRUh22CcwOeEOJcixi23dAGrea/WJtBm\noLeviwdPCso/zAR8z4xDKy2f/vaFOk4CwlDYkGrw6ss9AI1xCkFHOo2plLgW\njze2T6DKF8tFZJuqTt/26zm7jZTqt72EoRg+2avuordg5wALED5xlFNFrDTi\n6AsK\r\n=hR2L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"946720776dd73c7539bfa072ea415124b3e08a55","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.abcdbcfeb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.abcdbcfeb.0_1595292569064_0.44328238809998055","host":"s3://npm-registry-packages"}},"8.0.0-canary.7bd5075de.0":{"name":"@material/auto-init","version":"8.0.0-canary.7bd5075de.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.7bd5075de.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"359103a3dcd73825b2c3c3afce5fc67bdf8140ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.7bd5075de.0.tgz","fileCount":14,"integrity":"sha512-pK/vF1ZG/4qHO+bPaBdNBBKz8/rsvUj4d7qaPhQH3nESY9CdrVDb7cQxh5hhLEnpER/RLMFNAYIcojrBah9Zjw==","signatures":[{"sig":"MEUCIFm9clxNECh4ooTUVC/vATRwSUbDN9Dijd0RgL8bVF8UAiEA8prTOsCDKQkSWUANPbJZ6o+YIUfVfka7JOI25BYnA44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFzgGCRA9TVsSAnZWagAA0xUP/1vBvNgI9bj1AeAsoQp8\nrB/wAW4VUJncICtK0qgvdtl6Cqoq1R3nBfrsajHY3EMNFWj7Mg4OgrxxQBBl\nNuY8nKOPg1TALN+KF+PkgjfEICznW6BAun1jAAxxgPgsd8D72kIY4mAKpatM\nFqpUzsRT3qPYdhU+hHuhK6W6467WF6LElSh+N6mPGqviX9F8St8zD4Kboewm\npPnAFcRtpX1DEIfPxN+xbWqut4c1IgXdrbRpnSafE10gnkT/d2+Bq7OtBTzN\nRr+gknKA1qEG1/XXXii/4MZU9rDBTqaaVQhcBWly5KOgPkPzoLh+Q02v4cCd\nSWSKNIFYd6lbhI/ewqls9q6ypM5esjoW2Y5WYA6qGj7qWwuJL+P6DQj8RDlj\n2AszGDMwrKdtUr4MXZH0uDs9mEWvm4G4/NV9ICKbSHY1UdJBRj6pBZNRnwHS\nBJyJoPO1UnZaYb9p4mB8QDDCb2MyC/6Yq7zQf5YxpoUfGAJ19yUJQCbozWFw\n7pXeong1TTUBJn5Wkfc/GXFpyTU/XdeGGZ1RSR63SIs0JpKui5VtPiTjkpil\ncewlNGTHrhgFXPGgrTV/bBFv+hXLtvREcDpkUnPTVUobCzQFA2k+LnTbWIcE\nw1jk7U6BqrwjSgNMFur0WRtnqhFRHdrkh8+7I39Dy2vGIw/gHe76rPGco8ag\nGL83\r\n=aYH5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5ae456e961b208e98164fa21047b3ff2e3f3d8e2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.7bd5075de.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.7bd5075de.0_1595357190389_0.6571203575741082","host":"s3://npm-registry-packages"}},"8.0.0-canary.405a29a20.0":{"name":"@material/auto-init","version":"8.0.0-canary.405a29a20.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.405a29a20.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"42f48552498d773a7abc756ffd0d1645f11bd975","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.405a29a20.0.tgz","fileCount":14,"integrity":"sha512-jeAMFKepEPMGjM0cAIFdcvAN2JOfNvfezECKozfEy2B1W4yC3iq/fd3HY0AUbPdQfcyh2KXuld1GkyR2ATenFw==","signatures":[{"sig":"MEQCIDNkMrDymoll2czmgtC82Ur0OIsfwnxMu9vMCUFCyeqZAiBbODb1xh4ZPbhQrbUMcKho8gw+qQervZkzPh400bkL/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGLwpCRA9TVsSAnZWagAAK2YP/0JeEGZuQhRGcTcp3noN\n3elb82ThX9V/h67rzik4NNUC4lAs9i4VTW25K/PoSuc3RfZd3yyEUKO8QrjK\nG+OG6vQbZHk7K0UsRkQw5pAE4yLiZsFznY1SxjsYprl4hwPyBWqi/DlJ+tn2\nwn2zIFF08OnkTeTbrVqy2kHy/IcXntN6HjyG3hboZBzmFp5S+kv8j4bXdz8b\nVeK7E+O6akBG5T5cEO/s5odMHB8M3rqSzcRMg5NHDVk84YOuSDTiJFhD2kDA\nF/7ic1BOX+uBmrCfrRFtK3Q4SS5HaNIDckLnASYK5dMj9MS2eRBxHb/MsgzY\ng+xMmekWRuYr44oT32btRX86zOJOx0p545D2KbU7AVY7Kv9dZqrjs1pCKTTs\nAPQ4DytoffXBpX2dpfy0GoERJdEaUZn8aPLi5Sk/deo8F5Wex+cPy01Ckys9\n+f51nKng4lvh9DJii6zhGTJKsWNeGqHQNw8ZGBjzBqyxkDLxetNWEITpqDZK\n5nVFWJJPmXRJD9Tu6G4ijpO6JYlKic6M2x91e2oZnCiFbMOnxb5bG1db8Wk0\n9PLt4FZfEUT5BmZkb3kv0CgZxb1kSIi5Ucw2kV3c8I1MWjBVNcyNiI4p64z8\nAypiSsjTGwlL4nix+pnwgpgGw+YIKmqzWfz+Hfv1GzakEHHbrMLPzItEVSpu\nX144\r\n=jVps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"02c4f49285e8229cf49d9e4a0df213ff914b949f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.405a29a20.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.405a29a20.0_1595456553186_0.9899361651954657","host":"s3://npm-registry-packages"}},"8.0.0-canary.f3693ac4c.0":{"name":"@material/auto-init","version":"8.0.0-canary.f3693ac4c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f3693ac4c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb00c1fb1ac71a09619391944e9b260a1e1b5b20","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f3693ac4c.0.tgz","fileCount":14,"integrity":"sha512-XwZob8Abq5juzjtD50a1GpDTHsyNaq+BLp1BINTUFt+pzmvOyH9dDVO09JA2oDa5WbFZs/XDOv4XB0A+djAeHg==","signatures":[{"sig":"MEUCIQDRY6blx7PiguD7Ahi6tJDHmWP9PLGqOTPSVqgRD6S4ngIgFa+4tiYtwONkfUoLkVBYRbvrk0b8S/6Ak99Rz/WbaUk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGL6ZCRA9TVsSAnZWagAAbacP/RACoDHCjZZlY4zTT1Pr\n3rx5zULpVwlymd2J3Q/qgWOIZLmxfL420KwuTfku2kNKKSP7Wv7Aws+MXVuP\ndrC+ny8H9lWMGfaYfmasQHX1LHY4tmXt6B2T02xoTlZ7Wba5GSdiuNgbdlts\nb+Y213DPUSStPYDZXcuTGx2Ye8oO+NLGWdYjZYRBrDGW94wiIr4+sdsKOJAG\nli4I3MPNVhlOTTn7HHRnEkuy1CzNgH6vyq9CbSyn0jIUWnLmRDkFF9EW2NWU\n42iyzSToZvNFiOEj9GcT71bkkOBsoVwsuNAuWqduc4KNpxK7t12EeYlfavUq\nea1w7oLVdTF5d5Gbo7DfvxKpdDzyinIilVyM6BbRpxN1C7oJ/f06mfdVZW/1\ntFFrkMIG0x1QudAChDhh6fePp0BQN9NzkBrix0CmsEL1PT4mtU91qui1bLfW\nWkg6IJybvtT8+s6nvbIRCsc9IkfL+aODfUSUpGxSoL/GQ4xSwIeDjsTtVNbz\nLFJ7XPJYbtYWWzZTO1R+tB+YBuKdJupHamKBE6vinXln3b2/9Aeqnyz7BbT0\nUug9+3ae116zvvJTSOvFUFyz0O35Tpq5ze++Wais39IJNZUKe/FOIt1dek5S\nxVqNsyLytLzCnDG8V3D4kasciAGCocRKnOwlo5N72V/AvAE/0jkoVtdo09OV\nkWdC\r\n=vGET\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d3170e3936d96d26a6ca17df46c1febcfc33078f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f3693ac4c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f3693ac4c.0_1595457177135_0.49392223405079805","host":"s3://npm-registry-packages"}},"8.0.0-canary.12a109680.0":{"name":"@material/auto-init","version":"8.0.0-canary.12a109680.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.12a109680.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d72ac8313699d98c383ce64c5db163b3c331bcb3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.12a109680.0.tgz","fileCount":14,"integrity":"sha512-2b/U55jb8nW9XZPezcR7cOIPMUVeNc7nGyISmGtnnnRxjmDMxFDjzavz7b7aIyXfPgYwa68Zu0RRIm186zEG+A==","signatures":[{"sig":"MEYCIQC3AkSXN3fwGHO/C4q+yM458F95yikVmQgUBZvK99SGJwIhAPHVpTT5kTJCGihXZq2CpMcjqK9QDXncO7l/gfGxCLp/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGMWZCRA9TVsSAnZWagAAqh8P/jPYrytWg9opYf+nVXtI\n4AA6G1fPCexlQt8RB2eQa7PybwLBE1k+wLwZYEgz98HOenOr1GNzXRKaOMR/\nq4EcmZHkPRUrypdsd4njKJ8UOJGKAqowdBpd9l333LyKtAe8YloYAqubFHAU\na2DGoJc7XvOSd1f0OAKAQzovuVz1hADR2gqf9RwAF/oOqXjdJjSSdM6dlVb5\nlbhOEjmJbS0KNhK8V9BRWm3edRndvVOBSnndxrvGKmHkLNwml9ExZMUqGwfq\nM6Pab7BA1y/gyJIpooBqO6zQgvB7TegcI+dBFV+MSf34zqKlvAxLKU0CX+da\nnihm6UJIeypWq43I8JcfMZj3AKUS6zbU6a8j1eYPgk1lFjck8YwaliHev3TB\nD2nbVkuA9FEvtfu1Jsj+OSPeZtxjz5EJj299iP2p1HoeLfH4o+HoqWBLcpBl\nXD2RvY0zKQiyl1b1NqK43tLoorhXAY3tf/YRE0etwsxA3mA3BGTPibV4Pygq\npUtPIm4wBNEUhtYfz+BZ8IFSaL5d9bFY4aBAXo1eDrgEvztmEuVRIAgNYBHI\n6Limjztq8ZeNlWI3tIUpYuSzcyT1ioYqcnNuVlrFhx5QZf+w64WJVFNcSo45\nRiBLZbeZHARntbTxG3rg4t3nMU5uVD7q1SOOzJo0/a8BQ7Zzox3lbAtOBCzS\ndqC6\r\n=/DaX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a403e743d7da095028c3ba6d0a66ef2f7812aa8e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.12a109680.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.12a109680.0_1595458969065_0.33408753542915637","host":"s3://npm-registry-packages"}},"8.0.0-canary.bbd06696e.0":{"name":"@material/auto-init","version":"8.0.0-canary.bbd06696e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.bbd06696e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"88ec234e0551a5c02edbb7c25950e3ffa650daa6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.bbd06696e.0.tgz","fileCount":14,"integrity":"sha512-MaNgsAzCVToPXxg0G9CZTFL32FVgwERwix0SeGB3OpwPzds1Qz4jWjSIrL7v3gvXqHE2PmXX9rINxVj9AvsGUg==","signatures":[{"sig":"MEQCID/Ik+yM3ncBKglhRH6dwfhGR7b+G4telWyiwa5j/8JOAiB2kdV05wCf3wCC5H1UqaBOKc0xkIBf9iF95vnwQxBYwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGNEuCRA9TVsSAnZWagAAivkP/2SXjS1J9vnwUyFX/Zfw\ngw2opG8i40/Bq0i5YUMFG2fIH4Zsc5SwvQHc0JvAfm49Nt3/KmSogJmUWfgb\nMARz9EcXzjc6GftyKlAGfIcxKYaNJyoFc3nr5Xxv3Yd4/QXhBYoDkaRzGBJD\nr4F5KFZVUBAFDtNs7wnnvjhFTjHriQ3p/JGi2jdOxfk3qHLD8L/WhxfCKE9a\nDCl5yyW1ZNrSNC+QV6AsolCD89gmS0oPvM8mzsppLC9YXU+4dRTDQf6ncFDm\nkiSBIHQBUDe35MNcw3phWRExQl26RYd0WjRvyuI2bhNgpXwM6ytc1upOQEVZ\n4bBmkpod126WXsD47CA1upsqdDS540kvo5awzOBmwRRd0A2nxRi8lPLTFSGf\nHLuO4rsZ8q03VAUwQQI4FDtnbbIAC89EetF30fxENuAVLzTFoUcnkbt2R/Z9\nrv0VqVHqsB9klOypnZHFB27+M3CSZoO/y0egH6tb6VQ5PC05LyDR8x4eJvL6\nUyYgeDPr7oZ0f43h9TdGaJqyX0L4Voajh8Sna8A1tIFZd0NCZ9LJDAVsNcu2\nLzHoC5tQAH1silhPfUSDJyiy1G2ZNCdKVLIU4z4ldN3HQMqw2UfYDrbm+6LL\nRldzCz8wTXflO/Z9QHgyPNjRnlfNIAHDlL1g2wZXEyFzvyZhjbAirRmWCYdm\nGwQa\r\n=CqYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d34a386a37996e326b9ca18440ff1cda261f3aa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.bbd06696e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.bbd06696e.0_1595461934148_0.36920200512068324","host":"s3://npm-registry-packages"}},"8.0.0-canary.4951e7651.0":{"name":"@material/auto-init","version":"8.0.0-canary.4951e7651.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4951e7651.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"11d7f8ae8bd6d851af5f537aa446735a2f9c5606","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4951e7651.0.tgz","fileCount":14,"integrity":"sha512-w6Btt2x2X0J55bpHgUU38ni6cIeAevNM0OMP7Wvpx21mm6lakzP+XQFE8CexIfJz+nYPcxaMdu+ii5BRfXo48g==","signatures":[{"sig":"MEUCIQDnASum4B53I7k2fJ9CsZu8iEA7hBBDP7oDnrRx3TX68AIgWjxq//it7U8jQrg9JztfammSF20yCJw7TnuiL92481Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGOyBCRA9TVsSAnZWagAASFoP/jvTPQmlxKr66mEaNl5W\nESu15f+1/LosnoNAk7rDbgQGTWr8/238s8Dzh5eJlJ188VWvmgZM7ZtQ1r/y\nlygCFsi7QdJqE2Klk5P1dr0D97xxWg1Pzmb0UgVzY4Rz9uZ8OgkNYPLyDUW8\nDMq+RHUXNRS0vPkbNP8o+16gSPPMa3VfGvNsGNQcgH17SDQ9eJiQrIOJypm4\nyUwWIcx5ToiTCk2KGZM2tdUrkJzmY8YjBn7A+Cw4W9CR1MDX0KBmRkWzB4wz\nbwOvwjKS+rHMoAAd9kqEyLOja1HZaPOIH1JTjlsMzyuRo29u6cldV5ejc0pk\ngH42aCpMzqxQ1roop856DTDIdbeVlRcTQdFrV4YeBLG/KR48KMP5VAQuqrAh\n6pZjoG2FkbpnMtzGkLVuEKtunb4vW4cw/RhPbm3bLwhj5hU/eHdu6va9hazr\nHabRzFJ3rKPXre7He1p7hNkpXzYcs5WBZIkzifKVFjJv1RFM20gPhvzND9uU\nc0C5TGEE2yJlHjXJFL7BgmhowjjwhtcMHydm4dvF7V2hbR98nXQdMzpLwsDp\nLjHp3zLN9EpW1NBINVSOGziQz7+Q1ro5IiB56XaYTSPn/fVdFkXoZac52aXz\n8SyRVcgtKDZPWONkwwuwF5rQfU48DNvTARg5cTZIWa7lIqBEPbK5w2ywAD+u\nKaAd\r\n=32bJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"32ca9cc0ab948e59f91965e96adf325a142b8336","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4951e7651.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4951e7651.0_1595468928404_0.9624365570474847","host":"s3://npm-registry-packages"}},"8.0.0-canary.75deebbef.0":{"name":"@material/auto-init","version":"8.0.0-canary.75deebbef.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.75deebbef.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"17b7e3857bc7f15b72ed173c91efe76f525e0af6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.75deebbef.0.tgz","fileCount":14,"integrity":"sha512-QCogQndBKYSBsus7+Tuo3ofUWJghcuqh6Vm681dRGn3nvIvbCKZ1pAwbWGmbe1jJiELgcUNYfdDn02PeW4e/NA==","signatures":[{"sig":"MEUCIQDMho7FSmNMtXJ4EwHB2BRaMgbDS2MLyOEMo7QVZRPEzQIgfXxRv4KNFxqZmImoL3OxWJsROD0DAb+Gkh8zgUGPqvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGcylCRA9TVsSAnZWagAA/ckP+wfvKKua+ysw9Hy0zlgn\n91TKrvXlT/0+DUBzvyEUV1ira5N/jMbJ/txK8Bz9WluyJRaO5gwsMUkTJM2o\nBcW1tH5wPAaitY1bXSal0Cxu2MITT3xywh9uAhYVtiOXC+mzDNb0NseKWHEO\nuZ63ckjuSoPYLMb//ONfGtRHg2JqTEk+rPTJkuZHD6DvLYiBgiMw+mfmDRe0\nLZFnKNVi/BQI7/1yn8k32D/jiVuYKm8zuoSIKHgxpyGCjDQ1AR7go/xYkspI\n1Myw98Zo8Ket6R8qr8rV+M6A75JONTsPkJQyXCuEQMGCo+acU6qt3wzRihA2\nwBuhFZUCHbcpANeuLXwvz9GPbBn199SDQNT1wh6ygxurj3y8zdsYNgk6pdw8\nv0aws2eCmF+jUABf5HnCLm9pRPkhsPWcqbhtHcm1QOUG7NBvNIGU2tvWHCmo\n0rR2tC92nlF/11mwLZdwd5gGfJeS4POo04I1e4nZrdpGhpYSvwwKp7ATu0Gm\nWivgdGTe71CNkhGhiq0AO7sBfRNV0DzRff9YLs4Jmev4EyHGYe6LqA6QXjQ3\nLeMK5xVfvJw8dBHmzr1esLM8zFLUy0qJHLjX3ljP+McbiwniIpjVtVcx/Hla\nsydDMu7sHOfIS6oxStWwMX93GOIxh+Wxaj6a7JeLnuWtBrh0SwIN3cFZiv/i\nAvkT\r\n=tYV1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3df5ec3c8a254202fe3ba9017528cce3d5d906ed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.75deebbef.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.75deebbef.0_1595526308985_0.8177098020295401","host":"s3://npm-registry-packages"}},"8.0.0-canary.95aff33ee.0":{"name":"@material/auto-init","version":"8.0.0-canary.95aff33ee.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.95aff33ee.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d69d110d4f8e14f887687b232836c9c641c730ad","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.95aff33ee.0.tgz","fileCount":14,"integrity":"sha512-anigMBe+0jYf7uhNcagrdMuPJpXWYBcv04foQEEgY1G/MAhRTqsYEJffWK615xOxBJ70woIGXwNZNEPkC9npvA==","signatures":[{"sig":"MEYCIQCOIlV24ix2heHuM1BTgIGXcH0CqH7qH357BQKQ3wYthwIhAOW5q1Y39+GVUzSllLno/GgGp0yXPZhGDkEk48B0kjng","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGdsUCRA9TVsSAnZWagAA+IEP/1NjUvDFCgKiKfH+xYc+\nQlpcIcJqp6RVtWqF3TdVhD/ri1jDhkyecRo0kDjyNi9o9+3M1V1qMhfY69T5\n95qJt2WJBJiA+vwDa2jT++i0Z0+OeBkRpS1sppiOcvaigPYtSVnSeELD0M0e\nUMMBRhhm/LS93lFdulRv5rErvLkKe7q4YYoA9JhF4HocM1gswkD4CZ+MVuZI\npH5kGm0skwhHmpXeUe/7NdbYLz3Z5Xhsv/wXtcX8h/OdD8Bd63l3idyZ85wQ\nJo9dt1I75htFBxalql+abx6lL4iVw5OYyMuT/zYKA/UuVjj1PjIPO1a7us04\nt4aSsbAxlo8qgFdTvo+QPjUc7v78np3H06Jka14v95HOEw3Raba1m5PohvcT\nLS0mpbQu8IFYkSeAicoAzzT5FVIFzZFuZ+LCQgBphJoCsuHaYQsP0Kbvq+nV\nz/AHZki71u+XPLCHzJ46iIPBZZW30lsZht+PRovg8c3XXtoF+XOxV0cnYGtE\nFcETHrzRk13vXVrL90zumyX3HteOnGQ0NSz2ym/BFBaAgrXyLKPcVY4xPDul\niLaMfhEzpViw4xsVCCzlUcUMOo5XoCRfuR/9YV0j/SYnoLxdrsNSNWZACEBx\ndVXotXEJ55wpyStXwFu5uviftvQTfyOztiRDfJgpWI2OsKVnDoXpSjpWT602\nz8R0\r\n=RtYh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0343ebd62969f5d4315e249ad81f2837fdbaa096","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.95aff33ee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.95aff33ee.0_1595530004373_0.5194809428045908","host":"s3://npm-registry-packages"}},"8.0.0-canary.9d9f47473.0":{"name":"@material/auto-init","version":"8.0.0-canary.9d9f47473.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.9d9f47473.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"864c855e366050a5077f0baa770b826ea029cad8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.9d9f47473.0.tgz","fileCount":14,"integrity":"sha512-qYh1FAQtozI6ZDUKZbAThrAcqRFYtJ//aqrSzSNIaWsjsyA6sivjuQGTJ/tCL3I0TLUPjuvVsKjG6AspUM1wtQ==","signatures":[{"sig":"MEUCIQDLDHOnJ02eaRHD+D3XCq4rImL8RSSmBlPHgz01jf6YmQIgRg0xudK+g09M6cKx3tmOx6vrmG7Ge9wonPtNVLOH9+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGevICRA9TVsSAnZWagAAw68P/33DtVyA2jnOEqNNCOcb\n7ibXTbb6oEsX1Zk1mEc+c56L4jmQOC+zTuxz2xaKXoZaz45jJWlDmKGFTpXw\nBBU7quXzHbg4EV3AJhLpDFohS3mxNDP5pteWK3GPtR69YcKTxjEZpaiwckT/\nxmNbuKJVVIw0N5q1tpA9d77RF/KK8ge3sHrg4kdhTqBV3ULcuMrbK8CDAe/z\nZTkmLzKGWun6XCbxV9G6o191PqAQcLoLp8MHvjEf7EUWZf3ecvgspQM94ETj\nNZObLyWw6axIF34euY9xmbgzqCRK7mypbCgboUcGkiuQyh1tZe9Jw2is4K6+\ndhgajnvKRMtUIQ2kK/7809yGipUus+lsxHumxGnX+TVHfSZhzFBsb0xkm2RM\njCg/GcHh1ISbXhimDH/gqiUf3K0JaP5EjDK0ObEmiiTOl9483wHeLxxgczZ2\nX8BD1q1VAgFZJpZbFCahR/Q6n0K3kl4wQcAxvt5LBP8QsPRTqge6MQORckYO\n0MTecr/9FD8y6MPWTVS9GGzUWLSnYZglem0e1ONgO7T8l2scavAVhKpnhbgk\n05RDKUmRXbz7LCMycDLd895cNG1twGHW3zGKtwPe4WsprWXfjqRmMa4WuVGM\nj6TRe0guh4YnzaIOpPULk/mKjZv0VOYJKttO3xMj0KUNZDGlecnM14rbuRR2\n8n+e\r\n=tU+v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b21be0611a45dd7df8e3b48a3fd0aab09d6cb236","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.9d9f47473.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.9d9f47473.0_1595534280277_0.7509195592684452","host":"s3://npm-registry-packages"}},"8.0.0-canary.00dfbf6be.0":{"name":"@material/auto-init","version":"8.0.0-canary.00dfbf6be.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.00dfbf6be.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b7f35b4e56bd4a799321b2572d1debfb17eb667","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.00dfbf6be.0.tgz","fileCount":14,"integrity":"sha512-/AKbeVdaw16fSUE8/z+RLwAnx1qe+fOyfIeJVzrG+Y91svTf/AVp1vy1riJ7Si3m6iNfyUukLC/TdWcylPIkew==","signatures":[{"sig":"MEQCIEuEI2d0KuzKFyzF+BuvH7t6esDSchdVClgXX6navMKIAiA+95R82S3qtlUya4YKS/om/a3/lL2gN3paPG8b6k77oQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGfoLCRA9TVsSAnZWagAAvAwP/RlixZVrrEbAuLXcJo56\nX2o6o2f5NoBS73OY6pfGyijp0lQEx/j8LUIPhbYXkJmKD3u/IgjDWP+hSkMw\nS+gw8Tyc1bO/NG1M1Frjcdw8jNHPmaqB9jVvuwdrkMLVzMVTpYY47m9EsAJs\n/vqWBoT+wCEJ4QmxYZ5DdjBVdT0VYVlVgXq1jyQaDqeFpXPOgPY7hgEr/uO6\n0AGUcBMGut/e7uVTj9m+SsZewQVFqeOYKuaIaV4jftGz4WR4CmtJoKk0mAoG\nkPlmMfUbXRTiHps+dvkPvtchkG8IUrPn8eFmZCdi3TVoWECnno+pSyewO8eZ\nYJAyeOgpoG8lK1WMkrdSoaEce3hfp7SUB+HhglOxNNnQFkSaEo5Cb0EsFjbM\nobq1ihExJgjZ267S//gfbmCzw+AGB4NjLhFtAY2AbITBMgek6bHq9hF6frEC\nqALY+83AdNuCrzqZxRfVBK0cbhEi37YgtfTh5TQTlXwUo3nw17k58Z5RuBc7\n1LHCz1IRpqJ2lelqaAKUB+W3kF00sN26vhyvPyriVuYNvPBxdQpuk8vhFGPu\ntdXEVC4KQX00++4ubSo0vBQZoTrft5qPoH+tEaYzrww7iw571OIaBjj2pFuM\nsZ3Z+O7kD+K4Suglap1h7iNqs1KDCH3YqfbbAryKzIjwZJMaqU1au/eItpZY\nK3rx\r\n=z6Gx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e4a97455c736fab77028e52beabb53323eb60ed3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.00dfbf6be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.00dfbf6be.0_1595537931010_0.013859242481068179","host":"s3://npm-registry-packages"}},"8.0.0-canary.b87e522d2.0":{"name":"@material/auto-init","version":"8.0.0-canary.b87e522d2.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b87e522d2.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f69b91e46637a282d7200b09c2b24a2bf625098b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b87e522d2.0.tgz","fileCount":14,"integrity":"sha512-wTYkBLJc8zq8rUxFlDZ8cYqo2EaTw1oslXTL2qGm4W/Ft5EXGrf85Tgy1omSr9LKdg3qKkIgVFHoWZ8jm1N6QQ==","signatures":[{"sig":"MEYCIQDOKxmG0IrAQOdCPXM/HHsFt6o8jKwxnWEFpVwWRUnv8gIhANxOCfu3Uu57E1kman6CkQC2H1uEztbCg8NzCbpHmzG4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGf+3CRA9TVsSAnZWagAAaDwP/AtRKQUmQoWr+R+VxYKp\n1UKw/3DBngjxZNbq4XSYInwoR8DWnXb1ejhtJDMWoOSiMQZ6HEtH3e6RoOIJ\nKRnqAD9aH7cRLwIPfedExrARPrYAVLYSEky7g2uHpuRmKwZFdwNJUfw3NeLX\n7TPVwbIXQaphhrawJsRCB26ySlA6L3zYY+o4ZUzn1Yhc/JpB0JX7s5nst8bN\nIqH3cSxtq42tCD600tnEpjrc74wwvX5c8lxciznixe4eAxIqDbDa2uF/bCMs\ned3d6/fjaefyGvr77W+ECmWd/CIYCGlYtO0meDMnRCwZD5m+Wd478SPozuEJ\nu94me3iyS68E48bNQpZqbH8Soo4bFA3Zhe+sDLBBU9Y6kmwJbdQSCC4Fm0bC\n3nMepdojA0oXn0YDS7lwcxKuaWS9eTqANnx6UG0DquwcApTKnI7TAAVo/IY/\nmL6wCAcVOoMVpUgghZ2zYhTmDLgiqc9u4rQ/xuAOtNiwP9NSWu3PhvKbZLee\nb3D6KCbYVoiE1LSy8mnbYFgA7ox0Ycekz1IHvcbUjZsNkgWVWlWGMmoBAtoQ\n+hqI2KBEWKX1XjWkaGG2qrMrbcrLViG5KGG6IRTSxS7r8WMgATG30L9TC1Os\neOCl2EQqxE0C1RnBpHjPavLbWu3s3WmS803TFLFwra03uSnlmuoP8JhroEqB\n70jg\r\n=baHb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6b4bba75848a4cc1d6ee29d1b67848ff11a8ba6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b87e522d2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b87e522d2.0_1595539382909_0.7374832376151979","host":"s3://npm-registry-packages"}},"8.0.0-canary.5b3e150e5.0":{"name":"@material/auto-init","version":"8.0.0-canary.5b3e150e5.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5b3e150e5.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cfe02f88cceb7dbfd5ef20d335c9e737fe077cdf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5b3e150e5.0.tgz","fileCount":14,"integrity":"sha512-RcNLprxbYSxGAvM3IJ5jjvemH0VrEGm2K9CsM3eiFytthiUoHVGcV99do5z5mmC2lt4P5HJZs0weOna0rvKWGg==","signatures":[{"sig":"MEYCIQDJRI3TnqIovrZSFEJl5DXX9D6K70gUjZuW+A+RNRw57gIhAJ/D175/42ZWXKEczyffmk9Lr+4jwLJ1Fc8Q65+3H0Fz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGjgBCRA9TVsSAnZWagAA9csP/jyD5csfQ0LEChovdRxJ\nMw8Ir4bN7+iZJw3l2RcqtepJ8fGsOS4hCCi+jFo0q7Mxf0EgUCF5lwmTfKvC\nWT6IqajwBdV+hLI+zLC4DL2RQn9RYZZwT+Ry9ULeDhexO5xGkqHsXFA+QlqI\nBs3T8Y9WalCwuo6r0xelyB/d6bpjVdycYMrWxBHw7Czv4q7SQbNO8dj2gNOP\nObTMmwn/Uw8+TZyMqZSyxRMx3x4noryU9Jlfy5a1WCpA4+ja/eEMQqmOIgIE\nQrj1a4yryb062bMaMG7sXiTAE/VRoSv/ktv61cWiW10OT2FDsU7RZNM1yfro\n8Qmd+G+1SSLg6tL4Y0r2Ke6ZvCeVoEc5Qzwu3sV4+PU+nyEmgtsREYN2ahv5\nQlQRN9Ea0uC8QnUU403qrKLhdBn7R8B8Zwh6EdPEKdgyTlzwO+ZvCFm8lpT6\nN9RnuLstDZSbsbdHmBXB9i1HvRB8xVe1Yjgun5ZKPXC6r2WeoU75z2sABtkC\n216torznlMDUp3IKTggZi57JgjH04jLcm+U8WDEAXHEhXR4btw8zeQxbHEag\n3OXgggRwwW/jZLr8HMeDoKy1DRd+nooxgi8cZLqJnolaMVbfcuZ+T56QnfW+\nb22WxTZ1wce7sshV1MNTJ9Wk/EISFgV6zyL6hu+uetzcsm/XdSUt0SLnaBBe\nYXk6\r\n=0Bzp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bdcd04000450742ddf94918c2953ff0bbfdfe9cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5b3e150e5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5b3e150e5.0_1595553793042_0.7127197658405147","host":"s3://npm-registry-packages"}},"8.0.0-canary.f0ae11786.0":{"name":"@material/auto-init","version":"8.0.0-canary.f0ae11786.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f0ae11786.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b478dad3ea7b75a0914c9903f6f7f60df98377b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f0ae11786.0.tgz","fileCount":14,"integrity":"sha512-3r/nsoNA7GK4Pe0t8FULYttWNJlypmz4qRcw7HEwPwBMctbKT4wbV5DATfKpZc4pr5cjFWuav1sMer746c5Upw==","signatures":[{"sig":"MEUCIErC2gAfG8j5VuwpXfxR3DWPbUdkI5RaRuKwc0aBdh4SAiEAp1z6kZ7gYEQT3yHNLw55kyQP+rSuL79tFyFHbN9953o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGjylCRA9TVsSAnZWagAAQ+gP+gJAAyVcFwFWD1LALi5+\nhPfjvu/5KuJM7Pw4fNnPY0IkWk8yPeyqsJ+1PHxwscZJV/86TIVtTMvE/kGH\nk176eCAmZFH2G2UHAeYbU1zkxuGe6KGCQCVrVByQwwJe6MowUITKI5aiRmpa\nRObMGl+OSYfOokbYi4LQEvN6T4wxLwnvSAIfMJbDgz3YFw1njKUCR7Qw6cxw\nH0yCeIp22brZsieaJ5DnSiwgsZAU2mp/mTlTitmlSfM1uzE1CI4bVNI4eNKE\n2g6NDRDtfe0dAJdpZ0KkT33xSJX32wTQqW5N9COaiKjeGmGgjfTnyVo9vbzJ\n9JhmtNJLdEz5Wm/TYeSmK27R1ntu6HVjaST0CyEpGdV/1x08b/jPDK8OxTS2\nLZn8rlbBSmRjcRpZLlSViSW9H3Y1I6I7yI/ktkXqWoTPrBKHqfHvxxZSCLxI\nrcRR0neFUajnigRKz0zxO23GnKFOki7/yuswzA+ABwT9TcP45nz+Vt/FdIpO\nJMrWqeY5DHLh/gsZZXTEb8jANaDwHoKfVhBS4bSUTDYaNbRwg8OvudHP957y\nZo00IWSdxgyy+1PI+dbKBcWOlyGsUglo/s2J/w9eMlZhUh4WypA096ahAACU\n7lEuqb+JJKq8wE+hExBa858Mi5c/P9/G3Y90Mtm7/axFL56LrI7UYu0GItv2\nObWz\r\n=BB38\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2f6df990a3e45b1985740da9e55bce17882e69d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f0ae11786.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f0ae11786.0_1595554981303_0.5832320003040379","host":"s3://npm-registry-packages"}},"8.0.0-canary.fb4ee66c0.0":{"name":"@material/auto-init","version":"8.0.0-canary.fb4ee66c0.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fb4ee66c0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"58c25c8162d9c5ee367fa4391e759970331a7626","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fb4ee66c0.0.tgz","fileCount":14,"integrity":"sha512-F3SofeuORKMeOz1ABrl1uSXPyTfB1VOtv6Oekn0a9EDHvQtO7/U5PluStj9A3lvRnYICv2p/Q8MOXqLlZLAjvg==","signatures":[{"sig":"MEUCIQCWjqoOPuIK0jqncFLLXvUlLKgJJiWnSm0WtIEF25uF+QIgbiYe99gze4XDrCxaaGK/SMJGTdsPxDq6NV2l+QZgew4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGkMACRA9TVsSAnZWagAAn1wQAKOfGQqiEctsa0pSGAoi\nK/OMWFOoii49bZ8OjzigLbeHfRZgmjADV00g9LkHEwFysZsv3X9RbT/6EKFe\ndyHH/bKhEu85PFhreHUj3sT3id+1deTunMXgx4UFg2PQEhtoWSJpEXWT4PBc\nerTZ4ivxdtWDMXO3v8cspuS9iK8WOXTgxV0j0ryUEDW5rzqJlYdYEhnpOLIs\nRohgbuDhA/T5KrcLfUfwTJ+VO/fMYyMnaaX4LVxS9Aado5D2ZJ51E2DtZicq\n5m/KUJzTOZX5zWTVWU8IqZAh7jmWfdvZFyh+IqHNMw7uIK3LwBAr6oDI/QEY\n2RdVpoE4sc4PP07pCKo6tfBQaUGFXdWDb4Pr8zHFi6AU+y3V9yFZya66NCAe\nwlRbXAf2XH6+qjycOFq7TyEnhpUj7qHtvgTOk9FbTweOwTO/+tboEMdu0EFw\nA09ng0lM8AMYXjisHW3JrCCP/t2fklqsFJ+O0MFIxtbvG2lla92rcNeHwAnP\n0cKOZypN21OiIrlgm0IQ4sK1TefPVcATJABJhyG4+jKUybmfK3NDP2+W9usf\nsyDJ+8V4PGq56UiUWPLr3lbpIasb5QSEDAFRszuXWTDjNy/57eMWaJ3aL6wZ\nt41UKX6feL9id/4eEub4P5z6WPbncsS5TP2hm/f3sQ1yUuawf21a2LPJgrTR\nGWP0\r\n=CqI0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"38a9d8f8bf46aca600cb4ba84272480ece6c67bb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fb4ee66c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fb4ee66c0.0_1595556607651_0.6729542982169916","host":"s3://npm-registry-packages"}},"8.0.0-canary.5511e0aeb.0":{"name":"@material/auto-init","version":"8.0.0-canary.5511e0aeb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5511e0aeb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8e8899928639f7dffc7ba4e26b6ad17b39239f2d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5511e0aeb.0.tgz","fileCount":14,"integrity":"sha512-567ZCNOtpBrNauYPJB1Z5/cnrR/eTOJd9y0Imb1ocAW1DnU8VUZfc4CKKlJtXaTbcCykJW50guMaTrGIkw8fgg==","signatures":[{"sig":"MEUCIQCBLA9gu3p+WFp0DxQn41wPoMXsp62pg87T84pstcIWEQIgGjoQwEgAWcJddiENyo4j27ll25nlNYqwXKHsp88PG4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGxKvCRA9TVsSAnZWagAA5VcP/iuFbrdBn6kAaWYm6lSL\nSYPYXxOhthUPlVpC3MVYFrsM1vr9UNmAtW/WoWm6xxYuwDVuOTbgQ8NMFI7Y\nK8mPDz3aL9KUL0oaU4jEX2tYujzzw6neUpC5PpjULd+gkQk4FOoQPdjK4fHv\nTQxgzsY6C4Duyq71qggzlvGRo3AlsY6kQo2VlTJzQtC/+W/X+cKFxNRMOwYx\nFSodRe6QMyxobxZ5uifR+YAQYUiM0rxHTX3OZvUtFghDObNbR6liXZwTH+xm\nzZ+2w0Bx7AX8/qzhq43+SxdzOiGZlmUgTqhmGHs/gDsjRQ5WEWVXaaCgBjN3\nRMDSTf2MoWfGXOAGoCdaqcJTjCwBbtihNCXu27kay1XLltqBwXJ3ecvIZmmk\nXqxxQVQh+ky/AIRi+cG2efy6OYUV6aOxgMyykOiAN0KSqG2QBWwIkBBigTme\nuVPhWQzNg+MhJimFDYi/88Iu5FOVqc6lR2vHah0sBYVYIEgdZQxePdugp1P9\ntbABvaC68baSaV/PWHnBaCwA4CX2OlamgCn9fGk5/88EqNc3UvvySBXtvIds\n76m96azS/XFVmsFJQ4ewGzUx32lh676SDg6R12TwQ+DhKw5yzqpy0AdiJ6/Y\nawTqNPlwxHA+jlr5EEq8GmhD2nJ5ly3V40HrPvQQD9BbpHYFml+ZmDYrIRg6\nUf1Z\r\n=a6OQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc830dbf81ef9cb796c66b2d35b70355ca46a37e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5511e0aeb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5511e0aeb.0_1595609774695_0.4666389964404074","host":"s3://npm-registry-packages"}},"8.0.0-canary.8388a9bf6.0":{"name":"@material/auto-init","version":"8.0.0-canary.8388a9bf6.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.8388a9bf6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"19266488d3cb34236c0c3d5cc74b9b0ca0a41c38","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.8388a9bf6.0.tgz","fileCount":14,"integrity":"sha512-XKyBFy9EeyESfgKbGonkW0eC+r5WH07zrzlpOVz/TRPUerk/BOMl2mcoWYdUHejKIHA7m+GGchN9JE7eO10tbg==","signatures":[{"sig":"MEUCIHl2eJuwE0dSd2RM5QhNV2+XUW4ttYZgoZL22ebRRUEfAiEA2v0FO9hi8G2z3PyTuV3aMlciHYAzdwTWZ+VnWz1hrdc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfG0CoCRA9TVsSAnZWagAAHuAQAIeUfhzYz+wOtIJSJMPh\nZZmhap1lRWhqeUf16g3S8S0DBg/DD/oj0hHjSRrZctBw417NQxC1p2xl88+U\nmwa6bQjrV8U+8f8GlpZtHU1BlSW9HAWj7lLL40KmKrJ1UYmK/zWfpF9elM62\nslUoiI7jMqkiCO40CrOYDUWdsjKI3q29jhhAICgy4Y3tqGHFUdvll1UrmaRq\n/iV046LKmUC8LTT6AecTysTC7OT0aoMkR+6to8vw+4h/xfzEEGNw1lXwWXDN\ngfxkWX93MNhTxgap349AzijRa7WD77iF1DcoFd/8baa0MqhbBCmKI/CQ2g0V\n7gVJW2Hx/oLKWHCnG0eLk3EOLNVqjIMYfuW5HcQo4TDBKYWQcOuOv+nSAi+i\nQLMV0DshOV+YF5bv18QK7agog7/Y3NAPv8RaWoyEscE3LeXzhjAk+kp+jT9u\nhCDTUnT058i4WRbvLQQLolduRi03/t96NMt7kbHniAzxhE+VE8bneHWDLk7x\n4StB7lKgS08urkn45PcNf3GVI71EBqFWZS2OpNjgPcMvbo0HA6LBHj/8cXIk\nJ2WhZ6jhYl/jhJicUeSiOD/FqiyJ3FDLKiwlDfPWXMJlqrJ+kFUJVRaIWX27\nmsrw+UUFCQ8M70geSzXokmlFpyITnNeUUA2OM5DyoB8xsKkW6SXeTe6xysEW\noiW+\r\n=Tj0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f2188ad8c46b8f947761bceed0fcdfd08019e97f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.8388a9bf6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.8388a9bf6.0_1595621544366_0.27814652803557416","host":"s3://npm-registry-packages"}},"8.0.0-canary.ac405eae1.0":{"name":"@material/auto-init","version":"8.0.0-canary.ac405eae1.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ac405eae1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d74e8f110ac1da23111908f537a4e869463a3941","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ac405eae1.0.tgz","fileCount":14,"integrity":"sha512-y6CiXg9zV/54wVWYfSTMHQalhx0X+2yoa11Hh+0S255orWs6x9A3foQYglRgvj/wGpH3iKFS/RXdRWI0dv211Q==","signatures":[{"sig":"MEUCIDIR8EUGeIRPJQszcKVXuTDImJ7lZRV6lYFbsArWpR0xAiEAiXPyES7tr+zmwm6hvsB3/j28rVBlKj9XGOTAoXP3iLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHu1HCRA9TVsSAnZWagAAMRUP/0KC7u4rOcakd08dPKDc\nBvLmmUEZHPCaTspdwFx+H8A8b7kflc9t8K/i6/FwoUZEVONQFQEjIr7KGqL0\npZLAzFwJk8xXSFEZ0bJAMO7++LOdMmdwddoZL6/i5Q3EJ3fao28TkaNtmXD6\np/8Jc1JQ3iT1E4y6VKi4yMzjcwU/PnaQ4knJnsf2d3T0l+w9w+z8LaOBuoLw\n1LdJXHnwG2m+2RgS9U/ewO8uDwdCY1ZvRvwBxqbi6YB+Cu4jJwHp0fDKMNDS\nJvZUYJMUX7jB4PVOPFesfIv6i2peUJvU4OVGP7ZlQjjC+9oOouyC066+2cST\n9nUrv+f0jJ+Q7snl3DH23p7i6Ib+i6HLLxuAh0aqmOKNF3nahDnjh+3pl/E/\nYTZB6izepV1axgXG6WeNqMu4z0d2kQ+HInJEK1Z7ip0dM8FvQ4RmhJl01sq4\n3q0i5wnfU4yo44kMTeouBJyASunUBRyEfkvL/nxHOtCgsm0xiFNslP6VVp6m\nQlMV5ThmGyNB2HTIQ6i2bWn4hk11hSdbBvuqEJ8aljCoNklA9dNQ8jd1CV3t\nbCmj8+zz9X2WRlIZFB4Nn+PDDp8L7x0sTkroa8q1lvAFucwQCF9MWbs/iXCZ\nYU6bnc3b/mB2eKbXetRank7tsBave2MEMvcp8tx2gNtE702FaoK1/X7KisZe\ne/dk\r\n=awGo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c4f229736a36f17b97137adbdd4b59901eeac852","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ac405eae1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ac405eae1.0_1595862342495_0.5847314431391049","host":"s3://npm-registry-packages"}},"8.0.0-canary.75553837c.0":{"name":"@material/auto-init","version":"8.0.0-canary.75553837c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.75553837c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5324437135e9c6cd811b4bc70bd9a533736e6b50","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.75553837c.0.tgz","fileCount":14,"integrity":"sha512-W8YvoV3jn9SuRx/fwC2LlOBOMFIR8l+ePNhxy5VniQhjPjm5hEiVboMVBQDuJHrQhu7x2bCCNyCjtzrGGKPZjA==","signatures":[{"sig":"MEUCIQC7mxIXKb0IAiQDCXGSeRAXmsWJJtVpe68n2Mkkwu/VxAIgFa7b57Yv12WCGLEHgP2h4qpRxyWUaSz2Yl8QXyhRsZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHu6tCRA9TVsSAnZWagAA/RoP/i3WFvxDwnF/PSDKdDfI\n7wfIFCk4wYAV/XH/U1QHA1D30EIlTXe+rqnRn2HszRjz4PXiWRHDGgF99bxJ\nvq1Xhs+b0Q3yL5Lt+Rc+jxsgP+1z9gkSVUoJVpZ6QrVhDWTF5jdmbWPlEgD/\nKxrJy9fJvf1ez058J0/scrPVJEGuzO8O3YESSjbgpp6HU4ZAxLHrJXaawwZy\nS6SwoeafZ13dYBsR/kz4+gacrQVSblD95qtfnEXy4WaoNAJcuJbsJMHfN4Gb\nuHUF2xSm+Cy2wMRLKARkOH/RYwChdtOghApyFblpClJ5XlImk6yZt1Bk1GWj\nUUV6m6W2OJcQ28MRlugIS5yvwZJJohm34ySq5UkFm8fUoTpafqZah1aUEzDL\n0/El/Gg4a9/HQXJmjivL5oNbh73nHKkDUgr6i7uYn+BVCczAQ6drltfZ4XOt\n4r+HhHajQFnj3m6kMRg/IwrRM+VEODyGKGyGlUwlfGj3hId+yF6r2AMjMCxG\nTgv+ecfYyQphYvJh2gc9zAl7tS+QObIpU9pQ7J88CRNv03mNcXANr4gKJoQ5\n6kngTV2XX4r5j5jWbo9/knbWdPRd+1yctXmToBmUvYJj9DCi3Mb3VWDXmq/e\nsDofxkpqo6aC3FY9dmkYKTDvJI8QSLMZI06tEnkUV6722K4tRlioZz3ihK4X\nM7yJ\r\n=+Ia4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"18c0e52ebb63979ca614d6df13d96e2c1cc93216","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.75553837c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.75553837c.0_1595862700753_0.23540032935032085","host":"s3://npm-registry-packages"}},"8.0.0-canary.b96fbfc7a.0":{"name":"@material/auto-init","version":"8.0.0-canary.b96fbfc7a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b96fbfc7a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fede35ac9e484981d3460912f7030d4d1c280219","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b96fbfc7a.0.tgz","fileCount":14,"integrity":"sha512-yjRLpZjLfSAcO1KeA4d0bZEs2qFOI4eHlhAD5WcYPh2TA1C4Y/N6qrnYJ7B533UhjQQpHyLT+wBfbTLGqguhaw==","signatures":[{"sig":"MEUCIQCTAwa2SxEnuOFpCgvjhGXB5WuS3ZsvyIsncWpqvmphfQIgTCex14HbSGF0L4HRkA0BD0GCLowrNdEx7c/cC634d7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHvSpCRA9TVsSAnZWagAA7jUP+gItDrlCHYoWCCqwSE9y\nl96/CjgfrSfJ6UT+eSgHIRyKmCA4jfbWvfyqwsr7qeWxxPq0CS6RvSqeXCwN\nw5Hp8XH9a/LWPLZYYKJn2JGdWpKb2X1nFuSPLg53I7GP/lXe82IrABKL9BpI\nN6fN/QMcPjkAPshtd5b9GECqDdohUbx7KBX+5th9zu6884TnC/ws7+P7La7f\ncRz9FzEieV7g/3g2m/DRFimOM1Wx8EBvjU1VmvZDNuwxkv4FnDip6rL+NAla\nrEYiKSGglPOeG0rag+9OGAABitUt4ReJO39SN9rKgFvUZZ8oB2sq6os2OC9+\nlPSDvMnrjMZh90JwXlQjGSkLzjgT12kl65Yvn7fHR2RNsAsmaZPaxU66S+g9\n8xUpDB2F6LcaJzodsVBxIvufUOwFf9exnSBKvSFHp5op19dH56SSRVe+w4L+\nMEt06pxv8XPL7ircXxEURFUK5Eu9l5FSt6eIeroMD7Ch1SXtJag0UJeqnQC5\nf06o0TDCD0bml7oCQzVnW4K6ymAev9wA3ph/2InDdEVfhKo8WM5JixzmHphg\nA/aqFQvffZGuHJY+oOTplL9lg752W/rE2ocu29eI9HyAFAukm2qHZBPWqhci\ndOsMCxRj87BX/Txd56v616JE9YjEWzRlIkupv11cvotXJC9L0mcLwFk6U3XE\nTI8D\r\n=swCS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0e9c13ddacae3f3bc09bd4f168d276110fb5677e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b96fbfc7a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b96fbfc7a.0_1595864233399_0.9547380319231007","host":"s3://npm-registry-packages"}},"8.0.0-canary.61f1a8d85.0":{"name":"@material/auto-init","version":"8.0.0-canary.61f1a8d85.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.61f1a8d85.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"746ffd577ec0c5496b6b9a2d8de12b841fbcfd63","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.61f1a8d85.0.tgz","fileCount":14,"integrity":"sha512-xiViwYE7S7LpkTEtu5amsE4DNxuMzTFmQ6QfhFKDNi+vO5wijTapbK7nDZ4s3MRzXgPFWXREzVubArCCViSH5g==","signatures":[{"sig":"MEQCIE1oUUs++b8ivKvn60SJGQ19obCVYXJzs7bu56AfNviBAiAF5JrKhwXgQ5tfgLfcoN7vfb3psjb752CJwmbuct017A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHvbRCRA9TVsSAnZWagAAx0UP/3T7TEl4IfC79wbtUfVr\npcfIDgpBKS82a64YW7ryPzlNbTXrOIuihow/UknqHQcuydJPT3TTufaUvRR0\nevPn19FSuNBvTBubSDZ1ebS0qNoPRmt9F2jBgd2N77ipCQdYMkz4Ps66TRZs\n2jbTHSsWBy3Gp26Ri3jrlo2DJ6eSqZ/ov6ARZPkXNDCKvaQao02/SEBuPLw+\n6l+fGSbBlQxCMm6whev8dTjCuSO2FfT1Lrgm87ohGZN+2ncRQ1wvefiaWhp2\npZ55Fj/pbIgqH1cEke/Knwt4BAERZFXy1FqZNNlbIGMxNw47Dhv2GEiVGKbe\n6bkRqi4+7IUhd+WYUs+zRkMl7kKCQ2G64uwScSf2gUjS4p0lvRw/c8WqoYvt\nfnyfI3opDS59U+g42NFxTjwy/9KX8JtqdpvTghiGrW7z0vSDRDQIjuEpa+ud\nJZTkykKet4IHq/Uyfgl5eEFPyY0j74Uby9352mzc0f5HvUHaVRJgGzZ4gpaU\ncKHnlzhCTc2IzV/q9wQp1+E/dX/EHviqmttyGRybvVkH/Gm3CAkxrW5rLIvg\njCwsspX91r+yIkmck/vIx19r3CuV6tkuQFSbHExUj0+/7RiKkbIXrWj2vpt5\nJvIxIw6x5cRWKdxWNJL7+P2Iao7hBa7TQ6qRXaVUsmQyffjeY3HsuCcEmPCX\nHqqP\r\n=gEiI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"71b0bdc987ed1b1b5ad827abc78149cd4efadb89","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.61f1a8d85.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.61f1a8d85.0_1595864785106_0.68230703320711","host":"s3://npm-registry-packages"}},"8.0.0-canary.81dc33377.0":{"name":"@material/auto-init","version":"8.0.0-canary.81dc33377.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.81dc33377.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f5f28809cc4471f74cfcc767a81ecea76c9aaafe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.81dc33377.0.tgz","fileCount":14,"integrity":"sha512-cY+KUn0lJO+LQcS+0m2Lh8sXaTHxB8DhM+HcEi05BcN6Dz8pp5hnNyzzHSwWnfMsihFz+6MBXtkd7Z1uXqUSbA==","signatures":[{"sig":"MEYCIQD2yG5lWe1s1DrxJGVlMjsVFN8bI4N2TQnJraGDfSlTHAIhALr/j4Q1cF4dm0QRUUwFe+DWMYpmjSD8zImwX0a5lzXf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHvmkCRA9TVsSAnZWagAAQLgP/iy0+8hGD8rwoJHnSEd0\nZgBnemhsDtm4q9JtStcGd3M40iEdp/TyNFTwE9oLyFs+4JCaQAm7LNBk1FfP\n/hfhgRw6PK9iafwHmVb/3ZqUD2bh8Pxn0MH1rT07oi1h2NVotIJ+YRExoMmo\nb1jDegpKoHf1sB4n7rHLcBZvgvuAdy075W8TNyBEma5vFVw4EZXbawzAPRmK\nyyIpSwpYyp5SkvVsBWPh2VJrsmI2p76TNp3m97mUOMgHJos6QbPB/EDKOT7w\nn1YEQQNpaBy2laUJLmmd6G+bIacFMucYZ7M0aYl2zB89yNj+5bLSEbOCmDb+\nq7mzF6FGwhAXzU3Q47H5L9MC9sQFWwgXM9MRF5z6sJH59Jfxhkm3Gl4XY8m8\nD5Md92BMwb0xYBxmyZjgNZmVoE3F3wxaZja9Xwe87f13iYoU77MXzd6Gi8G2\nIYl2qCUNv7gVwL1L7aHsHdVEYKhI36cYvPJ9OStDk2jQE9c6GExy684zmzwM\nZXtoFoy/+Qz7jHfRL7mQabDYbxSjL4s92Z0v1xYLj5DuI3nNGYqb2vDOqXld\nlNPJbQV4jI7pMmeRnAY7u7cisLrcdq5i5l5psGf+8Q3NWMIwSu1PBDFzTJQy\nwitTgwF8QtPKR/grZNMcoWwyjuE701qIVpQZjzEkzIaJthZ0Tf+R5SljBHcC\nB6w1\r\n=gQZ1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"14e4858d309a20ecb69620f07c8f427bda0821ad","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.81dc33377.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.81dc33377.0_1595865508270_0.8095502335827351","host":"s3://npm-registry-packages"}},"8.0.0-canary.ffd9ede58.0":{"name":"@material/auto-init","version":"8.0.0-canary.ffd9ede58.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ffd9ede58.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8c85a8c436fcded90bde113f48a8c0110a789dcf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ffd9ede58.0.tgz","fileCount":14,"integrity":"sha512-bL2XJElqVH/8PeXGn5g+kyEzj/nvWjZAS+1/LggLUy+lwfvnAj8Md9KxMzAjbz5x1nJeIzN/fPY5qe27f9OdxA==","signatures":[{"sig":"MEYCIQCrYhRjdJrbKUDWHHrygOLcZug7zuYcB/9o4EpvDjnovAIhAOdsN3gFJ12kcpnX0HM01xzj3w4SKStqZXnNEJ6P0GxE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHwFqCRA9TVsSAnZWagAAOO4P/RzWeY1K1AT+etZiNFqW\nnsdyXTziJll7bGUo2uHIi7a8s/Hktu8KvWc/ahVRCMS2VUmpGsDncP2Pndqn\n0ybY6MCgu12iVVIx89GazMGqMwXoPwbcXI6bE6fcEkGsHi5rc8zCYnOUKIUY\ntJVtjevieopYOLTVkF6RGoq+LOsmASK6OGu6CTeEyQRDzGPqiqgt2G6PUICF\nYmAyug1VVOdax/HRfS8z0ZEEWgk1u0N/tB6P8IHAzA+pNNxPR6XOwCXGJUBG\nvLuEefkdLmdjAUdWV7tW2SgIbn6caaEM5onhJsbcZiU9VRWcY0DACiVmxObx\n79zmm/+UvLyIJiPPENVMMHxWncf5xmShzQr29fO3/YrZRd+Ar0G6c8zLXfhm\nKbiBN6lLBjzj9gGep3jU5s+pjEI8H/p0ShvECcZaKyQIgeUlCPgOEi488ywc\noO91j2Kb4dwuuK5ZCdIA5cJcmn5uUsVq8NFnin7SuhN4QQ705AjVOjyRxakD\ndP4zGYvh6yPSIno2SyaW8uVhKrIdFHEQpS8UhT0xVOznQ4tdkF1EpAew+rkB\nViQ1j23atdhh7bSy5Hms9b55rtv7uUmMI1APm5znpXNbJ6TWhhXD4eCNzB0b\nFxwrCmZ1OLWVflAWCHWChjIgvqoPc5Ifr160EBZqnAeKhkvalexprMT4EI5c\nMiJe\r\n=NQKb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a029ef9963cd4799ffbf7dd03908a696d110f7f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ffd9ede58.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ffd9ede58.0_1595867497360_0.9756740433259583","host":"s3://npm-registry-packages"}},"8.0.0-canary.52dc55acf.0":{"name":"@material/auto-init","version":"8.0.0-canary.52dc55acf.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.52dc55acf.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f324f582c30f070a16a83286dfc378d3a0fdeeaa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.52dc55acf.0.tgz","fileCount":14,"integrity":"sha512-1f9CW/lrYWUYr6SsbsPVxvpTPuEOx13TJ1ghGkvA5vjpxf9ReRu4qnpxnSCX98RTGwTZUkZuU5EXEGIKj0Nxtw==","signatures":[{"sig":"MEYCIQCxywkULQU/FzQiDWgaEF/seQNjtSuxPnz64xG2+g1vVAIhAKYmq6xjzTkZF3EoMbjRcFwVJTXTw72ngWPFQKGuTbHE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHwnmCRA9TVsSAnZWagAAeY4P/0pJH8c0ANkdCO3STiWT\n6VvcUhTpmTYNqJ5WWJSX5u0daxJ1XuwKJyMbd9rgORjmYIJuKKHXJaKu5n2q\np/H0/j0L9k9BALdsPImJ2hhm9Rec9zNlSidzPKJYlODMgpB2AO3Nf/FjWkJd\nf4hCMi1So4CzAGT1MuY34Swsa5i9B0yoKddXZI4+jWmDDAeWdZN7dXVlSPEN\n8NhqzjGMVabidIxRLMT1EY5NWBBBLGGtwq+Y1wJ5xWEtzcSNDP1d/VPOmVyu\nGRrYrTvn91FkrppWkHnQp2pANyJa8MW6I1Uz5KVVNSqHw5Y6mBNDP9ifJyWE\ncFip+CCt8Dxmd7qVnpbZ4Vkq6iKq8b8PihZWzt8LAeqLp574EQxcHHPsXCnD\nLASMK4eBwVhUG0VocEVr74EfmaHuAnYPa2lRA3bY45VTL6NB25kc2NT5mhRO\nUEL+NLA8MhPWDzmPZAcv9GI7FgyoPXOqKY5uxnMhwiz8Z1vYEI/0f9XwfgWG\n+ZU9GCvS550yc/8ZrKX73kmR2+l5YpBQnOtK8rSHygLVMqU007nb3BdIrUaM\ny26RWAG8+/bYYRuLUYvNsqKlrICPS1LqZVeN40+wLTEgwsAsapyeceEorgh6\nsegvx09XZpuMCnzJw+V9RFMpRjP3Qjo0xvDg+5/PChERWWAb5COsriI1TIto\ngJPW\r\n=IZlJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5253c9af3b0721aeb0cd096ac48b4c113801757","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.52dc55acf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.52dc55acf.0_1595869669860_0.6438976029796033","host":"s3://npm-registry-packages"}},"8.0.0-canary.d4274ff05.0":{"name":"@material/auto-init","version":"8.0.0-canary.d4274ff05.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d4274ff05.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c9c1877beae5b65f589bc534657c3f3c8f16d7a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d4274ff05.0.tgz","fileCount":14,"integrity":"sha512-f5yW8AQMEBdOHBQWRYskxKBIqRSLstYPSDOhAviOBrAcVnOykXSTVCubJHNpKMxXlYRRJeJYrAsbPgmfUnmvmQ==","signatures":[{"sig":"MEYCIQCMwT3mavjF15rP4CjHdU+axel7y83vTLlfPhQT1udXJwIhAKKMc/g7j84TUI1KIHXYAiAqicUtJIhxvGoALXhplUJx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHzAYCRA9TVsSAnZWagAA2gEP/1wHAlLsOzhLd2wBImPV\nxpHWYHCrdxahlq+mq1bXRnwZoa1QcqofSZYUBS6B5R4tJK/Wv3Y9P3yxY1zT\noDeGyBfJ0mWpwfCKk9AxYW0pm0i/krspjowvUCY3F3XY5Zw2rCkv9cGz2IvR\njwSSW9yHYD+lFUKXUI84k/XF6BSSuhLPOm+4EiWAYfyIUhxcQoyMzd+ofZTN\njNRwwvHzhmODfXAF24Ybus+PKnjNA2SlMZsvkRKn2Vj5awnoHNQ1aRjW2q99\n1YDY0eM99+HmwT/MGTJxGBIVy0APCqhB29euIRoQwNQu5YACYCzfp0w+K2em\nsHEs6oDTpo7rKzQGV2+FZb/lwd4aurxCO8JHFa4jPUaHaTh/r0msNPkPVgH8\nJ21qYCf3Qwzi6YTLA79mG/xg4nm+NCXfYlPIue61Rk4TWQwrXJNsjWqKCZlx\ngt+T7nzAht8Dcr7CCIoPqzdXdcY+IWqhowuxlNMUqAjerdio06m6s03Uqx3l\n/2wxaRth1ESlespP4n/jjBuUgjojQiTuWvrulB4eWfSmSqdO+ItogpMOungR\nR1H3ScQOQdrFteqB/uPdDhbDxTLUpBuU/AZRGHuVwqgzUlmTkAvYPnc2TWPC\nlkyMhwKQg1urZK5ZbXE9OGi01eZbnRiNVWEhVp2ODQNSc7pOZb0SNYfcPYx4\nJCXs\r\n=E/Oy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b4607e708cfd7069d540b1fd6042775c4599855e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d4274ff05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d4274ff05.0_1595879447755_0.4877304753415046","host":"s3://npm-registry-packages"}},"8.0.0-canary.b82d0696d.0":{"name":"@material/auto-init","version":"8.0.0-canary.b82d0696d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b82d0696d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"61176a28a7e14ef11c397acfacea63a6554989d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b82d0696d.0.tgz","fileCount":14,"integrity":"sha512-Y8YHIXtXyX3HLweN1Mo6NESy5QcppZENTBzMSf41HUCJ+Dso/JxF8qBcQ7coO++mzg9xPceAmpuCAz326FhpuQ==","signatures":[{"sig":"MEMCHxtzvXaFkXU6Wve1ko3/pf6qwhoCaX67RMnnUeBmL1YCIGg1AQ2+64tDXPLupMrRClfehPIBQu/0Z/QeROj1Xl9c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHzGiCRA9TVsSAnZWagAASfEP/RQpEfMwjqS5hR7dJ1ri\n4XyI8p0yOnLYQZc8IgPe7ZHeKNmzWgQF4oOmQ601qtwYn5r44i6F97HH3Anx\ns+ZlSwOLc3KhLHCAvfFFEiokFAasE0v/WM/JJxqIQT9xPfGU83GzA4fhmXFW\nrg2fAgVk4IzJMq+5d+MjsRDwtro4QsTSOp2cC1MRyztCA7xsD2w7u9PRFI5b\nVNg6iXy8bEJU5iDie2T/s6vlpt038kAez9S+CghQv5UIWQNHzo118LEcuPkS\n+Z3+FBshjuZtBKGdbUyYnxH1/WFVnMGECwq28ycrouxcWy9M5XWETxHdGOcr\nj5DW6gFWIuFjUwGBLpDByitI2wPmXW11eB3j6/ye+mEOR4qHspGrOAZ6jOyg\no3UD5XkdqyJZoQ8EZsMvMF5AH978/HZtmeLp2Jvs0CVxFAsaQbvbsVA0b1Yr\n0Q2VF+q/eUF4805IHBB+b6KpGBu9qx+sW85+ZXZM5rwRqQAO87JKWg8/beJK\n7mP1Xsuz6xOVO8i+/fSvKNRZ85F4raS76wtJx9XLMsVlUg9BeimUaEY9Qa1R\n9CHWXTWsPvWPM1MgxLS7Ojn+wjdH7NsfiCwWxYljvsCt4xM1vgeLRV+2RhoV\nNqo4DT0AvbD1BtGEiyAwnjtgGNMUTT17/Us2ra/9vOoWQBLC02VlCaCr6Ilp\nV9bU\r\n=VYB7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"914e71226c9aee0625b5bd1fff56b887e3c924d7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b82d0696d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b82d0696d.0_1595879841997_0.19747086250221213","host":"s3://npm-registry-packages"}},"8.0.0-canary.c2852000d.0":{"name":"@material/auto-init","version":"8.0.0-canary.c2852000d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c2852000d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"abb1dca8524b9058e40e8bd660b5a1ea9d9ad8c0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c2852000d.0.tgz","fileCount":14,"integrity":"sha512-+aqzds5fArYGiEqtwfcA3rTYE+kJZpPu8qP+F97Ct4W7EyrelN3UrG/Tj4QB2C00wrE4ITPsAKMeDaEcJHw8SA==","signatures":[{"sig":"MEUCICew9gp5NtMNVUgurj6xB0wq9ILVYPK0a3LhwaffygdRAiEAh92DqY7SAPuXSmdWmVOF5O2+sI5S17nA7cApdSjo4Nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHz++CRA9TVsSAnZWagAA+qsP/3wAKm//QaZTzfwWZtwL\nHuit8fQQ00v8zd3dm/bTmaJFZN7C26ZDOqJ3UpoUwolja5E3jUlT1CBcVk25\nUSuydeCO0z4G/vZEo0JrnPnu4BGvSbzkVD7BuG7YMwge5RZI2hbuYmSI+S8v\nYnf5FHTuFjeGWI2Ow5A9dLMwkUSBbMPLf+AmzEx5mweleMhwXUZidNBkgGv9\nfSzCVOfTaM2ymN5VjNpuWth1d1M3DqvHLnWERA08S0dUr4KktR2v9MFIql22\nPtcTGxlqdjxxX3HmOvJquQqmgIOeFV10zBDfZK9dZ0IYEXudYPSlt45VW21i\na57q8JydklBK0xjiHo/PZBi6duvpe/e087WYgIAIcFd9a2QuDaduqZJlWtZG\n5bmLWIriC3xbG2z9TBmaqJYhIuNzDrBYz61nKwqOq8/Zf+gVQd6kxO/CEQId\nqEi9UXdveChzazveiweOKEJVliCSJI40tuUtdY8G76snM+NLKeE2bvrjoZFO\nlLI+XJTCyixg3czMsYOrun4nJDCHVZM7xryefa15KC79bQXd1EkKlACo9d6p\nPF3YSDBOCZTDqU+XiY158rx3BFIcgU+GmZBVmO2WaKkrGb7MM1YBN2FWn7BD\n0q6sQniUWACYIWiO5zqHMuqyYh3gkC0AOUVNZNojVg825GeAuyW4J1ETVmao\n6x8v\r\n=m6MM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"53080ff99f83ab326fefffad16cd09e449e79f27","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c2852000d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c2852000d.0_1595883454368_0.06016287321437197","host":"s3://npm-registry-packages"}},"8.0.0-canary.f86f83f54.0":{"name":"@material/auto-init","version":"8.0.0-canary.f86f83f54.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f86f83f54.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e07d81b9fc9f99e39530c546d6d9dcb4e4de1fb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f86f83f54.0.tgz","fileCount":14,"integrity":"sha512-SVkYrh6jijEI4+/qf3D0M04n8af79oSDpW3bOfr+GjT8c1X/BtjhV+38c/TMCL6RnzeWuTuOPhJU0KZfKNOFdw==","signatures":[{"sig":"MEUCIAaffYAa3KvptWTqqcPXHz67W5Gxr/afUvH6f/3YXvE9AiEA9QyJMnsy5ubKRM0BC5flQVBPBFQpAQlFNInPEl0nhEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH0zVCRA9TVsSAnZWagAAIT8QAKTwSojKdeRwTPmn2oDJ\ntHd2UdQCWGEVIVTh6FuHtlAaNoXAxyl23xNcOe8uO448AkD8ZtgSs67zPnpu\n05+S0Jm751sabY7QgIEllTr2rOc+CozvZokuUg/bKCufsUrsxJk9xWXhnKT5\n2YaUo+kbQnWMXmqAW+aDgOG4/NK4jFB8E7jITYEonswfK7vP+PCeex1w8cnO\nlqpMny72P8DfR1kvgRB5xX5RbkCbEGPUSztuF+bkB6mwELc7O5jFohBWZagw\nOf/9M7jICWAOAbuvVC6XdNL0W72sWqLqfnSidSeJUBp63wrop9wTf7eS4/cr\nJl48M4eL2OXgf6YttQiMqvTEsL4J/HQcwdVY8pwiQXRxMNManwKe8fZNZKdY\n0uLXPi6R3aTOAG+h+Ge8uLef9XzBTrGUhURZVMPAuS0PIC+Fn+TmDuHmqcrL\naooWvYVz5AJt189I2xeT4zfXCBnyr2xyNv45YLc+TsinUgakjmtw3dLKx1FZ\ni4lE/ZZqC07StTvGYPoVb501TWMBypguKNLFez4vqc4wRAlFHGsCnZFVxWIY\n3YI+3ewU44CJOPqRg095F6fqZ0rMbQRiK5R8T+K6zPkm5tb+F4Z9N8Cp7wg9\nSQQPogUec8/jSVddAOw753O3wF+hj4QnqNepbsGwFwhZt0++V3IOmp72T5aP\nN+ZF\r\n=KBc7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3c8abc334934dd33ace7aec681868717a4e26d0b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f86f83f54.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f86f83f54.0_1595886805018_0.8416021572518568","host":"s3://npm-registry-packages"}},"8.0.0-canary.41eb1684c.0":{"name":"@material/auto-init","version":"8.0.0-canary.41eb1684c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.41eb1684c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a5a3af5da6cf0e8956abc3a308a3566a006a91f5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.41eb1684c.0.tgz","fileCount":14,"integrity":"sha512-C8mgh7ysk20sfFi4TOqVBbk+Ha6uE2D8rnDdHc0CjV1dUUdgxwC2+x0cj28octeDYs74JLGewqQSdPokvzAjVA==","signatures":[{"sig":"MEQCIAJbOwgzNUMnVGYHFJlz/8tJJDGLVS9AagNvM2XgjKOvAiBl8D/VxWuRgRZtJl+9SOSQfglqXPCAOFW0YC/jWX97Eg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIGUwCRA9TVsSAnZWagAAU3kP/3aqCohGr1eQcl72kUTs\nlL4M4r8tKnMIUxKs4n68Q74v7Sk8uRIoHQtLoTm4dD9b1YNUnKX6pU15S2yG\noWSjl+TYH+0b1lE5pUkJxtuC/rA03xHiivgFYHbthjeFrNszE0z9MAn5c10c\nhNOhKmM1gd2kXyze/bQ0a/4HTSqUm1uNV6l3aCsGv6hIqTp/Plz2hUIzL1sR\n0Ir8nFF9C/+yXr8SN67T3N7NTV76H7l4tdx0T0bjTZu/sAlX18M0O5q6aWSg\nX07Hn6nOhnQZ/H8V0RGFKhmMrdRQN2+SCYJnHJeKhsPPzdHdhrIBhDJb6gwC\nHdcA3P+oSr7oa+dRcMJ5xVjptFunwzzHkR1JJHlJAfHKOhtbCtfkDclt1WXg\n5hLGLCxM/Kfncs/gKBS0xO6UQOtuMza7h9ys0P0P5P/xom3MoYnbCftHWVb0\nzs9hEW1dJewwvItKVGTfHlpROp3ttKE4oI73VimR3Ljz48PxdpNWetYW2nOF\n28jvTx0bbo2KijtHVbjnB2ASKzvWOsRXGk0JHSEIv/8gPA7bjKaNOGeH8TCd\nEhnDgrtx010iu6dKRaK7vmcfv6+dnVw/zf5SwbD0+Pemg7WLaw7iQeAw5oG/\npB9ZV/S5T3GlJOqVXnFd8IFqP52pFqVZgBE4DPDDstEtASASuiZXPC+hzKXy\neMw3\r\n=HIbo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ca556c545f0bd908ba57eb0e24e99d142cc05b1b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.41eb1684c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.41eb1684c.0_1595958576215_0.8319174819199127","host":"s3://npm-registry-packages"}},"8.0.0-canary.9e2f6c450.0":{"name":"@material/auto-init","version":"8.0.0-canary.9e2f6c450.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.9e2f6c450.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"41f47febdc236389e8ad28594c6d3615a10fd90e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.9e2f6c450.0.tgz","fileCount":14,"integrity":"sha512-mQeepYItfL0fkHLJ4pzp+2G5uiSHbPdifMPJojsbughtr1MQzHJWvuCPLxyPrzvoVZrHdC5wbPo7RCeVBTpI3A==","signatures":[{"sig":"MEUCID5KGMFTJ9oPwy+1uJKb9dlydqqnS9cPmICtzajoECxdAiEApBIEKrKds6uFX9Ni82ZL9Yi1+EzeDUQTSidSavBG3aE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIKjoCRA9TVsSAnZWagAAZWgP/2svkZFWiJYUftajZOMy\n71HdEbIGDBsJTwWwloL6xCVtas6fWxc1QdNbRv9zNC+dkm1lmYR50DoVbTmZ\np9Xt03dXR6qLeStFsXLQcxwPIznW/pokmfTwRJYCA6Zq2WF8IZ3Id+O/ieaP\n7itiO++amLIJpTpITsy4TEIdzuS4sR/je3ID/4SiDOkbMaPm0JA4uwwpITYP\nC5/HUZR3LArFTuGm6W5p72bal/ugDEUuZx67JfaWJ2RTjEKOCgGR5VXoEV8Z\nhzKCkl2BptWohxsrlSpfYDjll01BU+mSa/zuTJjHjrOehqNe3r9OowLl/f5n\nffSM4SKHGT2C4gcZGrO3gAVJaaa4t+Y0KSVokJ+v2SMHjrisyK9USN24SCKY\nkMwwfranmAyJTBzyljz2H1yDmoqP4FxFPiCF8ne6sSXePgnP7gBvbDMod50o\nsEz4nRz5vt37VGY/7Nk+PM6IhjfMdOwT682ydDvCdgVMw5gJUV7GK2W65D2g\nNVNsYbTcGjCRMdZA1dEaeJ3CEUz8ufezZ+9F7x/k2dx44Mu2P+Uh+bvuvnno\np3FvaDQ8m6Pm9hqX/DzCO1xsXwuFZK9t0Gu4CtwtayaPsjB7pgCL9nsqdVEu\nCH6n6/7DS71740t3LHvWx3fKc1yNWSUhh1QskedAQsGtImeP9twJGaDLiXAB\nOHqx\r\n=FTuG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20a3870f861650ab884eeffe1d7657aa376a8ee0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.9e2f6c450.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.9e2f6c450.0_1595975912017_0.9627494672313899","host":"s3://npm-registry-packages"}},"8.0.0-canary.e6950b55a.0":{"name":"@material/auto-init","version":"8.0.0-canary.e6950b55a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e6950b55a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"43010cd625be54ac9201aadec080badfb9dd363f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e6950b55a.0.tgz","fileCount":14,"integrity":"sha512-hbBP2JA4G5bQyVd8ZoSYemQYSvBWcwjzHVwWgbPx+oKE5q8v9Q4xcpwban/mr8IhbMbCDCrxSNlnY3zS/X/aZQ==","signatures":[{"sig":"MEUCIQCwbW2iPUc9aDQcTSuTXBwSSNvmWqJ/AmXmWwUXcJ1P+QIgGe7dt9KSVgMMhbpwCxINvupOTFRZjvKbeTgTaAsEmBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIKvzCRA9TVsSAnZWagAALMgP/iQCEjI41+rVq+l0IpIS\n9RB89W1jDWtJR7kJSk1lminacr0ZzzIuwhNq4lKBo4I8hRYzE6F8fhaRs3Km\nUBQ7K4rZfsOrJmsEJEGCIxDYaOYHFNDWUKqKaJgfuXAKgHIYrwD3UBCG6zQi\nMYGpdXCvLHNDke05QA1WhXki8YAjj2O28ESYd9q9aUkCDd4NI6dfiZlKDaRL\nErJKnI+Z7GWH0tWXaBpdU9opIUsTeXB8HzfXfNaLkNv1iISVgNUDP2jRTbSc\nmim9mBjIHnZCwMf7Y+WbDRqqDpipyWWs+2OijpUfA6zmSs6P2nd2sTsmB32T\n5VeflTMLhYkcnZwTIh75VPG0JhQt7e28j2UMDluHX9o4jB4stMX6LG2GjCuK\nGCzQC3SZyL9e3FzIP15j2WC7OOHR0Qdx5xrRKc2D/IV6Y4VZ0N73QyBi4c9u\ng4pW5TVtBLaqZomdd/OhVW4WFFjYz+vMP94W/RjndY8pFDitavCNNbZHhqxl\nWaSGGv+Y2wOJ6AaDdPclNCiQafZ2BHRASUcnArQzFtryuIBKbBIzPXN4m7fG\nnAQadxAlOwoLJuWdJeDMUMztKcXGcNyt+I/imvu1NZFX4oyCxGmTt+UpjE/M\njIWl30TYcnHRT5l1cnsn8J1yVeNAhb2jAeI3FuKf2+qPU9y9KnsZVUzLx/tJ\nzd9E\r\n=yqrX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c71461d7d95f313de3fe5609fac67c2302432c36","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e6950b55a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e6950b55a.0_1595976691122_0.09450388716177716","host":"s3://npm-registry-packages"}},"8.0.0-canary.5e51ee38e.0":{"name":"@material/auto-init","version":"8.0.0-canary.5e51ee38e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5e51ee38e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ec9af6451325e2fdf399935b286e1c860be8ca56","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5e51ee38e.0.tgz","fileCount":14,"integrity":"sha512-Ra4dGg2RiNzu8/iZO878MZGheH7UkvFX1mqSiPX3oeaIxRrJgy7DEAGrBHtaw+/S7869wjfW7kcCAnWTF/1Dag==","signatures":[{"sig":"MEQCIG4Xy8boLgmJ/ovK5Xl7W9uFL+PyBX/rVLHMcPKdxf2mAiBzfivlaPlMS3ciH9Y+FPShkel0ohBDxD7pBy2jlVmEXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfILGDCRA9TVsSAnZWagAAul8P/05HIWQBeZKkH/M0kbHQ\nWyGOWPSA9LikHZ6rb4GK9rruqHrtvVGarrnBz+oSwqthr7TFGAh1o9uc4Jlq\ns3DrW66TT3wdn5WncRLwD0r2LXklw82Yq2zA+LqpTc+8mCsDciUPnlDi4Onc\nr7fw49wXIZXZ0PAP39c2RPmVmIChczjAPOILbL/a7h/cOPFQWAtsn6hxZAIY\nDWGi9Ki0pAicPwDkCu9NFDMjeCJSb2fVDXt7e98KV3JI60WAovUmYd2JhTuX\nZPhQrB18JEyegwbt1T3MRwfFZLbEEOXlXP6/0XVLozFogeFTFSBpo3upQDk5\ntUlTtignpL/JtXQ4vY4VzUIeyDp+lGJa775Fo3VmmqjX7b9ala3U23ZNo1V/\nNcfz5jbV+DZoYrESQJXhdKwTXiuTtAA6x3vIDmoOVGY0/sWPmT/KLrJYMhe3\n1Shg/VsxHpWDN0K/wfgUKYhJ9OdrdGHvf/myyGQifk3BdgcrGiT1P80yAkDy\n/IPHqUj9C4/XT4yZsNgWG22c056svCkzHiR566WyO5CXfPFEw2gno+pQY6KQ\nGmlEwPOx5a16B6t37DcZo2YSb5O97hzN6rRwVWtet6cFdUKxAl4ArqcttyoE\n83+HPcQb/GntjS/8MB2IrS1ffPhKyhYceZJjqw5sn0okhnjGkpfJJr9C+eZm\nsyZZ\r\n=0/C3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a7ac25d06cd849dbb8b1620235e913c46f5d7849","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5e51ee38e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5e51ee38e.0_1595978115211_0.3957458969789094","host":"s3://npm-registry-packages"}},"8.0.0-canary.a3898ffcf.0":{"name":"@material/auto-init","version":"8.0.0-canary.a3898ffcf.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a3898ffcf.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d6a482a0fa40ed20cfbf0d1fa3f38ed0246ef749","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a3898ffcf.0.tgz","fileCount":14,"integrity":"sha512-ZEVV/pz1ZHLHaEKvm1kF41psobVzsCxP+WmaoqEirQA7QtTBsRGvdQjYGqX+401Xg7jRH8Kq6r7n1voTG46ogw==","signatures":[{"sig":"MEQCIGCaLQfpChvAvl+b+wN2psaGci+oL2M5ptMf1q9jmz1GAiAH9cUUpx9RPPJNNiyeaYpxVmtnCzgKjsN313S+pzxV6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIMRfCRA9TVsSAnZWagAAVeAQAI/j8w/oa9yBrqMmFWUE\nr8SMJHDPqfNNV3KGx4rlm5tt2RApzEo98Ytb/mdgFL7VVcvrEgMCpUCx5phv\nqdFeRhuctGBWp1L4nVvRmYfMFyw9xm+rjikTL1UY85Ogx5UXl+XJphzdslUY\nizSDs9hjhiwB1oFMyfoFseTcFo4ms3oA+PjXKCK/GlhIMH6O0tm2Jd/zGk4I\nVPObSrqreRceAG1AeTdF+q935CJcs7VElaVf+sVI0QmvJIRSl8FGI0dB9sy3\n9x+hCg8c3LkBoUv4aHGNxAop3rhYkDQs3aI3FRnqjsFeOnCwGad9utlBRj1n\n4HmbOh14cwC4leSoHwWBumcFGVUxZrVxmUEOJP72myrKmMwl92vlQAFoQ+XF\nt7MmBM2jpSmXLRIZjtmLCiYt86pVWdoXHi5bAYitsf8kHeix9kMVbUXHpTmx\nlVmsIQ3MSkuFvgfIaasCYHeWDA6F2dhxMSB8QlLDvxmfLF00SF+e3xB2V8fY\ndI/G1lUtwreKN+vJyXD0K8AcdoJjHKhwXW41DookNuU0un9447zv8cb7yEQg\nLKSz6Dg65vo1K9ERk7ur2AE1hs/jhGFY9s+6galCPuv+RylMZXf5z5npHmwp\ngL1IQexPbQ+9k7W1WblSJStdWV65wc6o2XsI3rDpt0f+7TOAkzWUe0ZP7ZZX\nEmM7\r\n=UIrL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4382580dcbfc3da31d5107a92231aa87122f3f30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a3898ffcf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a3898ffcf.0_1595982942613_0.8594268886468983","host":"s3://npm-registry-packages"}},"8.0.0-canary.bc5cc6c96.0":{"name":"@material/auto-init","version":"8.0.0-canary.bc5cc6c96.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.bc5cc6c96.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cf080a353666d697830879e6e046bca06d61da31","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.bc5cc6c96.0.tgz","fileCount":14,"integrity":"sha512-UG/44DKgflMV/Mr2R3KEPzX72/Fxc5s6Fvva/Q5hCxFG2TT5CTZr9Oz0Poh8KSDyq6n+c2YYqGR+oy+vhTeA5Q==","signatures":[{"sig":"MEYCIQCJTS7c31fcM/crGGeoX7coW0x3yqqPOGkYzmiM6tEDdwIhAIOFkBeYwPxXyfPy37/TtBFC0Ofof0wnAaNJuGeJZHci","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIMdgCRA9TVsSAnZWagAAoKoP/iclqCTNeRCA69kzG4B+\ndFt/7w+MNCpmlatHhP9ktoqpWM3rY7EiNYHR+lhDV02MO2wVrAtP4wh35NkZ\no0vsX5Uv2Em56pQ/kKD3AXaAfsjQeZsAZCszk/nsfs6ElGPfXsZ/fTjkiVSh\nfHYxesVKuVlbMDOFBEAHlyHef2WmaOiwPzPpndKe50m/ijf0DObIotvTZMHU\nTmAmwD8yi7O0kS5BF+zBSR89sz/TU8r9Vdn+ZlMEHzsrxCxZsM9Y0qWsYC8o\nf34UuOdp2FXeQDCrrmBPqHwbQuo/+0eIqxWSQdJq6O98AqQbFXmpdyeNtb4U\nbrV4evqYFvVEOwWNYUwafHXVnIPchCXtgwBarEwQibPq99fmaYwGduQ1u3VF\nZHZVm6mBt3KgVaXr6bVzFp0fp63qjoGvePnAJzaZPro4+k1fd2rNf5Hmn3D+\nW/d3RMltUb1dWOhxER0kaUrI54ScpnZTdUGyU3JDZpVOJfBfot30/d9d9Fy0\nkobycv8SwYC1NS5LGVb4rM3VW2tF7MXtQJEHvVMO5Evxly87VHqEkXukzDxk\niNgEOcyLbjtimkwSfY27apBwvjxa/tkedihkRoJPwPYS93LbNUIvkKbmtbf0\n951sV5QbW35NncFTjSFm23VgakTVzOHUxTUSQxa+MqcKY422QmCCLumgJzNI\nJFBn\r\n=uVjC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ef5b32f85df29f3c19f5f6960f0f2e58025012da","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.bc5cc6c96.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.bc5cc6c96.0_1595983712256_0.42283857423215454","host":"s3://npm-registry-packages"}},"8.0.0-canary.9bdeaf928.0":{"name":"@material/auto-init","version":"8.0.0-canary.9bdeaf928.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.9bdeaf928.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"701b8bae8ba7a8a36c2f32df6e71807457bfa7e8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.9bdeaf928.0.tgz","fileCount":14,"integrity":"sha512-sjMGjOz6iEsAEoEfoTW+xevS43PLYvEzuWTFvWzMK0KlqhRVum3t2KdJnfKX3v7l6EUSBpUk6dd8pD7q4UR5OA==","signatures":[{"sig":"MEUCICxAat1SCbnszdORSv8rAys4iyjMWptgOXTYd13qi8d3AiEAqnanZmjSrjZCZU7yl+iHr3KYmHFMpjtFHNANM5+gTAQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIM63CRA9TVsSAnZWagAA6skP/3kqYf8xMX70z+BG4JqC\nRPKy39klt9dsYZAEHYxT13WjuU+mlpLH0ySm1xOSFFkQlu0LhbKscrVnQ+l0\n8kH2l0R9J8c+2vF5qKIz3QvqtCpIbRW8HeKGr7nydyuXnpUWWPRu1pf2bV61\nrLy9do4h1SSSlV4BVT7ZR3sKQ8iin11+uyzHYwDPthoyOCTLvB1BIp9g7ddf\n6tEh66EbYc/IzB6zlgPH9N/lXalweafZQJbooAFopEid/WUJ9Gwsr63Ij+Be\nWqVaa9gchtVx9/ILLy3pQ/bgH24ddvpB/HBInNUluqmP2gr5/eOYy1/7l/+W\nWipeATLjckdJ0x2pSI8+tV/250hMsUaaGmzAANnRbp2n72nFcEemEozYGZ0L\ntZYRYygt8xzD9Yawaa9xRXe4HSIq7YoiSxH6+RST/FSmPLPL3ni4Ogz9WxPM\n61/wGgtEIa71twS+xgjXkkWi/aQOzoM4wcNvYakrdiGoq+9ORV/X/3IWSrN3\n4Wq5dy2yv8jPRHm1ZhOcwqVqXPspkmVqYG+/L6I0NYfKi9yRQSGgzED1Lf7I\ni+2S4KOF8cHNucWI+TJXBjPmT9Ru8YvYadfbsJ9+S+up7XfhZbVmtX4A17jN\n4m0AvHnNYt5rmOoj2kvSPBuB3BNX2dC2tjcb8HJHQSeQNGlJpLB+r08uSPae\nz3kU\r\n=ldDg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0fd3de7a6a462365d56e724dcf32c2c1890f553c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.9bdeaf928.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.9bdeaf928.0_1595985591330_0.9418474144246556","host":"s3://npm-registry-packages"}},"8.0.0-canary.fde2c1f9d.0":{"name":"@material/auto-init","version":"8.0.0-canary.fde2c1f9d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fde2c1f9d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2da8dcd86334a5a9316504a87daffb272df83909","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fde2c1f9d.0.tgz","fileCount":14,"integrity":"sha512-ltJdXnatgnN0HsFlhDgLbS+tCpLYMX6si9ZG/r3mtmwjQdQYGMScK668gcHoxw4SoPwScqjbkRoi8yNEybwuZA==","signatures":[{"sig":"MEUCIQCQ5CCbjJoEoY4OXSlP9A1askceQ+ulUf7iLN9RdhsUSwIgc5rM5Jng0oOZEZPijCEJQ0cVs5IA5zA8egMbt5j+tIE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfINIcCRA9TVsSAnZWagAArOIP/A/lhkYZ3lnlB9D6Etti\ntUxTRAhIu+SQbSqOrjKNKhaNSn2IURl5fYvyjxqMo/u1/dxjYsxLtaYqwrbH\nrIxUsvj37PVjWSguaNIrQC4koOhetbucwscZr/atE+STE8JA5Y/0xF7UPsuG\na4uWijAWAnG+3yHoVc+2o5JextjwTjjAiyDfxNWvSsrLDj2ELdrvRba+JxZi\nvcox+muapO5EIMDZ+o3s16zc9wyOgDNdfU17+cE8h/Xi/91rtEDaw6qLUOo7\n62fzGemkP5H5n96hyUUxiTKYQ3QGcaWvCud5C7fqBuSR2u1e3+epAqLMMRn5\nwM726iqC7hohu4AEJy31DiPhtNcc5hRaETJC6UXb4q5+SbvcuzykLr1puFSP\njIWS5SCrL4Nm9kdegc0AFq2ts28bGs/qGdmoxqBJOKxB2a3PkvKLSXCSfWI6\n31wjEQo+d3O8VPhduGJ6PfHpm4dd26M9FwA+0esFLBTrKaIRH4hTcfEO6zyi\nUlf4pgTtEM782i5V5t1wh8cKYVqTjM62h2dpMmVWZ6a75FrnsOTeUU4FzfD7\nyaIPSry+S7iOOFMNU9m0p03JHpNIyvQb1LFE8DLS6U4gGtwR8GaH/oRTDamZ\no7xW4oHdBjCPq7m3BesPYUcH+mXjckBe6hSsbZYg9yPr1ezNvXp8KrTZKOFH\na+0j\r\n=z5+T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f2de51610533bd781edd8339c8555a3c03546e3a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fde2c1f9d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fde2c1f9d.0_1595986459768_0.9243859187487165","host":"s3://npm-registry-packages"}},"8.0.0-canary.6b3876d5d.0":{"name":"@material/auto-init","version":"8.0.0-canary.6b3876d5d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.6b3876d5d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aa11b7bee859dcc9bd01e25e3dbbe3522afe684d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.6b3876d5d.0.tgz","fileCount":14,"integrity":"sha512-yXd+Fux3qEDyDRV45bY4rojr5KlW+f+G7jipfv9e+0cFupuidWPkFITMlYQER/RBNMC1R9CTMCO1h++aPpsNOw==","signatures":[{"sig":"MEYCIQDcMnKZgQk/IcEWsHjxlHjNRqBC3GDzIbgmTStUcrci8wIhANVoo6jJq3OnuB7GrFehpx2WD9Ro6824rzEOCVzKPPD5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfINL9CRA9TVsSAnZWagAAkLYQAIApDyaOmwvU5vkxMDCr\n4gBuR3gCIPozpc8xNPupVGqS69F8Xjf1BrOV/Geli5XB5HM1WSvvA9tlx47q\nlj4SiNYFSN4ridJkq8vp4JZWLPMFteQAQpFUZH72l0+yoUsn6GC/DuUB7kSC\n37UUFjwpGZ8mIeLOYK6dwTz7W84qYlZezbkL6GKDHNFsFL23ZAaCDoV3XsIK\nesJYtoaF7WH73O21pvIunHHgKb7RPNXg+MtPEHH2ToULdYrc7GUnbdbAv8zB\nHvOClDBTeoCJpkRve8RauiyoQ/IZhnN1BGc1qY4cne5GypkX+ZyO8yiSgzUk\nJTRZQ2so3EicmVmfkL7CpyRI3oXvvTvwHu+yzbGzp9/50+MAY4FAyEc2jfQ3\ncmMbWDIJhQ+mm2w31Pd18lall+pntoXt3ZMYA8FDfAqO906UkQkyFi1MeBMJ\n/StBtWZa45pfptu1FzKJoD5l9RchyjlFn5nyJIhk7J9L2CWSGsZLKNdt8Rhz\nwWzVVSjeap6nD49oDT4Q7BZLKxubokal/mJqbRNjhSygmhwalzxq74NUCTvX\nRivMWlwhxRZmLaIhesAc16PS08HtrVTJi5PtMgi2qH2rgOI59r0C26v2nBlb\n3HFGDtBAyr3dHI3BR7WJEW+qHjqAHRghc+QP1Xy3xWvMBlzYlQ/IupusHDdU\nK9Qa\r\n=ZbpS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3559342f661baeb39f2e70f1172040aba07dbc1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.6b3876d5d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.6b3876d5d.0_1595986685130_0.5039421466714435","host":"s3://npm-registry-packages"}},"8.0.0-canary.30ce17873.0":{"name":"@material/auto-init","version":"8.0.0-canary.30ce17873.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.30ce17873.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a065062eab736264283a00c9e0800e75de025c84","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.30ce17873.0.tgz","fileCount":14,"integrity":"sha512-tZh9Jq89r0agcMsJzV3ZiCEVSeOa2+JDwx8qpfI0GfnxKyM5Anusb3djUG1GbtoSMzTDZjmhIfUYTdazVjYiSA==","signatures":[{"sig":"MEUCIDAGIjpU0K1QcCzsT+dcutP12R9iCIDjUGPpzXMKmaHFAiEAgSMEuXd3I8CRG2rsgOG/B7Gl7omCoBwnGdzuJGN3D3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIa5YCRA9TVsSAnZWagAAXcwP/2pmQMi2r5D5JaT6iz3T\n3dARACJZ1Z0GVKaCv9lYw19HkSkN3TIHVwE8JwWXG6GcByRF0HNYm9ul/iD1\nMaRWHNLAMEDBsRG3327rGqhRSc2xacyMBwZdQMVQMgTc1XPXxzFQ/OvcWR6n\nwqXvsXy3YQOTgySMuYfq81Y1Udo5YMC9ZT1gYAb0aH1vIErtuDdBUnepAIWp\nTFoFuV4XeE8M4q7XSdMSE28aRQpolvHaDc5Vj85XOxo0RFET/7s4V7adk1M8\n+KO/OiUGNTH72QSq+P8OebjWFV7tT+kqZA6WHp8tZOMLOdv0fz4hO6igRQ0d\nvX/Cf3U6XqUGrchSKd5A/Af0nccuVqDDEXgcE4Z3QMSxHJceEjkVRehhP+wC\nuLVh59rUgkS65gAp2CcqgRHmwEhPVb7y6ozzLFFRoa38o72Ygm+9kxF5+Ys6\n2+pN8ZCGHBRokKw2/mw5E9+f3BCd0/4WkrVslrjonJM4/xjNsqRAqdV/SoJn\nX9PkvSIpkDqS6AfMF4i9Q8zRrOn6CGW09pdUwmKRbAFfAmH59/uglWVCPfGH\n5KFmjtKfrZKy4J6wyxg0LstX47PV0FiOcyJeiPxjvKrXJqh9mk+c6cYrl8gk\ncbI8OikbZMXJ/DAuoHM2xfr6/F6fDVwiaXy1cmcmgfAaSEiQUkqtKnoQzADR\n7YC9\r\n=EeAx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"88fa0309b6185f09fffdbd61d0c3e16f53c2530d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.30ce17873.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.30ce17873.0_1596042839568_0.31699818973411364","host":"s3://npm-registry-packages"}},"8.0.0-canary.f6bb43bf0.0":{"name":"@material/auto-init","version":"8.0.0-canary.f6bb43bf0.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f6bb43bf0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e31eb73bbf2335ddc689992d48d949cb735047ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f6bb43bf0.0.tgz","fileCount":14,"integrity":"sha512-RqSPtasjYsFejZV5A41IBMyVZtYEcNpe8ATSpEHDiMfaWTEMPt3MgNOQBXpdNhHVbUbOkL1X5XV3JYihx1WQGA==","signatures":[{"sig":"MEUCIQD8OPAmRwBfBo9DuqAKyyq6ApNhvWdbsRjXJAuzzLBU5AIgXGy7qQBsaYVOUTIT5lkcZCuWPkq4EWVa2MknuEJKs0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIb7eCRA9TVsSAnZWagAAUSoP/RMJnzB6hFX370gcjeFs\nuxHYfI/42RDWBwYTu39IZcMoFyh+sBfs2Ms5kozQvDtbFIrsK8McXfWTFh8R\nzvkjaAvIaJUQLxPMJIR0e6c5Bgp/TiPFXnMDiBWkly7UvQSK1KxpRBzDI0/o\nhyuzktHScjZBRuRLHJ2EEQ6SGVV6vzO62e6WfN1rmU4+AE/SrjhhAW3aaWmn\na9Qfc+KBRd3yKmqtHM94BzAMD7Mzm9j/9yzIRw/BI6j/pWx4C3brTzuzKApN\nQYltiKTcEX+Als3m/4QsynGR/Wlnx+RwRbTutg3rgXHzo+tn1ACjU5KVvyas\nQovcG9z6a3TyU02SFBeqffQrF6rIVTaScz4NhwS1Ne8ibT/xWCsrKmxYXs2M\n83T02PWjO4ammUGPKAD1/lQrHBSUc/fM+vOpQA0Dz+SrH5qhD1WJq2+W2E3W\n+p2Ga/gxANoKwCO2xC5ptaAsjqo5419mgKB2Bz5IhM/H95MG4rM6nZL0ZeSE\n7MeuKt6wN/Ahwqqut92JVrUGXI714GFlnVanh+gZutZ42oOHhQ2BtEoAWJ4f\nmK8aC3UOYy2O/iHgVHQorE4XAudAsG9daA+mycrqXTy1sIBaKfvdRKWbgjd+\nTbKdQEcSozC/nnFiaAQWaN6t9ICUBQXLr0s/1njcmENrlPvAeeqU48lHIcEa\nc8bS\r\n=OJQ5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d511f86ad9ca4460730b732c04ab497fd558d515","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f6bb43bf0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f6bb43bf0.0_1596047069582_0.1673868124834521","host":"s3://npm-registry-packages"}},"8.0.0-canary.6af75f6ab.0":{"name":"@material/auto-init","version":"8.0.0-canary.6af75f6ab.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.6af75f6ab.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d80e8723dafcda84d38a44360ab51ec7aa21f0d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.6af75f6ab.0.tgz","fileCount":14,"integrity":"sha512-TnsD51B1h9vy1o2Ff1EakzAP+4IGewAox78/pkqkWZ7KRJSO1aYm/fDnMiUbT7zUUwfdsEz1OEek7GCphW9vkw==","signatures":[{"sig":"MEUCIQCSsup4fJluLeDzblgN3LXbtBAFmDLzqLZzDpoFU3/gPQIgPqNY3W3yH/uxr/dYMZD/zfpimvYS3lFy2bgyKcSXJig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIg2rCRA9TVsSAnZWagAAH8kP/jg4wWh1idSp8DaXUtNS\nNnr7W7f3teqMWR7uDLZsh8yHM04sedumqWhsm51KsEVzh8WzskWYZHaBjY/t\nynigjW5OKH9GdKSxdzkoj/VyB4USLjLVEHDlIM/66vcRa0l8Ecc5u1ccH5JW\nZOTC4RvD1hj1NtW/lKqii1ElpV/S5EKmY6PjFUOXCnZKUiaPNDSykCvW1urO\nxSwyPWrfYMXFYTH4x8EVjDc8ymPoadwkh4FxvnTH4W4A6T1taZrFqKJc1JOO\nIzr9oEEJ97GcgO2sVeS6eN8AQxleTqRnPebVrEG8CXZygGeK51URvTPfN5Xw\nnYPA04v93ptiumw5KdSqwRZOoHjzX9F+ibWPeM3Y3byvY0Fwo3z5o/PlU6E4\n//8/OYwk/vuddblPLajkuqxmbFDOgZ8vys69soSoRZrW6DDe7dXpYrsG2Z8Z\n1fIfWGISDGYiYBD8kCUoAHe6qIQCdde+FH4aRlK+YrJ7CxKORHjxr3bK2a9c\nPR8r2P87N0e50KL5zblDZ9QHotojCERwsoN+niKhLOtsr+sx10095Eh88STo\nthA0Olck4xnJlhsQljQCIkB9NP17/G8fd/mMWgFmAy38ECs8oBoje6iJyj7E\n1CIlRbyAumyMm75nRUTuHaVNyWp+z2Y6gfR8KQf4u/djIBPUIHcAN6HQCYkh\nEIHQ\r\n=sBm7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"44ee60f895715b8f7c0a7da67637babfd33452cf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.6af75f6ab.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.6af75f6ab.0_1596067242363_0.8127652126731462","host":"s3://npm-registry-packages"}},"8.0.0-canary.42d7a65aa.0":{"name":"@material/auto-init","version":"8.0.0-canary.42d7a65aa.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.42d7a65aa.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a8949a37b0d6e56339861eddc79476fd92a72117","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.42d7a65aa.0.tgz","fileCount":14,"integrity":"sha512-XdhVQRLyzlwBxEoHWxWxllK7Cs39npbDAIgwvcliWzWewX91tEOArwwt07v9T1lqM5f2ctCcGU83pV6qC9t6eQ==","signatures":[{"sig":"MEUCIQCC+i8n/EU84MfKO/o7K6iVVf8r6dWY/lJk6TN/k4Ib5QIgFJr5lj5pK6Ei+/viRP8dQm1RxcEybBKbh5iXY1aXaLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIg+/CRA9TVsSAnZWagAAB+MP/RKizIG7l5IsoUXg3HdS\nRykH6KpJF8dkiF+AvmN34K4SRkIXUIRmo+d0Ey/gVouxKTi44FR0xShT9CPe\nrdIOhze949ChtYQItVVdmPWZgJ8SrtEz4t8h1OXCSzJHntWDGHSAAiGzSeJE\n/ZK0hhIagQ8/Cc+Q2qLkGFf0IleHAuWUspKu3tPPxoCuEgdob7lNOyd9JZDL\n+ZHxuEgQ9oXKSTjlf3m6XZ1WWMC4UQwUzd0XniHv9d6xWPNCCuGIwANL8Vdx\nzfqzvd4uo4NG8HLYx+6TvVXrg8WaIUlyyMicLQlvxfCh4k8QXsniwWZT2VmU\nFepWMlbiXawc7NXfvfoqrOzP4i+sKxw1FoP9y3wYq4Dg4BucPZIldvST5K2R\nNvNcx25ThxeDn9EbzvG6eGRif+g/BdqZ+VSPyjBMR5dXPKehswoIMrweL+BR\nfaf+p28TVV5DQI9YGJyOU95qmh3HOP+If0FRycAMVCMdiNjsaBYJgOsQaUb7\nCuxnPoKjOvqUuHUfdJU1+RbR3y/WUSyTU6NNIZODleRpmVxeB5du08IlF9A5\nunoRbH1FfGeX5/+jTaM0ROgi6m8ESL/3SNMuezn6SvbAjlSRdEBx15DLhed4\nJ61yVKj3wQxUFo7jw8aqNx/m5nhw+gU7TxSSjZl0xnwjbStHfS1p/3kUbfAP\nkOPK\r\n=5Sh5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b6645573c0460e7bc8187d1a21ef306b674e1017","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.42d7a65aa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.42d7a65aa.0_1596067775223_0.036444314299544756","host":"s3://npm-registry-packages"}},"8.0.0-canary.85abdabb7.0":{"name":"@material/auto-init","version":"8.0.0-canary.85abdabb7.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.85abdabb7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4d8f6fe04cf72c5541e5e498275372d6c16276f5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.85abdabb7.0.tgz","fileCount":14,"integrity":"sha512-PAa/guDhD8xYuYYLXx4fxHcsRDWcX1wN5jmP52nuHPiGhUWAzMgCSf6omAQPPyWXyF5zB9SLbMVFszLlhQ8r3Q==","signatures":[{"sig":"MEUCIQCsxMxplhTvEh1COImi+L4D16tB9bJzrTyN/0AmbwpfGwIgH/SPdGqf/pITWwL2QHtz6JfSGaTdPIb/t34E1nwEiNY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIhDvCRA9TVsSAnZWagAA02UP/j3hSv5nXpQYjcDAvhfl\nx59ibp5bCMb/G2A8Gg3O8F7ep+8IkBhRw0oAm1MlUKS+c49bRkWqA4Fut44O\nLhBKxV9sN05MFjdFosr/mnCXvCtmn+c7yADjNwVg/j03t1qM5963oSIVE0TT\nyQtb4Z+AnVR4Q/rQJ7fegseq3vtl3j4lc6xdYHlCdWQsnWvnzoMqQ/BojkJ3\nw6eSPWPmZ9UERsWzP9W9rLQkEB6Ez9fNY3UiPjHk67hYhDM1FIshCA+LKe1D\n22KBNtNwz/n72tr/ehcQuTFIL5EWa/Z5MAyeS/oS/MIOQ9DF3H1J60aMiAxH\nwiOQjGQovq9Uz4Bk897YGeEiQaLAmswaC1JG0ae0wvfFlwabTNdl2TRCPi9Y\nbyD57Hnq8TcH+UltxQ8lz2axRYLT1STM0qNRpUJfi6JZXuZBv0RJe/W9xasH\nrpspF7sPaTGWeJI/cRaH/Oi2Woxi4q95C5jZwKoasfnFpyoGqDbmVMT7P6Ov\nmhBSAuj8TVzmW/6wHAC/JkJxNFdcVNYrm7jeCyWEOLAif7aQU/q1Wig7AouF\n0vbHz+NEvgrCmNsk5EFxfU7CUMtyMt/RF1LoRIl+6qfCvZ8MYA/+xp0r+uuG\n0BIeh6KWQ7u1JduP+2TmRI83AwjcwFfJuVBIyoZtQZ5tbk7MWS1OLnF20My7\nUs4b\r\n=XgxJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4686052ff6039efa085c0d360393374ff4b2143c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.85abdabb7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.85abdabb7.0_1596068079459_0.7171463308484687","host":"s3://npm-registry-packages"}},"8.0.0-canary.49fb20ca3.0":{"name":"@material/auto-init","version":"8.0.0-canary.49fb20ca3.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.49fb20ca3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b6ea0e79941e264957a2ad44157700047df652a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.49fb20ca3.0.tgz","fileCount":14,"integrity":"sha512-Mb2QsdKxwuGHZG+w+2NrrWhnfrjHj5E3EcJApY0pPkL86qbrbEv0XuMBu20fuo78CQsS9myj56c0RLkBAng7AA==","signatures":[{"sig":"MEUCIQD+CqToA31hDYSfQEyCqay/v1/6wJ74XSwt6kQougDfEQIgNj2TvgNY7fmCnqYxKnkl7CtIzAcSKS9KStLXMfE0w/k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIiHgCRA9TVsSAnZWagAAOzgP/2EU09R80JF5eg7rMGK+\nMDCNcX6TQK93d4xQ4vagmNaU5b1mA391xixfqY6bmmKqTWSak+RCn1i08Mrx\nhIus03nvX6NqgPN6+gHxhpRaXTMqGIPdYbpaLz1j7xAIqzHnU67LvSEv0JpI\neMGyalfQg1RnBamLFv8489T5wJEb+zXZ7fmCIsk9yjapI6zvY+46qsxS8dtP\nKvK52uLUiGrMGKFqfYZvGtsnuJGsD1RSCtBr9pAR85ojThO5A8STnJASDngn\nzGz3kOvaeSBHyhN1cS/lc7W+sZZ+61BdRFikte9KiwPj+ymvV7aobOJSTjY8\n1fcZTJawwvEa1un/pmbYWTdBptZhcKJrskwthrweQjPmwHinOnfPJD2ZjYSE\n8Eg+MIN6BzU/P1TGYd7ZZHqRFuk2TLfFT9eA7KqR9i9plSNha4GsbxAKzn1N\nf2bgv1+ZLyoEcF5CLhTY0GTZYldDRqExyo3VYpxBZ6kY77GiEr90jgDamt9H\nLfhktrSVJ0zL67KVey+0XRoIkjPL5S+3VfIJ/V2tQRaRYuWgfHYt9913xy1k\ngl9xTpdkRgpEr9RiJtlkNsoNS9h6W4S181gT3fEEBsIUcuh1HGtIP9TNGvfV\nPI62qmLO3c3QqUQbMdmEEYLNTJKH6iRo/FGtY2DdHOcrs4BGpn92U80D5po3\nfxBX\r\n=jfH4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9c66ae7fdf6570d9cf334102b5004c5a04b628fa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.49fb20ca3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.49fb20ca3.0_1596072415487_0.3796193049034693","host":"s3://npm-registry-packages"}},"8.0.0-canary.962d4abbb.0":{"name":"@material/auto-init","version":"8.0.0-canary.962d4abbb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.962d4abbb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"139d28125c6963e29e74b795daabd5c393b0efb0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.962d4abbb.0.tgz","fileCount":14,"integrity":"sha512-v7+ewfG0H6+wk3+0P8n/kCQw+P+k3N4OrOcOI9yU1TPuz6VOnLBd8TIV94EF7He3fSoKoKKZWRkoLQ6tY8onKg==","signatures":[{"sig":"MEUCIGBGXnSt4pZ8EiH+KgPZsPuTMe7JG2sK4LM5v+XDYWv4AiEAitS1o2AvCJwQtpazReqWIcM1hao6uDQBY7CgWs7D7NY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIvC+CRA9TVsSAnZWagAABzoP/0N6ud07BfzkddXB72CP\nbRpvWadUaCLC9CXSkQZsVhdye+8EpU2jmzSP3WjQdMEA8iOtPxG2oZ7milJD\nW0uWUoSlOn6fdkgfkwc9JgxMs7KI7pcFuxCI6MMnhke6kRo8LUdm4zv3BWQN\ndlnk6f0YewvsO8Wb3kYqh7G9Joe1q6DTkEueRFbCzTVekgov1MQLCG8JaiFL\n+u4D1pU3M2yDJga+mJnsRKI1psN3CXCr/X31e+OKqq/V/J6/6iqwtXawE9L9\ncVZKOrxW6Rm9Sq2G3bFD1Erpp9MoroYfY1Uhif41szc/yZLQUDAdb4PiBOSE\nF5/in1rtgz3byhkyaKw1fPS65+pvBg/saThtReWaaw4xO7pLgdU0G7U67ymn\nk/OCFQtyxmOZ15evl8VlHA/tdVQ5qJX3hdhPnJtcTGDhZxcooTJgQr6dN5b/\nkB5lWRVaFyIqYfthndBEinAmy7rJjDcaZS4Oy0X6D8WdP6O8f8XdZ7Q0DmZA\n3H+Nxb0s2i2uzCGSTNavS2soW1x7WroowGuiI/GPVBMF7s8XgDl/x4xEpdft\nnpwplOb0u4g7CdZSjyNijegpLpe4NZZxasyoAAujv9vKIezgrgZmFVsX7Mk3\nWgQEz/0bIFgAHDFbXQrCaY3Vc4WgXAfKzFkrv4RhFy8nLpUFRD/rTmZ0LMmR\nPSKx\r\n=raot\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d373d2867180ff5f61fc4d7afb88a8825cb5cc9b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.962d4abbb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.962d4abbb.0_1596125374537_0.9469690372234612","host":"s3://npm-registry-packages"}},"8.0.0-canary.2fcee40cb.0":{"name":"@material/auto-init","version":"8.0.0-canary.2fcee40cb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2fcee40cb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e694601ef819d543602547325a7071b27cbb69dc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2fcee40cb.0.tgz","fileCount":14,"integrity":"sha512-jEknTawkh6OpQheNMtFI0PPJzeky10rLARHASZXxG95eUGi8TwlU0vX7V567EdAEx1wGgcXPFP1rO07dpHt4nw==","signatures":[{"sig":"MEQCIBr8UorC20CgNW9E48NE1KO/d9WXd/+Ch1HEFK6qMfOJAiAozPXJEnFx1AmqW6NnnjxyV9M7ce4pPeE2QmAGTitKIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIwF0CRA9TVsSAnZWagAASlUQAIg0JYnRa36/5zPzlzuL\n/Lmkfgble0reG5B1vTUghhxRIUjy8df3nfA4Ha/hYcqdNBHWzioj8mer29Ag\nAoJe+lyH4KOPtXrDiiT4h1/8ruIq55II/ev4Xairnm36Fgu62Vqoi1Kb2x0E\nnlpTIRneAJJZKw4TubyD7ZLhkVUKNZwoeS+etiSO9xzI58i74aR5lM7MBQdj\nqU5r4EScNFokxPAU97priN4SKXt84ecnDwpTMYTHSE10a7qIZV4/uJRmouy6\nQ2fSmKYtKW0BvsslrmmgbyEXwMyiXYuUHba0ibypDz0QRyqi9hDmFzP9L2fZ\nDS5YQv0QfslH3+kU/wolngHac79ziGWSTcU4WhH+33a48y1bR+yRZx4g0qev\n+nXoh8JHZSbHsMtb3/d/ydJd/cfARrrJ1gBi/mYPro/IlBjeDETPVkYH3CiT\nNqeXlHENv/i89h+UVVFfykaUWok5MPWA3A3xpjoqR3U6WUuA7O/+5dfCsfX+\nNpqRl+YConZAxN6OIrTcvGeG/eU2aryZQVi9gAWsf/Vp938l8keoInFelkpW\nYN1S5h46p9at+CyO/W2CpNkCF7uetk8qVd916AqUZl6Njt3/8EYhH/lc0Frh\ncLk1IC7qkocYHED2lZpBN0nfYD5ziiGT3QY8CRBQupDrnqz9pZW1ZoZsrOPk\nmxz3\r\n=d90q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f769a8a60e9cefb9e0e6306a96914e8e4b4c0c90","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2fcee40cb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2fcee40cb.0_1596129652423_0.9591923668096989","host":"s3://npm-registry-packages"}},"8.0.0-canary.bd5987f5a.0":{"name":"@material/auto-init","version":"8.0.0-canary.bd5987f5a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.bd5987f5a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"befd306b4d24885e8328010081cfbe49c34c9d69","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.bd5987f5a.0.tgz","fileCount":14,"integrity":"sha512-AKmzUfo7TJVBiS++R7W79u+9rAkTbbuwOxWX98c0D4/Pga404mvTjwVTxTefuo5DQOalFbG11oWccG9xrTZuLQ==","signatures":[{"sig":"MEQCIGcnKfvFVRByanwqr2C0s13+hTXx1YGEp9PYPhpqWgCGAiAgQDHNfNGMZRfbaHlDpOxmDll2NZZ8JSL3boSv9Zl4Dw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIwc7CRA9TVsSAnZWagAAEdYP/RWMeRdr1yuDbARpg3i+\nUH+cUocA/imF2lASCoHJi5ClCKon60naJ2jM7zusqnY74o1suMGfWmN4iZNa\ndSBuiAGfgm06uJpCMr3oSBoOIm8uonPdlU05T2mSc0TRYJh/Jn/igAPtHmA+\nFYYcz7fotKgx8sOs/52a7ySq4g3SFpYX5VLEk+OuJXBtykypvOmQFWZU4Q24\ncLZuFPg4eGXzo/QMp9a5hEq+bkDVy4RGnVo6AmA0zGsgsVVXvYqK68zH5j8u\neTvQmamy1BMf78ovMb6YTbBNeW5AEbS1rCMYDZm5a0twZ0fp41sUq2eNE/hk\nLB3UjPOhR7keZj81LAASlZj39XmAAX/cGd9sVVattFufJZNehb2LQtG8ucaV\nmmdfHRRfWftlqbMh6GUrfl34qx3AbR4QutY9c0tiVGYUCrrE2YA3TyB30AZa\np6Q2PnIYG0SUr3aBDyHtS1g+YMPMiq85VxtuGACxS/eOALRLpC+fCIilTauw\nuu/448W+cAWUa/0t3+qhgHG6zXe7BteBn+Rd9D3ggsZF9dWhzR2Dxy2Qk4cw\nPUBRVF86qiW24PyEshGBQHt9J6Mjpe86zsMPz3oo3P0HVO784HgP+Zp3ZPrE\nIitTT/tWiLxqs80v1OJM/cvsNBocBXsr3byRHFNyvOTFEmKp/VrdW7Ad7ZTK\n1OMM\r\n=WKRq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7825c698a6686a8ea967272c1f150363b3845900","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.bd5987f5a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.bd5987f5a.0_1596131130530_0.05400702534968227","host":"s3://npm-registry-packages"}},"8.0.0-canary.005e86a9b.0":{"name":"@material/auto-init","version":"8.0.0-canary.005e86a9b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.005e86a9b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b567d6f416fc919354461e88098e07cc679dcbd4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.005e86a9b.0.tgz","fileCount":14,"integrity":"sha512-JLDjivUoEIee0Ap94lMoqnAu7qCUNAL0I39A4x8M4Lhfb/R5eK0nYkGigIdg6AKOL9+Q5Vn2+qdiHFQgv4/jng==","signatures":[{"sig":"MEUCIE0b/7qoq+HdvdDksPWuW/S+mCpc3K8ITxhBi52RJeAOAiEAj2uJqTNwF5ABV+7B5QMLadpSWNfxM8qar+mX0hMjTSM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIwpqCRA9TVsSAnZWagAAuZAP/RgLg0lPGq3zlv6WTnFg\nrU1wNJiKwbklmBLKkfM2uOSJO8URQ0RwOHPNjghuJqv2r21SMlkXBCth4YCo\npnXuk8aLYC61fB/ZIK/gCElv2FIg0j4HLaz7gTHzhh7mESvigFUI6HBffmOe\nO+OvAg+YA3+xcXdiPMidnqikqThKML0O2aZuVFUKpCLX/85kLS3WqEvWziEE\nHwYoxdtztBDKTrCzP1QawnDzzndfyilSs/hDlqDuDuO13ddoMxq26rrO0AOa\n2iiGQ7+CwIu0hyEaCwHthlmZfc1NRAYPzLSCvezs9WJrWBDr1KJnCAfvtkXl\nA5TJuiPlgYk7aUJevELzHa9O3X+2WTAXnAlA2Z6oksIUT/QiNAg1jPPK/2me\nSAwjpWP2mQ7btAhPmP+prU1v8lI4fcbvVu7SWNv5agSQHPweVsbIcN9X2S2T\nnN1Y5PynxperTdZgu2IpHxYSXD6LOH3M18ZxlUtB+ZO2ip4Ea6dQbIbBoIgv\nQNqIIDs/LNkLGsVYxxKQ5B6CwgsZtQa2cYcFQzgchOuLfSw0OMjozS0ND//S\nEU1t3qkr8/WaU2f5VKtVxdjqRboY78055bMONr0KwhvzJViPkPxnL5uNJTT6\nAkcDgTrb6xznZNGDnTC4ovRFNbKyctMU0WhST5S3m2tU1eHBLd0sX6gT0NKo\nwKVi\r\n=DCWd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1c429f861ddbb35ec8588ea55cb1845296ab0218","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.005e86a9b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.005e86a9b.0_1596131946241_0.36991619069331416","host":"s3://npm-registry-packages"}},"8.0.0-canary.e309c7c68.0":{"name":"@material/auto-init","version":"8.0.0-canary.e309c7c68.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e309c7c68.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"daccc40d7faca7536938c0e53de7fd886bf5ab75","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e309c7c68.0.tgz","fileCount":14,"integrity":"sha512-iSJY0Y4Jkp9fKilVhbxW5NMvkLi2UZtVJ/s5LL4igCStOkd8A8z+1pWMK8jNx4nQ1ClYG1+67vTuWwSOsD+YXg==","signatures":[{"sig":"MEUCICU5QTsf5H9lV4+e5sCpvdihC1JorCoO8Qu0Oy4dskw5AiEA7k7RjtlXNYvLFsGBC8H6nYaSIjXpl7DoaeEzl3JSt2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIwx6CRA9TVsSAnZWagAAD5kQAJF5PSnNBp7GtLIRznXZ\nKFJM3Mni4HM/sV43AFmbyRCIgpt0Zrl/yPCtJwX/8kHd1HWC/AY8AtLBPVzg\nYx63yK1YA5If8NRgBorD4vDBhih0WXK0PKpOTwWhv6wRaPMeTfZfAE9t1Dto\n87bxl9zUQFnJdAfZM6Ai1n7BhseXYWuYFMQ3IqQ80lEMwTI7u5zct7PxMHbs\nYZI+5ErJ8sHMWJTUM8VQ8JY1jf2jedFJEErSCTJpPxAKuXX65beVrShO6y+N\nrFFiFp5EeSTVeeA9d9v8+d1oO2LPuMeSC6/VGTTHtzpdUukvWr+7ge6bSVWO\naluQzmpoIYNgOxPqk7Ly2NaPmMdm1bsdW3zgJ3Ywhk6WJOik/i/r3tuZ2eMZ\nHBpWufRw2oHZdwGYEHm1jxVACrFyE52TJDW9plQf4gCbfrflaEMEW+RQw2Ow\nVYNYeta1HpwT5pSwGTCbhCtMNSKwyuTWNtnHwwAoOOZFiBYmIY0ptv6kMhi8\nAxsszb7qLZyqW7JfoYJnU+4hrEkr6GHim0gPcle84aeDq23+oLGi9EyUkE7D\nAVJH8Nn5Hyo1Di+vpRUFZLwHmbtDvDxufAuwZfjXJ8UwX5xOY0tQrBoidCnh\npLp1PLsYAJ343TzSCwiUdazpkNCDFTM0gItMEkaEG8jFEBRp+95xt7057ia0\nVp4g\r\n=0/DV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3ea460933f859061781daca3ae127802388c28bb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e309c7c68.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e309c7c68.0_1596132473524_0.2835758855388495","host":"s3://npm-registry-packages"}},"8.0.0-canary.935a51cc0.0":{"name":"@material/auto-init","version":"8.0.0-canary.935a51cc0.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.935a51cc0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cad904eb772a06a3cf8b58eb7770784dfceec719","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.935a51cc0.0.tgz","fileCount":14,"integrity":"sha512-A96Aa59Ned2kZCpo7fv6qakHkUURtEiCuA9IGxw9dsTr9QV2EO2HpWm+Tfj/0Xbtkbz4W8OxvncdSG8evxToLg==","signatures":[{"sig":"MEUCIEnVhBNjc55T6bT8sJAzA+rp42yDL5ZSBLoT3AI7fa7YAiEA3WACQpp1Eh5acaF5zFZ/25Pbsjfc6C5nmf0Ez/5tA08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIw88CRA9TVsSAnZWagAAQNwP/0mxNUCttn4fz+2KD7+I\na/yu3AWq4PQv0YK2WkyjLoHRotdZUsnpwo5hCrWdPSfHlDet3CF7oiniGmmN\naYml2pvBm3AWSKbnF6Hcd5NEGkYMfUF+8XA5YAPTLRbu++uyD3T7qz/2Nczn\nZGvYPXEFnnrg7L1MAJBmpxjwdza4/leZlKh5zhszE6KgxYHhK9zsQ0O+ALMh\nB9RNL7Sy1g2tdqKfU5mgF8/v4dqe/Ujfb6Eo/rCiOeFcByFn/KY8qniOJbaw\ns2gqGxVizBOj224wOKWfmDM5J4B4HASbHTZ8hEs42OmJFeNMSLDtC1FDr3Le\n3vnf0axIRhBdSf+dSpfhGP3uVcZPyEwZV5d3vQ7A9PETBGfw8j2K1xwYSFfZ\no1nvn70xCW2ywyVfWvXM7o4lCuLk7YJ6FMQavklgYxBsQNYYUGAas6rrbmZC\nQ+3xcMn4ZCKe9DAiGI7EtkF4XsgWsBp5XzkhhTuUTI3+BCh3FnVmRmFX+9LT\n0elRxUUWX1fEwjoI/+yi2dq7Q1d9pYKkCygn5YZX40OUuryRe+kB2fQIcjX6\npueO2H/X9a9LZiczqxGxRMpeD2sEtLw9dptPwdFvDe0ZnTwDHTT//sk4WHu/\n455ytIwx+CuS7/tYz6QWMv1tZszUN0biIGWrX75bKrN4UoefTNZ4xCU+raAa\nxGHm\r\n=8850\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"79622070723d97d5c4052839435f92189e8fb6e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.935a51cc0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.935a51cc0.0_1596133179683_0.039945364933582805","host":"s3://npm-registry-packages"}},"8.0.0-canary.74839da7b.0":{"name":"@material/auto-init","version":"8.0.0-canary.74839da7b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.74839da7b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f3290475f1524455905c25ea8ccec360bdf76c03","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.74839da7b.0.tgz","fileCount":14,"integrity":"sha512-xYFNeSwxxUcNf+36PPLO0eLLrnUX0s7yyQxyA/rf/I8pN34e5NaPTHlfA/uWJ11hJLwnT71oa76B9inMSPIvCA==","signatures":[{"sig":"MEUCIQDMRr0Ce0OxMR+toznfe+sndrBlDhH62MbLr9dbRccSvQIgQfFpTMRD/yUL/zlSh9bKkElPPVTKveVWPO7wdLILOao=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIxHMCRA9TVsSAnZWagAA9nEP/0331RwNOUsloDI3GLJT\nW8QKEjoGVROZ016GzQTPnld2I7PsceVf9KFQsTnhFYhtz8KgjOcBAhBWE7VO\nsUjAUS/vd3xoyvsx3sgb/8DZa1CMXypS4Ee/YG+zmL+Ih9Ln5ifIHzFekv8H\nVAlJsBSlZlIVWy+/GKJ1tdQ9hCSVZtJXCWDW2/WZR/sBScD0es1QQgv3JzRx\nIel/pZ3BxUbw1GcztzNxRyhUvXRjOj9upZUtp6LkpPHP6wYzqAciwws5e4Is\nFishGF9+JhgrsYwMQPct4g07fP9iPkPzeR+OIq81ESyP96fFp5+hKRRPzvC3\ndrm1u/0Rc2mDBr8h1nO4jbtaf3WJuDXQR5eE8ZS6ZEiCDpx8fa0Bto+hCHOc\nRdGwQPa7RyJXRu2ReDwdLA5kcHG7u659CdfYFObcvsWb8x9lXH7bb1PG63iy\nDrRC5ZOB22yb4Ilrt9yTEGFu9EjLdwsvy9DKpa22E1oeXhoOCaYeyyiYzQlT\nradZncI5o3sdxPcCepsuWQy4DauLU8gFzeXOtMwQRkH6mTBXAZYBqelsII4A\nuX/M9fWrhik/E+uGzAH+NqGYgArRpcFA5CfxVLLdusqG8Iu8yKDPi6s+siSM\nW6dpuktT2uzFCoNVm40+2DZHjBEtawp0l94pt8/XFyBhmfs4kFGic9xwZGDp\nXyC4\r\n=dvjV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ad186768bb65467a86f70e827e74fee089e25811","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.74839da7b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.74839da7b.0_1596133836315_0.36601892381976353","host":"s3://npm-registry-packages"}},"8.0.0-canary.f041a48c9.0":{"name":"@material/auto-init","version":"8.0.0-canary.f041a48c9.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f041a48c9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1c0a6c1e4ad2458c234e5286f90ce9e40753f01d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f041a48c9.0.tgz","fileCount":14,"integrity":"sha512-A6o8d4w2KJ62QSxBL08KFTP194TAWkyNOIG+rJF0QgIUqir6pqKY0V+p+A+9BRRT3dC7bbaU9u64Ujxh16XDAg==","signatures":[{"sig":"MEUCIQCXN8H465oBVaIK/GfFHmLGuOXvoNKFjvHInnW16+wnpwIgCSUMikucYuggQaJGIyC9rTPl3owYRcW6NrBS2XsQzPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI1CiCRA9TVsSAnZWagAAUs8QAJxxX84yU+KdJapmzRX6\ntoeUg80JXjJESSxfyBjgcWCx3aLsSM5tUa4Q0tZzhlTPzVTYubbjxat8f+a4\nqSg0xlHnmbo5hi9GbA+NGW7sbTWxgp2E9QcqRJpo5wcU4wYtIW3Hsz4wI0r3\ngQGSJrOiholFHrkus0EMzKcrE4QW7MIT2k3vB/2ZGgz/48Vy+VAymEiPX/IZ\n3b+vKPLmYsHEP6dH4WLwxId/9qljZXoCQ4LF2cp194X06vI8wcp1ly3Yywn1\n6/MJDpoveMk0f6qIgVgO+XNobYE20uJAXVH1BTjsBV5sOd3Nu6tav1TmI2iB\nuQFQI7P2kG11HOYt/StomONFQGQhaKBB8kUtDMyOtscDVZGRny/SOY1XOpUH\n9Xmjy2/1Llbgp6C/nwWi+utyUS1SIFwWpILpRhB1z2P6B+VgaOW/7i7wtBfA\nbgFcV5RTxkO0rhsamKkyMiD9ZFZdmAz49zVOabEB7qusVv8/vvU3ALMSoJhX\nCXf/TbwJH28etm4d+jWlMl5aqaV15c0ffb0Gz0bwUePIg4KSjeedsXCqyLLa\ndcx8Fh4ZtV44Zqd9EDanlb9wlaSp5+0BJfe+O0arLiwmVcE1l0XZnocHyQxP\nTOqhr5s1xWeK8GbWNLZv+4HHjMi4blXEU/8BfjBh87u4S7wHTbyxBSQFlvAn\nFrif\r\n=nKlN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e37611a41628785b7c1266cd53abdd9da0208c00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f041a48c9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f041a48c9.0_1596149921778_0.06370954212218782","host":"s3://npm-registry-packages"}},"8.0.0-canary.fbb1381e1.0":{"name":"@material/auto-init","version":"8.0.0-canary.fbb1381e1.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fbb1381e1.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"079efec0b20ac07041928860dd73e4bb5a3c5918","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fbb1381e1.0.tgz","fileCount":14,"integrity":"sha512-J3FHhL9seSDbMB6eDGAY5ngyK4N7kfut6bWTK1qF3jXL9fWrbXppfp4a89s4Ht8VMTrxjJdaCHi1qBNZ2S7RnA==","signatures":[{"sig":"MEUCIQCXwKqXRqB/wGU+7VTrQQsw0kKslu9+G6LJh+5bGqqdxAIgCXqKUYJARLZ9iUbM/DUssVLqwz5NXQtUpKNU6+qMvyM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJD2WCRA9TVsSAnZWagAAsJ0QAJft4zpbdjNEVdU7EAqY\nAZGBLc+IvjPe7jaZlvYTNtiRGjug52XSoFU9zwJGR13sB6u0U1iIIfsNHfcD\nCc7kylNP7vtILau1FrcLN3w/FtlA0x4LuhJhCmCMERkhIM5zKkxHBck15Egg\n33cvjizozGiejv9cAK+vrQvraWnXxccKdgQWhIya2fTML7l33uSjK4NIqA1l\nQJqIvFN8j0K3sVESXs6a+QVA3jhBfVTwNVDvMQ+7Cp3Srg65FurydFF4lnH0\nKUIZi5lEQ6V+Tr5SFhwjYalw8cHdRFeFUnbKakhxlLa6p4wZKetFeNd0W7i8\nV1cQRHyumM53aQKJoAjWLCjiqR8zWx57nAT05davj59vA0iGLSVfMedWp9l2\ncZFji5boBjZDjwcdUXY0yhnNM0T5yNLSKY46EsUXtjzhzuRhy4wRrcoSeiTG\nTP4rnR1yybm1BVVhyxYj0In1FqY/PH8qjPHZ/Qf6wP1tw8+VhanEPVhBGZ8x\nJbD/MAByIOqxQ2rXiXzSiZMxKZuigFpM39rsBgWyzgL5LH4x51RneHiMFtWv\n6NYDzxCXTTDg7QcL8xNK+R/Y85O0iVPuiHrQTgNAuHCsWzGzV1Ndhwy16k2w\nn5vFhyHnsOhzZxlWBlMreXh58kjz38CpTaZ52+Vnr69MtHBeutnxB12zvNlk\nwPy4\r\n=hHkr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c42a890f9b5f1bce3c7986f37f806066e6e30bc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fbb1381e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fbb1381e1.0_1596210582232_0.13298070839011045","host":"s3://npm-registry-packages"}},"8.0.0-canary.7f61d5785.0":{"name":"@material/auto-init","version":"8.0.0-canary.7f61d5785.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.7f61d5785.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e852dd149548d1a477cc50f262447bfb23220f61","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.7f61d5785.0.tgz","fileCount":14,"integrity":"sha512-oqTt7QYM+TNfZGw/axCXBmMbR72Mlase3z6WNOG+LehUajKCcEJbBuysTtJwWty9+UwK1DksIXyXiFFzYkKTHA==","signatures":[{"sig":"MEUCIEQRZqLHeprJDDtf9mah1V2fSHyWs+dBCkA6xfHEe8OnAiEA00i0G2lOehYj3VdC4xI/Xt1QkrOg0IEMWGtCtlyvPKY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJFNNCRA9TVsSAnZWagAA0HEP+wRzWMr2lon1/dKNx9po\ncQIZiiemcv+betwWp/M+Lr7+BZzD+1PmSZwZuy+s9i3L/D6IhzTe+wcpuvjL\nN5pktzwtEC0zh+oSnW9pWLMT6x+U/bl7svRNHUUM0Zu4GmfURxvNytLtSdw9\nARgY50Xb8Qcf9UXaek1RPxuzAb41IG1EZaJq01b4Et/z3jzLWkV92WoTnuy+\nYSsVjTCRmTnv2t6OHLr9KphCBe5V+QUfSR+wU5viVwAuiAvkT+hCZCxnwbBw\nMBurFXwRz4uSSCJF6MWCTQwZE9FfCy8mjaas1IjDYVAw/PbjfqC61kMRXRqJ\nKAuDJYoJ3CxjolvtD/TYod50PX1kJli0qcuvgYM4qEV3K3gBLXrnIGBFoBnH\nTeqAXPNsXA8uFeuCQ4tPz3FoI9bOv1WCi0LEOLQTo0FNK4rKyRfoicp6yFqh\nZdY/WG0gyB6ISrFx/L9FCKtJwCZSREcOOgVtFHDyejW5uKxnZpNQtaPKv2WE\nWLZVSOcqOxzJQdZrbGN/C4006K0WzFg9fKqAG6SjrogAubyI0lPHr5CeXtVL\nxpcxrJZg1Wa0i8nz1AcuedM2DAFDCAlzkVH/TNhh+6Kg1F9/Z8BmVXKXa70b\nIIJ0YV+NpeuSQfeApX0iMohrRZgxeZALOfXamsNkl+EPbT1k3hIz24FhqAzN\nDLjL\r\n=AK4f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"beb77eaf7ccf3f03c6d830f96485010ea9e3d47d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.7f61d5785.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.7f61d5785.0_1596216141054_0.7506254747647763","host":"s3://npm-registry-packages"}},"8.0.0-canary.e1bc84d10.0":{"name":"@material/auto-init","version":"8.0.0-canary.e1bc84d10.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e1bc84d10.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eab1ace72b68e5037a97dbd66267ca114c169e77","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e1bc84d10.0.tgz","fileCount":14,"integrity":"sha512-bEI+kwsxsAsXMM8DnDfNK8p/1HyzH29u5dsF9SAxWXVr71QIZzQ5+IQuRck5tAqUq61Nc75iabpWBdj5w3pIdg==","signatures":[{"sig":"MEQCIDvyljcry4wM4WvPrIND99N9R+65YAepC3qFlgSr6BBrAiBN9XMlTZa4OoxgEVopvXjpySKqWMwiHU1SPdwCjLIleA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKE5LCRA9TVsSAnZWagAA+BQP+wchz8h+wZPZDBDrEGbo\nmJlUKG5PwDtZ8VeJWtxGSwsttG9M7Wnng3PuX4aR4xiXH5ZqTDOQAYBemAgy\nBLdEA2WI/jOWTYVc9jAP2wb66QhLWyIM2T6EJD5hl8ZcFzuqdsecaOa4xtUy\n774lqk4cxxw6wSGZj8gI7UGXE/8Rb4c/Ph/QwwOFY2s+tFKdgFjPWTIqiuHw\nsgpugRgsM3TaLjS4CSiQpzMGQOsKL0BJsvBZ1kfQOvNkrFXOY28yTTmPukoC\nhBL1W5llxHXu0l6Zf1hXQf8jXUan1gjhSgrHK6Ro5Dc6NSYkwqUOW0icGWkK\nPSUJ6XY751MAuG3sGqnOZBXmeU0tLz4pHPirrwuraiOADPBHOEr3c0tE1BnG\n5OteoFrKcNxN2aOofsTF8vV8ao27DBse9sS0L3rtNBg3tX2Rh/vMNf7pvupT\nwfJ1/zkqbSq/ePfjllMNfXmcgvwLHk0cRV/n5Hp1XazUx4hq5QMJi8D7Lvhe\n9S/QCT/r4M2MPs65qW/bVEuG3dmIKvYB682SzvTj/at8MMLhu6JCn86aJYnD\nD4PqUpPU/G9BMAjzcExAG48ENlUdOef+RavbDDHHW0jFMxN7QAHTMC8REtnX\nr2ZOzgZUcoi6E8arbrq1pvJP/Rj1Q9NBi1eBFIOg/rkJAhSspTmbhWakMc/m\nuSLJ\r\n=1ZGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4752dcadba6adfeb006ee3689e295db016f4bea3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e1bc84d10.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e1bc84d10.0_1596477002604_0.7285446368812352","host":"s3://npm-registry-packages"}},"8.0.0-canary.096a7a066.0":{"name":"@material/auto-init","version":"8.0.0-canary.096a7a066.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.096a7a066.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e6533c0b693f235206d4fe9883ba7691f8d96c3a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.096a7a066.0.tgz","fileCount":14,"integrity":"sha512-y24KCVm1abocAihRAD8Q0Ay3CsuxLgsRpOJ9hn2RCSgb9Vmr7BnlUjR37j0UU9BDvv/i4hGvww97VkpnM7/7gw==","signatures":[{"sig":"MEQCIB5aN57JAGa78uwi/qzz6pw4mpscFvxqQk4tDeqtWl+pAiAOjqF94xFpxHC4KT6zMM0NRozcVvLqpKtnqcqQ71260Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKE75CRA9TVsSAnZWagAAgoYP+gKu21JTCkZBu0NDhr4H\nN1kGzRs+1BaCQRbYE52sMJO2DUHrUUi5c4ZwzsRTyyKs52TUezReVzLeqs7s\nar0YU1g1wJNsN180qVIgWv822DYd1IDwG9WEPmp0tgIZtD85vm3Umoc1H11i\nXQcBULwdAdRwavXHECSdE58Y896mIi3AwDZuvqchdddiu1gfkFg1fKWzYP4I\nQEVu3xBn9Mg3jWhgLbFEWZs1GopQU8Zupzn0qP3IhEEpuHNu8A98sa3QpD+k\nFTo5iwI7CUQyStTYBA62BaiT2eeCAxUFxdwXtI6Vh7O5xfamm7zuVgS1d1l3\nZ9ls2TYiTlyjJAmth4RL/2KC+J6Zl0wc6Vcxt83nmT892Sjz4BVOhDNt/Qda\ngcjhF5VkM7y5vXdsbArR7VUmJd5w3nIUgYbhL/E4GT+wf0Uevd+UCvXZo75L\nHGQ/kepDmc4+fbMRPbphvhs8f1PtnmOxaDrBfxojoEecbshhmT6d7mZMYkzF\nvsddWHOzsY0sEmzF1Yjq2asfOTfgbZ8o7nB7Yqz0VtBb8IFinIKzSpOi2k1F\njvIow66LBOa12lGYqsVvSTmzCwosrQAQhNOJn0xf5qobhu2zDesVys3G+7NM\npOzSm9jT04HIrFIu2Enc3T4Skf7Iy/cu83l0kdL45PEH+vDuEC2QU7G87zJY\n/WhJ\r\n=Ab7z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c1f4491c464cef40f62d03f687af7b443805fb7e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.096a7a066.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.096a7a066.0_1596477177051_0.32626449761147724","host":"s3://npm-registry-packages"}},"8.0.0-canary.aa3a3e5a4.0":{"name":"@material/auto-init","version":"8.0.0-canary.aa3a3e5a4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.aa3a3e5a4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4c0630710b6c2319121241c22fc32ed533fdc551","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.aa3a3e5a4.0.tgz","fileCount":14,"integrity":"sha512-mYKlSv2REntG3P0SH6wdGjVbmE3tAufXIphPNrpbAg/NOndiX/wM8KYfKhZmXF8umCrucrUpoNSBjqVFeC1WGQ==","signatures":[{"sig":"MEYCIQC4A2lrLlIyD657Q9hY8rSary+aWczzyo1AqDftLInovgIhAJG4fyWB1fgO++rs2Uph2TXpUHcSdc78J204LAGlLzQB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKE8KCRA9TVsSAnZWagAA5L4P/3m/DuAu15cB6Ms5X0i9\nEDJwIlRq174XSEvmUOgUFpIGhZC0LKiWwDrN71eWPC85RKs/wdxKaZTKfprO\nbAMo3CfB3tn9Koq2dcLNUyhUZJ+Q/PgNN8aXlDWjygy7AhZNkiQIf+wlApBo\nF8AEePKtSNVft6GtIHDOp1SK3ygpxsns1pOdy2bU3hJ+zcrVVLI0z2rdXYKF\nrjJ3QEJzS1I9h3ybPvBt6RVn13h3VMB4u8xvdmIpFlBUPZZuP2+1fRoEwtR8\nUs4VQGpgmiucdfma2JT9PhOZZ2GzTsePBzDQqiUc5yjg319yWBSDMdFVH+ui\nkGOPg4YrIkbbmT1mQ/WuL1EOBJzcZRD4195ywi+ohThmxXuEBKR0K9hSCSOF\nXR6heHosoGPNapnyoaw8bOms2IbMAjpca4EPGGh2Zo9PFqnVTLQ6oajfaDCd\nlApUcYTB9Of8cCW09ZNp83sRfUU/fX2MhYWKbjXo+SXVW4tT0YP60uD722C/\nLZFc84U6KT+yFF2oXTeB+hKsyaGHsn6jGfb82fKP2EMQhECNQpwqUOlBb6dF\nqpDRVKjb7Ct92+Dp8coiLpWtMzJG//q5mHYT/MxpN7tr+f6S7kUWENIC+90X\nJH/QZRtF/5nz9z/i00P2yvIop6htMqS9UiN8WVShVwoszYv/acaZOZ/alkO0\n9keb\r\n=6rx9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e25515e9c171e19310cbb58630a760408b78c80","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.aa3a3e5a4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.aa3a3e5a4.0_1596477194104_0.3994714454790791","host":"s3://npm-registry-packages"}},"8.0.0-canary.5903d39af.0":{"name":"@material/auto-init","version":"8.0.0-canary.5903d39af.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5903d39af.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a93e27f9425efeaae15e097e5b75996c385d80f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5903d39af.0.tgz","fileCount":14,"integrity":"sha512-F/idEWc+SXTumlEQ5iBB94gMKIaj7tn8LZA3Al+lLM9Ld5sa+9MtMkJNmOR2TX9YTAn0K4Ms8mJtKxbo976vkg==","signatures":[{"sig":"MEYCIQDMvihwaqMYYNYGfOdoze/VwKFH50PXI3vNQJMH2FL8LQIhAL0bh8WyvTI38aC6SX3kvotfwz1hz1lm6LcHCIZ2vpT1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKE8UCRA9TVsSAnZWagAAPngQAKSYAjOKiAKfTYJdbs3j\nZM6rMKDSPZjNGN8X0KxNIVwF0zhXA8yaz5LYiOKF9EcQotF7jYKZXX9LfYcE\nQwqthR1QXkj2WaCNZzBkYT2skDXh1Hu6vWiIiJ8jmZpP9fLJYU7NkFpCE7J0\nXgC4JHts0Iafnp9smt7J7bz15b73b9tda/Etc3A+x5SK3pvbofadFOapiUaF\n18qQNEPpdy4Jm2y+OAhp69pjroCPn/E3C4AeFvN/yUo4VesrghrXDcF0EcFl\nnzxPk5Q0JAtux91K2l+xK9XWMvldQPKnm1KZ7UQCXqND/Ke0uB/TUyfvARFf\nUQSLju/pn9PKjnv56Jf8lGfaYvx4tGmsebjwrELz99D2mAdc4DNae82ZR9Tb\n1Ml2HJ2NWhuh9lQhIkf6GOrnHCay3AMbLg/Lqt41KNyKyJ8tZFofRtDVCc4y\nD9lIka8NEpkA9uBZyDVofQzwZyT0sVHdleqLB6NlZohbdbXSIOHQlhYDh7X0\nIEAqBE+l8FFWN6Zl2mmDTkER+BGAj4aQAFxhqHd6rxQmW//GtrF1dANz65lF\nTpuT3BDY8idTRr5QsPrIAJHYnVSoxvkA1OyRyVgqAAc3XdawFBu/33LbSFXg\nZhr/gFSO/9X9qL8MNot8dpLi6Oedz9MCTpK97kghvpuApQVSUZHAqI8Svc7y\n2b2i\r\n=FXok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a4f2eea8ac8483e7e0a1c93b141ea9dfaebaf4f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5903d39af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5903d39af.0_1596477204159_0.46590121817769714","host":"s3://npm-registry-packages"}},"8.0.0-canary.72258f898.0":{"name":"@material/auto-init","version":"8.0.0-canary.72258f898.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.72258f898.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c9478530a5e5c91d7296ded01d26d270f5200b8d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.72258f898.0.tgz","fileCount":14,"integrity":"sha512-hb2cY5vZZMx9gQbwDQYaiv2dqaeDaISdeSkWf5CXdG/4LtjazlQPpcP3ibZkTY5m5UN08Rz0DxhtCmxcoQmptw==","signatures":[{"sig":"MEQCIDjT6tuZQoEbNaEQQLmHDLmEmPK/X03TlQiMLyh9HZyFAiAbffF9WaAwQSFVAQG18nMp9Az8g00AcniEZkJWh8BpnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKLb1CRA9TVsSAnZWagAAeVcP/jMdxdlVQ2Uu6YnGU/Qk\n5EUettYl3FUbmjY3idK888f23dYfAyWVFloH9IEUyHxHZtC57+jya3M2C4jr\nx5m0DpROGz+ZQAm0CGL4NveDdkQQv/3L2DB4YSJ2T2eiGVSRYYK7RsXGuzxJ\n84SWy4+dJXtZ3hTuoMsgHgfoCJxesLoK7ZUZEEZz2zk1rD4vHP8B/KVbuNxW\nz6uAi2XDHq5MLppUFWTTkN/xBNkFwWAQDtOovwGDgszXyWOnmz+B5R8yglpx\nEN/Mp5SJWkMeBXQ/7MKP/8iO3I7DZIMEqRSwktwEI/oyqUlNeIqgGd1TxMkV\nvlZ9JpVaWYY8Qm+ZOHsiNhYZnlBWzosrkaV7SgJ2mm6Z+2Cuv6t99TIRmw5Q\nS73p53RnPnVcKR7QFpRs7+DmW0Yg3MX8OH4tg/LFA/T87Q58ck6R5fxFXAP0\nN/z/V+fWVNCJky/Ff7SvZvjH0S/SNvc80DDsQM1MYRokrRPInYHpo0CHa9Dc\n1q7ndzKdtK8vBxFz/MQv69uXyL3p2BvuQ8cwhLFuUQKM7fCUUxgaKwjtSEvp\nCL6O0q4dVZSNoK4oqq/CRCwwoaQiWQ3ne7i8wnLnJbU1vBskXA+yPF5wy5Tu\nrDUMrqLJOKb9lOug4NBHJuIJDfMKuefv3wdODk/ozwXIs859vOfj4394VZ3e\n2HI9\r\n=B9jC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff2c64799ee2d684ba36b9cebd15fbe0d0ed17df","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.72258f898.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.72258f898.0_1596503796437_0.2404699244815629","host":"s3://npm-registry-packages"}},"8.0.0-canary.1b44b43c8.0":{"name":"@material/auto-init","version":"8.0.0-canary.1b44b43c8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.1b44b43c8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae986f5c0088682bfa7b19986e6cf79c8f40ac6e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.1b44b43c8.0.tgz","fileCount":14,"integrity":"sha512-OmVUiF8CGqCRe1zpTYgCx5/XB11QFVuGEmhNGUIm5rz8sKTwI4i6N5waAZbci8kWGYw2ed+e4j3OH7NFsj4law==","signatures":[{"sig":"MEUCIDAhTMCpkczUxckFPv9Nh+ZUU0/IAyBam5KIHPkl78AzAiEAg15iOkBEF3QjYUFNdlzd83WvIF3QQXB0oEMjcNkrDUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKZEfCRA9TVsSAnZWagAALzEP/i85YX9gPFTkMMjcHZ/e\n0b5idJsYFtnJa1403lFSIdqPe/JhKSyw3ar+U59Cu2VoACl92JC5+rezfQ/D\n96yy3CaVDpRzRTG/hS6uxFYtS/UGhuS3jR77dzgJHtYCRKkz5sWGGvA84DWS\nxROF+S8LW2Q9ZCcLvk1qLsCcyd5BQuUZKzKvwzXT84Ey7mrr7qOYoqsRMinf\n3e2u7nurvVsj+i9xAYUYS9SBMzy7Mm7DFgL+8C6qgnRFWpGk0qJDQ45pQwg0\n+wEredh6kOPaVBlVLJteiiGJwlALnK/dJG0crL94xSpfK0QS02KdZhpoS5cl\n1tnm+gSBnfHxLy87kU9EmMxK91CosxKmP25jI9rqTIz8LI+B8aUHfAWagkZ4\nVuDVtVAo6d2mxR8mMobyVTxrhpRSe8S3S/cTQ/JMGoeXQWdmvdq4noB/RwAP\nrfMEnSCipPriWCcaT+FqnfZfWLQPJ8wJvWTKFeyu8z3a7si3xvm9f0GjsSSy\nANL6mY3iMeKoOLPFoKnAGs4xPIbmslo9CzsUInrVfrXQOpqWGYf62pKnQA5Y\n5QxMUGfK6oR/32aHo22E9YX7xcjA74gpjJsAtoKyRhPvh2JidKEQ2an2pfCN\ny5POIyr5RiDLywuj6Elui2wNETgeMwSedJyu/2EJk7j0eVCiKMRkKyhuPn3I\n3D+0\r\n=a8dw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"69ee70c646249b45b57e59e958f1ca6d8332dec7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.1b44b43c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.1b44b43c8.0_1596559646631_0.6524985394230609","host":"s3://npm-registry-packages"}},"8.0.0-canary.e9d2e2f96.0":{"name":"@material/auto-init","version":"8.0.0-canary.e9d2e2f96.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e9d2e2f96.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e9e2dd87205f4e558fc4b5213db429427ddfa18b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e9d2e2f96.0.tgz","fileCount":14,"integrity":"sha512-8cmKUdnh15UCdx1Nta+Iq/TXLReSo7+xTjGCKdyiR2ZQuc2cKd82nf+KOALW6I9GCM+UVPFXKfH4Y00WfeDn1Q==","signatures":[{"sig":"MEUCIQCKf5Jd/uMGZznvtz1Kjpc3Xtd1RHX34ahEP+V9e4/a9gIgZdi+gi7Sh+sHm+shsXcoiUVIePdtYVLsPpAaqn6xKLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKcPECRA9TVsSAnZWagAA9BgP/00K2v9fiJFmaQMlCvqD\nxWiXLxLSnC6mYHZ2FMydrVDNpta2f3vSuuJpN4ofn9BACpQFUsvVuMw+91Le\n19vKqdVgZGbZWh4QwfUxuaKcpAo+gBW53TVfktkXICETSnkogdJDwUY/2qBU\nHquBP9UdUnSCPw1GCBY59ItfeP4txADDEWiKgSRmtZ9jCBQAJvSEfEU6MyYl\nX3w6PxBn3J5dUrh9N45XTdyC/CVVZodGqpyoWn0JhZdtSgxJBsTFSJx4bI/2\ngZagwFXiD2IV/nkNIi5XmXCbyE1H6vmXNlSnwxnHFXQmDyNQW9H1L/GrQz2h\njhxaSuKswRbt98onOafv7orsbNDUyBR7TuS9op7/ggwGzs85WdYdJrjUQ+fR\ntvwxieXpqVtOqRX3BJ5lD1KrM0II+Ch4YYdaeZq78Pl88n0Kv/+mQRYO/ayB\n4AZhWGc++/Yj8/eUBKLwCWrSUcDXGaeT4jjzprWpuULumFMGxmUDA9FQr7C8\n6zZiIZE159RMG/KwcpLmog3GH2EIkDwF8PQg3DUYkwpK6znSt/V5RaGVO2Am\nlQWR5L0rGkL7hYQeab70DE8MPfCX199A37nylw1AnA1zw/MeaYUbt4DWyQs8\ndpiw2RZauUWIx1xj28pbMto4R9KDP+PyUc0VCaA7cho7YZqidTtWSzJBz90Z\njaP7\r\n=QUSY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f6bf51788bc1f39067fcceced79dcc12b2c59caa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e9d2e2f96.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e9d2e2f96.0_1596572612159_0.8771636747528995","host":"s3://npm-registry-packages"}},"8.0.0-canary.b9dff0a19.0":{"name":"@material/auto-init","version":"8.0.0-canary.b9dff0a19.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b9dff0a19.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"254dd2249b22ed5d05cd6b2ab31293b05f05e705","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b9dff0a19.0.tgz","fileCount":14,"integrity":"sha512-SO4y8ToQEngtFBPtwZprMUo9uf1d84CPzh+jcXbXQqrPwC80rZ5ol/RaH4rMqSSLdQdLKfkF8tvz70Ctt/sfoA==","signatures":[{"sig":"MEUCIDb9XpFyu/7js04rl8cu/Qrsde4EppG0nY7EtgwUehI2AiEA+eSjZyaWPYNZ/y0puBWuTcun2NzyAAL4vPZeSZaOFHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKivwCRA9TVsSAnZWagAAK2EQAIk+i3JbAQwg2VOBa+Sk\ngahoZZf/+VW59BVujsYpji406sszSKcv+9w98RoNanhbU+1NYgLGQkHqMdTZ\nqSIO8wBSj6DJgIktKK0yBCo64T/dRlZbDgDbdEPkvPesSHHLUG7mr9LhPfrL\n23RKR/HtobNp1RIzoUeH6Ew5T6pDOBHswEWlm5Nrb3igosc7xM7HnOwWT+rZ\nZzYTHZklz9tCXlTCWF7GynZgfqYDO6d82FLdRjRzY8/pdDo/RfnjwVhrdxSw\npY+0hz2UKrtig7EZoY0T70oEQ6QsJrXmvMjFF9ZHXh153Ogtft0eTi2T/25a\nbE8bJFZd8hrLIYFq/jWh6HVulhdZ9EIdpGSvn953weJpRtbVy6KIt+/+ULzq\npixRpL8NCZYkOZlHu+RtJrdSZKAB2pCsqpisUmyDtUiLtAqaHo6lXo7v/0V3\ntuRiRHTlGi2EN96Hx19fu5+s9U9+nY3QdN6fxZCHTKegL9Ut6QpWtgX+nDnp\ngzXZyVQWn8vhpCHEF4s/GIL0hxxbq3rzcPexIyF6lNG6h3UMsOtJfjD+FyII\n2vfRh2sSXpUm546Av+CHNO7xRsjPIcJx/zPEZ7JA7VQXS4+XY6I6oRjz6+mD\ngu9rjxeBVTaepXFb09ZZYTHeLVnQD5cY7HHAqv678iujeUxUkcpenxsKIwNI\nCV0D\r\n=UT+Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dec2f9fa4c83e98bee860646fc2a65b134a7900d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b9dff0a19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b9dff0a19.0_1596599279760_0.8530021805747086","host":"s3://npm-registry-packages"}},"8.0.0-canary.2bd09a706.0":{"name":"@material/auto-init","version":"8.0.0-canary.2bd09a706.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2bd09a706.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bd12bf08b05e3ce6c9bf5acf7b0695f19fd2aeb6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2bd09a706.0.tgz","fileCount":14,"integrity":"sha512-hL8VxQ2WjujOPWn/lSqbeFontVqOZCz04FTYsHPTi/9vGaj8fYn/vG9Xr6MGjJRVtueIqiLDv/NtqbTT5FX8CQ==","signatures":[{"sig":"MEUCIC3zMzLwbOm86vdWvaAfj2FW2ONvHDhmbwiAWFnSLoo3AiEAhlLKYQPd0MaEjHQvldKhCg8HoZQWo2cRW8nbtVON9MA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKi0iCRA9TVsSAnZWagAAwFkQAKGxQ1hybm+Av1uYjA5k\nBhINFQk8rTCPBygdR0htXGeZFPzPFE260NG4OVLRN/uL4kvFCphNCt7u6tfk\nT/LLoq4sZSPUeTzxq0s4U3vRtWj4EFz18BVENTnek+4lP1e9SJJUvSnbpczR\nRZeEJTsdOMe5F2K0yxM+QGlPlRcGqBiJpqIIREJ4oe9XtoIsogwV22fWWSJ5\nlGt27dUMcY1hLB9P3zzs1eE8hhnG6xTq2GfaADl+ILh2rJcdhLaprhS46lhC\nj6gLGhHnVmIEAo6Sj03OQ1CrJdsQMOsDTVWtrcoBxEfDx04wb+T1Bf/Jag8L\nH/wLKejCWXKgLyPRVuhlGip7/+S7694E4K5PS2e+USosmhNGKv+uL9queEb/\nV5wpY0OrGJNQKwUwSoztOkRUFaJDtqpdfUG48wSuPJZNicdsdcGncdT37tfG\nDOhCXfw7ylyGC+Dbdcsfaf+uB21UI9MOMkbdOW/wTwNa17uaqXekSVSkl9aT\nKXRwwYwfyjmedSpe8XXgIlZBMtfaJfg20d3rL4caEe+3ASIrRj0YdnH8n+y0\nfoXJhNP9q4pi3vpzeFBgnnSdDAQIIN5HqzTC4DWijUppAznVt7NgCXtgqfWm\nV73tnm6BCCfU6Nyblg0Ga86Lj1RgQe3SCNkI4xNLSCOfIN7Kow265iN+iA6f\nYCWQ\r\n=FN7y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c8b061f3fa8ffaf5214e79fe44f6c575216a1808","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2bd09a706.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2bd09a706.0_1596599586032_0.6400379918229637","host":"s3://npm-registry-packages"}},"8.0.0-canary.e0560522f.0":{"name":"@material/auto-init","version":"8.0.0-canary.e0560522f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e0560522f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f4cab0ea4e33c27ec80aba31a47545739b98978d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e0560522f.0.tgz","fileCount":14,"integrity":"sha512-gE7qz5X5czqxAcI3GQDchvMbWpfpxHQieKlOuhMr0nqNMJxfH22ddHcmZFBKu8q4UhPeCKiMR2qHsAy80UJTxA==","signatures":[{"sig":"MEQCIHPmoQjmn794nVDjbxPsSHDtvWSnroYIocO/OyiEUFscAiAZVlKCdFkekJbwda/9YLtWOnJ0B63NEVmiC6zUBm8JnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKuoBCRA9TVsSAnZWagAAD7AP/iM6SyRKpBHv3Dy3e6Mv\nZT+A3saKzZDx5rwUJNWnbyBpnAEn65AZ2xQQPZjh5lPPhJp78rD1I1eW4jgd\nEcVytD7jqHZRA7bPUr6r6R9YkwWzDCISOfCuqvdEeQHJZcZOEYn+t46kAw6S\napjQLtt8eymCyiT0XrV1U7VjIoM0JNoaG7TvfMJiQw4M0CXeWiz+9OKPZ72x\n8ikmNBX2Fqti3jBHdTY9SWEQK1buAH3DIBoNfF/M0L2NnSbMY+LRcT/T8TWK\nmgYb3aqfpjLGGQFuRrwdrup7WC0bJdHkJCpbz2FlBQu9yW6c+ogPZJaqT1VO\n/YSbQQ1jnIgV958uO4kO3aPm6kQLW1hXnDzxY6To+0VRHTxxH12YzcSN9ajw\nT8+mqvB4CFVqLTyibFLPKg5BgUkrr0awLS/Z93tcXPBxxD9XSDxVWUNIOVLu\nKeR4rmAyz7iDEkxLpLPeAXQoZFm3uNkm1jLfyToqVi4EgU5BtkfkTi1seYDl\nfFOWBy6Ip01cjkyFVbqU6bPsgpEMeUVDXAQ/RcJumNvrru25X4ygYjbrvBTR\n/3KN6hOARLJxDTpQeYQAbjaDDA0Yjsxa9B8tNQhR5oOwb9e9se6FDXc82RhS\nbUUqc1OeRE5n+cpOGmoML0zFvaujGcfxqIBoQTME/64Y0WGisc4WyWW31TC3\nuZL9\r\n=Bjlk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f4f71f168da3435c5dd1bb74e7ae0c54fcc45746","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e0560522f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e0560522f.0_1596647937013_0.6808061703402937","host":"s3://npm-registry-packages"}},"8.0.0-canary.08ca4d0ec.0":{"name":"@material/auto-init","version":"8.0.0-canary.08ca4d0ec.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.08ca4d0ec.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"71407eba7cc0bae5df80fbbbef1a4a39a69da947","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.08ca4d0ec.0.tgz","fileCount":14,"integrity":"sha512-6SZJqk1ZFnPcoC30FIpUHuVQMLH/A7n49R/wBi5J50Dfq7nDEXtSY5d3NGLSBUTN2SCR0EKv57N0sNOMPC9KJw==","signatures":[{"sig":"MEUCIQCUyscLsJE7XQN9Xn/pZ2o5MKPw+59PCQ4WQcq6geGtywIgL2IEMPAvjxx2YVfQLsqAkGv6xHk6vplyuDoq7OIHa90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKu6kCRA9TVsSAnZWagAA4q4P/1xAZXdwem5uyMxFsgXq\nOrkdXUF9mEsOGLf6TRZrKr/y2Eb2Tn66Z8b9K8B2ARl9eL0dbpxpcUi19h9S\nUGRiF+Q7tK/9QnuMCIXfskxKxNrob1bMQ+0W/uS8fJS2THcgeFkiFhnyI0uf\neOb+P2/c6DbMFD4FqAo0KgktpXrQka0MKNNSdMiC4vuKMEAXgNN7G6eR7gZL\n4ye+ziJgYQaLbbqDyxM9M/1oqftvq/a3n3Dsjxhc2nKZm5af9hjAwvWlpEtz\nm6ktk/f9rj1SrgrYsuxTxV7TCThNmjH6wGgsPrvh7XYJ5hF/1yAzrdLgCSPv\noJvpilEJbsS4zgB8E/Y7u8auKXLMK3xAuJL3zuZzLMIZWPz/uGCxr0JtKD9Z\nnRnX90ofFezab1uYpDgYM+GquqkcbfT1/k4VKV3A/2xYNADu3CBj16othI/d\npSRBzifIL3jqBxNcVA6RMNW9Wel77MwVwjW9l93IGJF/y0gNCzUkxHOYhLCv\nwa/NoKDiJZHFMwMGSOoeQVxwl7SsbRjd+rNesCA2sMVOxp9k/QZA0mapruyO\ny6wwQmGgT+pYqheoVSQgXebTaey5qjx0XUBIjnp/t/oM98en5taJDPmddDzI\naYXrxebGavwNzW6D0E6aXYmzwbjdpS4G8eU8wsMaPdk2gm8/kBEPqgAuBN74\n4v2E\r\n=hTge\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e525a44ae67401224e06885b43f10017ae70f9af","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.08ca4d0ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.08ca4d0ec.0_1596649123947_0.5742168473791429","host":"s3://npm-registry-packages"}},"8.0.0-canary.08090126b.0":{"name":"@material/auto-init","version":"8.0.0-canary.08090126b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.08090126b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3dae0dbf6ca95bb68be3613318c2fab78d6c8ea1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.08090126b.0.tgz","fileCount":14,"integrity":"sha512-LR/UuhAcusBn7aN99CqF9jxSQkyjuKDZO70ZQQDq8CWjkQqxDlPndgQkJy5/bpUIr5rrQsBgpSHjH8AYH55lJQ==","signatures":[{"sig":"MEQCIAKvWLswCCAKFiZ3Zts6QByNIdXq2vPPZ3Ol1QoVvxtCAiBQFreUXcwa9L68M2VQQeEux1EJHD93mUW1vbj3PHWc7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLFqtCRA9TVsSAnZWagAAKkYP/20aSiFSgrxA+EY83fzc\nTBrdFvJcOpAmZuaGr1cb6T92KktUDOhPzU3TKgcXOvDzjHeAoCdHm0hxzAWZ\n/feLS7KVnYZeNSUt1+pMcm9YBE6PqWJwWvsR98HhF4ykssz+SSozzLHwU5q6\nbi+lmR32Lqme5U6awqFwRgrADbtUhH4NIQWXT7oc8f9b7ZD9bQ5Q4f+OUDhs\nRH+CqAP9uBPcqwSiUt6b1teUe0VTpGSAXys9G7kcJ6p01LsKOAK86MJ/168E\nbDwGROg83qySKX0ji18qReNPYdvwr6Drn+r89CgbTwXjdU9pTxigBqZd+nbq\nZ6pb/qUpJeVOczWRY1XYK449eRt359+00QVa5ZJkRX/Xqb5gDGMmRJHFfh6+\nKyOynfEO1JhW4FPSsco6VP2DZPH2ToY3Q1O/sJMasdzE4h2YLiALW38yNFAQ\nxR4EDaO03KTo1y4LSifLvGv618If2Lh+YZT+CLAPp3BjrEvNCaU7Szv/vU/l\nda5Q2ED/WNeFJ/s17zRLEvsK6DbGNtqg3X5Scj7ecRIrVHH4Wo/XOXuWtuKr\nkb2qFzpC8zBX5B2rO3RODWPsyylhTDI/scEFx4G28fGyhJJUTANEpFqZI4Cz\n0+8kewXidNBoaGfMQThppXm3sdpjlnuYgI6xcffq6Cn9zoixVgJG5xbcOceg\nv7ms\r\n=IpsJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92703c0a9dad96887725176e28a4ac83640a3b34","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.08090126b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.08090126b.0_1596742316551_0.40593674167534743","host":"s3://npm-registry-packages"}},"8.0.0-canary.e8bf5b2ac.0":{"name":"@material/auto-init","version":"8.0.0-canary.e8bf5b2ac.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e8bf5b2ac.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a91ecefd1fc0d29423d743338b51c393751c3ed0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e8bf5b2ac.0.tgz","fileCount":14,"integrity":"sha512-uAhuAY0ucHVWpwhMaoCFCfPb+JBaLUOkCkUDfdcBM4L3GsjhZD8BghlGH6YxSaeQ8K/pVd0VVaFC3u+CeZT0gg==","signatures":[{"sig":"MEUCIDtQVAMTg/CaAePvv6QHYbs+kB5VbE4T38u8jS3FBa8cAiEAhoORi2oX5zqpTRsZ2nNTZwG2rIFjq9V/QCEmpdt2IPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLHrbCRA9TVsSAnZWagAAC1AP/20bMYdnYhz/R7YxC3hr\nqwHSZ47A2c/rOF3d8ZYyJp7F8aUTxAnmmVbQ0131DMObSjQtvHu78xcpAXXh\ngktn8ZdvIjA7q/OVdGUrnezSFk7Jvl4z0YkbYXDVbeMKB0jX1QRv/tugJTx4\nREQjoyCp95BTm3GIlPC/V/NDr7tUZ+c/IwhBWqWE5uV4JemI6cciCr3nOy4a\nzvjBU8ApJBf6pFO/J3NBMGbag65I4PoNRFnFeEosBB2WnHS3v8EhgBASaA8C\nSaWR5tupWeUznxI48vFdlRPDVlfKzYaVBpspDvKC0hFgGi/AH34eQq1L0Hdk\nkiVvbUP4WBJ37QQwtPxJzajEbkLWXw8j+DEQWmZywRKeUaqngMsGhHtI5dei\nIHD2Fj9OnPDamJSrszps8PPvrEEM/YrOhMtf8/EGwrvIrk08TgLrnBKGjX+H\nhqtoxR/fQ7JyLPVHhD3S9jLIiH6hxxmep+kMbxFfp3ilYzrJbpiix/9Rp/yx\nBEMQCRD7ZmkLZ8UtK797troiWFppGd1l/gmFoZTKktSrM8nvm6KH0AezJuz8\nzvMmVH/d8agGRr915i+vHbxCnx33ESWLaBAlfGToYHG2HxiB146gevzuLCNj\nD9CHEMfazxHJDHrkl3nTNJIYyQNp890TiOmxi7cmG5xhMHi2Yadgego/xkrN\n0kQ+\r\n=ebJH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d5fe47cd91dcff7cada8ca9b587eb8a924a211d3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e8bf5b2ac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e8bf5b2ac.0_1596750555317_0.8507634214876449","host":"s3://npm-registry-packages"}},"8.0.0-canary.e3b746208.0":{"name":"@material/auto-init","version":"8.0.0-canary.e3b746208.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e3b746208.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0cc7572ab2eea0c4779f774d5e1791c0a7c2608e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e3b746208.0.tgz","fileCount":14,"integrity":"sha512-gidbwoyLY2vZ0KkddbylAsV1N54oZ5F7UScBd9iSrs6KI7iH1ylxgWbabV4/mHLHUTeiSzbg8nFOPlG2/5/Fgg==","signatures":[{"sig":"MEUCIFRICOl3SQNIOEZdkZqE9tN4TOZdoV5d4kRN3Ycs6+KyAiEA1qERo3m+xR/TYs5oRx7sk/nbYs/DZt+yav0qpVIMmmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLIN2CRA9TVsSAnZWagAA32AP/j05Dn4sELxuHiRD23WP\nrrDte+6TOOdeoSEchr8+gXu1Xpw6ExAK/3h733GNBLrgXDyYzO5lZ+zudNo7\nlmd76lVKT7PUjkk8Vjw14PJA6+9B/gGnSGNSEGPttu+sg6yEfz/LH6RWDbGi\nMRZIBU2awxDQwYJGE1Ki6Z2TsViKDzmji7pcB3goLwB6coKR/O47EQlq9azC\n/DeVIs+B6fX4kw0+Bcmi3wuxJXcWWqbB4Mxz53x6K4xT3pHPMxHFh/gK2knb\nLm0RNn5p9RIZY0w4dYJYr3AjRNktCWGKCsXBo7TIU8d9mblzi5Vmo001scsq\nEdFFKIc/xohUYEibsTBxBzCmVYP0SsrzrM2LrOVsZU0ywP05g6tsYoEvjDF6\nZmkMRN8KwqxtX9Oc8K8XWR/Yl655KpXgyUabaKXxxcbv4MGhViGZM/7edDYT\npP2h9KzEHzc8CxKf+/zMT+XSMImGsiscXDVlI3u90TG2HEKmFn1b05y2JmKa\nQBpHG8phpmk/9+06lHVoCI4GJEmv3aaXNwc55DGBNQKyqn8eYkGCnu9eMQEl\nzPSnJZJnl1whXV9+XSW0tybz7C0M83XyP6vesBkofDIjXtDM3w6n8UjAEfY3\ngr2Z9ciBbbN0WjxGXQ1hFaC8VTjm9lliRiNVxRRS4dF4wPdBu8DZnvEKfH6c\nlFvB\r\n=OrnL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"565f03445fdfa2cc653bce8f5c730176a406e5d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e3b746208.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e3b746208.0_1596752758144_0.9734602922512126","host":"s3://npm-registry-packages"}},"8.0.0-canary.96a640534.0":{"name":"@material/auto-init","version":"8.0.0-canary.96a640534.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.96a640534.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7bc318be409dd0c33a90e490103df2d3ace82c37","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.96a640534.0.tgz","fileCount":14,"integrity":"sha512-dBGpqZ53wBP/p5DV1dMsDe0KF/kd8MWqxEKKMzFpFl1NUmRbFG+ShwVrlEL1u1W8S+eYTvmRtDJlF3djyYHI8g==","signatures":[{"sig":"MEYCIQDBzkBjMVeFQ91Z0i4QdJT4xWrZYYIHsWzrBMnK6j+bNQIhAIsDrN9W3rZxOECZWRdZWLDJmF/Do5xmw9d/90nDTShZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLIbwCRA9TVsSAnZWagAAJzoQAJnxsk6en7HXTvyJzO4y\naJ8hjs3/l0NbBGl2xDddTipCi5LbKRKmRNWyHCye9rW8fgBw3v81aHzPhLxE\ncIOTUZq+6qZ9DH1jzNxZMZWGGqCFpCwhb9aTNyMFGAXmG3SmqOiNx7tJ9NE6\ngu6ZgcaoqLFCwpAj8vhIQhRMXayB8bpebecshNH6IpP7REik2MmEvQyOkUpE\n2CmjZgfMHQHshGCsXLCAHLjhLLrf7r1YWpo7UeBv1xF4iYjq2ZFTGfQjhK8D\npkfHfjOhHRBXVhy5Kdrzs0FLl4UmD+KHaC5QLCVty6PXsMqcT89jkTiBCOrA\nFoAr4hLIzMsoYGzEl788SFkldBKPyw40ZKgYBfS3u0rMWh3hW39D7W6IT1Aw\ngH0ZvgH1MkjYluzUpHXBW3k0UMa1auvUdwoi5R7Dk2C0EtJaGIGdkFot4+/r\nc1hFsMCo16wd+AJdEBF/rixNYxhtDErM7pboPTsnkH56zfVEFV9ALI1EsYSs\nMx8dZimt3ciMfmYYINHVIC46HVC65k0HfW/Qz5uZRdQuQYqaPltT5T3Vdsg8\nhGcEKI/pweQqbaEe8dEh1dU1duo3M6rNaKYLCwxFd/S90e9Y0/3McWOQvq5p\nA3jvCOE2XNC9kApM9CLRT+KlAFCCri3caUHdhf6AF+CgwnQTPoawC36ezzg2\n636w\r\n=pRIm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3363a6ead1437d646dec8eb21cb2d5c5323e8986","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.96a640534.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.96a640534.0_1596753647445_0.21864823069988515","host":"s3://npm-registry-packages"}},"8.0.0-canary.9f9aac825.0":{"name":"@material/auto-init","version":"8.0.0-canary.9f9aac825.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.9f9aac825.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0068c93bda1b567bff005fe6d3e0edb5f5937fd3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.9f9aac825.0.tgz","fileCount":14,"integrity":"sha512-fmM/yhyyu32I9NCaiBHCTmoGoLXe9ByEXHXQHaZb39J7gwxaJP5tfl+zsD6eEe/PhKnh2QCowwIBxNAsJDXxMQ==","signatures":[{"sig":"MEUCIQCFaYCzKJE/i8zdGC4CanTUPeGiTYQMtFb88VfhVMRWmgIgF0e8eXPuCrQnLZ1XavZVpKQkml195ouf2j7vaMkXKw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLb6fCRA9TVsSAnZWagAAXD4QAIB0gfFCkfTXO6vk0SiB\nR+Iqt7Y/zvCLrknxvhfNzrUoKh5gCfD0bHAWt6Lw10IvX+PosVbqpk0cPOuz\nlNS1GveCLtrrtjkm8LUwJG909u5rthPV8FOujdq5C4X4l0Za7x4bnSF3jAVz\nH8gLN1ZkzLSEIe6TpZjMWojK8vX2eBeLg+lzILzSz7a1ZxAvb2FnFIxnQ4+O\npD+8Odc5VzgsSNUTAhi7B4FA+A7wJf07BOcNZyPTWwp7qeOfru8EdXUx2wVD\nAghvk1F/gR5oc6rdRXcao59SXHuoLg1v9vLHMBoP/oALr1LX47CnHM+0dadU\nMasnzqx/lgz/Dk53crANhAy6eMftH4laQ4w4WxaP8psHi1hClPtOTqcqVt4R\nn2nxGLQbg+xnBhpXtc4Q3qzFA6b+blOo+sEr9DV41S6X4LCZYJHQrDKLxbDS\nyU/faf1LZtrAJ0TjHK8yuCVzv1fxs161QHlUoGWTf2HtJBDrN8Xhs+Cz++Lr\nGPi8IfmI1wEFpnbfbwQx4jOGHZ4FkGYcH3IEezEd0FhlYi8n4EcXtObTP7GB\nz/cPCkPz/HYjBbDPxx0GLEF7c3fD1X/n28pnKTPzsSUhDBV97tEG5XfPMcRE\niSAFqMCjyhV3mz4xdU5BL4xdXrbBUmQVwWVqPgw2ejCd5DT5ow3cvga/GkmK\ntBW0\r\n=1+Ee\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b417a722353dd60a63448761d24a06d325b83f7c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.9f9aac825.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.9f9aac825.0_1596833438931_0.9057607245311068","host":"s3://npm-registry-packages"}},"8.0.0-canary.fc65fd00b.0":{"name":"@material/auto-init","version":"8.0.0-canary.fc65fd00b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fc65fd00b.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"63c8c11a4ee1a25327d00a8399a161bae24321a2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fc65fd00b.0.tgz","fileCount":14,"integrity":"sha512-k2UNyoa/dIaocgc+q/K/ibfmTn8tZ4jgJ2A8n7ZnMfe2eKLB2nKc85p7X7MmN3Kl6u/q8f0AM4vOT3jsDgFAsA==","signatures":[{"sig":"MEQCIHDTGlJ9HlCb7ahaNeBAMpGFmmWq3iQKWvkFvgUPmmeVAiAF/nMsMlgb0Rve2yBVZWoRNBydjeRTDgtZ2dcFTQo3kg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMWWLCRA9TVsSAnZWagAApTsP/RfcuJhn+JqlgK1/XHOR\nCRnyomvZW/NJJFPU6ExgUp7Dq7NYQymA3sIzMbt/3d6rk/7AZc+2ulJ+y0tM\ne8jgaZTMLQq31P8jKpFuQiIOHgS4PfrH3oqN4EOrkdKgtxJgavS+T2qHX0/B\nmViJkcDfnQ33mLk1ZiV1E2HmeaVr1iQobAQVT7wbKidTmmou6pdO4nw+H8LM\nvXI+IR5+AeU7yUuBuI0tCX233n0ZyTwOgXBZj6RMLKtx9QMGEsGpMggE13/O\nF/+Z0wairLdsIm/mFNDmQzqCfL9fdhbanMuE1HnseF5GplX3Hshs4rSJ2Vh8\neuqpNjbljFxpEE0Vn5f3jU+p8Ul5XiH8s+EkildRzLMM292HQhhGwa8j3PGb\n84dNPth8Sg/CUqtoqhDrN7NlKJTQLwYGg334aAggkJ7z7LnoBtKHydq4Frtm\neKeqfNCTqEBL4v2tAQIn0Rw9PfMTkiW6u8VK641I/C7+4JpyGhB0cwd7h4V5\noet44rin5nBLmLduybhBHpjASaOWQ95h0M0QmQeEeIQXgP5m1o/A3CUr+cvY\ncNX7jbMI0h8T2p6ep+PpOyG8FzRYxue36SH7cz7gCWHowwCyRoed4wlGo0ym\nCDa210QD+lFULiDcqiZhfLk8d63TScHlSk6r/vreTOOdAPhrjVHsM50dME5r\npnYX\r\n=BOi/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fa39d9d1e753796086537bc71b6fa2d2aa21a3c5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fc65fd00b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fc65fd00b.0_1597072778543_0.6584862490732772","host":"s3://npm-registry-packages"}},"8.0.0-canary.02e372c5f.0":{"name":"@material/auto-init","version":"8.0.0-canary.02e372c5f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.02e372c5f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fee7edf4b00632951681ea0874d9e8dabfe63c34","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.02e372c5f.0.tgz","fileCount":14,"integrity":"sha512-uF7DfnDX5rXwYnAuIJuskkgtEXB+2HpBXa3wZ8hEnoR/vUgKidiS9JiDSiptI9OxZR8KgEGNuKutLqHviqmxxQ==","signatures":[{"sig":"MEUCIQCrHH/j097VtrrKF3g3+vLVGzZwrgTc8Ohs0sfxT6YNBAIgV90ElcetKG9TEJhZmfxDQDY/in1IuEbPpTvx8g7s1e8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMWweCRA9TVsSAnZWagAAFSkP/1Un83n02Dpb0M4T/GsV\ncushUSvXwcP2sLKw1xlJh3jTC0ZQmY4pNUawNzeOvXkUgjULg6f+KkML6rvS\n1uufO7SkafV7Oig63AqKElynhxOUDSWlaaisezCJGPMFh66boXe0J56nweZS\nJJULMyNU4k+Q+IGlhoyWsWmmfcVNyEpHotc1nwCivzdqtnIu3hh+UW0Kck9D\ns9jxVefEjKpMUScBg9j+oWdpVJ9OHKLMQSvWz5bARWhT5aLIJEUqvlhZD2/G\n/YCrD5mcXBt7ZfBMqWiF4cAEU/TP2benrUl9IOairW4Db8+3PLeyo1OzhnX4\nslw6idv5GyPVQp8lJCY+lSpEQzRx+X21JFolNxDLf4HMWIWD0lfAYNST5+ex\ncMg99Y8zhg/IJQ4RM2eywzxxCDMIVqKjlOunV69eRCfj9zod4cBfaFvOLCn8\nXZjiR4InHsV9TRwwOjz/sMp8jelzFTmEhCC+Gpoemqlj5GlOlTYAhkylyFXZ\nVDRStReprMjLc2WNOx2SVsH89FnwaxCFN6F0a9zlUHGMyAE/dvwEvfFNjXFI\nQlEF6XbVuqhSeqwhHGp00VtLdx9yb6OFH2C/TouaOIju0NNzw9GPjNuPl5hf\n7L1GG08bGQEWSitOc7n2Rxp9UJ1BFMT54fnOqPWfCYkrrlF9z+Cn1qRO0FBz\nmpNI\r\n=t5k8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b765f8699fe12742bc2032a8df7cc23807ec94b9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.02e372c5f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.02e372c5f.0_1597074461983_0.035575708712535015","host":"s3://npm-registry-packages"}},"8.0.0-canary.66669e3b6.0":{"name":"@material/auto-init","version":"8.0.0-canary.66669e3b6.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.66669e3b6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bb4d456d6561f03a1110c3c5f18f63d7f49f0e8b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.66669e3b6.0.tgz","fileCount":14,"integrity":"sha512-QGZJTNV+FWBkFygI5CSjnM9U9m0sCnAakZCA29mueMaqb3OXrEEj8NoOm3QQ/WVRUVEvMerBDMb2KvCNzdU6Xw==","signatures":[{"sig":"MEQCIBmYKiYmD4u4Zn0EUmdNFfuWWBPMjcp1IuY3QK8PZVrgAiByQ3SfypU1Zq+mlffasOM/mYisH47oKsbolStzH+lcrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMW0WCRA9TVsSAnZWagAAR8sP/1mMqw/XuTW6QjaXpN3K\nezkhkq/gn522XcvhhISu1n9MT8ZK2vC+7VjXXf8OKgDU1CdGDMlw6qJIHkhd\ngC00G6YTTDC+Lo+xtXmhNwds2mTOW9+Nlk9v+TKtXoKUSzXfJMpHk/aOpPUH\nRspMb9qh5AaRCNsWpidZxf90jtcitBGnD7JR2hPDwISN0cUxUFvdtLxpXzsI\nXQInQCOEvZ4/J0fd9v+uM1Hu9CTC0jf1oZw9+G67Jmr0ogLpZlS2Exx0zj11\n7e5VikqnRXTAT/wQmvU3Lpold/FsjZbhm+IY8xpKms71KmYAuD3tJ6/q+Vcq\nbiEULPN0XzIl9H44yB1bEnxQOVAT2iD3WVi/WoZzC7gOVu6Eg3/J7rKvXI2n\nHX8rnELlQD/f+F0S4aUaeeYHlLgw3ndd3jm4KGaye2ZouKTFpYXZCWha74Ba\nQ/fXiHvfXD5rjW65WcnQ+fSB8CWTGHmIrY5fnngDu3ejXvYfjrWwnFPWzlEs\nquqVvutJQjkwEggxeIktCdPyWLdFk1ABaQ9oto5bk/2QhH567tSD5fGwZIg7\n37oJz1JbdvdRisqeHyUR/6nZb1XxDaLvm0ioAMKAhwlm8Hk5Vg7AXmTv3m00\nSLsxB5Qv03yu7ILMIhvtMnkR0L3USURdGFGUQOmC6hfZPdm3vDcQILB6mhuf\nOwJb\r\n=97Me\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"96a6a7d492075777ad5f7692328b3bd50153bd16","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.66669e3b6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.66669e3b6.0_1597074710392_0.001258317082914795","host":"s3://npm-registry-packages"}},"8.0.0-canary.6d1ea9761.0":{"name":"@material/auto-init","version":"8.0.0-canary.6d1ea9761.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.6d1ea9761.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"07f069a64c62ba9f6045bcaeb19851312b99e4f1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.6d1ea9761.0.tgz","fileCount":14,"integrity":"sha512-MOefNk+cwyfykCAJ9hVn24VnMYVVkpyuU3N3lMKGdzUAAgjCuK4coUm4hT3rU8ybECdAnQ7ESXZ3BOkqh0SOTQ==","signatures":[{"sig":"MEQCIHN9GtP29RswVmrOuiGgWKlG5njxLafnRVzSXie6sCMjAiBn3YzSZqvyTxsZ7pj9mwsSmRycT1IQXy1xP2d29/O19g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMqtsCRA9TVsSAnZWagAAELoQAJHfPc5y3MUGC8ekbutv\n8kJzRcaZqLcp9xRjuZu5oXGy1Xs/lBp2SWRye+FPSH5H/G2TrIGoEK6z4pua\n0yqqcO/vWZ48AHIUMDhUPhVQHVtzJMkpHh7p7LZHXKkCniRfirckCSQkJhMO\nVW6YpIjf4mcCVuviAtN1ekztNFky1ZKIInMk2IOSRYyzkvn3n7T28Qig88sJ\nUEVHy5kS4X/N8V7s4kPPR0ndcIUdWqbWrX97+tQbqRym4LHHnOteWpPie88S\neAoHv8ijnlKSiu4vgKJ+F+lxJXqgpeUfss95bgztFR38mQdURdDci1XljTMA\n1Es0WjP7xHrLGHyng45RADszzU8V6JlN4WSadZgJcK2qN8XN2lljyEqG3CrV\nn+hzxQjmZtX+4QkOmxq+H4M6c+lFqrYEHRNxS6A8cjg+CriV6m5qd9xkNio3\nACg4Dt6jcK44esS9adMia+NkYebvorniAlYI/GiMTVQ4vX60+1Rw8HHdbpXe\nuWua363CtkMf9sV1Ni7UGL1ogklfgnGewehHZsL+M7xfBmi+ih3PEo4iagYV\ngDYQcx2CFe2LY8KXUFjfYgivW+BbNfH/TDp7w6ikpQN9LvUsiCesbh/83e0T\nUWQOvTDvwKRwumiuYNF/U+UmuWB6EImDZR8INyjObDa46SbXP8gr8Cjs3/bp\nGc6O\r\n=gnXq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2539ff1cdb03aaa0365880e59b2705e6f6ff4229","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.6d1ea9761.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.6d1ea9761.0_1597156204324_0.21631782292893909","host":"s3://npm-registry-packages"}},"8.0.0-canary.79414bf9f.0":{"name":"@material/auto-init","version":"8.0.0-canary.79414bf9f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.79414bf9f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba2713149eae3dcbc85454534a32fd6106d6cd91","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.79414bf9f.0.tgz","fileCount":14,"integrity":"sha512-ilaTHXpVGHtfeG/VYEcotkQREQrhYHvOCaXaG19QT9TwUk1sQiwiotffjjrfil7cLEgFVZ+uP+eYJxiDlKFbPA==","signatures":[{"sig":"MEUCIQC2kJBwAOl01Qx4Xe5EiPSbvi4baO/qp0T4rMuXaqNx9AIgYD1iElfhscm9nYz9IBn66BAsoIhEJSZ2dUo62Gd1oxY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMurqCRA9TVsSAnZWagAA9ogP/3fnN8B/mSvpzsLNtUMi\n+VkE/MBomKAut01DtmmKbPBleabWLviRI2ccH4NobcW8JpCGylpRGAG3QJkt\nyEIXJUWvvzfMniY0lUnDpUgeOvAINEKOhV3cOz7ePiB9hCvt7ct5bPKSJRiu\nmk8akbfbNYIHvV60rpScWjSqa4qaFcFTBZowW041TakvDExmgr7vLiBjxJfv\nqAPx3e5k/YfMi6b964rPnRz6B+J8JHgvydbSEp6rhEXTNjyxGG1+EtTldUX3\nt3D4tOj1oIPeFUFU4SmX1EBLNaOaEeHj1luieX+Wfcovsm4xlbVMtsVyp+Dp\nZAlfQH6KSDADpytgx2pfEoHG0u6ArnbiSsVYwRgmKf0awbgdMj0kThjJoTyY\nFJ9/Rxrn71j80MnoOPwBb1sdjKzCzRzZmUkkXAiHDe8lh88PfvhkBEy++hJ0\nP3XZNUtXmufRCqoRfLfo6F0Qu/HYiSw/HerzqlUpcKL7HbmkO750N72Dinbv\nTy9uo4C1mTA4x1UiK+8MtjSP1Er8SL+l0+G9jciZOdkfvGDP03FzxQ/tKVq8\n5vrkmsRu40mY0X2WAIfgdgKmvdlpVVXX0ZkABh0sk4uvMyN/Ql2NCSuLSaFP\nlcZ1XytCmuRCWXl3M0Fm3kPo+6YPaP3AK8y4yIsnEYSOOIPbmgc8/1hK8kXy\ndUW0\r\n=cZvA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3101c6ef84c1ef8d9afdb44b6b6b3067c2f5723c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.79414bf9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.79414bf9f.0_1597172457491_0.2581309871922477","host":"s3://npm-registry-packages"}},"8.0.0-canary.85a5272df.0":{"name":"@material/auto-init","version":"8.0.0-canary.85a5272df.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.85a5272df.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f5d0dfc7d9d8d7cc86f061d4ac2340958cebe01","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.85a5272df.0.tgz","fileCount":14,"integrity":"sha512-iZkYeyS1hbueM3DtPAD4zDI6IDxFSVjOhUuEy5XqB9er6vYdARrjKzbnLwPorjxQI5xUrMVapYyntuOTR7xmNA==","signatures":[{"sig":"MEUCIQDcODS78QUVpD7VAg+wPkSaXLomeUFZAdBQOq/9jlQXCQIgQYLcEwG2l6YUzhSbijGmjiEztqpL5LGyRloFljmEgwI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMvp9CRA9TVsSAnZWagAA/hIP/RWDWgy9MJB8iUkkpX/q\nNmFlrkgvkE7nn02i8AG+Ai0lglV6LndT9QFPkY1GcOJfuGOGD+Drg9OZ4+cj\nIhGjvV8ZhWkPg8Y6BHV0RJUcTD1k+bnmhN4A02yCrh5P+Mnb36M95h44/Azh\ns7lRc2Pbjxx22S+NxRvb8f4lsy5UU4x7f6qxEm8/F9ohiCq0M08ApaoU2rgU\nYadit+Ja83TYZVhY9OL3skWf3DpM4pVWRprz772MbSj/5f3Xy3vl5GMUVweg\nXGyBFgVF8MkzVhbZBo230a5Igwg5hvX3OqQo2wl0j6WjRCowQN7xr8g1oFk9\nchDt1rn/fSMuQOx2e/fBlbfbgebCCi6yIQn+IWInjwm2LiTsLC+DbNwqwT41\nkugqPtF9p81NA2TUOeYKWgB4bqjGZzJTP5/bLRAQPlAHD2OOL+Vj4nWj+apZ\n7SDkTQEvC/jEefOROAtSy/XA8f/eaa+Q6knaL77yh7qP0M3YhUolp9AbHzFx\nBtuM6MuxlyfNsErxNlhVJYgQSathiMS+Ey+jyYHleBC2DtXn4Gn722lQ+FC+\ngnHFlNkAF6FpPh4KkSgPKRAsMvD6FOh2bKtebGSMwKzzcDZ4RopDG3hnmvEM\ncEGGfhIeMS54uq52L+cf5bn5cqTdJEgSj9XWfHXfPbvIJK1x6pzyzyFre9PA\n16ts\r\n=wy+z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"070016d39c8d62feb1148d71182053d37bc35fc6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.85a5272df.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.85a5272df.0_1597176445319_0.5449668338972458","host":"s3://npm-registry-packages"}},"8.0.0-canary.fda053eb8.0":{"name":"@material/auto-init","version":"8.0.0-canary.fda053eb8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fda053eb8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d9c85cd026ce5d95511ad3528ab456ec4e499b57","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fda053eb8.0.tgz","fileCount":14,"integrity":"sha512-EfdA5uYJO849x9xMCavlULVP74D1m4Y6DMmcWE31qewOHmbI8NPVQroNWbSKSNA1JAUtVHtnepKAkf7EE9W2cg==","signatures":[{"sig":"MEYCIQDY6Coz5hXp8yOAvVpd69apex7wo9LqqsD9qEjVM8ykYQIhAIjdpuzlTnSzboUS+KbAkczPAaIp4LzlfvkW+f/OuRdP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNEsKCRA9TVsSAnZWagAArpsP/icr0exS6zq7tyXt3QYx\n5xiMj9jd75gVbHNIpirrysLvTLawoQgVjWAMhIBuoAcs1ZhgYiHMXV6x8BYy\n930HV1TYmWU97HSLvwlRsSYvl1/iZlmPBy7XzW31YNy4BGbLps9CxvxjI6Yj\n420cl2RsDhlXZpYhu4B97Y6lzGDvJ6TcoWvf9pwJkz5nR36sXYL9quxK1VOd\ncnzV/SqWBwDHei1ply6VmzQJNeZ6NnGkXirooyLkBlEMyO1CVSLzafA4XoQC\nxtschySrvct4Pvf1qI+cmPR+voMJ1Kxj2dN7m7og+O7g8CMl90Q2NJkpXAil\nvSA3lVfJSQy/cK4CkYL9QaxBlpVHAbZ69YH1YEye7Gmv90cknRkutTJyw8kU\nVSu0dQj6CzizWo7lZYxHl1wU3H9InzPM1CjpvB0sVQdiBCUM8/2wEu9K+5jr\nlCjDwVMbFIpv6UnsycHTK+pSIj1vllSZuJe0h7A6lVmuDVVFHnW5goJYg2YX\nOlhV4GSKPwXtPbn2TCIxU/FzhtIp/IOyknx2OyyEUOwm+txFeJxYfL8aWncH\nHl511uCFOW6OhfeeL8fMHTnQ0VLBK/9sPhDunUgha8iYlV1WPnCtQyp7rB2l\nEpFkOH6Gx+dmDolvin43LSGALnMyA8uLDh4odAbnTxKB55R++fItP583HbiX\ndCfc\r\n=V9Sa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b92b594784940e2fbd248c33d60198f7f2e0ff71","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fda053eb8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fda053eb8.0_1597262601747_0.7053942807512734","host":"s3://npm-registry-packages"}},"8.0.0-canary.760873445.0":{"name":"@material/auto-init","version":"8.0.0-canary.760873445.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.760873445.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68f8a862d406cf03c38998be1409f64e054a0457","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.760873445.0.tgz","fileCount":14,"integrity":"sha512-twA1DQpEZv8ZYphIW695H4sTIkjHnaWttEFesoE1Qa4gAfvQf5fhAqR2pRSfoCXB/q645dI7OcoRav/yikGUtg==","signatures":[{"sig":"MEQCIClk7muCSF0YVWINziP2JqY+9Azu0ivlhmEI5xKoqZ/VAiA4jZzycqcQ+PYY2o6FLQNnbOsNLP61EzSlS2JXEnY3Ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNGJFCRA9TVsSAnZWagAA87AP/1HNODQv5m1/qMGnjJDe\nt4vws2USrcCaXcbVbOI5PKb+EjixRmPDW4B52zt+d8qs2q32pI33oO8yvkRJ\nLb+3l/6tELHdV32uZlZSUBYzUPifANg176NSUlHhEQY5PJnIl2CNrL+4renL\nUu7OhcqdTcnOvy9aEG0KfpBFDYx14aIGSRj+ZeWH00+6KxVcVJineR0kFKtQ\n0NZrx+Qbg64nxHJxL3MHUCuriqQg6sv+RaFjdTK23Z8eLLzYCSPKG6G2Mhm/\nQ0Ouh+qLvlPK63CbzIJJMpE7rRBuEnqt9QMnZu6euAO5dUK9lfN3pbiuCQnv\nUf1K/4z60CRO8X+yC2B5AKkeD80ahHF2nbRRkM3jnWKxeU+/Y8cs0wdlJQLS\nx5veEt0abjaVQfrSRQkVd3L3bN5XeRZekgGqC72bW0LPLbWivHHLTuUI/b1l\nbk/QfErPwBhaED/hyGv8nANhUQ+ZXgyecbcCpvovlZrGNd/+bwe7FPkCgaaA\nSXKScOB7KunJ4K4KtuYIu6FtcGzQNZjYU1En7ice/FE+9L6xX6AVga4TMR3F\n8e8TF2Zo05gLGNvzZNkOy9YVrxCEr91MuSvfBURatlcLp9XSe9nnG26oDXFw\n9KiMZsPbzgCRRzRkIM5qYmI6eJ7E/ksd8fRopO5GBcEkKUoiyXWtK7qqD9S+\nxGNg\r\n=djqO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a830629b92051950e9e15bdd288ad87238b7103e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.760873445.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.760873445.0_1597268548726_0.1603434620172315","host":"s3://npm-registry-packages"}},"8.0.0-canary.2f4711a30.0":{"name":"@material/auto-init","version":"8.0.0-canary.2f4711a30.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2f4711a30.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a622f3ac9456e68a30fae637fc1c9872030fb5e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2f4711a30.0.tgz","fileCount":14,"integrity":"sha512-eGWRuJCZUG+orFosd1+vBgGbQwr3D0JhJJHOx8guqvL6EeDFiLHDatXdcNtjkh152Om8TkPnWvnp5haMYFqyYg==","signatures":[{"sig":"MEYCIQDxpeHmIi61PwiFCI5jOsJVnX2HSBO7fofhonT4aJEzhAIhAJtrH771S3j8l1odDtWveeuZioAdazaa68Dzm7r7ZYB+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNGSdCRA9TVsSAnZWagAAf38P/05PKyuGxXlvK4rOreXB\nKgqc+uCzL0b4Ax4eAyVLhYWhLHp1pioBjmwgFxfXmgeZgGXZntcqTwQRsO51\npGNm8iApEv0FAAgnTzd6Kyqo5Fb0uRLttFektWFQ3sByZz4ZWpSd7zwWLtd4\nUSQ8QS363yT6cn9gWXCnbrC2UbG8ZrDUfqhq6qPMhKWUsgqD3XNiEraix7Ly\nxzgMcVz5KgcbcHAqUu5z8mx95ENWUvM1wA0EZpTHPJxFryQtU0lYZnKWlwiH\nXOKbOz5g+Dg6nqe2zWkAzT4tGuf4AxDmKkfE04/XLkBkS94/MQpF6CFYo2nV\nawSYcdDmup/+6vhqu+d3G6tn3GdWASrzGStMzJqBEGCLDQ3xmujgS+fyP7O0\nkiU9UN80yFgtdGaglaowgU5TjEYnA4pchpM0anWEAhou4O/mGKke4sS5t42B\n73iPFOqPJkqH8dNtbCToZBghBKU1Dm9YQmahYN9t0B5mbNxoMvXot2IChUIA\n9zKRFwmRZ8AO4z9ewxlGqePFId8ECNLWOIDx4yhsXv3LVN1D1KlGvcJSQfx8\nWPkclu56MPaQVVRCNSJ08E7mFJ6Z/gKITP05p6vAtr3fOBkHITu0RpiU20St\nGPuD2pmVHI2aR7zY8OydrAs2JexKZzu3biDrvznF3zTK90GVr0qrlqbXLjXx\nqsk/\r\n=J6k7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1347e5c15ba848f3525dcbd08fd0b11061e94116","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2f4711a30.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2f4711a30.0_1597269148690_0.21699626796557947","host":"s3://npm-registry-packages"}},"8.0.0-canary.2d72f3659.0":{"name":"@material/auto-init","version":"8.0.0-canary.2d72f3659.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2d72f3659.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"baaa43275afc67fe6acc11c7c13d01bdbe859a42","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2d72f3659.0.tgz","fileCount":14,"integrity":"sha512-oQIE5uZ00O53/TEAo6e1JEvvpHuPdRA6Y+MMcURM/TOQTlDUA03q7tRmHZuhxZT3/lFUL0oLqCvAsKByDeFVqg==","signatures":[{"sig":"MEYCIQCI+GkiqcDioCCSlrf7NOFrLgqmF4/LX8wEok8motudxgIhAKuof/ZkMPkgPX+Z5kGTkPMO2YsbFPIhBbjojTgTzozW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNGZbCRA9TVsSAnZWagAA/zkP/RE33mtOx+S3Vof9jVSx\nib2U9c9qShz75KLxLOdGnlhIvGxS66LRjgxNez9u9Q+97jFbm+sUt2zX7k+e\n5wl4ZIdnsMoQbQYMYTrIuyhO0VWGgGUzbZmFbrSXG/HBoD1MBt43/3y1WXAu\nHyp9IyWaOe91OOmEMvRiH/JjOs4pNQqw6SILtlBo44pYtE4aYscqd+UNmOUf\nlAkERPfTmYr/qX6C+vJnOdd6BhnOctD0AOaRtLaDJ0w90f5lxbFIHtbY3ipv\ncaYc49w/IUeduL61KbAMMVbelLouCAG+ESLJcsRqIFiT+FI9jSgYnzAFssZT\nOeAW0twGUPFuOqozyvq2HcbeBOHaX/bB5rntVt9B6ueftr4HMs+N5tGq048M\nmXbttGCxv2/rPQhefRwG93C2PBYlY6ZkyhKqze3hTvB/HJC0JfCmgvkteZD5\nQTmrgLcy0J0TTtr53eLHJRcdI8gaKAdr5tniVxa0EGDpmIBECtOZv2f4nCA7\nB+FPyAc5Yh3GqW6taezmXo0X/uhWmyX0jucUTx1dUXi2Ip4YlK73AVH41km8\n0Oj7BtdpW/h9nJKF4MCx1H2JbXBCLYFqhZKiLMTlvTffmS1ty1POVhqKmg4P\npdkSGALn3d1vIL5lVCU8sUL6ANhfpjtTvh5P8NRBdtfYIhQpWGanMNLDfzDb\nSsqm\r\n=ardB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"de40c24a4d850a3bd4269dcebba821d972e01c19","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2d72f3659.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2d72f3659.0_1597269594544_0.6201238562793265","host":"s3://npm-registry-packages"}},"8.0.0-canary.1fee70a5e.0":{"name":"@material/auto-init","version":"8.0.0-canary.1fee70a5e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.1fee70a5e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5baab6c7032a8650654ccf2d996678e6f08d0b1e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.1fee70a5e.0.tgz","fileCount":14,"integrity":"sha512-VJufw6tA5c1rp7WBoDKa2jYX+KT9OKoAJEMEO8jgL7yx4AE/yRBELskTrq5r/7xbWSuctFNLtYHiIJROiz/ewA==","signatures":[{"sig":"MEQCIHomt2swEX183Xx+QZ/ZLhT7S0aSP9PaN5dAGZOoMvLMAiA7X5qMk5B4iwZSVmNgfZbMYFik/qsfPY/6jiLi+4YssQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNHr9CRA9TVsSAnZWagAASQUP/21UNA0W2U+NJrCfEQey\nPMz2U02CsoLdTm+zxAHEOOaBDpaxsEyBkggZdD+NHUBbnlRZcaUaGFhNk29X\nXZbkdDok/0fpoIeMgL/ujjOlXMch27RBGl9WKg02CL7NVK1m97AZ61CfYlwd\naucSX4SmtZJ90QH+S6SqM+wcdtvfMNB7ilTptJ8jBHzha9nqrtohRwCl80ur\nB+2/CveTirKviKL4y53PaTf6ZRmk/pdK9ia6hpK669JfBD06LuN022pDTdtl\nskscVdJHyd8ByQuOK4YmKjSh/6wguHgp9Kvh6FAcqdcQ1D8QY/+UUgSJQcAc\nhHJSgrYU3+8nFwewbyXsZFCQpfGCwNcLKAVs4v7sa0iGwavMkFD5kdedADXM\nvtX7Ua5a8CupM1YdeYrrlBk8lvrWlNXTtHHnskBLKtZJIq5mdrF01byHNB5u\nx8eS3Ozww5JbJ3w9aY65NRlLYdLL48kgdo7waMtpiKM7njungM6uVmlJiLrv\nwqn4AhtBSW8wXiRUVAiD5gmQYnlkAUqglUmINeXkH9JpKmjEK5ALGm8U19Kh\ncXHgKPvk2K+t7xAtzt5SFn5WdHz8SnVy1Y8aSVTDYdAWSR+aaNpbEBB4+Suw\n3PHJ/qr7JF9RuhNHQq/b2E0vFXOMsjlk6CwFHYDNEG8XIEJHR+KrFOMzZ0iR\nI9ls\r\n=5ALq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e5eed4b73395e9cae47d93ed6f34f0dc0467c28","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.1fee70a5e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.1fee70a5e.0_1597274876529_0.30736065624705766","host":"s3://npm-registry-packages"}},"8.0.0-canary.023f3fa34.0":{"name":"@material/auto-init","version":"8.0.0-canary.023f3fa34.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.023f3fa34.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"44dd146bbad849d5d61c5e5aaee92d2981a10c29","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.023f3fa34.0.tgz","fileCount":14,"integrity":"sha512-vJ1sWMbAZb0f1z43ollFyRKuSrUcOmHtpdwmaMZrXIduPfk4ESennstuaozaYd641l/CI0WuJfROOOscZM5MNw==","signatures":[{"sig":"MEUCIByBEjQ1WzxN+XskSSjSQtncLSu5Em4QDK0iO/b4wXkhAiEAlLfyUKex0b5SFuHzxl9HXuR9kmqVp4g+yRl5a60rkwY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNJNHCRA9TVsSAnZWagAAzrYP/14ysAz0xoB3VIJqKQp+\nSo/4Vhue9tIx3ZtEVkjOkFOb7DMC3KpS8rpVS79aFxGWpledv6qG3Q/GrYzF\nQP2UM5g77BVza484+n+Dr85ljPsEHQbUKgg86slii11+oISSVPwMOreZbj9l\n5Z2HEo+R9SK6NxB/7QmFx2bn6zC6na6xSvBwrV6wWIORAOa9ZJx8TUpsgV5o\n54w9PjzsDpgtQObnrP2wPzGW3RBIr2whE3uLR5PDwcyB3Pv3ot7zwrVlHh+i\nDz9uAiS0sylc5vTc+HMbzf4Cz7OAeqLdBjaiEOtPzvY+Fx9THR36PDyoKFFq\nUIf3ZbuamRqsvSOVhFh0atq2QNyIx8PW3ErSimoAHd30cuSgUhUgPKHNJWMY\nO8k6zYiPM14BIKP93fh9o8gD9VrNOiHfXttZkznDN5V5hCZwuzPrI8frv7g4\nqGwOuSvMrh7EF1wB4nE1z7xAHbCcGWNAoH3+MHVWqDxnaEmrUAj+Se9zknXV\nZ7rT8nJo9fnvfv6p50ybFSQEPGdMwK8T7hzWiII4w2V8HeBHa9ymVD+iLv+n\nyu2Ri+m3f1nIVTL8IA8HrL9KVLgOEDBNOA+uC9Vh6t7v3GK+qAHcwYJRUbJq\nxWyGVG0e0Uc4a/LKTw/2fSZQ8ITQ9/MYOMNEz7ikDIaDfL3AL0VsL7pp/Awm\nenmO\r\n=tA1x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a6538d0b407fd8e7a7de8e39b4ed51bcefc560c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.023f3fa34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.023f3fa34.0_1597281095090_0.1928188822356811","host":"s3://npm-registry-packages"}},"8.0.0-canary.80f3a9e5d.0":{"name":"@material/auto-init","version":"8.0.0-canary.80f3a9e5d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.80f3a9e5d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2a69e8e0959b60676628fef02e3f2c885c6793c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.80f3a9e5d.0.tgz","fileCount":14,"integrity":"sha512-ToQg/hsnyWx3Q8XaFAR2ZwVsVQfuUjv930rn2eOUPoczIRuljeR6mcpJuXigVIzu8EEPgr4hphAZsADg8wP/5A==","signatures":[{"sig":"MEUCICeVnxG0Btz/ex9MSSHHzS847qJCG+ICNWsiT6vqhZnoAiEA/VeBCQ0V+SqfYce/0vKyLQqNpTj3BUTdYPjcmPsYGh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNJcsCRA9TVsSAnZWagAAekMQAI/TmVQ/mNh2sSp+k2jd\nbROmofHZpWMGoMWAdgdhA9upcJ2IZbCJCj6j/EZDbupVcp0JQli24OP5utiw\ny4R4n5/5cU96DpR6oH9qD4hvE1/8y2HFpNzFeTOJU9cPugRTfH8JF4SWOWoU\nMiMCZimr02riT64Vt1XN7Fe2r8AVUamrTJAaeFpsroQRP1pBQPBCsXTxKoiB\nyrc+NhBZ+YqlAwd+f7O4oOClZedRTjYi6vj1dJTc6/NUvCq1/bRQGm0SnQFM\n4NhReZVr0RWu2/p/3lDAOId3f2KUUbkW/CuL2z5KVmyVLSPCKlYN4/q/DRLK\nAc3L+iPpT104eiaIQoAoOrbxNamr+mrikwSNym6R8ajB2Rf1HMXAsT6as7cG\nTaCM8Df0irPbEWK+rxTlwXJlKZTNC7O55+Vp/4rqeNxXUFzl4FqB1CECvgWp\nNDkmzjAYR4X//YOjVWOwBxaf3aLnMUKl05R5CA0GISNqQpVHu2xhyJYF67Iz\nRwfxn/oq5KPMEAnZcr45+eyv1ysNxN04jtTipJBHIxLJ6DztVlzd4CQz4KPM\nEwZU90Bt5+PRrYlBovel88cN/lzJRWjXRxjaJjTJoY6DcSO1aMcnvihChdCy\nxDyBMl/ey72Q5I+K7p7TgY7L/wufHhkj9RkYvuCOm62Pqkw/A8lSSmXMTFSe\ncM39\r\n=RBlg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e47018f239b51581a67186dcbea3f4167f5ea3f2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.80f3a9e5d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.80f3a9e5d.0_1597282092010_0.444442672198607","host":"s3://npm-registry-packages"}},"8.0.0-canary.a1dcfe97c.0":{"name":"@material/auto-init","version":"8.0.0-canary.a1dcfe97c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a1dcfe97c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a49f94dfed2e0485017f0fd38d2e44602ac76df1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a1dcfe97c.0.tgz","fileCount":14,"integrity":"sha512-BaefjDEjeKUYHEd0H2jnaOda7EQWSmhlxY+IaJecZfwVEVRb7VvVBGFj80HwFxHgGJr6+ick0UKB7DQATwwiNQ==","signatures":[{"sig":"MEUCIQDpvJNqzVCfEFDTnfgD1LzZo4sfM/87l9r0joKXQEk+ggIgdZNz73TRx5e2hZgkSQQIz3FxKzNAn1uhnMYOxVrPNfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNP53CRA9TVsSAnZWagAAvtIP/Rm8ECIJRq7NQElCvMt7\n5voLTP4PwWTW0hxQ5JnFp/dyObUoeT8c9xnEr4HrcaK3QC7L18E2mZKT20AK\ns2zur3Qc85cm2KJ5ibE4ApJxGJ4k2NqJg0UREdGzT0lHLwP3kmxPfiBNaWHt\nrge7a7NVWNxg01mA2MR6cCrQTVFL/pIWpARS2hr1x14NiARawfRa78c7timg\nx0UoxBRvBk1xdLkU49s0fUS++VcCyG3YI/Nx5xb2f1arMqffnle/WUEfB8Oi\nr6Ll6gGSZiD2s98v6Ec9LImmakQ8upqxoAktkyxiIPYaqhbnMvjG12lihwXl\nfFJLsyKjFt5nAUv7G5WC25mCRFzqhCp/CM9xi/o0eavaZIQ6SSg6soOAsaPr\nFq+9tNTQErqlt8peSg24jsbEvyKF2AJFYJJkp7QEHkA1cMAzc2TZseVJSSd7\nSLjbl6rCEwDhOIQXWUBLzwt1BGlIS0NF7ohRvYTSPHTG6T7pt4qFEHgnFosc\nkZNYFx63dxMbWVqGEko/3eQOOEC2UiTEtrrALlb6Xej4MhrA/pRQzYcxe5sW\ngbkrqrhF1KAw/JnukmAGc3CVK25X7C6VByRa9ObWxHTz8tRY7KKV+OjUSLdD\n/O/aTZE2P/pDJMBf/snS9dbKg/dFDwnnP/VLZOmyvUH+cha+SAvUbB/K5uIw\nyxRO\r\n=Vvw6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ec1483dd23463f0239974be9a65ec22a6b54715","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a1dcfe97c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a1dcfe97c.0_1597308535190_0.47915695378752976","host":"s3://npm-registry-packages"}},"8.0.0-canary.af332d5be.0":{"name":"@material/auto-init","version":"8.0.0-canary.af332d5be.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.af332d5be.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1bf6f04610ba450ac5a569522080461f84576125","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.af332d5be.0.tgz","fileCount":14,"integrity":"sha512-JoycwgdpbI7FqjQJ48KyERNaUOKynHfd8M69RRH2BW5nwUsLAYTir2N0LExgT1Vvq47pgeQHvd39fFa1NRheVg==","signatures":[{"sig":"MEUCIQCQQIybjLuAOzN3GPHs+cGGGgU3wWuJ+93LVGqPFjINXAIgGkzCz9gKGUqNG71zGpggvwRImjVZE1zyxP28ZPQMNOo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNa2yCRA9TVsSAnZWagAA8k8P/0TNz0V4AbXJ9zNXcdKQ\nrBfVKKrElgPa/2ZLO9AtrtY+YYvGi6xCPCtZ3WkpvkXSkKo2O/5gV+fCTQYt\n5c0Lw08NtCCrSNt20E1Z9GEoGs1rHXhr8uG21EXzAALgP+yqmC6Ab8mg/a/I\nsrYjprAumcpVjEQPz9f8HeOIehH+UdBz3EbC9UdQOPmOaZe2mszmLbpfKGto\nbB582eTf7G6uApj6ToXtlpA/HBc3TPPxt1NU8VVlOTY46FVYzjIUAmOJkyne\nGr8FV2YJwixLmVjl6Np5oKHCX9lxTGyq4MiEO10nnWuJKtNEvflwIszc9RV2\ncUG4iES6jWh5RXRwmEGbkgDcaaswtCPaJQ5z1PngiJSjEvtzOatHoLjrpzU2\nCsWwlmyfgVL4X3NBhbvtlL99Gee6uV+kpW/N03ZGKXM1SxBk+iJFJWi/ZiCo\nWAveK5OepI4EeuCjvDUWJX6H6V6swDI0/WQosfQ7tpCX8xwsaidotqA/KKea\nKr3xVAn8ceU4r1k4HWff1WNaOQ7zj3GQt74zt2P5oBc4UWF5UbwyUpzs7JSR\n1cdh0Ag9t0u3AkaZeSo+sgxnwNtT+/3Yg7AUTjFh+4ptWmIbN1y8FyGBRUor\nyNn+JG1Zzl2ecmrA4UapFHZUXRDixcuMrwHG/f1Ii8P0KoHvI88z0lu+uckY\nUNFl\r\n=4dEO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ecb675d071cb76738aea95a2d43ef88a134275be","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.af332d5be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.af332d5be.0_1597353394311_0.4301277420776093","host":"s3://npm-registry-packages"}},"8.0.0-canary.7dd4567c4.0":{"name":"@material/auto-init","version":"8.0.0-canary.7dd4567c4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.7dd4567c4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d64c043ceb0442204ce6a1b61ce816cbdf41599f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.7dd4567c4.0.tgz","fileCount":14,"integrity":"sha512-4pbktHHsE92pquBp32ngn+Df7Td4ywXF/DXcMH1dYRoq0QQqJVGjXVK4baTrrpqAdtuYVRZfYRiv2Tnk/eEnXg==","signatures":[{"sig":"MEYCIQCE7fc7bdnCzQyk4SNb9k9WW2BMTxN4TKVySx7iTLU1QQIhAJOocRrPjaVeK3UlNvMaDoT094cClvVMi0i5E7FWAOxf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNd/ACRA9TVsSAnZWagAAqhoQAJThQn8rqjb9nFe6PI1O\nUWJWwI11eKCpEiDoOz2IU0tohL8va8GSbK8TspMiCKw0ykkwB0dWtV6J1gH6\nHTWlUOnE9oc3JZ/o9ce5bipvm3B/ZX9s/QzekIK7jJuL6GUo1XDC0m+azD5p\nQzDmN8Yd1AiFuvF0SfOFSAQw/ZONAG2LiSdk0YdHCXTgENooHC+JTdCqH0mc\nsHg+jGlnWGpGV5wPcshTrR9qClLQL6FO8umdi/ZTakzl5JBPsGWaPiK6IgLo\nHJ3M3XaDiYuM7hDmcwEe4291RZpatS45PUJwb6UwM0505aKA9In+fRTOQvvR\nHkbujSDavg5i9cFd1onrh2hypLivA7sNafEAWF6zJE7jMPwAskWo0vSUjv37\ndjmZPEgfqENAUkACkbk1hwJ/j6AW5d7XN8nAP5abV1KuA1sgubdpE4xUZ2kf\ndbJ1aKlYVz8NOvqFGlB5R7PFmJy8t2mF4Jj/PAQQtRHSHHlW7xWDq6MuwaMw\njSFRR5TqBuJgaM4iVaz5NbodiFNZjg4mhBQ2hbgKeL71v0tdJmUZPbmNpEKH\nj9k/UohMhGaQ724X0cj4s4RkTVvB9mlLTfOxv9gE8MozXQ/S7nR6AtWdg+iR\nTyfni6rEvwfgKKUuEseoSMx3eRgKEVOBkuEG0mws6KENlW7U47JS4R97ifjy\ng4wM\r\n=k8oT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"515ae143d426f0329f0a745e0ad35113761376e1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.7dd4567c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.7dd4567c4.0_1597366207292_0.6418115069914587","host":"s3://npm-registry-packages"}},"8.0.0-canary.ff870005a.0":{"name":"@material/auto-init","version":"8.0.0-canary.ff870005a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ff870005a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5fbfa0833349ee2d6e0d0ef9316ab3abb7f14562","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ff870005a.0.tgz","fileCount":14,"integrity":"sha512-slxaA2+QLVV78fN8K8Xx2J4RGM3JC2O1yLurebK2BN/JHGP/RbU/cPusF0XzGces6jv8+y9TnOH9RQsXKmpjEw==","signatures":[{"sig":"MEUCIBWJjhI8CkhSlWK77B209YPV8+11jkguDN4/yuQiIKAxAiEA17Nh7EUExzko2ILOTjyu7d36nPTtYcHSGiuWFn74msE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNeWxCRA9TVsSAnZWagAARPAP/1fn8nfwRoWO8VB50KrJ\nHCs9UoeFGNNebOGOIWI6E6zgYoxVesR8T+YhHrYneHDhZjJrR7ompJbJiy+3\nlEz5MgogTv3bTk3WMkNnueeAv4gsc/mWPlwiuvWYbhbrdsaQuyXdl+uUVZuj\nUQiZ6ZsHOin6SEkWodRtv4o1HHavdkkA4udMIf5Z6PrvNfQZg/Jz0wQrw8xr\neTQ91ePFfHheeZpUBxVWs0ZDNceKKNkA8Tl6Juu8nJHn8sY3jy4zsKMLmlJU\nSa+jLttgaHOJJTPbZGI+gL/zC6wuZ2beeqX89lWxlwineAKPsZQZePRhocR0\nhothAJ9IIwlmrJInkQ7rFScjbb/FrbthE1NRXn9nxjbWUNyJf1HFVfbz+GLa\na6Oj5zBjIe9EbIPwDgQxach1ZEtuuwGkuMX6e7slOrdG17jMqysP5fV8GufB\n1sOHo8l30rRFUa9mAYBJ2fW5w7qIIzO4RDpmjf7dV+7xYnRRmLM8hlFRrgnk\n+Gu7hX9513gaLmmn1/HgnfyHdnbDlJwls4tblX7Lp0+L/Uke/gHkj6inuLRs\nOyhpNU4YLSqNI51HgTFh/q8ncE2p0k3YVwwapjSUkbhyrbe8jLEHuM2/z8q4\ndW+95+sl0GLDB+ePZlBOrwOIXSybZiMqy9VG4vxaJTnEOndvCC2ghgML8JOL\nMft6\r\n=VT4z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"885c1d5e1cf217db1bcb8176917a25d6c74575a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ff870005a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ff870005a.0_1597367726569_0.30227485667595033","host":"s3://npm-registry-packages"}},"8.0.0-canary.150f427a0.0":{"name":"@material/auto-init","version":"8.0.0-canary.150f427a0.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.150f427a0.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae6a0cbc4c600ff20e22a0b9b836a05144b8b131","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.150f427a0.0.tgz","fileCount":14,"integrity":"sha512-Ky/75Xev5c70isruOCJ/S4KuGM8C6QgxQcL/vm13tqOuRjq1eMfOGADj7+TTeMAn5eDOHts3jbgxTuW2G8HuTQ==","signatures":[{"sig":"MEUCIQDcPB6uAvOXK5fjZCrnk1OyHZl+zR0C8viRRnE+L++i6AIgGRBnrmeh2QmzOaZJYmjQj6LmUa/HlsC+PlZcQUgVrZk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNpF9CRA9TVsSAnZWagAAQdwP/RKp4ldtF4jKLP9KdFnf\nnldbQj8wS7HjzQHobr7WSMXbZG0g3Ax0hSTCtgqulJcFiUQHzCFdRRPb67mS\nIvAtNVu1rsWqU9+mot3PrRoTdUgkZ/7PCbHtk5i2QjsAi1H4X5UYrM4nDoGd\n+cWhxa4PGBNYf7D/tiqtca7H7S8zbiGwjrNEVeHOhHBhKSESrnjV5r1pY2PW\n8poE+3Rh7AkMZKXlucWPKjsjOpObe2teo9jWEvy8Wi+hTXhRtJSfiEMEiCHT\npSjHbYQ62mSP9h5O7t41UgtHZj8ibhSgAXjFtAeQpbG/tZt2qb2GGvbi6lcx\n/fk8ZX09SitQpOWz8r9hd4Ch5VJtqynKFZGj+KkqTTpDqIn0zN/81L3DG6M2\nICwyGhpjWEGqCwkRpVfhMh46xltmF09SDLhXZJRpT1v8Q4KFDeKGHmN533i+\nbd3rn4YhX/ENUeqiMNWYOCxc+DoYKTW6T9VIbNu4WJ4OO0TPujlCO12vCi4F\nstGUn4KeMeyS7w/Vy0NBKCaVY/qPmppKgIWx8g/OTyG+nIXVQMWkSWtwMDsU\nS7hvHlbpQFglXjXTmWrbCFNa03qv8VMQNVKZZTKfV+GEjciNqX5hEJ2xdyrs\n/I4BcTKJo9PgW4QTz2awcYdJ+gbrI6MwVdWAPTW7VkUop+/B6q197xJyQCGZ\nlP0L\r\n=IVLK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9250d38c39aaaa2210225133bd9fa4da3739df3e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.150f427a0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.150f427a0.0_1597411708678_0.04972411307094715","host":"s3://npm-registry-packages"}},"8.0.0-canary.bcc58290a.0":{"name":"@material/auto-init","version":"8.0.0-canary.bcc58290a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.bcc58290a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"47d857629d2855f4b503f99e1728f169efcc1f1a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.bcc58290a.0.tgz","fileCount":14,"integrity":"sha512-5wJ+vaaJIhBn2VmvayjqlFj8+jMZLLxJxAFVDwTTRZZG2ZceVukARd9+89csdc3fu0PbRO6951oUgI8omZYHKQ==","signatures":[{"sig":"MEQCIHA7JfSe6NR+vJ4Li43VLCWNuQOUkyEvs3b3BaHldeRfAiA2m9iUELUK9k15fOr2o2raZ/ObvwAnm3YP9UkbWGr+Mg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNxyKCRA9TVsSAnZWagAAoHIP+wcu7snzK0cgSncSQ1O6\nNfXrhSbU9zPvAJkzqIZknWskuRK/TPMAO04JyplVDMfy7R5VMYhocntIFAq7\nMnJdJHcayHQZa1j+iaVoKa91ZlJL1myZRLXaxP7e7epzwnqnk9RIJIWg926e\na0eBaZXsjJSVSEuFXe+GISuQ8TgiuxZRVyaRREvZYlxnLjR8vfWuSGeVksih\n4EdSwB7Kj10HWTTKBmF5pxF526jivpAl9Yny4tNhT6Kksvm0dfVkKYBZEsWF\nILdN1VaB91fqYvyL1/hnqVyWORKeKEfg9g6hn062hQQdaxMA4gspWrPPDrlu\nAcV18VP7FIJYcituesFnrM6s81+Z98NYNQNnPTjJpnfvWgmNutR9vucj1xuy\nsK8f8ithSmMRIE2ttJlTZRHXPVzR3G0nAAnDYI/lfHpGPxNNvaLWCJj1FKhT\nIRpZ5TdK3dGkKA/wR27XrApj/VAdh1maTD9G9Dbbznyz21AXpd5p/7I6TnNc\nwFY83u5D87E7IG3zXiVCaq7RSKPIAkSRomhMs59w9UnlHMOHjecWVLJRkYOe\n1qprZ6DGXNADRpz6tDFQcPH5QreOEBl17WbEvMImMsgrPndeLCBXBAZ0PRCP\nNeiuxE4faQ79BTSmNSMSWnu+wneUPOAVJlKjwrX6Jaa8t9tQ3RRwx1AwS5mE\nhjjx\r\n=2KGs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ba12c8e781c26c6169e16b167798237b5ededb54","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.bcc58290a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.bcc58290a.0_1597447306032_0.003484983347984416","host":"s3://npm-registry-packages"}},"8.0.0-canary.4f55400bb.0":{"name":"@material/auto-init","version":"8.0.0-canary.4f55400bb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4f55400bb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d46102347d9ff586fb8790c2ad31ca2d7734ddd6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4f55400bb.0.tgz","fileCount":14,"integrity":"sha512-xufTl0Zc6FIV3mV76fs/WBuEKlF1nrmd7m7Gozi4qwCG8S99cDj+wYVj4wIY0QonssxNBkO36I4qSugvsXrRqw==","signatures":[{"sig":"MEYCIQD2EXOk53fbXlh54GObcmvN5daieZ8QjP5N0u8nZM+7VwIhAIKrnLLrgJyadgJHHSlLi4AMCi8LxyXPvUx2WrRCci6Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOrJWCRA9TVsSAnZWagAAshIP/jLMNzefSsCOq+PVabTH\nUyX1PUFB+6t7pt3tr6YlU481o3dThJkuZvxfe/+4zD1QfHCLQv1i1FYu+OXK\nTA3lsHI+WEHJaZ8+d6G1LP02996B4RxPJUOoPyu/8LRuPzmNOb8Ssfz1oPKa\n+2nKAO71ulh6B3i4AWkZOfcdecE3fog/3QcpA1GbUtUjNcI3ScSGDbLZ9iGc\n2KclykFoyWTpRVeYfUE3nXh0u8Rt/EZb73MKNUSBpLyZPWbG4LjYb8CLvtn0\nuA/1RVk+053mM8+C1Q0lfzWhIoFrw59PdRsqeQMdH68mHQceGzaTb8luIY75\nI+vz8ypUfJkXqKqIjex2SDu6hRGpyl3Cng5ZizQVl3FH3+nk6XU1RU8Qj3xS\nbwAhDfdQcKFmri4H8gmkCHRFjGoD5EOfiDE3cuU68y6dpq4k3MfcCpd29VhN\n5K8KGeUUrU2IAhLqCrVFH2jkoh8TLHC7JkADyNQi5uRbfD6bAIs+QX1g6R0Z\nlvX8Q5KJ8dhBdbKQ4OJgvgnfvpokQO4XOf4WdQP/GzYBLMUHHhtWvp8m4Xh4\nwPbGPVPW2myQb9USY3FkVfSjXYyLba6SWG1Zjog/D1bUNi5SpW4/66s5wjBw\nPPhhYz82V9aokKiVjHWDkyLMVPxYldy+zOawBcnvzkFLCFoQ0xSR2HrJCLLa\nAEIG\r\n=+RTI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a9eebd86aa2e631b994a71291827e602b842dc36","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4f55400bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4f55400bb.0_1597682261827_0.13181391272839438","host":"s3://npm-registry-packages"}},"8.0.0-canary.000d64815.0":{"name":"@material/auto-init","version":"8.0.0-canary.000d64815.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.000d64815.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ff26efec3d22f0becfeb3e2af2a6c206d49d4d2e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.000d64815.0.tgz","fileCount":14,"integrity":"sha512-IsraRDXGxzcZOJPNVsiuP4GzPTRT/ANpbFnLPW1uD25IBw+DXFOEVDryKSjZB7PIXTIkYeR5OYRo3DuvIqN8ig==","signatures":[{"sig":"MEYCIQDW0vlpzXWzJb4UuUcaVgB9UHgitMXxbiGs60dMWSkmlgIhAO7B4KFvDVe6/R1dskpnymov9UqW1y4ogiHTPrADOcP2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOrhjCRA9TVsSAnZWagAA2WcP/irWzWD9KhKKyH3eFAYc\nWMvTOojcsXzfvkhCE5rm4lJjsi4ByFInFMK60ZnPJ+du8eDoM+GlKHbxU2Da\nPhwUkcOYk4PnUYIxpBgIpqU4+33r+OmNd2GpA2ahF0b82nFnF9lZZR/qvzEL\nOduD308bU4hAw9MDzI7lgJ+qMewQGRCwN3ZVxnXRl94stfcBapjEOgtN9FRG\neVNso5xa9EVI3VMCadwsDQqLfJl/5COD4HGQA5XtHWXfN9SgpfaQ+uYZwufH\nhRcolOE/E4++JVV8WYA4hQUBdCQ6GWwtcivXkysxP/emkPDTvLcb2cR+PhNg\n3TdYVMhGyDBdFY7YYLbrcOO5JXkfYsWWU3FDgEax+Aiw+EVjEJeLRoe9sCWa\nUv09EQd1TeNHw59MBC+JEwta+2KDAr0vXgtDCjQ3+xBHwRdZopYA8nTmhAUf\nEaKrH63PxQ4YygfCx/dMRzECXeqemgi3e+GTLSHMvKdqKS9cDdaEynLO2mct\n744zRKIP8Xuk+TC5Tv8OcGYvdgfJsju8mMNsbesV4nv53AXrInTYlDxN0pjK\nlL1sMz5UN+k6YIIPhFQepVnNwHX3//vzwnKn0r/hu1Mb12VmfFl3gz2kJZwv\nee1hIXzTpZs724ZRSFRhAVTj0DkR8g+KKP4bjl7ULQXrKuJ8Y8+gNwzlX3Ci\noAue\r\n=M+5l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c8a69943d64e6f468c2edeaf1fc6204d372a9fed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.000d64815.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.000d64815.0_1597683811208_0.8866881238172772","host":"s3://npm-registry-packages"}},"8.0.0-canary.defa599a8.0":{"name":"@material/auto-init","version":"8.0.0-canary.defa599a8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.defa599a8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1490562c3addc163259c78ed46e56345fd066790","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.defa599a8.0.tgz","fileCount":14,"integrity":"sha512-yRkD2SjUmP+kX5ZCiCs4ztJtA3vbaOMD8knLIBsKiFho8KLU3OaU+GBCxRvYkS94LomZ8hVeo8H8W/LoeigqMw==","signatures":[{"sig":"MEQCIFNjHu7cniSKceh2S3fRlZDg10HawYpbbFv/ZIa3kmW3AiB1RMpflL56FvK09qRvapKf1MV8kYDwD8kdyyKZFMkrXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOukHCRA9TVsSAnZWagAAYPMP/1ag9ZZ/ZkvSOZR1WXNg\neiWGxYjrft+XqnX2NuV8PxFhRMGkCOsoNfZbCOhVdAU2frksgrroAEDZoATi\n93QWK8cB8NBAgfNsqdYsgJfdlZddPCZAxWbEJbGCPgXfZmGJlZNEMKtWHhyV\ngsMqt+UM1/KfNqf2WEsZyQ55SV9SeXcXhHJjs9hXWg248m4mvBF3EVOe/qvE\nVazug5+VhVbDWTs75nvOz1aH285Id5R1CIkWQix8WMM1hLTOM7AOHOMmHHLH\nalwOOLJvN/sbLHtOR9TzXurTLNRsiU3TpcL/aHfETbD+1ji1qbnxHqQm8T8V\nqaLo2+xZ/jYZZgBOK1OVprJhO3bghaUM+q8iPCuD0NPg0xezKiQuEyvV6aOw\nhtgR/MVR4Ks8uLGEhI2QYhGODyhr9gb2sHYL09PxTXdyTcl1gxwrSLK9yn+X\ne/Tx+5PSbiqacKOX12lrq6MY+mfJUrjz4iYHGndLDM4I2GOJiAJqsSm00IdK\nDycmOSFrTIfZ8ATQU8waoccSOLGtNlSlqjKo21pcL3kPXysLGuuTRaU2Bs4r\nt5gj7O4ufE0VIWk+T/Vh8Qw3UXSoJMo5Gv2PWDMmbbLJwjMPc+ZCwbQUPIFK\nVy6/H6lktfLLjEoOGCxz1sPQjWyJg9f1qRxK0bFn2BcWTHAlvEEgh5V2B8w1\nURUX\r\n=Qq5E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d3ddc8cf9af988fc4a02f26feee3e4ca0184dbec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.defa599a8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.defa599a8.0_1597696262507_0.5342529665012443","host":"s3://npm-registry-packages"}},"8.0.0-canary.66b8ed7e6.0":{"name":"@material/auto-init","version":"8.0.0-canary.66b8ed7e6.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.66b8ed7e6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5a51e34623b3765060a2c0364da30e6eb8157cf7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.66b8ed7e6.0.tgz","fileCount":14,"integrity":"sha512-OBCTsVGeK0C9I5CZWX6f92+K5yZqJeSKjik0C1dKIUhKTy6grw30Tq/ogtj0byIp97MWpySAbwpGJXcYm9s3sQ==","signatures":[{"sig":"MEQCIFt5ejTOJ0Z7O1RWuBaFZQmanrGlIE/CjnbJ9p+xnEcUAiApQ7k7CCzT+AVa7RSOwzgoqPMCw6yvLQq0iQEbNX8Dog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPB+RCRA9TVsSAnZWagAAf+wP/25DPaybk0bAX8DM8YV0\nFQKLS6bslf9n4ERlUNE8A/yFPbSN4owW6PAgs8n/hXtXq5kOiMzLN/uSCQ60\n/a4em/9Acm80IxaG3Z5b7bPxe9vRIDCvXUpAxY8HZmOMOU7tSxtzUL6htBJJ\n9wCD/xDSiwSWYPNpczRma57Vlcy7MRHP0LQcbtrZfCID8vSflWXW9KIe2HWo\nWBlv8/W4/W073uEvZdIhU68WA8FdzLAM/Plk1g3Mb3ER5MBKiFc/BQShKAb/\nH68Rq9onMcgbB//QzjhqzT2vg665Rz9P4IvYlIOuaLy/7ri4M6VLyxnENhMg\nIamOhDNDEBWO8JsMd6ah+OtSffkoSCTG7qQhmLwb2lze5UZ+f2mA8+4Imvvp\n17JbpMh5t/Mz3kmQuRbzf+ns23k+knB7WemjqDG/waIvrBA8XT4VdpQgtDc4\n1TBjCSxS9lHgksl2eViXELq3ZfVwzv6llAhpfFNkFd+WcrtyqZTfCNVeyZ8L\n1UPQMx6OS/kl6/C26JPr2/hzYXx1UQ3yjxX54sLBlCl+LVYvZHpXyhuzyLxf\nN9F7J5FuCunt8grzoVzEgp5UNfqWrnncukbbvkDlXSlA3H1fdWaWsVDeYuO1\nFcsba6BlWbl7KKpQKB4rmT7HInfgYQ3D5LwXMliKWKaBHUcfMeUjpTCVheGO\ndluz\r\n=UNkl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c23c9dce18363cb6806c169d5a516da2a0fcf89f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.66b8ed7e6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.66b8ed7e6.0_1597775761427_0.26146634945446645","host":"s3://npm-registry-packages"}},"8.0.0-canary.e2b1033df.0":{"name":"@material/auto-init","version":"8.0.0-canary.e2b1033df.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e2b1033df.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"651e2fc0a2d68ecfbea68f178cce37f88a717f38","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e2b1033df.0.tgz","fileCount":14,"integrity":"sha512-2yysrUtHbvi3GbuXVtHRpXlYcv+yeD2rKTv3oaAhDqn0M6rohqmnm5NdtrWWBkDm5oVVNJM1Bpqf3VbKrbOB0g==","signatures":[{"sig":"MEQCIBDeMCqrB4WM73AprMV1v7o773lfzDqLLqDlc40Qz+T2AiAqO7P7lEDvZ9hqiGlxwclwutFjTtyAxgp8CAQgdrSrgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPXJGCRA9TVsSAnZWagAA4SkP+gPtTarT1id42GDd1wOE\nEX89dbwDYlH9dBUeGTXUql4P4cB5g8JrJ2K4cfQMrdkeom5Cux1mzlrWwkBv\nqrJc9EHYeAt0G7KWfkCUn8gt17cN10uK0D4YBNqJFVXm8NOwXz0b5jHaEko7\nhgxSMyULffy5ORPZ6WqznCUvjM360CPWeT7jPq/5PcZvg6jmk2uOUlxTIgSD\noSUDSQnCxQfe8h0gXEOwebFQDdN9itl9djH7bXbO6TtvZQuBxEeUviL40UoX\nzSMDE5h2Fi6k5k0bVelwYX5VyNhzEjP2lZx0Inf4UD4/s2ahV+v/huGtQdph\nQK8K5/HxHzMhkArqQuwzaehXtoImLK7d/Qt8PzLsqRfAiYoS/g3R5h3LlVuA\nqLEhZXIcuXBshrn6c8VhsHJzk8GG0X8rOKEzBJr7gLJPHppIKzbzmkcRfGVq\n1PxvWvElVN2cabJS8gw23bKENdS0JlSQI9tnS4/uI4dEoKsnO43g0yfh9hBQ\nZ47ZPkNlDyRRctq4kVFE0sUbgL4h3fcuglJ6tQd/ut+/VR0IKlnSnl0/86LO\nOSg3vNp+dYfkPhlMSB1lDuXpSU3jLZ3hxxg9jUgmIChJobDken29HI8TamRD\nmNHpi+c36s7sKUQXkSvNsYaOGb9/MHxQv7OUQpC6v1thTtpuGa1l0+/06rhO\n2rzq\r\n=YkTd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"763ba6b73959bf0639ed8d0c9656a53b18e30c1c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e2b1033df.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e2b1033df.0_1597862469565_0.5142648952993985","host":"s3://npm-registry-packages"}},"8.0.0-canary.2e8c3dd2e.0":{"name":"@material/auto-init","version":"8.0.0-canary.2e8c3dd2e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2e8c3dd2e.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"14d4dd61bfeb7e8b633f5f07870b9d8f80482dc7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2e8c3dd2e.0.tgz","fileCount":14,"integrity":"sha512-md03+2TVp+9dwtIJGflcAyYDY6Ak/vJJJaPyfNhQ9d6+D0FT3vG3414BO/g5W1LwbuRuIRv5lsVUrfH13A6JSA==","signatures":[{"sig":"MEYCIQCpIFK1Sb1zu31PYBono2cmZ1VkS2SQsS8ixZ6ORceNfgIhAIWcEhLcOs22YAUhYbmKkhMMCBfdPSt5dsP1XOtzli64","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPXweCRA9TVsSAnZWagAA6HgP/3PI+rFPn/c/fKTFd3uR\ndIKPaMELZl8KFIMC1eApWlYjiBWpjwFdvKciIY2FQbPxEvJzI7soembfIMn6\nFNY8XUqDkAYJCRUyd8GTofJPue+7oemqUAlvQvCock0tuLs782pR6PpUKp92\n+Jr4aazq3yWCDQJjHrB839+UCqM1Kup8BBXWIhgxXgaM38COlQel2YwJWtIF\nZCMwYYX32sLI68BCAfXBq0PQPCwRVFK4hnuEzc7cveNF2GT5jGz6BEbGYynE\nKRasQzbv9RVmP3rro7uZfTGhoGUw5RNlWGWWHBuoveEPta9S1w4F4KB/xGeY\nkA3bk5DW3LpCJkgHdFbcPU0SROJJCdrOLvg+OA1tt7sUjzUzUPs2HSv1YLEj\n9aWTfFxAY3LeZaPgPO1sg1EjQYc7ZPSkMQQupcE0Tw9Zu57u0bsI4YPmWjwR\nw1Q0zITL4/YwaUOw7UuByCKRsPCyw6ZN6z7aka5iJ4hCJ7bSuOkMYDPqPNqi\naYn0fBAV6rB54CIU1wLYCUO1ZcRZdx69B8UKw81Ut+4/RBhyJwc2VzDC3oRI\nonz/NnOYpWrmXHCFzCpEoE7h7Ki++/yOy/uvds3FNpW+i4izkoKO6GAhuG68\n2k+XUhcPvFNUvpXoT7ISzpzXIXbUoEVTeA25hF7259/FrLaQuf4lVurvFkkX\nyNB/\r\n=5YN/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"237ca1e061b4efa53d623ea5dc9c9d670d5c9da0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2e8c3dd2e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2e8c3dd2e.0_1597864990279_0.5947158987759318","host":"s3://npm-registry-packages"}},"8.0.0-canary.b2e80a5d9.0":{"name":"@material/auto-init","version":"8.0.0-canary.b2e80a5d9.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b2e80a5d9.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"28d02dce9fd6c8b57c7b16b3649849fe91d58e39","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b2e80a5d9.0.tgz","fileCount":14,"integrity":"sha512-IjYDUfmSgrSfgPdANMyfGQinX9SiJVv+dIsY+HNTCuXLxELyIIT53WYqyr4KR2bua/yCb6QHTKJsrMU5wWyroQ==","signatures":[{"sig":"MEYCIQDayT6s2pTAQHNvvFwfBxdexNJs3ez2A9bf1tFkC+IpWwIhAPDVapZSMvki3aQMk9oTlW/bRx5Q4N+FCfCMazG8ZYbH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPaWcCRA9TVsSAnZWagAAkTEP+wfAMVTq5sDYrfNLaz/E\ndzW/sb2ukBQXFWHR85/v5mznWkBvO3/EyMxgQ448UV6Bpk83bsCJBy8rg5jv\n+Th93rO6rmVt1wMafOBUpDcyA3C+yVMp6XfpHzLs+Byf27dIjwzyP0VcIr6o\nHtIDYwRfbNlLBB9hYyPqebS1zuovr/5nrXKtL55F9ccFeadCMPFy1UHugwXw\nJqly+zXFuAnjtWRm5bXA1OTEzZSdOMzkQh+Gy7IDOjh9QRz/exEo9kEvOZOX\nSefFL9/Y2mO3sl7RuNfyNk7vLHtEc1uZVHxCPy5gy+iFkJ2k36fCyZKx+Lg3\nZbGf3wnPHkygqbLvxoiUQOkYFgSZt0tK1Srwvff+xvNSSBfjwPpxGltI8t2k\nx8tYbhvg/n5s7ydPfigm9qdU+nHXbNrvNkP/sVJQfAvq33og0xgVOJzbbvf3\n/PH/NTqPZPsmGfPmWtjLHLDZYG5VnYLttc0r5MIvgPpVH+q9tElRqZFPWSWx\noLmuFJd5Y9zWaWOaRj+qCKcSchMHgxIBlJkEUx+zB8cAZXPaIQJF2Mk0mVMX\nohHukw6su//ugZFns/otNiUMVdHz3VhFpB3j8HuFZdUqedgvmFbfBHnHWlC9\ndyDOXGBvPXC9nK43lrJGqVk8AVoTcxr+pwGVa1pGizczfYzaAwlA2ZVF/eD+\nfuU+\r\n=t8YV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"84085f6b072572fb6b09623a5f0b35bb95db6fca","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b2e80a5d9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b2e80a5d9.0_1597875611658_0.519620679754546","host":"s3://npm-registry-packages"}},"8.0.0-canary.ff88df637.0":{"name":"@material/auto-init","version":"8.0.0-canary.ff88df637.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ff88df637.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"28bb61e83fa4f9fa6671b3da40572c753cbdc6cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ff88df637.0.tgz","fileCount":14,"integrity":"sha512-X61HB7x92k5ULq1Q5XMjuzblTT9revrlsalJsmQ7UkF7hT14B5SNavrwdR7QzampqeI2q6rA7ncput480Bj/pQ==","signatures":[{"sig":"MEUCIQCnyDwaERpbPWNXmpEGat/ZklxLqFEft/7BUEnMKATaQwIgCXM4UQD2kjEx75Iuab9tabCGUyUYQRWA9HiRPwl94fM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPahqCRA9TVsSAnZWagAAolsP/2DSRTmZwNvo08g0qHCU\nkGvH6mS9EU73FmQ4QenkBSCqHTQQRqSp2kHKXT7gJY6y2Cyo5lHH7eklKBvR\ngfYT5Tr5danb0ReLLNncXiGsrDKl4TValuC9GG11PUcAjozXGy4l9wyX5qLC\nLt+WmvLo9TBCGJ7tsDtVc7FM2SPvjDMAMFwroEmVM3A+V2t4qNUBpJIRIhHg\nKt57jt0Ps4e7HwAHvsIKyPeo9+Mav6nirHo8zKwP/1fa7a9gLqTj/2+c4E5i\nW04PWsIjEY/61tpNhsqT3GPcZEK1DYqzDLntjHv8lk0B0p/jWXp3GpLlVBiK\nzoulEYtM2nnunbwcJEd4jzBvVHUjtSYCgUO+KiUTOAU9U5UqKL1oEhofwxrn\n+Rjzr1m/zLqcWHq9erIYgFsttb2k2ybLS0pRMJPT4KtsjGeavAPgmpF4UulN\nWWRGkvzAWvhfiGt+Bkql9DeQEZmogw7IdcVV7zEWkK7PQvU7mBTycU7g7IBf\nUChLU4h8mN55FpWzsgC/BPQNmThuExDnXABDhvOv7OlucaQ1Ylw5JLqQfhLo\nrY0VzdapfOMtB7h7o0eglqYec6V7GuUrpU2c8JHXQV5hL9lX+wVRbuU86AeG\n4UxbmxrJkDmWI5gVeijF/WccwiqDIbAM3//D/FSRBfAmHpxobELip8Hj12TT\nUdWT\r\n=Hiag\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36ba8daf061692c2f915513485e71707d8eae239","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ff88df637.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ff88df637.0_1597876329622_0.4064661075793823","host":"s3://npm-registry-packages"}},"8.0.0-canary.32fb314cd.0":{"name":"@material/auto-init","version":"8.0.0-canary.32fb314cd.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.32fb314cd.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"10a31fa7ed132a45cee05d324d3cc5978bc399e2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.32fb314cd.0.tgz","fileCount":14,"integrity":"sha512-zWHg5IYDDZd92La5gGuBtNtYInoXXhzB1x6iJoxpQ6gwmO1AEhPFeGIdq2KGMkRa/KF3kfaLd3gXSwOT8EPxPg==","signatures":[{"sig":"MEYCIQCmbC3WpY9sZogCa/CEFSb5410/4Ohg8UESBg11UXBFVwIhAK2OFT9YxK7exdGB7FQe+2mCbRROENkMVELiclbtsxDK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPlI7CRA9TVsSAnZWagAAx18QAJF958QvrzBMoJmaMjML\n7QAV/J6UQYSPd0qUPieNB5szWtDz8L/7I34bkz2JjMKkWzTjsBKtRmSKpuiH\nddPE7Y20L2woIdPPpP3SbeJEwpCmoYmfJk0OSp1eofr8jSu3aesIJkhI21mn\nh/l18RIZMt3RJZWIqTqLbKe2CbTtJ4w0BF2Q0OyIxrKVjmLwOsVIsqles6J3\noRFGsv5Wv8f1XxyArnvp/O2DXp6XvYGZCRzR31N+GphOB7Uxi/SuKLEjpF9h\nEp0MpcUQgoZDGM4tumOzpgscinaQGqWONCy7wfbCu9EFmy2W/gLEjiTVryp1\nt+l3RCYAUE6qnCX1Xi95CHLITS3yYqDtAVgCoIvkkIATnjqJxXeCWp162DYn\nrDSyq2o8xx8WO48Dx3mL4GhulTwKo4SRLsn2S3hUq68O+qEVrutq3guHrE/8\n2APRatHbbAkOHsCIOjhA5V51gH+jtQjX618/tSR9OwxasOPnnhFfBDoaAdsx\nfIuUBKg9DJa0nHAk/O5E2k+nosV+s9pkXIzi4Beg6yoxOyGolNQgbR0gFwFz\nBJckSC7SzRHUOG+6zclgvaSDyLRDNxoivVeD+3nr0QtscT7GXTj7FR7MYeen\nDnSWFUu0Oe5S2mItYsgMkGufQVM66rLTNueSlG07QXWhYlRPrGEhV8ZlrMNf\n52kV\r\n=1oI6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61108ecdbe311b101b1b87763e8f3283dbb9dd50","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.32fb314cd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.32fb314cd.0_1597919803249_0.1347532366443165","host":"s3://npm-registry-packages"}},"8.0.0-canary.546277d32.0":{"name":"@material/auto-init","version":"8.0.0-canary.546277d32.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.546277d32.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d05ba5fd9cd8ab5118c651530b9b3aaac40ae3c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.546277d32.0.tgz","fileCount":14,"integrity":"sha512-+SYgwkUj5bLUDA3xjwJacqlwJlbVw7zEPl4PtY5yWfOSS4nce/6JvECwATVC+/+Np2thj53veWax6zT4zEfy5g==","signatures":[{"sig":"MEQCIACm+5JHEt2pm9ovoq8N+hWnvPbF8LrLtMDAJWO2GkjQAiBrqbCT8sTkrl/WSH78W6jyKXLQndhbdq/WUMGOa92z3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPqflCRA9TVsSAnZWagAA/m8P/1r9lrDv4hZuyXWleIiZ\nSRoPp5bA9d3pNWirbCtdQgqc+9MNwTtXIgVK4FwU137OGzOiK7a7e/7eZibB\noFRm6WdMTgvbscLdZlhW0yevKqOleuX1W8eLfA14u8OZinZQ5hzAzCWdYk2A\n1IZboH+AtmErXgI3v7C1Pq0+FkjxRdc/XLOMBWCif90S52xyR4GjzTCmKLB/\n88Wg6fBCebciEei/B48I+Awf3kwjDg6pn02Cw0lDO8Hsnhc8HdxaO4ERjqf7\nEUbToK9ve3Ydb211eLMfmvkypJhc6oVAsqcqKLlQv2Q8YZzi8hWrbM2+z91P\ncK6LN4+IaoV8iXnQ2M1d4BrnoasvJRmy8qvtFAhCXiiNls+NOofzFtTj6sae\n4oaRkZ+wN75r+DzayZN7vFc3Dkcsc6qn54H944OB+vWe74FBnA50lNkiZp+r\nL1OQat11cFC+Mb4h3vtDOL+t9v4G+Ph+xkxArwLy6TgPMY7HufbreOWuwHM0\n1ByiVsU10Kgg23/+z2kawcrjCvYd0FmsLm9cQO9fW/Vba2Ex0DX7NqaeY6Cp\n1KXgkzPe/+6yjHviE/jtRjW9uT7hlzpnZwB86s8y1RGVbvNkh3IQEVBUR0Ba\nknLe/xLFbEwsyZ82qU73HPV63COGUU7PQIjsgdGfyBOq6duaZzeqeJjhcyT/\n4q7B\r\n=i3ED\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d97622107fec59bf3261ad4f1f3bbe21fb1ff62","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.546277d32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.546277d32.0_1597941733013_0.6375971080036611","host":"s3://npm-registry-packages"}},"8.0.0-canary.da72839f4.0":{"name":"@material/auto-init","version":"8.0.0-canary.da72839f4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.da72839f4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b36c71504b231663d64cb7900ecfa2daae93b104","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.da72839f4.0.tgz","fileCount":14,"integrity":"sha512-WSxOFAF15L9uRTqsRP3IFVZZ1szfCvEN9Iz1UhgeaQFxlLyURYmalZXYwhwjWobYjYLf4kMucnhMx6L/aFFQwA==","signatures":[{"sig":"MEYCIQC2pv4JOyzyOI24adXXE99Igqr8WOUqqpoJteNRLxVvfwIhALE8ZUnxNPtdg80j3prq9GuSyhVKtQ/GDQzmYFyRrsZc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPrnqCRA9TVsSAnZWagAARgYP/i3nVLc+xVTX5uFj4Ykf\nAi4tIrv5M09wJ/umOEsYEtJ/z0kpo7rk+sCND5kCj+CbzkYhJtiEyqFhIxc5\ntu31jo8DZWIiD7bL3azT6ZCzbX+GJWms16gass/Sj/jnRwQvDR/ZfVH3GAZ6\n3Y7h38rCxvE039kN7hN6eLSxw3EOWQZsiJnqL395XPfOyuoMDN1HFf/euJMx\nGc5vwNny/NBXkSK37gcUCBNWEOfl7tQMDQ9MU+AkX+9WP+VQu2a7K9jttV/j\nhEc8NYfZjfK8UdoM6TcSQg4Cm09StfFRU9DnO3c9svwTD9J7uvKecY5RZQFo\nOxOi9bcsU0024mkW7KytU82rM+/3TZyKbwS4vFY24ZJKJodbUNR0Z+uSP58v\n5SzKPv+y6suMytuLhrlHWxiW9mBazwV6QxZH4iLwcnORj0X3WwoFstAcEbrE\n9QAgNsIY8GrwSy8ltqOfYPA7ZV6OIlpOYLTdZPavXMtvdKxSuKJiUzm4HETe\nndwCBMaNsLqTQPTV45La4/uaPBmTGfALRXRKEJ3M/Tv66QqzyF7Qn8VdqYfo\nj4wvd8l54r+gwrR1AN2Ilu7pQOuE1ySZWhUtqBwMHv2swN3/N3sGyfbLJkUN\nlG11C8QwhQnt5uKsAg1M/gmjh7q9qSP0L2oansNFDoSdKjWuAxxZUV3RLuFc\nN+rG\r\n=aaQl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1b42b69de51cf24aa95c09d0e08ae1e644c71335","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.da72839f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.da72839f4.0_1597946345718_0.013644402667330802","host":"s3://npm-registry-packages"}},"8.0.0-canary.346069ccb.0":{"name":"@material/auto-init","version":"8.0.0-canary.346069ccb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.346069ccb.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"78e011ce919ebc78b2b68e9173959d31eb498644","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.346069ccb.0.tgz","fileCount":14,"integrity":"sha512-2Nlylc5DQFOh6RcUcVrs5OxEH3izgo1fGIusBDDMoohfhD3lZKbWc+4nqwZ10m2xnmzf+U6Wky4fnNAKi3mAfg==","signatures":[{"sig":"MEQCIHjQOcFA1TFQrCC0VUyeNzYkJFmSfp8n91HkRXhpSOqJAiBlVL204c+Y3HbZSn/nkIn+fjYdILSIDQt5QMh7nVmpdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPr5CCRA9TVsSAnZWagAAXb4P/0y3pxN5JJJusR8ysWel\nM06FZbRRCEignXOH1D2zOeWjHH/ZfHvjMgTSXamU/jN91jPSscLEzvAeL1mR\nbLT5dwjqDpCdCSG7EYs33iCf2PNtg3J7LxNHp3rUCngyyeHuQijBnWBJRmVD\nwIodf0+dri9Nt4mf+zZhrTYPR76GvfCuCmm99/o5ineO4tJ+UufcEW0rsCic\ndXTMZXVxKN5ALnM6/JB5X24JhzW995262dztMO/Yk9z/BRYI5pTCjmIMdM4+\nMh55OULnuzcRoj0lzCfYkMrQcyFH7Akn6KF/dVdxYQywNMUqqYNkDrsKbDRW\nND4iY6AQ8F+vUCdvVr2jxLqzLXZRv8DuS3y2PJeeel2LL5l640OHzvpFh/Ow\nyvzePRKumK8NWRYWlAMD8zwsTiah9R0TgrFxKNdn9GCeg2VAg8EYa2zEyYXs\nXsmyHP0ZGTHS/wlrOlmPHc5z/2oGli7F0nxmGbQnzvgNgutJoEA/4WvNxtN6\nLetJQTlvO2yOSER5HYsaj0VqJY36Cg6O+7thsoPsWLB+lniWBbCnDxl6Hi7c\nstDNDqzNjsQ+Naz7SPS3gryO/iRDpb9ux0k/zV/qV7R9MY241dUefaWIHnrN\nfYX8u0pDrNBYG6OIEAU6CH9sr+FXGCaPv5PeLPChABaoBELoauFJ95UJSEDu\niJf9\r\n=I9Mx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cf298389e23ace16c7e4682ded1e492e489011be","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.346069ccb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.346069ccb.0_1597947456810_0.16955034901033805","host":"s3://npm-registry-packages"}},"8.0.0-canary.e27c5802f.0":{"name":"@material/auto-init","version":"8.0.0-canary.e27c5802f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e27c5802f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8b62c9a41a25b8f599b27747e7b62231b4862153","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e27c5802f.0.tgz","fileCount":14,"integrity":"sha512-fVvLhX7wxKI6K6KWZzimdG1lWVu82cJUVFlZ04ryhmVBeX/9lFVpaJcyh9XqihRpRpRU9XtD7+x2oEmkoSYKdg==","signatures":[{"sig":"MEQCIE6B8NeIApiBfP92/MskMdpwZgdV2RzAUdbglkFmQl3YAiAmeQrOh35mCufNRMgiNOCSHqV9eIPb2VT3VsEfs+1UqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPsuPCRA9TVsSAnZWagAA8XkQAIIdNjjXtEm4pIJNTymv\n7wkLsUQ5jbVTwUHRo/TZYQ4bKeXSiiPq9gUCNjUbRhS6EbLGlNw61DOeweZ2\nkzuTMatWs0quAe8mUFMuC8LkC48301cCPaN/MoP7O+ifXxXI7sNxIYF4YJRp\naxC6xCGLUtUPdzmyGatjSbX2gXFhM7r2nT40aZQ5mVsBncy8EnDaBhFE0r6J\nwlJH5pRqo+eYBzijwo4KwKBe2SlQ++colLJMv1goqwDlJaGQUNt0h7P0S+kZ\nnIZfhfnniBLNMAa+7OxdTwB4sLLuWswJfGL2BWL2klONwElC5Fg5+VkP2YMt\nLrMCTNlsDGvMuZGIJ21surOn0nARVbVkea+kinOzf+sSe6uLDK76eRMQ3kQR\nCViHrEpkrMN4ENarLmfNRicr8YdF+7UD6DHzRyifHo5MIkbhv56MUfWzvs2Z\n6PzBbg9AiL1WSF2yClA/Uu2cCyOc7Qyi2mnmW49EN/RQH2b3LojGAYU+/MoR\nttRqkJKk48cFDddiTBkSv8c9WN52lDMaVWfUlxzG41OgilRi6ZJq2wW4pSwF\ntBAsfieYKQ7WK7YvisyyEGNELuYhn1lZNH+f5c/+AyB35Hc1V3obRSa3+qGx\nck87fWJbj3ABfoWwtEtCKjl3D9osAjIkGkxjrl6DX5ipkrd2z0YSL3SmpT47\nEvBq\r\n=2Duh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2c9246ec446246e8fcad54982848f7cd5839f69f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e27c5802f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e27c5802f.0_1597950862610_0.06604956609177814","host":"s3://npm-registry-packages"}},"8.0.0-canary.f4532b9c8.0":{"name":"@material/auto-init","version":"8.0.0-canary.f4532b9c8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.f4532b9c8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"27940b7bea2e34eeeae6301bf792dae93bf3b966","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.f4532b9c8.0.tgz","fileCount":14,"integrity":"sha512-e8ejOqG7ZxV8q9E+2UfS5khqAUrxHGL40Y0awu6Ky/is2RVDLt2Ef9ADNGKXenBI4Jt7PWpwqx6lvR6uC+c1GQ==","signatures":[{"sig":"MEYCIQCY9Vx1fsCRrDcvjcpkqHEVbGqtpRvjnuRCSntPd/1nYQIhAJiubnAYt8LtzXDyuynnujHbxUIdxAQSJ4WHIIggAWsc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPtWMCRA9TVsSAnZWagAArfgP/1cbKshp10/gumetUH7T\nQbVHvnTvD1KNOSTrh5GYfRZ33paCJT3MnBRIFnq5NRvfgsfCSE+8boFgTV3y\nLz7ERkRzSA6QxEyx5u7qVwe5CTon8i0yxlVD4AQN5ZG2nJWXsISa8Ha8xoOQ\ndtw9X6OvhUvpn6W0unmEMgcL1eAfwtMEKoe0oKP6FEFJ8f2iP9zG/yPluepn\nduF5n0hBOutsv3CWjZx15/RjYLiKmN4CIwBBTxc+vxT1py22IiWk7NlYBZ+a\n401RRK478wScAsBmF8Ul1y2JPsfa6i6LfdE/Ue1a51FWGmqi6YNn1DJHKfx+\nvUlyyUVNPKtpBU+JhUmoW2xXYiTOM7pijjHiFJbEw5nOTCexR/DPGyM8InB9\nPYglYNzruJwcR8gSCZXoEK86ZWRbC7Zag5jFUD4bVJni0+jUTagHyECapv0g\nevz7KaiWOUQBWutThsaCHEfQn9HG9FXEeIfx2HUaOywTkbvwoMyIZezRwNec\n9b0hqpt3cOdnbeErOE24sEbOh3sG6qpvjHCy79D7bPWOlax0dw0fcKj1WkOa\nDTVX3smcWRWp6FFOp+2Va6QRHmPmj0mXPbGJ5Wzj+3lwXZH0olGhmvDmogB2\n2/hdXg3fJI4SsT/ZmTyZDsOqvhF/mJj67RRjiFpb4h5jsjoJUNukBplsvVKm\n+VA6\r\n=hAkc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"be56493a06963f21f1f5343fc6db3accdc74216d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.f4532b9c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.f4532b9c8.0_1597953419680_0.02100645321748873","host":"s3://npm-registry-packages"}},"8.0.0-canary.fbf73c2a6.0":{"name":"@material/auto-init","version":"8.0.0-canary.fbf73c2a6.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fbf73c2a6.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"17eb7da7694e76d2c92abc5d6fae1b93ca6ba0a4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fbf73c2a6.0.tgz","fileCount":14,"integrity":"sha512-Sc2XMHgCcNJ+0FL9PoQ61YAoSLp5BwDDrB99Ty8DVvl0ZxfqL+n4FFjP7yQZHtOvQr5K0PzDciysEXiml209Dw==","signatures":[{"sig":"MEYCIQDv8Mjh9/AE8X7c3ymTuUHsJLQdrQMKra/KdWzpx5bh0wIhAJea0tY0KZQ9iu9YJQwlLzoPXR9GLWv+v9n5meL7dlFN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPuWdCRA9TVsSAnZWagAA1aQP/36IFt3axAK5B/G2P9R5\nDHyh9Av+3hoJXmij83sPZQQdvMrZJeIFBXkyO7oAd5BQ5VD0PQIvmnq2mrb+\nTIVFChUeIfvQ/8xhyuY+ro9F0NvkI/fkV4voIia33XdNhQa3/IF/g1QmACm6\nRSLV+DkdhHJ7FXoL5ToKxCzLggUy3mHXLl3uNfM8h+ZV8yeRD+0IV6kOfuBx\nt3gqcPWYYz/SPBEb/G4Ka8pj1INDdRSBD5MxYZLEX5B5tjb1iyrVgZtav0H6\nwRc9PqreDObtv+eSb4PdYv0K7BBjOsl8JIfNLJpFQ6ggtRhSaTrurZJq1EhN\ncjaUBJHX/GKqInrJQQeqka3Jy8a6SGD9E13lNHu5A9EnOA7eFUPXxpPjvPLv\nl5z0l/ojFizcQVhzM76ia3BcNHMIDwB3IH/LpWNEKUM/LNV/4fWqMbjAz4gL\nEZIBtvGcbAqXv/UA1hIwdgF/Ro2/FBkT7Drw39534fMLSGfp/sHvgTFe6puP\nIwuRzoTpjAddQhden0rk7cRbs+IUFzmtrV4ObU+HHbdhtbKqeFszuKDw3giR\n214bPaTw2i9eBrxovLWFKDg54Dsgc6QRi4OsqvrsDKs76bXjZh0DXS7o3oNV\n8puBK0EYxbt8EIsi4fsxExmJAEycBEgq1n7mcZVqQ0oxAyom9aPrFojy4fOh\nhQqU\r\n=VYwY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"64db59647b6d726098d0871993ac5c563d92be26","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fbf73c2a6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fbf73c2a6.0_1597957532656_0.8969338132806266","host":"s3://npm-registry-packages"}},"8.0.0-canary.cf800124f.0":{"name":"@material/auto-init","version":"8.0.0-canary.cf800124f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.cf800124f.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"947a3fb3ebeb7caa584397c3dd12cfd1d99c0b92","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.cf800124f.0.tgz","fileCount":14,"integrity":"sha512-bqsQLuPSUa7ArOXKCGBXIQAVcI0yut1OZoQ1lsJg1CMgsardb1RdRd3DmRcrchxv2+i64/DFKtWA0zZ5QaSsiw==","signatures":[{"sig":"MEUCIQD/jzBBuZgatSm8JRzaKTA3qF2tdwOmHRTPTaqZ/5cP4wIgNDcbQTQxZRD0qlymoK3UP696eBVprZguaLfXvBziwBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPvB5CRA9TVsSAnZWagAAtIgP/j4l2rPXOTEjdQaP14NK\nobEh3d4c1O226P2bj8FD5kY/ykdaE8/OdvA4JAKliHKRPy41u80srNUBbYqo\nBvELu99l1J0yaHzU+kTuzKMAEsKfMEqzVXmE/naR3A9NQ6pgP74o5EKTt3ZH\nq9e3DESrLkQBIjwk1MLS3OvoMfrT/UtZ9AHT3/2LQvB0+nCOBEu/4uY8kS3X\nyDyVidghJlVGfS9tuNd07p6ZDh1PjM56irPD6oTE7GJGUOsDIQuwIercrh9J\nfVB5+7JQuk8uJU2ELvPEDG8G2b4mzWZNGc/nO78h01sgWUVhtK5IT5paiDt8\n7/YqxnsJ2JIXgkKOdtXpF3JP76qaj/9p8nPF0iXmvDnVegyUJWhsmWm9dWUr\nCrjZ5LqnOSDWVvZZkr59gcmkvZBngfcQwrVlHhoBTeOB58eBJZffaIG+7Oo3\nALzRKExZycfelQWweHCZKPRTWSp7HPVZKlwlNdboQhQBMDahpDmodC6XYfko\nO8zH75ixduDvOlyoBHYQET6hmCq+6vtEl6ZjoW2sum3dja0HU3YHIN3cXs05\nyzMaLD565Ou3myLdVVjw29necSBD4ZjZTUa7HTG9yt/7yv7Hm/0eccN4JQQb\nymKwQd5heOlTV+xu+eVSv0YC8I6PDz+01ryeeJG6m5riFQEFZVkffgivZFMv\n3KXF\r\n=FI5A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b15bab8ce97a47831c29a3b0acf1c34e0533b8e5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.cf800124f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.cf800124f.0_1597960312833_0.42502609831275096","host":"s3://npm-registry-packages"}},"8.0.0-canary.95e4eeea7.0":{"name":"@material/auto-init","version":"8.0.0-canary.95e4eeea7.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.95e4eeea7.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f832666dbc2e72f09022abe07966e59af31f4e61","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.95e4eeea7.0.tgz","fileCount":14,"integrity":"sha512-o5FdWltMF7kURYeUOhewJGCkHjvrxtslr6XMSEm9zzUUKLGQkn/tm/tDOEFRDzCVZL6O48mn6IFKWqtLl6V+qQ==","signatures":[{"sig":"MEQCIGNu/PqVlbyaNWBb9CBOXfc4K3rX7KcKeddCicEuy5QaAiBKbK+yn9OLEI4V9dhir2KpnfEczuXnNTHuP/V4odHsiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPwcHCRA9TVsSAnZWagAA7ysQAKUSx5sy6sO3elfcbhyx\nzATmuD9OxT7UN2ahj55ii0vjem8BKcVXHjnL55A27LOV9crHBawr8iVWb7ov\nbKjVyrnhFIexFjBX56Zza+pWd6O3v0jt85aKmxj6XebyowZV8jwWnkIzX6Mt\nZY1uG+H5RZB1aLpim058lXTSSr5jZBW/cByjTa0YJXj9j1JOBG+Kqbgb0CU+\nUPNQQ7vBw0eWbUhswc9JWn3OwKyVO2EAx3mbBTHMPbMZrXcpVAmepGb5ul4i\novu7MjoWiO9kJ8g3Iu7D2ZVIOwgZU4HRl0TjHIbNoYT0UA2zjV63T3d8pD6q\n0QVXmTp/1QmuS+VOIpu9QhwvJzNqx/yy4M7QIBRlJ9AkTCG/mkV8eGVSw4ER\nQvX+vJ2sptOynTSsKkkfIHZQuxokis2UCSIc4zBZa5GTo4r2fh7qTaECAw0Y\n6P74Mc+6efq0JhvYRQ2fny/qcr7XXZ+lhOxc83kL3J9gRgQ4Uoj0tCmUmUzF\nTWbKdDb4ad6plHtQjI4BKxXu+CWcqdgXLqUE20+ln194ftlxK3UgLWkedP2C\nomWGDnDQIbe9hT/W0MLn5tJuFBtpe+PSkTWQkxMbXP630BjEF1gCZfURzxnL\n+q00hasO0eeaoXWRXrbAtwI9kEo5iXM6ye2eazXpjJHBDWHQTpFKXYMMQ+ww\njzhv\r\n=TyI3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"be1ca8dd4a02de91f796aff6f2a9fa745f02df13","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.95e4eeea7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.95e4eeea7.0_1597966087013_0.41040763065526975","host":"s3://npm-registry-packages"}},"8.0.0-canary.91ab1c62a.0":{"name":"@material/auto-init","version":"8.0.0-canary.91ab1c62a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.91ab1c62a.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1e692d5f8542a1ba7c8dd6ab54950618538b9c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.91ab1c62a.0.tgz","fileCount":14,"integrity":"sha512-9v6/x10win/nFGPl5xiN4oR1AD6MWzKTB4puJvcRgakakiTMczLIBif3rJ/e//L+Bkbt7Izplaf1BpMkkzmjQQ==","signatures":[{"sig":"MEUCIQD6aACKH5TA5atCZZn6YTZ/9Mx95B7s2sduXpHO74FEXAIgeByc8kOjnzAp2HyKZeSdbNo5M5uyuUfsGz/9kNSDPvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP+P/CRA9TVsSAnZWagAAaOcP/1ELpTrIQ/PboO+WW8y4\nVEyEuEmUQey96sDnRzFqch0P8oH58olpg7lsGlsqoNg+RwF/7tjZS7vwBzHV\nT1f86Mb37GyJbv8PTqJbpczX8M9Oj+dx5YWsb5d+84IwSegbD02bKZV22dEA\n8h0LqZ2q91Zs2kp4FbhVgGDfkAR/FCzl60yRoxPETUWenV3H9dZh60qbl2sk\nDbusc+PPtv5Rseqc0lmOpz4lqpKN+runnkApK/GXjByKUnmxqS+L0srrBohs\nVDyEbp4p28dZoCIv39k2hvTWSas7nwWD7IR7lpzwY7vggohLicV0CRUL5fCj\n+vR34fTPcUwQPlV/O2kf7NqgrBAYy8s6+krSwjXWbMKkpTRSFVdGjC0ejV/7\nrJNvDj6C8EPKwCYMArhKgr9JpqhnPgCan5VTGMNap5nCV0icrJEZNYNcnZoj\nD2BTtq+cGFcBIKeEgo3vG4l1+/Y8AWiME2NUUyzQFvDXkKMYnpKLCkJoBOGo\nnF0jAGAP3UBpSjx1LEKCTwF76kKapxhHS363bp4kx3c3LQ6sOxlgBRQvTwjU\nQE8LBsnuauWAbqTZyG7PGW993qVTKBnXxvcQaygHsJxAmJ4ZnbWP8iCLioKX\nZZIULdKw78TWn+LZ6Hai0heFOKl1geR3x8llCCP4NDj3nHHikz5CtEge7HMc\nTOsR\r\n=FXmw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"389b1e8f2b60ae90730087557ec80e133f0e0129","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.91ab1c62a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.91ab1c62a.0_1598022654551_0.6681415728812399","host":"s3://npm-registry-packages"}},"8.0.0-canary.58eaa9f02.0":{"name":"@material/auto-init","version":"8.0.0-canary.58eaa9f02.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.58eaa9f02.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aa6cccaa9aed3d8c5d989924e4b6a606b080fc02","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.58eaa9f02.0.tgz","fileCount":14,"integrity":"sha512-3I665UaJAc0hdsVbHYDMvEDS7M2fSKul21XoFsjzp/896cQeVw32fwS+/V4Vr+OYYwhVTcs7gai6i3sNevf/eA==","signatures":[{"sig":"MEYCIQDgSJlrjRGpKbD76FK/wfW/gQA5YcooxwqIvF40QjPMTwIhAOP/FOrlLPS3ngSy9LnPhjYHsxUoqYmC6TTJ5UBS9W5F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQCepCRA9TVsSAnZWagAA8agQAJkmxqaSUPR5iybbX3hs\nbBOG6A/yoFNq4PeK0mBxTKosETl3vKqj4SAgv3n0rEagv8ueWD4+/sDcnW2U\nZBieCTFyJwuP8kIs0WEr0u9VMS2VHckp0fV50kIIbXRLqeR0Fg51fS3R1EIh\nZ9SBpZ24yS3gRVArShIKtl0wjnrlfQHmKxqQtyTNA3YPn3MBhqRvxFGBnDb9\nSH/gDSptiJTRPhWATdu7RnCYm7JGFKNksiogOWzU5itlnD7c94sBm/TqzDry\nCOvqYzhRpZ7cp9wiSxcHZDrHD5SqY13lnlBSAuDlWn2gd00e6D1fKNVJ6LyP\nBFcJ9Ttccz9ka+nfwfJ8Oj4pdw4ASre/KQliahxutx4EgQNeR0Dx7U4rXGWH\nnr6/rw1iqc0UDWhH0VXpoQOshIQxntij1jhrI9+dXC027x+54uo9VbBePQXZ\n9iQ+qPKW0/1hkbQtHIiQT4XWeLQRoPs9kfwSJAfM8xs+78tY6fUOpkeZ7HPr\nmVOFW6FZFt4MDv4m8n37L5bIKQfFZdnLicUbDFKjbHlaUGK1E9xijmPBa0VV\nS3cqOfirSIkJRM8GkDL6E25oEj4cQC7TqlKbUftNzTN0sFcj+A6vjTOuxI+p\n/gPyyeWYjUs7u+7bKSULro/ilzl0IjtSIV373i4PluDioEohiTFYo9DXWmkg\ngnEv\r\n=lxOY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f3944d638392fa39379eeb30bd7348c9578f67b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.58eaa9f02.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.58eaa9f02.0_1598039977176_0.2155385588942722","host":"s3://npm-registry-packages"}},"8.0.0-canary.238216fc4.0":{"name":"@material/auto-init","version":"8.0.0-canary.238216fc4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.238216fc4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ade83c583098efeda62ce19514d3ea4e6f55e407","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.238216fc4.0.tgz","fileCount":14,"integrity":"sha512-DRw4TUFzHTmuaGpDL0J6fE9GyzFWsCzXdcWCL6Toc7KnGfoyi+oYwxUvXgI0Y/eDxHaMRU/Pxu3nJ/qOO4lcOw==","signatures":[{"sig":"MEQCIBfo847AN0IiDHQdNKIpA85v59AIyOSjWCbcLdj1cgukAiAQij9uHM0xXOmFL0ygCZoHfkJeWWfO+YkbINoaXam3CA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ99NCRA9TVsSAnZWagAAiRQP/2qJg2LafTM3VWgRkcMw\n2xRjA6n+UP4/o3FGtGHPR6Yij0+EhCEbdysO5vz4WCS2HXZaWEhSVlnZSPwq\n27YQqfjgJaR9UxLO9M5Prh4o8Y2oLJQ9iosFhV7P4Bpl4WmeZFatMnB8oV65\nHNcWRNz/k0p2tU6GIljb9eVgq7EOIxY75X509Zq+Dwz0F3NwX+CB7VygDGCD\ncrwHEzOUvnFd2dljJtHeqAw61cGAWZ9FPgHAJbgHRgc9/EiGHj/vRDkPRVly\noAgZpitWvRp8R+a3TVC3nDMb2ZRpwtTDpwcfLC7tqpkdXuPwVNOdpvZ6Tz7P\nTIo92So4tds1ZanZMC1dm7vpJvFTUYD79v82Mfsfqayou+tmBu0bOA5Tztwx\nsru1xLf01EGXg8b/qte8IFlWhwtAmYSUQZ38l/S5VNb7QIxJM6KJoNgHByZU\nyW4SywG6qKfT84LxhlJJ17HwR1SuN6sYT5G5RXoUhP4zRP8OMZrZUkIqiGuV\nEIZpmbQvOYmbzjCdYFltZ/94np/+arfOftR5OgwtA+E6FN+WAJ8ye+0/3NYg\nHPiPNE7+5icystsrSvA/bJOkFRhid3/pmnu1X/etkZNYcQvUSiTZfP6VL0vJ\n0aYmFBJTVhr16RVcExYxX0ip070v8mUz1WZeuujglSBhndx6q0gUhARHtwgR\nyb7g\r\n=ayGj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e224b287e176f866661b15e2ee791e17fcc44aa3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.238216fc4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.238216fc4.0_1598283596554_0.2141635761221694","host":"s3://npm-registry-packages"}},"8.0.0-canary.a1c65593d.0":{"name":"@material/auto-init","version":"8.0.0-canary.a1c65593d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a1c65593d.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3644d89ad06a4625bb71859538f4c7fdd97fca7c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a1c65593d.0.tgz","fileCount":14,"integrity":"sha512-FwxsupMBuz3KEkFmM1FHizpCgGfCntWxx32Tk1fEcMC5T8puxhSA7xNW36jxg6h3g6S/OkmPbm1wMa7RKzZGmA==","signatures":[{"sig":"MEUCIAZDgBnGJMa7amwjRo3sJ5Dc2u0e0d0oWW22Sf6o8VthAiEA5mxEtBDStPeLz052R1PciRzezB8SJfDGGM74GrsRy4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRH9qCRA9TVsSAnZWagAAi5EP/jaGe/n7HLTNdYWc9u+Q\nRR6OtXFvQrX6wCw/fgIoUjP2+44CCnjyjACU4k30E8kXBSwrkgDiMftquQ5U\nyYhQYZObuL47L/i4E8Kw32fWvcxOT/PjAedK4eoJwDyjvZvKV5Pqi6/jDzoA\nszEor8llxyQ7wUu5sF8uC3xbhgEjUPfEuV+ibsLiNCPM+9Mp5BCohPyO4dgl\nQ3qKOiWjefUIByC1yAXXM6pREJ/TWwb3Q0Qu0jIFAdHtM+RS9vDTWXQv+CUk\n8T1VihJupqQT3LlBnHQw3ATDv/IoQe3Ka+iKGQplqIokf/R2mvAKMhPtKEmr\n8E/Ds79je+W1AZO+56HwNgW6D3Z3nM7u4ZVA3zqGmJJqqIjpOBih9RRL2sqM\nrH31PC5WnTG+qK7pfD3SjirzUikO8bAuI/KRHRz/CYAIEGO2q9Xenzt5K6g4\nOJMdqYq+3qIqa6cDPtu+N505s5Wc2Hkm1Ha6mb/oUUoxlUBb+5icFqGkFUVi\nd4bGf2S30444sH4EpmcJnTenMbdTCbAI0Xz8wdYMwYDYFJ/oIs63odlXrUm7\nWz6X0+njn4EFkqabNeZ54AVwxCbG5ZfPe99VOIGHiSTQHTbkUEOCL6Z9BL2a\nBnpzn5p/hi+mSzJLeI3ixfjjAOB6mx55xpu7vJ34UZgDOh/FiJ2xIp01SnOy\nTCkl\r\n=BD00\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"71fc6b5e7b16ba7f6d37b724ad4982780c9c9932","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a1c65593d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a1c65593d.0_1598324585588_0.06576584043650602","host":"s3://npm-registry-packages"}},"8.0.0-canary.708cc09c4.0":{"name":"@material/auto-init","version":"8.0.0-canary.708cc09c4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.708cc09c4.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9bae6374b3143dbf8898227107a2eb9a1c466d74","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.708cc09c4.0.tgz","fileCount":14,"integrity":"sha512-RSksKw0Brt1VHhExeOKbdAbqTchor5zgxAJkvi01gFWfsG3/OSMqRqeWnBGQwyi4Ncd8pISO2Rc8YDm7GKkPhg==","signatures":[{"sig":"MEQCIGu2daHqOCHEB/34/Hf9tv/nCsV5nsszY/R3C4cCg4U5AiBtU6swRFg7cKt1kV39ay71XIreRCF2gzrQFeptfFvjGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRTR6CRA9TVsSAnZWagAAjRAP/0xDVOLBxD4o1nyoMT0b\nN63lC7h5NgDAX/c+aLkGeWNAT6ensSkTB8izn/Ba66diWSMYNPv4YIDUBlsb\nNCGAsbTpHeklvt8JM3Cb+4xbaIwlMgNjpMabdc0mmL3hIOB9/0NTAXV1+K/d\nwXjij8rw2Ut8tVQU7SXi4FjHss2DOZhKmOCRlMhdjYbw9PM4j0Cbl4UkIi/L\n++S44iIrjZh1oA/J1QQIjaeEWViSkVFh0XtBs7WHGi+xqUXMkQKenXUMKG+7\nKAoOxqT4kz5Ndb+WZsQMnxGRnWO7S/VHWgGeb8ybRyuEzqdphFyOqQRPi3FQ\ncHhMblyl18iDnfVt20RUQQ3cjpgNH80eqymUdNeQAjBVog+57KMDdWgAKh/O\n5NpEGkLt44RK2AKIdUg7TBiVizEH22yvAmryrNHj1HrKwDIdfgU7U1oJdycy\nRvSCQ/PpgRAcQaKGaxp4dqEoUuQh2AxoLoQ2JTtULeWaM5IYVnKRSezwEUga\nA12JDqfylpEyeKslAkOdqyPcUP4taz9FETYr0AMvERbGiFTIBtCsIroV4aSg\nqlM+zBnyWFBqukFTbi+ZsDvbsEreIUgrWn/5YN2V5k3S1ER1EXuOj/nDqumx\n5Ofu87aEUJC90ULKy/kWpidogWr0PZBK1euzqhS4/WuRhwIaDv7CD0Cy/mim\nN6aV\r\n=Vrp+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"41353a40a8a6a80ac6438fa702cff9ca690b897e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.708cc09c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.708cc09c4.0_1598370937916_0.55546118980496","host":"s3://npm-registry-packages"}},"8.0.0-canary.19bea2ad3.0":{"name":"@material/auto-init","version":"8.0.0-canary.19bea2ad3.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.19bea2ad3.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad822ce58661bd95979cb2d990ab0129c52c5474","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.19bea2ad3.0.tgz","fileCount":14,"integrity":"sha512-Plu5MdpqJdqmgkuQ2Zn0OK1w75mbp6iHvg8BtgxoXrELNXWk/MQ8/AWDJk5rwejAF2m+aM9jOISiZNHIxY5jLg==","signatures":[{"sig":"MEYCIQCnH8c4UkS9Jwa0X+9ONQBEUe/niK4V+8ccnqNy4EwAXgIhALGCqeat0j84jPcF4VqvM4PjzBmjlUizogtfK9pagz3a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRq6ACRA9TVsSAnZWagAAEKYP/2VfAMo7O6kmfvjQAmuE\nz8VdD+dFWhiE16w2EdC8qwmxEqRvz32j9sfhopkUTh09IUNSS+wl8SUWs1VL\nS8CS9Pq5cqZykneLpi2HERrCyyjYtBpxJnbQcPWbd/a58MxENgYdzYDtXRHy\nAlmm9zW3xau6MuzlBcAEuuwUfk7dk1eX5Xem5J0lrlPvT5Dn8ui6G5XBJKFC\nascwsP3s9jhdwU1roHHhLI9+hM9rOvpa5HzIP3ybTV04IAQCBqINhCRrmX6y\nWBE0QGFrPq0TG6s+ebU5GR2enxNR9meS1hf98nOPkgLmc5l7kSBLPCUQmsQZ\nosihl4EyrF/XulRBQlM47F/TjpYeHcBp9hZdPS04r6xoDUBl66TWAEkbN6o+\nmJ5fp58AgQHYTTWEudldkS5vLrxpNGJkqJDtPNbaku8sQ9uA0JWr5x133jG/\nzCq1hvHgQnIphqS1TM/Q5E1uWBErNbQHieQhXlJNuUDbBKGfqIz1JSiq9x4K\n0rD4lI/ttcpfxak2XnsR+rnuQ7sr389JRh6Zrqo48y5QEEXKJ6gQ8KGqPcb0\npNSmfWeN08vxE3HoQobir5EUYC4v319mwpfRIqdVgg4d0hI3Bqp013w3rpLF\nX9XjLgGMXNbiRrEY4LfUusd4dK6oOVvIJIdW0gs+/FRH/fW7HpEqQbHhmqc2\nhEGM\r\n=6bvE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4f1ed83b6a09dd3e7d24508d420cd99be9dd3893","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.19bea2ad3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.19bea2ad3.0_1598467712365_0.005408065237328508","host":"s3://npm-registry-packages"}},"8.0.0-canary.911014711.0":{"name":"@material/auto-init","version":"8.0.0-canary.911014711.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.911014711.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c6ec67f2d13c7ceb9028835df215ae9c36a69b73","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.911014711.0.tgz","fileCount":14,"integrity":"sha512-oxp15kyVJSXi29+jale+bLXCnkswlbRRcRJSDrG9ryaAZEFYkO+6zJ4FkWN05C8o7E7bRMYWwVSm0w7Xsv42Wg==","signatures":[{"sig":"MEYCIQCpQDKTw1vRgsG89e3NF2SSv7CPS79vyYf8xEAWQsPo7gIhAOsLkvK2gIR3Sv7iGAlNRoxUighDM4+7bZQ8lQ5WYeb6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR9ovCRA9TVsSAnZWagAAW9IP/0OpZitNDP0XEItWBmQ9\nWemHg/bfJ02MlIC9/hn0C5uPLrNllwFl2nF9jmr94datsaok563UyADd8msr\nnUYkb8RKGcoSW/3DSyqAsCZp+5KX6JTpGzOBOFGQ8eFtxbAjOpgMsl6iZrvh\nAa6f56EaBR4Wmuo2cLjspIs5EYLo+aSRw4xlydk0/+gJ2+U7S8IiR3C5Bo3d\nDxpLEmHA5wk8m4RI7Uy4Rr+PqtWZ4SE6ZubmsRSB/59cp1vunmeuGyOG6/zj\nOAjSFJ66W4ltjXwCJn3rs8+GpcERvFRITqRAQ0RjlzprhouBILNwY8OEF5G6\ncJUfnICkSBhH1l29kstiIdfCdkYllUWuFMkOpYHl2ERqpTnnR9nF5NYDA2Ko\nj6cg0779EFtdbJl+FfE5V1GIs6hu0EHf/6YbSjZTq3QBPsCB/OBPG3hI9yxd\nkdw2eeKl33PRi/AeDtxGk0OcOsPm8DN1ECrSzX89ya2/rCsAx+5BK0/pEcGo\n0EVXfY1uq5J8FkhOvDf6WtHtINoNiM6nVM1DkM0olYEDQJGcatr3jf0HBLAB\nlPrHw1qUl4apoq/U+DEIkSocfY3wEPvMqaGcrYczVBciEhtR72HEXUlYjQqA\noelasz3v4TkUOqVLMM+EV8EjZ/6W5c2E2n5j3Kz9RiMMouiZ6ftYhyo4D4qX\nWrcR\r\n=rzwJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0563b839594887804244d231bec5f415812fc4c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.911014711.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.911014711.0_1598544431408_0.18185420230287153","host":"s3://npm-registry-packages"}},"8.0.0-canary.d3387f54c.0":{"name":"@material/auto-init","version":"8.0.0-canary.d3387f54c.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d3387f54c.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4343511c076efcf7866fa178981ceee028c5bf3b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d3387f54c.0.tgz","fileCount":14,"integrity":"sha512-rhv55K9A9I+Lj9u2I4SfpAGF8UMrFNNRtADWmJvkCa4u73yTihhL9AoMLmyH/zwVXNDpPChgbeLqkzuoySQrgw==","signatures":[{"sig":"MEYCIQCR3AKbkZUsSIX6OsTLXnQEdH/dj4FRtrdK2+5XFGpBbwIhAMeTyBGdq2NMsBKqj8kqCdUVl8ry94NHLddi4EMtWaHY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUVfRCRA9TVsSAnZWagAAQ54P/0ejpvDcz1SoW7RQbNv1\nsTM4kFYGCwn4ekp+P5tDgorRLV8EOlQy9lToU8shMg0cLbc3LIQ1W/w3STcT\nl1541W6j3Gnsqla33KV881LzyrjUdJt4bAiBjK8PAjpi6bTHEJ3++1SIuiVG\n7JJNUk/HO4WxgPKSv2OINsS0S1T7KKNnpghUemhEgTOytLHfj6jd2+yyKmo7\nTVoE0FAt1FbeKQu/BtScIfla8v0ksC1RML6Q8KIJmf/Jtc9DYhCw8ufa3Ry/\nv6OAeXnIDRON3H0QkDaHfqHqbyNz0LXmMEgXqog1TJb8JegOLz/coSYxWmGZ\nrjg8Z4SbaNhOLSNavWdsFwVtVqj+9+47lXE1RAdchH768wsVNd5C3oUoYsw5\nNlC5JzSVDqTj5sI/Rb1KUteAipmxmGvV0K4dNZ3YEhte8aN8B3/DJNJFwOoC\n6v6pj8qydDEB6Vh3E8DdyKyyrkzvT+4INo1ZH6wNUhZvGLejDgAZsNjduk+C\n341q3trdW35S/41TOEQwCEf/wEXR4/BCrhf3bRg+sO3L63z6gCRMyBA/jqgz\n1zMlKVlNcapm2Lh1PLteiZ4U96S0CuhKsNobNWpXYo5jwAlQ42EhwHy1SCsT\nxvhw1WV6JCm6kK4JDpnRwc1h6mAyiyGd126NfZdlzBWgAQR6hflBeqfOiot5\nnYxN\r\n=ACuA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b8c159d735641688e2fc1631ac7a98134ac5fbc4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d3387f54c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d3387f54c.0_1599166416430_0.19952193668321572","host":"s3://npm-registry-packages"}},"8.0.0-canary.2ccf996cc.0":{"name":"@material/auto-init","version":"8.0.0-canary.2ccf996cc.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2ccf996cc.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c549bfe152e5d89784197269fb27ec7dde867b2e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2ccf996cc.0.tgz","fileCount":14,"integrity":"sha512-QCRQFBJeE1mq7wq0QdM1RyNRYz1no2S6Oav+Ct/X3KSAJ2g/dj42ws95BM0n503BxL8SDDyfM6o85ANVPd9fDg==","signatures":[{"sig":"MEYCIQDC80ARmFezAHllY5s4WlDAY0kUBEITkOeX2tgnvZjR+wIhAM7ZYWYHuG6u7DIFJA1n+cwr49icVGGnNrW3tb1/T639","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUVflCRA9TVsSAnZWagAAIScP/1x0a08Q+rn20Zlm7QIw\nahP81Zz7a5mAf5G+ryyQF86a/4GNwBL0/zVeZ3tB5qKrnbRQqJgUX6Bh9rNi\n8SpyWP+JlyH+GqZ/Dq6SvrV3iCX3vs6goNqadjMHb8Mpv/vzF2WpcwSCRS2E\n8ZKV97qzgTyQ+UPqofm+5o5jistP+ph6z62KAAa8kaWGRXJBGR/7fNWOWn41\nP5vNlcW0UZdfh149l3tuB+lPbRpsdsP6JZA+4nkyNhTnPjSngz5ahIEZqxQV\nKxgw4mwnrt8XpCnONe4/mfPP/kcJUHeh5/aSYTOz5PN3I9k0JmEIxu98moHo\n5+OUMfSIwT+jaoppAVwOsAoXFlR6YTl5svoUY0Nd+6H8U09Mnm+8nLm1qd3s\nKKGcEGOuXDqwSOcaOK91eyVwFLwzALTnsKgxZm0iK09vqLpQK7cPiil6XVGv\nLv2E3vsSchTO2lxRYojkM40TutMgQ1FYkENdIIj6xpP3AMb4L07TaOsKgjTj\n360sfUV1YLpCEshvz+iyxGedgdrpUgs9WAp2u84IZpAXYTAyF6+6zYkPqvSM\n6VI03Gd4I5TuWz9o/Vqtn+Bkgf7EMhhb2nnl1mZQiJxSaI/rsbm+uXlXc+gZ\nilgqC+YZk/VD253YnSFY1KC7xgsdi3S5uC/xEwQbxM3vUgyZCAD8BqRqC9hm\nQFXH\r\n=FvhW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b295adf5299f65a654963fa774da90dad3e39244","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2ccf996cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2ccf996cc.0_1599166437244_0.09207602186879882","host":"s3://npm-registry-packages"}},"8.0.0-canary.744bfe5d8.0":{"name":"@material/auto-init","version":"8.0.0-canary.744bfe5d8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.744bfe5d8.0","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":"asyncliz","email":"asyncliz@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":"candysonya","email":"wangchan518@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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ed683b8abc5780876f19676f1350bc54809613ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.744bfe5d8.0.tgz","fileCount":14,"integrity":"sha512-Z+LDbwPKosz6zNBMR0ck5N2kmKmR0ACSC5TA0FY70yhMdDSG4n/KuKN6YYdPlI5W8dnCvg+ZWHWa7Yr6l5emLw==","signatures":[{"sig":"MEQCIC7Y0vndO82tFw5DzsgkynVGG+D918A+xtNR5Mfbo2tZAiBk4H60AxTbbSUAQzZcuazHVzPTiylSWs1Ac28T9Nwpww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUVgmCRA9TVsSAnZWagAAQ8UP/0G2pQCCG24jVSiXGb1N\nl8E/2FTy7hIgRoZw9+sT0c6+TvVxwuUuD4S7nd7c0KYa/4eFsoSpmkUt6iG4\nK4rIWUNbhCw4Fr/XwQiRmZBDwuYwuhIqbpdxfLuZLn5c6ZEGUoJJdFcPOQLE\nwY+J0B2RzAGZ2VxIbtl+94zntPtlDQ8v6IiNRYiuqQm0ZfzpKWK7xPK4u2Fb\nUjESKDmiIpAPhM3aCxp/09Th/MHuTT2LWLCFEP2yVwlBvBx1dKRox5cp5Fmd\n1ylnAZg9NjZOh4k2a7FLZ3Zknmu7NXwfdBSQZWFr+Rb7k6WxY0F5MmlaAZwH\n2RMegSgCA18T1QIExVcWXpls6NOfXFPtA6zy0hZC7S6rWw61DdqBps7Hvc+L\n9n+GDZow2O5mrpTurIJVK3+JRVnaXdX8V/PnyOk1SEBk5fMz2aPPV3cD2GOY\n16Y0qIQje/18RSCZ0QNuzhi86TPDx33aahXUpicswHU6t4/sZZXHqcry99wJ\nVbawkXQaHn7Z6hCYcMmkUJQmqAMVdgnNVTSE/RksfJgKLqpJdqrovdHeLHa3\n43MJbtr2vOyM6dXLSWy7ssdf076YTPPXSJ6a+En+Kcq6CG4vWUs4RvKKJ/fF\nsx64AYyBO30tCCX0ol/ZBVsOU3vEic1RAxXWPAZvnhsqTJ3mguDe01f7t++H\nCrue\r\n=E2z1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e8e9d5605e05fdd50b88c6ce659dc2ddd8ba768d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.744bfe5d8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.744bfe5d8.0_1599166495607_0.5018639788861525","host":"s3://npm-registry-packages"}},"8.0.0-canary.78da96eaf.0":{"name":"@material/auto-init","version":"8.0.0-canary.78da96eaf.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.78da96eaf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c5b88d3d3785ad6c52cd1024a2ed60c704ec96e4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.78da96eaf.0.tgz","fileCount":14,"integrity":"sha512-oLYE7vOXitbz6QCkqDqopnMCYHu2327Gqwt7pie5l+MdX7poxxHyzNjoVCQK6+zWwrFBtXU5unrAPYfd0yuH6w==","signatures":[{"sig":"MEUCIDvlHHBR89ec0t/5xCPZCDfssPKkADpeNGfKWknDcmgzAiEAlSgX+xRPQf9vCR5USTwbcP+qtUe06wEcmYYjRgwNE5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfV9eACRA9TVsSAnZWagAAnMQQAIYlvZ1OTJcHoLbyOOcd\nXzrKlrU8hItzLHMY8qSf1vH3DzmgkXGtKiQb2Uwfer1C249sLf4ezo67W4Cl\nWxF5/AX0zmDkPZnqKUUzvkjuZPwg2YNLVYyLURZ5auRV2vgG6peIGz+d9Y9j\nFkYpLht5kWFsAn50QW2d5nmfLXoewdbkepgHhKOcuILcox+T/2UuXMtLlOaI\npuZiAxH4DTzsK47ncKb+We36ZBU1IdJPdGOURfWdJER46S0QIBxR1QI5dSG6\nL4QsTu0mqBi32gMKc2CTSOIhvvfTQH/TZkAiJph7VkWUrYz9m09p3EEKzR84\ngQXRGzOum1PexbCe+qYl5EcGoQN/mJkllIKBNKTjR3jjTJqxEJv3be5VVD9f\nLWoCesA3ka9B+BlFU9xF3QtoZMzGpx3wVQfi8AnIYE42GvvzQGt+clkGlaWq\n3xIRB6JWhj4/FV3ARKYpgqRteZqi2KXsz/oRAvW7hQa6bpl+VjeZd7w0/3Kg\nVQfGj4yhkVtPLjn+wD1pIZvIY5b/d1BQxNgkOj/IpntfNYG1FOaU3g3CN9BU\nIYzAibA0KlZETVWqSOX+jd2vmT6N+Wd62FR1zpajYPE9du9vG2EyoGtjLIZ4\n8FX7M4z+4d0Z6mftklDWTAZRHzOQMfNgmV7qK4EvRkPDLPgeDqGjwJlhTJSr\nUhNm\r\n=4tvy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9750a8b0ebee9367eee7e514953a1b1ac6fef7f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.78da96eaf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.78da96eaf.0_1599592320170_0.5229066777119356","host":"s3://npm-registry-packages"}},"8.0.0-canary.b0ed593cc.0":{"name":"@material/auto-init","version":"8.0.0-canary.b0ed593cc.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.b0ed593cc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d9e6890c82111a076fffd8c352afbc967b3ba0da","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.b0ed593cc.0.tgz","fileCount":14,"integrity":"sha512-PkDtzK/CPuTRETyJtC6S6GwLhCU1GiIxmnOhzXHxDTuvcY1Hv5iOaIvgXyTnDMmh40IZuumCxr8ZwZOrMy4Nhw==","signatures":[{"sig":"MEUCIQDsBok9ENaVQ0TZpk1kuR6kXHZ5F+WI9RqJRZjGUd5SlQIgf0rBUUtuuyyfUHq3mlnW854x0iBR3mtb9nFvDCMvprw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWHLyCRA9TVsSAnZWagAAoM8P/1t+whmlkhkpP++O68s2\nRtF9kG6FA+0Vf2Wd5NHmGaWSXxkqhKHEl+HPwO47nifFj+XnwgkBJQNXk8r/\nxVbJ0GJxT2WUPx3mgiOqzLds+TO+LvcCsFZ5Osnn+NlX6qS7LmHQDQsPIvYb\nBwlPG92FiK8+VwwjDVOWw2trEn3d39jwdYAs3hpeF07kmbdNrLbhr4gSqj/n\nDr9R9V1kc5Hmj7dtLVaJekCxsYAplHgcKVg4P5iu6yggUrdJ5/rsJWLzWKNZ\nlDKxcYDOkHPFjubbEkHpwe6y2igVfCJzxyfEC01/CfIOGmo4RcSIWX33C7Fa\nja8no/NWwUtwp5vOFINZVOoZlasBBnkXtMyMmVUaWADApRvEGJQnBhpZ7RpT\nigK2se58khoNvv5mnIe/oWuR//GBFpiQvvUEiaz3CuTxipy24FVLxc+fUQeU\nEbp1d+bmkujJgkSHMDyqrIECxWlpwaBkrKLLBjXtBsKplupVeK5Futaq/vn9\nRBlNOU+La71SUIEfD8HuXJVyFTXOrXnuq+pEKja1IECFYKCEIi+5rU3QstCJ\n9czFn+LWcnrjAAUrI/lSCJghkyHULrjPva9dIJEOLxUarLDQjWRmXxPHvHKR\nH9Jrf9X2nBmaKvhB7KHV8Cb35a7xqhQKBIld2NfNy0pXCyLylznkugdD5BgM\ntUga\r\n=sI4/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d4dd3b56db446c52c35f891f9a19896a2b762f0b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.b0ed593cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.b0ed593cc.0_1599632114459_0.8022887707788171","host":"s3://npm-registry-packages"}},"8.0.0-canary.85a1fa9ea.0":{"name":"@material/auto-init","version":"8.0.0-canary.85a1fa9ea.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.85a1fa9ea.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"30a1db07d2f4fe7c6ff39359d018f4f61479d62b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.85a1fa9ea.0.tgz","fileCount":14,"integrity":"sha512-mJizvv32LNqN4bUGUQGw7Rra1bF8VbPqHOalDoRhVCNSlH1BXn4qg3so5dPzrh7dBOK/i5eypQVM7gw6ZR53lg==","signatures":[{"sig":"MEUCICho4WjAq8oDiqkbEiul1c2Du1uEnzPlheIib7zcsb+tAiEA84sBsdLFUjTS+QxaaBn/fx8zLd9EOdFIy2giqDEzhsM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWpYYCRA9TVsSAnZWagAAGkwP/jpyeeUR4oLR2kqRRJn/\nLNb0WWbhX03vWb3z4gMtq0rCo3HNd95dWoQoKNKNHaOZMVjYUVaLG7p5UwMY\nbCPJFZbMcJj5QkBR4STaaNRm50eCkBOGxTXA5x9zrK9P+gCzQ2y+NnAgQWvz\nVvi8Ro86Nyr/HOaMd3cMJdmAx8qkuRjvl4SmQeX8G8fQXBhkJ95CFoeWLjhP\nCOw0L15VLTO40g1wha9Sbc/pHuwTsVo1cK2KuT4wZmNCs4Sf492VVXZ27hMd\ndDHUtX9xtBlcHfcB5A2cSJ/hrYYLX97YNs78ZtqPo+7q7pUYqgIb88Ck/utv\nHuPxjzLyJMF/zcwsH2m82xvPuOQ27hgEU6l9GZnJWO9k/v95FHTJnA+VtZFC\nL1bXhJud14H5Cmvrp5yXp9EwofoCasE0XR8qfT+331KCN/6b1CMP/A0RpKDt\nLCuzAieTMdXZJQS49F6tFcqqYOxaYx5QCqFUyDpYbHg4xBHHedhGsNxyiVu+\nZZ0BJ91XXf/+k6DCk3M9aHMSZQy8eHb2vJvz1UydXyPMayXN3tXNVmXSxQIP\n6Vc98BgLxGdzOuWvPLDKWNh0RdrRIH3JhICnRVNijDPpI91ArrdyAuJpno/7\nyYrbVZ1QPm9sWMV69KceuL3RSRVP8kqGi2js5oDXzsqBEudgLZQcE8wDxBJH\nh9sa\r\n=aJJj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"96441cf0eac61122c48c43aebac2e249d5bf492d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.85a1fa9ea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.85a1fa9ea.0_1599772183895_0.49838660125137935","host":"s3://npm-registry-packages"}},"8.0.0-canary.0bc41a9c7.0":{"name":"@material/auto-init","version":"8.0.0-canary.0bc41a9c7.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.0bc41a9c7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b45b2af3ae33132012ae10b65d539ecaf9b682a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.0bc41a9c7.0.tgz","fileCount":14,"integrity":"sha512-ESiTjdOhS+HyB1qAznDwXchP7KkghDkzyFOChzDXL5P9cY6bFGva1fs2tOwnaDx3Hc2IweYk+mOWwwjrvQCHMg==","signatures":[{"sig":"MEUCIQDYZf4FvwLetYZiRa5ZWctaLzbPWvloA5Xz2kr1HvjRcgIgDKah6mavadB4u2YuGcF11nRzi8Ey+0YbGxZnpUktmok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW7iFCRA9TVsSAnZWagAArp4P/iWQhErkzp6Y8ceqqF5U\nnFdan2Ll7jZFohM/1WsdM9uN4OOkl0cEqFNDxvxX+gZthiBF3oMXPuGgTGrr\n9QRx89iZO8ZvoNDlPaf5LGLfK3LErE33P12zFOiVUGzOFlHpezCAdj0bQWKK\nZi7z8m2QkdkSyCP3fbHrrMs61MIUcJuLB/RaXM9UV7FeINc5mtTqXbam76Y2\nsc81tGil9G/DlSGzHD0MyXyioyJmk1F2l0a1x08hY3Zbnb1y51hcPdhz4Qm7\nz5A4jsteYsAjOGBHTTWh3o2q9BL9iPERfBdcfooPb9t0HDpRW036YsNuvlh7\n2QkcFJM7DPE4kyWpssRyEMME7vBdvnYehLua/HPpIaXPeTjt36jMOw5pINmM\nzBYutiT04+G2nJnAYoS0KsR2nq3QmQMSAj8yrSjfZaVivwXuUQcfJlKR5vgE\n7ZiR/yt/dlhp5n7hZDSe30gVuwrAcGhguNDTtrlPwgz0+mhbRO5/xTMR1YOv\nlSq4kl5kLBh1ipkmL25e7r8XVfw9Q08TXbAturo+D3MmE8Dm2v2w1OJt2/f9\nTASVGBgHG7VnzkI7YMxIxOIY3Es8SmjKGmcClBf0TZnJbtbXpTx9oWYOoizv\nIB7ZtudfBRtpsFe5k57SpQbAMailOCoO7W+NCCokdvCY+JhN48UiZSI3qHbb\nTf2k\r\n=KVfD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9e2c4fbe617a115d220d49782884d15a0d9ff51","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.0bc41a9c7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.0bc41a9c7.0_1599846533284_0.25188571169124496","host":"s3://npm-registry-packages"}},"8.0.0-canary.fc0eb5013.0":{"name":"@material/auto-init","version":"8.0.0-canary.fc0eb5013.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fc0eb5013.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e0599fa711804c401c9d53c502c647290c59927","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fc0eb5013.0.tgz","fileCount":14,"integrity":"sha512-PHnmxQu5Xk901FrefmrCZGMNWpUzKUYOdelU0mGYIPx/8X9vDWu4+Kh6eyHtj6xq08ntM8DdwyPhWD5qldIooA==","signatures":[{"sig":"MEUCIEZIBX1D1s0aRwMYbi3HXAoDrelFf31I3lJs0Fftcnq8AiEAjACDtmM7bjXavle+hoAbOkzBiIfXxtS7Qp+ZxECdC4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW9YFCRA9TVsSAnZWagAAlW8P/1UCr1KTKhTwP28ae4zH\nqcBQ9oulbCFzmHN0+yaj4Z2JrSmAELCGMoucmmWg7yfkO0fmcCt6v2qRYc0w\nrCamH/rkV+WgxYjuW60iEKUy7PKbjubE6AfjwhZwMu8q7eGOV46fBZQp3WQ3\nKYgp86+T/QIwdXTUgOHvlqJZPHDDm2oZThPogFWo7lda6EOWP9LWUhEGkZqj\n2m4VhcZOjPUn0K2VNxRiYNeNuH45dibbHGc8kdRKpEiUM3ZvwINh1KnUA+fK\nYmc3ijnNFy2ImZbshlgaNiHo2GAfc9SO93wzZMehy+mdyNQjEtzliD8qplR3\nUY3lfJ9GpGWGvRRbXLQWjz7F9Ti58kO5TM11/HEY7wbza+owA1ZVRxe9U9fJ\nyK0DEn6Tnjs67DP7LaYX/iTs7jdGwkHJJijt3lyHCimf7mbEPn4L8FKj9Hjm\n7NxkJL2hvRGigrc37bjj7zgN9J5k71WFMF+Emflg5OThbF1hIUc7LgY0PChW\nxunJaHRjCzeHMvrUlrliH++AX32K99UFz/wLIyXiYNIssQNHz9/q/I+KugqK\nFMRD5V6sy0FGPKDNGzvpuBsrqFcfNKJwpE6ikeWO4YXa3vXVmwbAM1vv1GiI\nswl83spB7f6b6mu6zis1UNvsD2JIEXpdccmtllawITudKh7csbO0JhoR5muS\nsu9K\r\n=MO41\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6572140acfb45fa86b79570328d75e3869c40ef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fc0eb5013.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fc0eb5013.0_1599854084261_0.06637127008718546","host":"s3://npm-registry-packages"}},"8.0.0-canary.319bf66de.0":{"name":"@material/auto-init","version":"8.0.0-canary.319bf66de.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.319bf66de.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2173ae057956ae6660066e1cc4759bb475752991","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.319bf66de.0.tgz","fileCount":14,"integrity":"sha512-SP2dvxM6+M0xWhl2KNeTI6hFnL5TqZ+BdHB4XHb8NwPgTXubtIEoCzCP0CFjJqjrtwce5rBVc2zuxHVyn+UUww==","signatures":[{"sig":"MEQCIDzOL54qavry/F5ZOqZawmP4f4fJFunAoQA6MVQ6Q96PAiACAuNR1IB4nqueE3QwYvtG+BPaIEL+OR8imJCW9H1Izw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXAOnCRA9TVsSAnZWagAA3YwP/2p4bNpGYYbpGgTakeUN\nrARjCYi7ex+hMBy00rm63BuWvkjE4qL7EJDoU+tWbdaGZonIWjr8KsezYUkz\nQa6pB8IA3tCob5vocxXKOYJFZjkE9xFnfwSJhvy3hf6llO4y4r7G0CGXBjjN\nOZa5hIXTEM465+aWzWXvuGjwIuXuOViAbb3bT6z/OquAotOy9ka0LqokKaVo\n0lZBt02MQnMSAjSvR64dm3o4OOXbx9b4jZ/zVWcMBRq8Hla2+IxImd/OV1Li\n+4DIF0IKjjO+OP1KNko1vx4drkGROhblspUyJ1Uv2BEFot+UYYSXoKoGhMdU\n3jSjOKF91MIaOikzKsX8NfL7f66dzWPrmqt2hwilVVCrVmZIe+zhiEjlAheD\nnh2M04omBFHzECCpGfi8mZhO5g8FrsysxKe0hE8yJGPXIylt/gdxmw66grrX\nwQ0DTIgqU3LMzp9PrFp3VAJoDLzj8Nk8Noo8/RG7Y+kCD1dsCMF93TEwFQoZ\nlwbw1iOEoyVvPVH1NFC/9uZNMIAOV+3u1yItFB8Raz1blj5lYC8zejieWi90\nhd4hXrLaxEDAtSS8aaFVz75lV8Xgefvl5uN8nzjunHcYrMpQeYBJZmlfmo0p\nNw6Hf/4Wb/Qcyz17UynDh2GTf7K8b4rLU+k1nKsBll+x7yfzQMqDppKbnWMb\n0ac8\r\n=ETog\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ba4054064292bafde40e53fcc87405c8dcad24b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.319bf66de.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.319bf66de.0_1599865766714_0.8379136487178238","host":"s3://npm-registry-packages"}},"8.0.0-canary.5bfc305ec.0":{"name":"@material/auto-init","version":"8.0.0-canary.5bfc305ec.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5bfc305ec.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ec1d6b120da5c18815280e9a6636e009898ffc7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5bfc305ec.0.tgz","fileCount":14,"integrity":"sha512-oBirkv1H6zBJwI1XnMh3FjMkRlnqhAOB5cTJQQxtPcyqevbUaVMPPmSGaZAhbEqOFEx2kS8Mpx6dlj7BGxw+mQ==","signatures":[{"sig":"MEUCIQCHrMD2K5RWG0SRldWU1Zoy8p581UMjvQLDB4rcaKmUPQIgRQUdwg/7Yefjqb2JtGqx5q31PjkNbZJJ/SorgUooH+o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXqROCRA9TVsSAnZWagAAw0AP/36O4+6JvhG3rXTOpkSn\nnLxv92K76HlJO1FHKsCba6/HT3wRuufAdgY+RXMx6saywihbT9r+D6G2WJ9Z\nn/Eh2iyGLtF6InMmspnI2gY5YEgLNOyzexqFLWpofK/mJlgFMgGk1qTafJSj\ntX9QD7iLKGoYtWYYN0rjXaUXss/ZZeSM9kN5i4zEyoOLm8XH8bFSyMnSkUoB\nlnv5lysSLTr4KOZWYYe5P09CbC8R/CGmHkTJ0Ds8C17KN8Ip1WjuHTPoLUIn\nPCzTmKrRT1VnEgJ/ceSOMBhuTARQLBjT2rDXw9I4vDTcNlRV5g5GesuaQ+Fm\nsXY5aLkZmvRjGU2xFbS+0jQY5NovqgH+acp9+WnayMIQjk5fDGDhIOwEy7mu\nv4WtVlrTbKF1zNtCAQvweGrAFFzHSLAhH6YVZzP0cMtUob+66CIBNzr8sNGv\nhyH6Pe04Fv7Cn9dmaJgMOb7mXCA8W1OX+WL2a8hifcD6ya+FxJFdX7rVJG8O\nYhViQFV1LBdbyyVBlJyN0gKS2qCaVLlprWMTJql2C7DSUPyZrhR7VuRQUlOW\nReBU1BtXmmGUF72Bqo6PzWP2b2HyFtPDs9+DoPp2aRUaCucvCYRH7Y0rAqWM\nacfCeWb3rc5+btZDgnKsoZOt/v0dJafFTpPaUX93Dp6+1yWDsGh+ndy9YKKl\n/JT+\r\n=89eC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"96c0c187c7fa544c1f5303e96ba3e85cba86e5c2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5bfc305ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5bfc305ec.0_1600037966206_0.8833394288231227","host":"s3://npm-registry-packages"}},"8.0.0-canary.83d83f131.0":{"name":"@material/auto-init","version":"8.0.0-canary.83d83f131.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.83d83f131.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9754425e5889379e21a184b0a9c94960ff4ec841","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.83d83f131.0.tgz","fileCount":14,"integrity":"sha512-Xu5zX/oiJiPBuBKiucu3+gLARW1jkoQTX3CSY5CkruLtnPbc1k00MDI+16VD9DrCivMyl3kvMCRUMlcPkgtCfA==","signatures":[{"sig":"MEYCIQDwqbqGzpxZiDkPASM/NlqqWfzfrk+HDqgHzXAtT0e+SgIhALDE27t2gNJQxkd/+Z/zvPbQ3IUerrOTKYNT34GeZsKD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXrn9CRA9TVsSAnZWagAAwPkP/1q7CDK4jP3w7/losgSR\n36I2Q5vl6mF5EbqrH9ZpFN5XjW+jHWV80i5VAOVIvsn+3ktp82BsgdNxEvXC\nfVdkBOv1hIcsxIPgBa4Ckv9Tb9N3509OubIspBYp6tFhThbsQzLnccLpKaMS\nlrel9Nj2gyLQpu5MTVFbWf5mM1BMLrgAvfVbn5f1lczcWoEXQZMfDMIp0DsV\nmOyg9/RfOzQSXoxWofaIoXZ6zCUcvsY8Ai02NxrSLDaw2jGTWP4fD/ZZ6EjF\nolOqlU0WbR78mq3RKKeqd20VP2neIFPsj2LcAe6l+4vHA3ZYmKucKlvkvtIw\nu+MCWVJi4mqRMNyqO+RFvebNhWAOfZIPyCDVciDCHFc3zX4XBGHmLIal3VpB\nL3kCJGz/+di4JFElhJybNbyOtwCIl07uDHujpW1Tu34eIL1YbRGBeHnJBaPH\nLT+y0Xjx5ED3XJ6ar68lMXja10+Dts0dkwt1ibSR+YD0f4kDGFLkTGJ2toYS\nY1QaTqJt2K6/S1d0W0PUNuirNwR0afh8NHu85IuyLlbWeoEGuM5qi2D2ScPv\nNGeGsImUKVzSo17YqGPPIXoKHzIn06euEYqVLY1VnXXuu4XxqRp6Fn8VIRaH\nLm0j5iC4EBLpDyuO37UaL7EZJRyiEKQVv8pD1J3Zf97Q3oRq0wuMmJjDZQrt\nx8NS\r\n=QJrn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"520e8b604c3cd3e7ce96b30f4315d576bcdad3e5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.83d83f131.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.83d83f131.0_1600043517168_0.34905917178021273","host":"s3://npm-registry-packages"}},"8.0.0-canary.40d8e4726.0":{"name":"@material/auto-init","version":"8.0.0-canary.40d8e4726.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.40d8e4726.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b1d9346ce8bbbd0b82876bf77dab99b73fbf9c1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.40d8e4726.0.tgz","fileCount":14,"integrity":"sha512-uYwE8H2wkfktq1VUhaEWtQEtCdwlvw3dyrytdO+eJNAxQh+a6NdqLpqHpQaom7S3ckNbfq7kUjbP/yPgEiry9g==","signatures":[{"sig":"MEYCIQDxIVimjumxvy15lXmTKv9WzT/JcUmaEqWlqv+BotYxtQIhAIk7TF4+bkg16F04dtrEcrNmkyWfPnC9RAyCHovgwUnO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX/wxCRA9TVsSAnZWagAACP8P/R29c6aAe5ZB/1vNIpD5\ncjv8ewz/KpH0lEIq9ksFB39ZpGij90UqgBwFKL6Q+8aGk7GNl/R9dv/v+n1P\nJpwjqjOP2tkYPkdaRG2ikO5QvhL3fWuTUwMttCAy7/6WC5gK6ZalFNTM7B6T\n4dkT5fM7VZJNhuKgu2g3+MwKOiSuEz6YShX1o7AAm7GMRH46kuT7uuzNujXA\nG+mExgBpSITwuN7wG+ed4prTPDKPXq3m0C0rhA6wP3pjNTYxgef6EmIO+r/x\nVyfFNNb7ORB3MDnouGEN7a02FyvwWDSmWWpY9DEFeFxoGpQ1bTjtymfrKj7Z\n0HLhhGgz6R2oSO+4d09y5ugn6RIuKAvlLXvwNSa4UAZsls0lqRluDvPcKEKm\nBsSzM+FKZhuU+8ENm2UF+CYhWXWr9A7VIkQr33gLNrf0KJLcICPf7sSxYJ+j\nzCpRir9/gUKkyPqfq9DI3psjFRfVOVZLoqP9EY+/Gt5J5cWUZvKVlVKkyI1v\n42srDXRyz/HO1UlOoz79ByM7lmefQGFc9IqpZ8m/Mh655mhoCv+d0/nZP706\niSNMTortRzK5u9RtGzvky4TkAWI/7WLagk9Xv0Sn40ETcVFPLgYNoRJVSxuj\n/h2SKSiM8qcB4bfEBw2MeTm3qppmAwbg9J4WJRbLEuHSQqKcgn24C+FdveVe\nrZw8\r\n=CPhF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ba2736b8bb826dac383c6f8f237a6584247d5198","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.40d8e4726.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.40d8e4726.0_1600126001197_0.5534763196807009","host":"s3://npm-registry-packages"}},"8.0.0-canary.c25d70a31.0":{"name":"@material/auto-init","version":"8.0.0-canary.c25d70a31.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c25d70a31.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f86edaf4ac07692a55d44cf6b4ca9c833f95de9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c25d70a31.0.tgz","fileCount":14,"integrity":"sha512-0Rp2WlYoK9QC6m7tV1+9rC2eu8aXqTmdMGSn/qDTw3+Qt1AnIHzhihFFOtOqzFZgGTYXmjjfH+v7rI6CBt54rA==","signatures":[{"sig":"MEUCIDqd2SL0KcVlTFX1+KIMp9lnu89RCcZQjMTUfjc12/mKAiEA2hQvyQ371x9BjdHlt+3xnGUAd28a4gyUzfXTTSncwbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYCZtCRA9TVsSAnZWagAAoRQP/1y+pxpZd9pCqGtDRgym\nb839PCSqf3ui3GFbQ3RQo7XZxp9vU+/YA5prF4v/GX/tqYEiUBGRg+ICnFWg\nDXCTDU1qr9Ba+00nlo9rMBQMjldGfBFr0UMDPg/PFuLAVfag7KOl3rox9wkH\ncHofUQGV16RgSnQicVXjSR+8/al+PsZk0OrvH5WZBnJloq0mf49F30vUXR6a\nwMAYbax6YWYdVhZcfUSr6rWzokNlh4bymPCGttwWJEsJISThNU8X26/hKKVE\njaYVZRqn7TyK0w40Y2rvn+IYNKixKvuGIgKjUOvV6WKkHOfbvR2LIDtZhu3H\n0Y+xljCjoeSvindNd2JvmonmyArTc3E4P9lsK00wUec8NKpLwz8TRR7BHzXY\nU1sN9/vt09MH5h6kH0d3oO4aByoy6o7FTk7J3xr93obva+rP6+lKPlp2FFaa\nXC50FXL4ahx6WODkFEtT42K6vGGPvG5A6wMJsusco9g8B5cqgvnXU/0xDXSA\ntUHbGUOJOdcWb1REkDUhxWa9lE9Bwk+nWk2p+RZDPXjWaBmjokVMJicvTIrT\nMZALtxFoutTvCBgTXYCGkQ/pmum1oHb/SWS/3UtKdEV0j3Cv4dYCfA8UXMrp\nOaW8GVda6JnBRfFy0Y4si5mgNNW8Z+7+BBYMAw3VgQt83R2MYzw3ZRj7Uw92\n6qSu\r\n=9P78\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"23adc9426ee1c32d146e601987be4165e56c7934","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c25d70a31.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c25d70a31.0_1600136813172_0.6485449008999529","host":"s3://npm-registry-packages"}},"8.0.0-canary.d52b165b5.0":{"name":"@material/auto-init","version":"8.0.0-canary.d52b165b5.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d52b165b5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9fdf9b332ac13aac3c544eaa79e2c323f5308a3b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d52b165b5.0.tgz","fileCount":14,"integrity":"sha512-ifYWL8eauK3wLSEnT7BjHRQDgs06KW7W07jNlMhoHdKG6AUwSzaLj2CoHUcVEJmijg4vjjeAnJ+ckjMZDOIQvg==","signatures":[{"sig":"MEUCIQCyA/xpjoKRHocKdzzDP7OSa5DCGrgTKP99sFj1RronewIgVSq67Xj393VHjdh05/GHhpUyCuwOKJJbn3WipvaB6pU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYNVsCRA9TVsSAnZWagAAg4sP/jBlfldOUCNNDYuBzTbi\nh8Lqwr1b6tp7o9NeLk1iO43qlLC9gNuzyO4w6sJpW+fvTh9k/9PAZYSfdwZe\nPvj7I0PcadVxIiyy8wTFbGluzNNHO9240SqdOvcx0ZEf0UY7uRZ1/7O1rqCl\nDPDFwiE9E0cp0e6yCb0QJJLnTMtoplj97ggv3GuM2zo/2HhTCfklCJZ65YhP\nbyanWKRWGZgSSlFWJBnt+28VrhliyqFcpR8mIFfAD88Rl4uVotTbEclinnFo\n+7nhXL4c98vjhEiBoIvrCOG7Dqwi1l8WDFkWqQziIpWtxRDvi4YgElMi795D\nc8WhmOsY3eZrGj2eZGi8VUlFZVaaWyh2kCQU9euuaGrCOxGx8yLjusG8reoJ\ncYotxlo7NhGgLTDk9nUXiU0hTU/aGUo+2hMC0lk/ixC7pKQ+zvfHb97e5oid\nwEHpkyqFszAgXzfYcY7e5xA8Jq+zUav+fqnXH9Yax0l5aX0D+GPefU+nrB5B\nuWKmhGuNzcmBHA1YGCXk9XpLs1sr1WnExoAT8iJ6N7ISLpGHSsGBdVOjvZA3\nKGk6x3uEXm9fPb7qUuiog58gRjQa9c/KN4t3pASq8zmQKYA6fdnlzkB0dumO\nN4hmVDeoWrRkFIzWBMqEavd8Nos3GTbfdUxB6bpv976lzB1wj8xAUwIIsc/B\nudGA\r\n=HHle\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"19ac3399f14583da3b2ca5e37a0ce783539066ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d52b165b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d52b165b5.0_1600181611816_0.1448382054109223","host":"s3://npm-registry-packages"}},"8.0.0-canary.a831d4799.0":{"name":"@material/auto-init","version":"8.0.0-canary.a831d4799.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a831d4799.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68e2b7baa401e3bd80d9b6ffe52f40f084fd4cf7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a831d4799.0.tgz","fileCount":14,"integrity":"sha512-ieTe9PrhTsn6CtcvJ3r1XtBTg0d2NUuA9x57M7FEyNRzjuhvwSEI59Jcb8M2XCKEzI1HFZmGfcH9kl5sotRhUA==","signatures":[{"sig":"MEUCIALh5yTbrE5U4TSB7vePBZm4POxdJBsY6JJ/nq4ZB72dAiEA08E83eSJZxGHN5pF4Cf3pDbndWnx7RLagpXwaFJWJvk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYP8ICRA9TVsSAnZWagAAdKgP/iPgz8m0AbFyOCEER6YR\nsfCUz/pM59oVO7wQSanwxVYQuXlnK0UhOrfgrLJoJtx7Rc/YFXibRO4TWA4R\n0dvPq5lVjG04nU6sIr78CQAXd09nw6c5RWe47436s+vc9cyk3aILNp1U2Q4y\nPVNoxTky0+t0iD68KvUAsor677tBn8+2cUbXzk3sw3sdwyfLQQK86yj26Avd\nQrd4gNXQMGyS/t2pZZ2kLfXP5G6OjaNpG6T1YtrEd064nkNMEjZWpAYiP/Gp\nkZWHp2PAwO1Bco5lVb/nSrIgsQtd3XX73DJoywUqVJUtgMDFo8a+p9h4CJUg\nTjx2N2NxmMfP1A2k7E9pce/p0DQxVLkKgwW4YQ8eMKj8mZFueAD4b8DCQMAH\nvr5v7zW1EJ1pFEE3zlO28xjMBgMy313LsULaVJJHBR/jQJLyGvCBmHflkVOb\n7jZ2Z1Hf0/wES/0iTHqF5V9on6kV6TE85wi5azjAMi5L+Fn6xfaijU6PIE4d\nfC38i4cVwj4H0SnSf6myiXVsarGhp0UVgmJEBNOajiv2OoE7IMauET6toaSD\nw0PNzjSwI3agB/7OJlMJceW5U4bJsFIxyc0c0XMkV8cdwE7Vd+TTOkgxZbMG\nPVlU2r+6I4TqcWL9iro4gsVKUTcQdaXbxGlYfUixuYdoaci02tyLjj6yYYcI\nRvxQ\r\n=EOEH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fa7f461e7963e1bdb73e7811d2f70b0a07acba16","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a831d4799.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a831d4799.0_1600192264304_0.43935788863172887","host":"s3://npm-registry-packages"}},"8.0.0-canary.a306aa488.0":{"name":"@material/auto-init","version":"8.0.0-canary.a306aa488.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a306aa488.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"39fe6f2b4bcdc138e4b674e8170be8a6606ebdba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a306aa488.0.tgz","fileCount":14,"integrity":"sha512-TNZpAMoXceyb6cUpxUCUOBmEL1nsu4RH5Cj9P3ugAQRxOf4qEWd0pOyQxmaSDuOcQZQyutbKowGsZ/U56Oj/7A==","signatures":[{"sig":"MEYCIQDlc/dYjEnJx5gv7iucooGPdfhfm46GiXu+RaC24iinfQIhAJ17ACoBhL63JECdZcwlLv1sAHlFXVwgHsCKOaMr81S+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYrSHCRA9TVsSAnZWagAAjlMP/jBQvIOTBSO+MZMfY0mX\nyDGqapkQWPF5VZrMBES3qRS8zYQSR5d8ZfQQTZ8b9r0OZ/Wl27jUkHLZaVF/\nuxZrb4dZtNjXuEqA/9CDEdn+UJ8gOOspEAj13S4jgUOEbuQSU7pfRhZVUI+Q\nk5Szvi0uQswROkugo/vecr2jCgd7fwifpGoqUlASJ4QIs0vMKNtDOiyXsds3\nEgx2arMSlT4at4LT08zG+sXKnPdqDZ7KtkRaGaE2q3Mplt59QkWUNdOKDcD+\nujgFD0bE5Mf5+MIFYfFDPkXZNJesiAd1/8UQDjnsJaWEuULrf1Q0nfsgmtw+\nalwrMKywM8gh3ucR86TkjnOEc/BI29ppaQLQAvuRhltLU9H7pNnSX5YzVF1a\n7rWfbIDhizj6n6wHKcQbANJwYjHVotD+eRhMry/UGEV0dyD2iW2I9lZZu3fR\nv1NEzXognDw+Z3v//Ep91bB/Lo08dl1T65S0TZm2zkV8DwnHprGm1JvSM708\n9ggvEXn00IwoVNm7OtKbsOo1XcZ5V5J9e+qXrXrXazvwrh23JVj9V+OeS0xX\nq5WVf4BQPi6n6EiIK/BEJP7Feg1AbwVDyvdxoWJFBwHjrb9C8ytM2xKDueY5\nVx4GJyR8A5CiTcZuSiab98N28+WEFOttbDB2PbzDw9mYMOsJreprxwZCRgX/\nVyg8\r\n=nJzz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6addec60d43eb106ac774211ca2af4b04d40f1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a306aa488.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a306aa488.0_1600304263406_0.8608700046254949","host":"s3://npm-registry-packages"}},"8.0.0-canary.fd608ff66.0":{"name":"@material/auto-init","version":"8.0.0-canary.fd608ff66.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fd608ff66.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2cb1eacc55e6e73c37ef4eaa556e8c10a82ecdf4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fd608ff66.0.tgz","fileCount":14,"integrity":"sha512-NjWFHLap4aKu+3W8y9EAZMeOoXzic7lKWG05UJiucHQmkR9J4J81IFzA+NBXqmv/P8omsEIwJdVG9llItI3FRQ==","signatures":[{"sig":"MEUCIQDg+KMebbLeMVG+q7siuR0HIKk2SBBs+TUalHv2Og0kpAIgIJuA2EL3i3tDFSojGZwLbH59DXXM2X3KbU+gf4DlRuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY3G2CRA9TVsSAnZWagAALzcP/13b9YjtUqAyd9ZjNlQ9\nHJLnOxeYlZ15Fv4Zdhx2med4cAAekYLRSGjj9vKa/cwWhxgyV54bbc2/nYr7\nBhyiuHnHenpBgh9vvOTVE9flKOjp5lfxy/53XROfGGMkicBGjF9JcWj/BgF7\nKZ6AmaatDkq24OTmyopFmcWc8QHaPYudfWLqlKWdzOLHaTjLEYGpm6duULro\nGljoxAVXO8X6tKD8BqEUUX+yEIHLJPAZl4DLudnnIgSAenqKE2/rt3nZyu/l\nwDWZR2aTNxmW/0obIiy53dXatV/dK9xyMLCdS5GbqMkqIlGjgKsLA1Nijl3a\n3bzD/G27EDSIcyw2FFhlKPF8/C9a+NpEI7Gem5MGJVHceuEVmTJ4I5ZeZzcW\nqYrHCWJYs157dv+NaTY7qORetWxS5oQTyAWDhc1jTA3mwRgfaIzy4W7uyzFW\n8OfLV1DnIiXodryZOwqyKZDTZJngReJqzYw9Kud0s4YkUqFf8tcmokPcPSd/\n2Y6TtBX4kWVorbekANmKW/OpwbKLBH+54Vjg8UeoPmTcrh29wjZF3pwx19TJ\nnyo28o4fhokEUB9D5OU0wFYCn+ZXmFAc8rM5wH6QqhXFL5R5w61wvlG3f6AP\nnSDwRVhMdWB71rPQWs7tuDYBYmHbZ/0a+LCa3XBaDwqNICx4OD9+BJ0aQuVV\nh52L\r\n=gyvQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"03ec88b3967ad97da4309b1dee0b9764edcf89e1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fd608ff66.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fd608ff66.0_1600352693817_0.3113803987086181","host":"s3://npm-registry-packages"}},"8.0.0-canary.3e435ba57.0":{"name":"@material/auto-init","version":"8.0.0-canary.3e435ba57.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.3e435ba57.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2804260d2a3d739109b5fe01793b38dc0853b4e9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.3e435ba57.0.tgz","fileCount":14,"integrity":"sha512-/M7nxZTWFtua+cYmSkMSrwxTEUImE9JsypAKAor3EeksCP/RaYZEwmUXzb0yDp2l4jV04ai8IUPPPJBP6WiOWQ==","signatures":[{"sig":"MEUCIQDX8oTD89yjZlAiERUE+GEqU1jV+b80X8EnmWODMhBsAQIgVYQ2gL1QkZQKIWLNdAJIRjsv8Ykc1adUB15tZ8xcZWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY3XECRA9TVsSAnZWagAAUxkP/3IAuo9VvL6pepnp6+hf\nB22gnmAgjX4+O2mzzgxhr9I/cViUzPd6kvePH0KyJEbcxKgSghO+9VoLFLyO\npT2o7jNwUR4Vb0o7MPbPdPWG2Uy/BD+TwsPEOc/9HBNOZ3wzD8Y938amlqXB\n7ZtTnLpABXTeksTpLVQ8HbKWRn6jt3pTRYi42TSuWoXldlB1sle2jvTmkwsw\nk4oRwRIiThbQ/rSi5MoFK7DjIb2ZAOYwmj+SZGvQYRLPVoOSrk9gP9vg9Aij\nHgcEIwmMoEI2TtEh5uixICsL/XB9O6F2PLjjMYB1RZqqFTg06QdQeM1ZLvz9\nJGJT94L+lN/gg3/F5eN7o6OI1KbRXuVgC9WRR9Fs5rPizcX/xysBY/bgC2pN\nQQ1oxIDETPJ7Xf7kV2zw62XmuFkjTjo3EmcBi+Ch9ekAK+3x/5r7nlFTfVMZ\nOAKPujTPIUxF9kOAETgd3/fKzL6i4sbwvutz76vgeioFWt0FGS4PnXiXsPCk\nDk/DkC3VpXcidP53TcAqiUBOFM+kp08rt43wR11t8tzSHkOh1V2M9uz9S4lP\nKrZYODHsXm60uOcPEBC/xbBRf29BvjLGq8PAkprO5zlkvO3i0IgfV7tTRUV8\nKhWsv1E/YiygOdi3Zo8P8cbXckibHN2g6cFQNYxpoR8GrN8eGQpdhRELnrJB\nxGDg\r\n=ZHfi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"15ff2ccef4cf94fbadfb06cb750ee6de035cdd19","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.3e435ba57.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.3e435ba57.0_1600353731538_0.43083942313100065","host":"s3://npm-registry-packages"}},"8.0.0-canary.c250ec52a.0":{"name":"@material/auto-init","version":"8.0.0-canary.c250ec52a.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c250ec52a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d7dfab529cac16b4cbfa3d86f67f9997536204b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c250ec52a.0.tgz","fileCount":14,"integrity":"sha512-U/nNVbPMKJ8HUUgMwDebSheDAM6pnrxUU2bVwZCrif7F8gl82LraRQjkXPBto4ynw2Kd9u2EXvaNeeTMRK42Cw==","signatures":[{"sig":"MEQCIFIN/asHZU2QKxFZVqKbAmx88ywRMxObt1sruUYizq1pAiAj9nH3LKG9VvSa5draku9YI8ksMf9vqy/HQKiWGrvYgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY8KICRA9TVsSAnZWagAAiN0P/1W833LbyNL2QPO3hge4\ncJYgvfTU+ldun9TtUt8Y35zGYPXIwTB16febjaiYEC23x/HYrKgd/KvR4BmL\npqL+CgZfwVKataonVRMyBhX09cyjUtlqg/AGyT6xk2llg7/cTFUN+5Nhz6vy\nmSvXFv1XWH26/ulYRCH8KtJtTBLaDzLS6DrQVGBol0d/3BD92MgpfxnJC2Er\ntPJC1v66owzLR9bJDHH5Wguuoo7CkxESkfII6Y7a2/GJULYGZ9DPVWngHLbc\naWGIw5dnGqGT1jNU51/AYvvin/MTlvjrxwNaU7C6hcQzHJ8zC1s71X55lEil\njBVE89F001k1Xht3R/wzzGIpm/BVX6CW9HBXIxh+rrsa18zyZIhqcLihhHok\nPJaRYUozJSdpWB/OneOLrx1ZAtiGr4HmUiYvR8DcP7d0Jvr0qLwCOwBZXi7R\nRgOyB72xf+1Bqc9YTrpHM/eBGKKKVJtWyz88WN5Y0j/GfREMojg6QBb8c9VX\nrS7bnK6PIl5DmJLFM/FsmdKuNTvdNxPH6NBdcFt82qlAsICakmhEVtmVWrlG\n6SmeuZJ2P91jnXVwkyfhliPXUdPGGBQj9deHoQjzMThqbKfk3UZpbkQVmHsv\nea5ixKga9UZQp6zTeJ1WB8yXo9HI63WD2hbuigH9ghYX/UVVQwyyG+TBWrHO\nGX+J\r\n=fEjX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e214ca7cd3c1a65ab89d2fe2b4fc899aca418adc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c250ec52a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c250ec52a.0_1600373384016_0.6332754951207462","host":"s3://npm-registry-packages"}},"8.0.0-canary.e34e411b1.0":{"name":"@material/auto-init","version":"8.0.0-canary.e34e411b1.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.e34e411b1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c44d2b39386a7588e55c9e5e6a04c7614a0a899e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.e34e411b1.0.tgz","fileCount":14,"integrity":"sha512-gEmcWnk+lmNnBG4Y2U3ga8WqLaip/EflxlAKb+KyC5JuwgLuSGIavTc0hSFg6GuKJFXtpAcUSEVvlSqs7idxkg==","signatures":[{"sig":"MEUCICS13esSNvFjMH0MZzPCkXBymfs1LMlUNY1y7Knuvi9RAiEAzTeUSDbHeZl9ipcFyPex5Ow1I9T/7TOmIoEHcuA/VR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY8RICRA9TVsSAnZWagAApsYP/jDjZhjJLl3v8cVO0kIW\nXpnm8QeaW61Sc23BNO6McikzbMY6oNd5+id1QyFl7q1iBgCzcq6jzcO1ovAF\nr94kLdBfcsTTYbHt4cqFGZOa6djqQ2539E8wVe6I32U/1JrCGuLwnf+ePM6t\n3+2n+SOkq9cG48uP/93AKwmIP0WhTsZZoQuEi2xFIOfMllZtqawScUWmFtBT\nB+Jv1BGD5T/Hdqr+7awditjLCXXGqzWrtrlK/22tg0MWiXmdDGfflMHkKxKt\nZfaVXaE8Ep7pyoBTzsgMVwGIl9o7AAQ/kLfJNXz/Nebk+Ea89B//QLQKk8XH\nomoHH6gsoWYZzUmfoAkc1OUb7Pe+z5LkiFXLbqj519FiAKcsxKdbDgOqNKxq\nDse/2HSzaOC8CECKLO1UMGJlROT4RZUDqnNTtAuZrDDR/5tOASPMlTgd423Q\nlk2nXPmm3ad6qmJHxsZkoiZ+fJjv+nCOpF8O9MscFDYvYVA0EMz3gqUnpoK6\nol5zdwRnbUl98BbTeEAcuxPS3Dn9woPnn/UPlY2BTNmPW9eKKFohXtuQYSMW\nLkmkPzISOLavIYCRYd/34+bghtLMIB+2YW3BX9BNdEoEcT4mzyYbJlJXFjPp\nTw9RPJgIxCI9KDFOivcO9nUuaSv1vjhnhrTSvVVhTewaxsFE88FnsmVr4Qzm\nV0Z4\r\n=NoY3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"460337b237852aa88d59152c38df2b32b73792a0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.e34e411b1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.e34e411b1.0_1600373831648_0.8272761818881655","host":"s3://npm-registry-packages"}},"8.0.0-canary.4e9343929.0":{"name":"@material/auto-init","version":"8.0.0-canary.4e9343929.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4e9343929.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"769891cd6f62092e74cd46f51855db31be1b0a47","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4e9343929.0.tgz","fileCount":14,"integrity":"sha512-IMNFkaduxEwgz6gzsYbIc8XkP4ZKMRdI7wcOZLwiGoTBXyxl/m3JyEak7rLrOUgIIAlPNNtbR9MDwYxlcxzo9g==","signatures":[{"sig":"MEUCIQDaSeqxnZG9e0hLNPV3Dv/QDQew/6Ha1c8kv9KOLa3y6QIgBcIXkw8UezoUAu2dB2nPObMyt75SsmvAsPmJitxk3nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY8oqCRA9TVsSAnZWagAAnYkP/0J/FjVJV8500rE7AHXo\nkqP5Y6/aXLRoPVvujQ8ADrzJS1PisD+maErIbkbHKliwK6zSrmQeqMnCACrT\nHpbf1NnOud7Z9CK5d5kCejAnWQsL63bvJFY/+cR/Y0h0lvWaf0rJxA2SICfV\nyImTTpZrpgZ/x6XxGnDIA0Fo/YUFBboBG69H9dDuhqP+3IKdu6BtqwLYlZ61\nQQhZuLs9dqYKVlA+zcHm8duowFNuUXT/EpaORQeiffU4Sg4f0GC/yYarOo5C\nMELwXRsn8oUAQd+4Y9s99QtBMXAIuYMG9/f/pvvKtkRvuzdqageSgVKmf6LL\n8rNhEokASlqFNhWWfGZJgHgM/T4OiXUboHKJzPOFgFXMv0sd86OVCyJ8Kn57\nDxrIetid/qzJKTzTkxzXs3uKpNN+WWx5cvUoKK5lhvTgch1I2fIBSenpvfoE\nNWgjkE1jfSdCS7MiK8AzsAwpKQEemFnW1i2u5yYByn7bg+pXYeTXn0UGDCbk\nDtPNnl1JcxaGiw2bGCD+dgJi+BnWVujU6NkNF46e0KzhQWV5ZZb35hrRtJHX\nxBAzTKP3ZCBjMtsYtyis+c/VnJ2ekcq/kfs3RZoLi/z1jREe3qJjsJqIsRs5\n2pbeyVFuv4rEcbZnbOrBQ+Z0L6RbHfSNjv0/z2N7A9q6nBdF8WxJlFwW8OKd\n6O0y\r\n=pd9r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7bab75a521cc7f81a2f78587d2146ac140e3cfc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4e9343929.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4e9343929.0_1600375337910_0.29874488015354905","host":"s3://npm-registry-packages"}},"8.0.0-canary.4e5c350c2.0":{"name":"@material/auto-init","version":"8.0.0-canary.4e5c350c2.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4e5c350c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6cd3e5e65708cef236e7e545ad109e1da2e8b7c4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4e5c350c2.0.tgz","fileCount":14,"integrity":"sha512-rv/7a1e50JiBixMW+cytG+0V/XWRF4HooLrM8P9Dn24hBqN9H3IwI3k61MnAwhKJHp9Lvk7XgkoXs8vcy/msjw==","signatures":[{"sig":"MEUCIQD/CmgLmqKNjv8+o74eHwn7WYyYJqVSlo2WWq5AGLUkSgIgGHei/xqCiB4TXb6E+7CGMNzTjTX+f6bRtJZ05TBv++E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaRdzCRA9TVsSAnZWagAActcQAIZSNiRmYJ37vQh3Sd+g\nWioo6Sq8LPzlCD7wzJ7JiYRoOfqGVraXBSi6vDFN8f66pIjPESLa22603EQq\nls0I5zqilvW3l/6WXLfDtQ5g+diDZhP1M6gbXPQQPzz+5xZBIjc2gnWlypFJ\nwPEBNtQjlME9jN+PpTr0SHEQV0cVkXQ9i+nfs+xMjPviQxyBlij+HMouoD1S\nqLZbPmc/p6RDQBbVesCrdVNXK2WUCuAZUR5Nh0mNGNp3E6t7Gwd6rEPFB3vS\nvu1EvqX80XFKlE3CBiCAKMXAMVkhNg+qPiGf46zKp5agBXnGVh9jV3T/eD8J\nf3Q3P/lR7smOb7DpqJQO+3hoIVvPmKM94m0pAzepNR/a3rtC9oNn2fWOsKI5\nXFJDdK+saqtEQVYZErGHKgmQYw6+0sg/UJMIuV3FtsW/SQ5wk5q1B9awLmNz\n3MRD/lipzNKJGbKb9Gowr5fxvXU6FJtEGZ5BoOCDdk6u79Xf9GdihdbVUzYa\nkS36+Lb2whoQh8QxEdzszU1iNv7yJkNcPQxLwZoryXrhom7jY6Us7CSQG8kc\nmKIz+HK8EIZgq8Nak/nx7X+iglTYT/a23K1aOOkL3emyn/J/pN3ckPkAow2d\nYzORMjIG6lBPpsnB7lwXfNGqyUud1tknh6bM/i5P5Vc4FKFS+0ur2D6N/2vw\nw6V6\r\n=NYwW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c753481bcbad808064a366112868670fca5381f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4e5c350c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4e5c350c2.0_1600722802960_0.08955453006866776","host":"s3://npm-registry-packages"}},"8.0.0-canary.16c563ef7.0":{"name":"@material/auto-init","version":"8.0.0-canary.16c563ef7.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.16c563ef7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c3d5a34c49a880bed07d0182a93692f7882b4869","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.16c563ef7.0.tgz","fileCount":14,"integrity":"sha512-MkD976C8Y0JQrLfIEhZ/Yf3SwRqwAvXGwQvq0vYiS08Gs0ndQQ9ZJmzS+C08z4Es9Mk2LcLJCfE4JYK9DYa+DQ==","signatures":[{"sig":"MEQCIFj8FjGm3ONxkkpuf4AUrKpJrSV5lYt7YvNr7e1EAfEZAiAcQb9qDWNOwprqR27zvC2STXIQ+KGMwucJZHEN76zFSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfalRWCRA9TVsSAnZWagAAyT0P/3SMMauXtENSws50w2UD\nXZE8bmkT9g4t4MNeziXUwOOyRSJakAwdXTMnqpKiwcdHWYZKKLc6V87KM1BL\nYqVt181RjthpZ9zHI/T674HSrbSLkCKPHU96Dc5XZdM3VFk8ynjaNPLW4dwb\nxQ+JFdEiTp0dff2QNpVSclMW/SiJ8nZAt/wI50tDb4duIsE1bX4XCH9M4rNj\nXB4Bf2qeBXXHnZsOD9A1ezjPFt22Ha0dYHFq1KR/IAmKj27ccLE/pMTBzaba\nVb3ynI+cEZrotgJWcVts2J53lBhcnG9Aa8BA7+WFkdF7W4gavysAbWmwPhHq\niAjc7xn7t1Nv7aJdMCegIEY1x/NN6hyDrmWYb7517HMtQQCQrlFhBQiBXn6U\nNYi40yja+3fP6FTbVygqACuXW+jtTFJjndi46wmws5jbjAE8UoxuP52R4m8f\nOz/qrPIk3Ay9ZbCOwN1YkyYQYLLebY9Rfbu8VHr/MTHOJmFLZPDW3umt/vgR\n1JuhJEU4Mq0gGcL10O6UrT4h/3V6uEh3ObY3meyoa4vqVBPzojDV4+1UetuL\nNsnWesU0qx0QpjcAvaR4VyvGRnU7SzgX1oD5BDLZ0GiGJMPORIr7JSN54kLu\neIOIcCq738TyPWnwYwg4/3CoiXkOQpTWwKPklnVlf7bYZNzj9Q874UDNMxFS\nvHo+\r\n=Bs3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e3abdb235aa76184bd5171f68c237f58b8541f7a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.16c563ef7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.16c563ef7.0_1600803925798_0.9464497930566858","host":"s3://npm-registry-packages"}},"8.0.0-canary.fd8af3d43.0":{"name":"@material/auto-init","version":"8.0.0-canary.fd8af3d43.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.fd8af3d43.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb38d08900d60d354279976a7e4a0096a1245219","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.fd8af3d43.0.tgz","fileCount":14,"integrity":"sha512-yB0HHw3uDlu4KiZca40+R6JAAZj0g67/CU1spafdVdpzE8oo6rBmr7AMAuPdWu+ZfRxzYxc7tov8lvETjUoipw==","signatures":[{"sig":"MEYCIQCOGIPe9Z+GskmowFO0yAzyKoNc66or2MX6dMLtROSNfAIhALkxfQ8WljoYV2dyfqLlPjAmqi8zsUgsVO+f1Zjhserk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa6KRCRA9TVsSAnZWagAAca8P/1Ph1ookgSuHOSOXr2Cu\ncWRxAwaiLwP/5S4Mvb8V7rKGJTxPvw5EAw4rKJ2j6pDJg2OHrmK5k2X9W30h\n6JxmggdF3eLHCJUZqoWBkd1boOjwrfteXBV4RE/UZZGFvJM4NwKzViLuSKXQ\nxz7A731a0I3QFYOeQHOr+C7I5aaN0KOW5Baw8ut99JbPUPjPOubCcQrhzGNn\nsTlii4bB16Tj5IUB/hWSpvMzi/KVH7AkQ8qP3QM7j1FzMIIGv3USsL5W18M4\nX9vapM2s5Wrfw1YOsXFhZ4/DdRR7vabgMdmUo9nQ92RZMAFtXIokUTP1Syri\nSY2vjqQXbCHxBwWkKujAPpbI82U2fHx3zTffr5e/bFfcP+UzYLfexm0Hw68Z\ndCWf07uuhw6CC3sv3UKw+/dVkC/dyVvp60US+R0FxJs5tMHzK3s9SE1SDvKC\n06a0lKx9neRr5gkbzY7yCCtUCBGIsCLtqlL74Z/EmS4eFuq0jBJ96Ed0Dnqs\nYZKIYYBOXFUgTKZs5BYrE5LKa0R3GPqioaNnQhxYGRiqT47llG8glkY/at7f\nZKsCF4ITpEkvWw+Rvk6naVKss45Ii1HfJEVIw9GpK2EI6Cw8QY+VGkdjPQn0\n8gFezzSUTPVoqKqQdwP4PrFHL67SjGeAKWSeBeljEZ8Pb8/pho2o1ywT1Lsg\njVd3\r\n=V359\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0f295a5eb9518e726dc271a945985bba278bf9e2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.fd8af3d43.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.fd8af3d43.0_1600889488711_0.6854737494681489","host":"s3://npm-registry-packages"}},"8.0.0-canary.d4cd83a85.0":{"name":"@material/auto-init","version":"8.0.0-canary.d4cd83a85.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d4cd83a85.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1660ee2e7f7408490a0345ea4d5d6472fd91127a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d4cd83a85.0.tgz","fileCount":14,"integrity":"sha512-nyHwyzxTfVPAmjy83TIhLJnVLxKLLQrVeMdcX43tUwFBEQhnaEsxtopnri22lE3TWTTQQ5vfO9kp+RqN+b8+pQ==","signatures":[{"sig":"MEQCIGhayUHbLatA9XD8FNtnjkTf093cWlRUvODIk2kP9sZXAiBGx6wQumag4VmituM9lJRXZ6oKIaQfE684mqOuKGY/Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbTsLCRA9TVsSAnZWagAAwskP/238FHGbbhmdy/dIJBBk\ngV/ZrswcHJG8DBBSfLRCSYC5WDBODnjnZqxnxypof1XNUXDnfXNhNaJ8j60t\n2WIpkACpeqGfFBHSmmVQtRE/Dw27LxKXR7AF4Ps2KSC46yAFkiz8oO9H6LjK\n202qHEE/xOP7ED6OuhIdumFDPdc0reT2b/q7dCZ51qLHgTN5B2cXaYRMNOnj\novfvhXdwqVLILaIlPaUHiOPfiGs3x+DY7eUqP45PuPv+4sAmuOd1H6deF9wR\n3qdRH/EvRIK+L7B2IAHFKP1CUtKFlO0tdHH1KPIShNUOEQ4B274td4qxtVrc\nRe2MGqFC1St5olK19ZnVkqFEO/NTad+lyynQvAZqitqeH9x1bYtZN45wIc4g\nWD+bBVMEwF/ohakIzh32Q1xs8HDVmFJxtb97k14WIoHdswcOzKxmYmM6ZJKC\no3ak4QxGx+hsFqWK2ADRPxNrMtU490S6uX9pxWycRVtwTXEDCUczaHvYxq/2\nsmZ4BLdo155tviZvo2HHHq0G0NSEOja1G1ny49M3gCBIrPIzkxfOn6jxlEAc\nJtb8SVhZuXTiFVVIQB8EmviLGgXata/5PYx6FqjQ9GQtinKSvkXgFb+QabDp\nx/SgnfOwuFOg1VMJqsKi5lAP/wzC3+nS1fN/q6NVdYeUKvNz2koQNmG22h5L\nWbiU\r\n=3Ujj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"80cc7639dca83570a37de4bcf4d7501246ee8eee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d4cd83a85.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d4cd83a85.0_1600994059361_0.9180208276059523","host":"s3://npm-registry-packages"}},"8.0.0-canary.199aecdfb.0":{"name":"@material/auto-init","version":"8.0.0-canary.199aecdfb.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.199aecdfb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d6631c8978d4ebe8238e383315540b90c44ef33","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.199aecdfb.0.tgz","fileCount":14,"integrity":"sha512-4IIdm3AyeKnIhFRNk/rSAnlbGTCTHgfRNe0I6VMpUiFRSK6qd6cBGpEfuT+KmXhUvSnXP/5cZ9hP3a4QYkGrew==","signatures":[{"sig":"MEUCIFnKMnSv7HSod2C5epKlBo2SxEhbhrzvut0GM2LmYvtUAiEAxWF0hliDQhhRYw5D1TPGAXm9V/t2+kwlHvw0jTrlYww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbhHFCRA9TVsSAnZWagAAT6sP/1xbOIeQkmdiNVFPcIiA\nA+tRDVu+/aIJCmBj8LY0aeCGdhgloS04ZXHl2ysqtp9RoeCmA6W8XTcFPFU/\nRZOQPEgskLc64qyA6WIymg+ArXcEJj6tblZWb3KqilIjTqHmBSGPjxo7iBDG\nbnoJPXmL3r6rfT4woRYD3B8oNGlW11GngNbd7bJgXh+XIPEok1rDuYlPywji\nShA4lBw3vtX8+R5bC8NlqQa494mGZ11/u9RklslZugDJW3xya2WNYJUPbweh\n1AxBwLZrpiBoOfqKd5Ds89qz46uRcZMBcpQmCFbJqIXg/8CLIYhd9kescXk7\nkuVTrkRP/M8WEBXRyr9MxEPDG7jfTDmKiK9jutWtzVGX+HbMm2LyhLri0L4Y\nJdNBH+hnT86hG6pObhGDfU+5fyMt6n9IT2/o3xF0gDDOsygfrn55EN12unzx\nafde5MJQJTJnK9j4yH5DJgMIPAnW7XUB2ieUkfaq3vdgZVHIiVnaIjsBqLzT\n2AsRCtmOr1sLRmtnKPepwAzSV6CL+ecS9+UvWvEO9OqyCmn4MBSNU0CMmIef\nTtewzYktefYNPMUoChPMr+1qKjAXtKl+FO2m/1haAl35tFgP0aK0HncxV8Ze\nc+fRoFlPJjcNU/dmFIliSvZVHA2vcoL995CmYpAP3H5QvGsc5m5YQbUy8Zur\n8NC3\r\n=4NmN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2ced06dc0aac728f58cce508c7393aec959895d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.199aecdfb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.199aecdfb.0_1601049028857_0.17773506972990205","host":"s3://npm-registry-packages"}},"8.0.0-canary.38ef4501f.0":{"name":"@material/auto-init","version":"8.0.0-canary.38ef4501f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.38ef4501f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"adc3f20adaa992070c473e606eaf5ad9e750ac8a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.38ef4501f.0.tgz","fileCount":14,"integrity":"sha512-uERDProhxOu4LisN+cTkHLWECWIgaD+VUSwk5dZc0gGQdndT1QzBZ6Fl0n/znWLUt5K0AI8WX3NeZStv2K/XSQ==","signatures":[{"sig":"MEUCIQDKjE0AY48fFVgZA4sPK/dVKOekR9LHUuPWAKMwxFge1AIgHUG6OS9rrRrQ5oHjEkoKeH8xWMDqTWOSVPl+RST8aL0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdM0jCRA9TVsSAnZWagAA5zwP/R2mUf8mt4oeTsbJBYHx\n0/YaZEHjD9wyml16VpaliD+kUilvqpBwsQ9viZPTcH6wzINnoCOIgL9kQJBh\n8DO2O40ee7/RFzJVyBquRZKz1SgRfCg4VdRPdQK8xT+dO2A7TCBcHY900Wx5\n1lEhR7m8DT/+uacSDFenQHYN67yvruScN+4+g19+g+o9eix6V0BYhep4yexq\n0DLWuED/DVQaul5cmcolfGXcKJ9sJ15orNr1m7Ngng5+3LSFmjeS7rptCLUG\noQvheeFCf8iO45W8PoP7QIWDL0AcT0Y1kndedhzDPd/AsjKfoxSmmI8vrpPU\nMH5Wg1+Pk28f0RjBeZJ9P8J/nEf0CAaf0BmNFTl7mUjCyx+E0cq34MmWg06p\nzOlwngAAz2DwGSTFjpMZsaJ4DQ9EMqfZt7I0PmG5LJy7hxacd7b7irqGPpHZ\n6wXaXtV6Y7JVpEN4efETZVwa2YoxzKs+PzaOAIBUDexWSSRTBoP6Hh+DF2FM\neVmYVEfQvzV670mk5PhYRmqQyhkI1uPH8oHcToM+5PIdCcWeY9zsJKTCcM8x\nI+l1dhir/UHiaUqDwNsSdkxCnivY2rAAWfgM5U4AXu5H52KJaMsuWx3T2OaS\n8HRq/mr7Ih9QHJ7NPPzbUjOmt314d5E2Zru/VUeglXS97VVUw4dA1Jqpd6tc\nw99e\r\n=Au2J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bace3094edebc680b12a257aebfe6170928076ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.38ef4501f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.38ef4501f.0_1601490211167_0.5161850025935237","host":"s3://npm-registry-packages"}},"8.0.0-canary.774dcfc8e.0":{"name":"@material/auto-init","version":"8.0.0-canary.774dcfc8e.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.774dcfc8e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd811a75234bd67e76ac88601be6ee633b56b585","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.774dcfc8e.0.tgz","fileCount":14,"integrity":"sha512-nOzfad95QaWAhsOzo7wLTjbzepqXMoYW8y/FY/Lgao92RDqOmNa/aQwbls1vyN+8x4qJpmqn+rbPfajqlt13+g==","signatures":[{"sig":"MEUCIQDySSqWe27LnPROmCZppw50jsIs3fpyZWhC5JdqEOUO3gIgH2zVm+5Zduht1M6QIxZfXU8K86ZOgqo15kWRmiSq3Og=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdacOCRA9TVsSAnZWagAAEloP/RikoebwVvHoSqewHIGL\nTQYyYRMv/DZWVnHv1PK8j2CNvJJOs9qhGTt/krBflf+UQ7Ks8IFxxLFGOasy\n2uufuILQqYRqpd0TeL8eaLx7nbngRG21NGPLbJPTHX2xG2nx54DcOFmo0Uhk\nRTs6byN8ewBrvTtLZd9BllkFUKlnCl+KzAvubZe29aBwz3iYJD2flTPAZipy\nEmZKJetZz3V84N0fnNeHUXHTIAkrnZKggYMCRiaujwBfMd3ky9yvuyq4qIxX\nyLVwNDrXWRzL09JGIVZbuP4eLG8Y5vlRdfJN8WIPKCVdPFzfUf6hYN+/+jSN\nWFE5sQqMyUEnWN6TbegRE24fOS7hkcA26Jot2AIRbN2FTS8VizhFzoStptSX\n2AjTXZUkE4NextbYRhS4yv5OBxKYNLC8gTtGnIoC8idMHR/i8dcXraO6tV9k\n+1VS5bhwbyc10qoDouv3uaJLjgP4zBAJOpVcrAUhiQJB97ksq4bAcWQxRtNY\n81wLXlRoTjS9Pp4VXkpfUoikv6jBjD6Gc3CiaE8+tzik0sDPr+IwNE8WKEFY\nUcH/k13QehnppEGcf/wAbQTpiiBLdmlfrvQfdNLPqf6h5h2x5OpU92oyQG1r\nZ1iFuwcYaOKvuAFWoVOnyp2Ui9M5DZGBEdiD4b+X+Sf5N6LXV6W9Z8Iwjj9t\n39nC\r\n=ql6C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c37b80b059fbd4c815253f3a3868578afcc1afd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.774dcfc8e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.774dcfc8e.0_1601545998172_0.4637032007125639","host":"s3://npm-registry-packages"}},"8.0.0-canary.0f60323a8.0":{"name":"@material/auto-init","version":"8.0.0-canary.0f60323a8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.0f60323a8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05fc0c6b8cb6b555f46afdee716cf3c09afea58d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.0f60323a8.0.tgz","fileCount":14,"integrity":"sha512-M6ByccjQJzADU0XXPR0ZoPI347RoY/TeiZX/cD1gCtYg3s3WbjWAQyWGCNpZSqNlMhQoCJ11PPfQfahk2nCuxg==","signatures":[{"sig":"MEUCIQCtdrBoiDrTw4GYsnnbGNxTeQt6DTsUt+Ik0AJkGTV+rAIgJj20N6nViZaR4XVzkx0o+AIIoDA3StD3xzlxO5bAhFA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff3/9CRA9TVsSAnZWagAAuRwP/1QtP4B1ty5o9w+xs1NF\n0zlSShvk6YY96H4/XVBlcfyl5elG449ADBUufn+FQRIbs5x13sXqLzIS30d8\n+lkoXh51nSn9HBeKkB0wcCc3XzuAupISInZrR5JMUbI/LQm+nal7XZocSbiV\nnXyL3yHuCMibDzIA8VshsYSGj7L+kU9Jv+Od76YmTtp9Zl570RWqxapw3t4P\ncxYQhgdvuno+H/Hxci2l2uMEwpcYZr74ZM18f6XMewQAbchfhVpPV5SJycOp\nQ/aoK00Pf/c5S88SU1Tvv4X0HYjWmvt5cCKyV20p61zOmtVXTIcI6uZ/Z83O\npQCkD7R/ztv8GMvUkKXd1qfWtSJulPMGhRWk2BmJa4GPiSJtpa5/8oPre/eN\n/v2LGgs0GJW96+GhiLdlazX0WJ9h72gB9C2LLPUl7NNUo6puJ8YmKokQSPYa\n4qsWW1OM3UCtK3KReqoK4Xv4+v5yjD0rXduefKfbN7YWrm5GedvnIx6d0GvD\nBVuI6vdA/VaOtdUEgb6YR4bWA+H3ylyPwf2YbM8Gf4WxKbwV1jzaGc3hO4KT\nrjR4A7E5iJwyen/HyqoyNSJ7egeBXpPvhn3U6yJuD+QJQ9mjnXhvhPQaTamb\nBxDWKRRowV5ldUJJbtYCNc0tHdPXM7AncfQpJ21IQcPk+JqDS7B5tdsH9reX\ncuV2\r\n=B19k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"edfdb55487a31cd5f5130aad32b3fa8f369e6d0b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.0f60323a8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.0f60323a8.0_1602191357124_0.42622625857962815","host":"s3://npm-registry-packages"}},"8.0.0-canary.d71622574.0":{"name":"@material/auto-init","version":"8.0.0-canary.d71622574.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.d71622574.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ece188f69ffdce2eaf0f1f540c9f463881482ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.d71622574.0.tgz","fileCount":14,"integrity":"sha512-YUlJRjz2xGHkgNHyJCmdXVlsCLGv9Isy0IjUPHqNm87Vr9QG9656vP8PFsU3Xq7UoFHVDjMdH8doTK3NnAf0EQ==","signatures":[{"sig":"MEQCIFj7EOsTsHfuR0C60EkrsdNaPrqHpb2kx2LkqDqoddXEAiB9EnxMZRSwsUojsLOPCPthVlMamfSWmm4XwGNLbOrDig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgJA3CRA9TVsSAnZWagAA3RUP/iw2YYg4YEGKmGbCFSa5\nWhwr6X0CWwse+KjNWHANOz5DTNK60Z98Ggb8S5kPmiNwKm2cUMKPvnzw4iAl\nb/rpklSBAfbisnXJIfFlTNyQt+Yzx1ZXvhNz0FiYWeXWq9jNVm2C8BJKFQdT\ni3cE/aDELRdsxM44iywJnSoVyqYZ2OdoOPHakkBFAIubvjXcrYGlsovqjB6w\nf2s4y+iotHmijxFa0AXxMa4Xkk8vpAWgShHC//pY/hDI/LaOwSsfTy3yERZK\npNt2TRkXg8SnkKp/AKYu/Vvie6ePTS62Ky2NxnMl1jwXzkyVQ2NU6BKku0jm\nchh6bH6w7z4orcm2FKipoXN50Oa8Cx8RgV/3YrmSY+C98fNchWAU9w2KMgEs\nIYTtevNFgvBy/GPWcNdmXp4LsCnLqkuc7vmcTUBkU7KZ5FEb5gXapyJ8gNt0\nsFS/9h3MQYh0Ey0dJbvw1T8eXzenWpMaME5fOYMhEMORaKRFt1LkpnVnnPUa\nOOWjYabJ+kU4JTXtvit/1q9QgHTlfLadFsC7diF2BBpgXiSisIJKSmFkNtNP\n+lYCg1gag9NEZ58ccpLwO0FGtZrm86gKmJYPqNqPynOsVYsYcBD86sCrEUjd\ny/e83keAmcqfxvjSOMNnFT7NdiB+o4rOr528G9BWXu9/U2X0wFnyhzD5me5p\nTRMX\r\n=/jPS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"19a45f4824305f22d61cbf9deea0fef067dea3e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.d71622574.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.d71622574.0_1602261046614_0.6689201390194806","host":"s3://npm-registry-packages"}},"8.0.0-canary.7a9afaf4b.0":{"name":"@material/auto-init","version":"8.0.0-canary.7a9afaf4b.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.7a9afaf4b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64a3bb74d3129cd525b0f9b250162c45bf70f813","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.7a9afaf4b.0.tgz","fileCount":14,"integrity":"sha512-+nHKQSbpGnp2Z+sBT15YYygkRO19fnwmV+u56ndJebYz7JBA2EUu9v21EyoaKyc/9Flf6DDNWtUp8djMdsG0oA==","signatures":[{"sig":"MEYCIQD/f+Z/nGMWSnv78epFXUx4ggOvFOy4OzmNTjM/e3N1MwIhAKmQqtdAUNX4e8VUwJG9IFYHf6YTJDwMM3pXO0fbCvLx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgOnOCRA9TVsSAnZWagAA98YP/3DUKHBE2LAln3CZ7bKQ\nh1JaqJIFH9YWrTeQ7WbXDgZwapEU/ZutD9S6xRIbZjte8JIga/3cQN6c+rNq\nripRRaAp+BPUYgclIBEoZoiDMhHXEUcAcOUE6JXnOnxMT/u35ReVmgrMoMm1\ndAzBiNEQaF/2o6gT1A2bopqSJ6mZBnOx0PxupYHGkFHlXWGUw0m0ZJuakZWC\nMn4NIbUR+42gIt1XhVpNa5gfiUNT+7gNPVAsCcF1gb+S/xlcp4PDo/JIee8X\nb8iSYAD/QJoXQpoZWGaMWSGwfmihrmRBtDkH4oR60/tY70wpzTRHw3Uz8VL0\nIsR3/1rrDYZ41tAvFaHl6axr32BKuZ/D6wamFjdCNqMKJeXpt6ayPFMn5thE\nY27IgdEX6SQdNYGmXGOpbSB/N8mGDyBxXCqPsJ8RjCfdzV+RvwgyAXbcCujC\na0rNwD3WQvv3s7aDUgiBCLjfszmiPQLTbmJm2gBMUKyHXgWwmKgnX7AXg0RE\npCxPz4L1sPMGKnajvZ8MJET2WrI2RAJh3Rogx6HjRxY0TCqmZBOyxBvtd0mY\nlZhu905oeuvK8QNtUOoPpwF8CE9aQoGWd98DijhMDnHc+lVGF/ahD9PVpX7X\nGdNMcb5qUdrxbI1eVVAfibiDui+crGf+i2bEeBYYOGYJ6Gm8/6d/FCBkE6P8\ndnBW\r\n=Xw2D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"137d6fb8ed93c50312981c75fb37199ad460dcf2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.7a9afaf4b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.7a9afaf4b.0_1602283981493_0.7772639823532708","host":"s3://npm-registry-packages"}},"8.0.0-canary.8a39352c8.0":{"name":"@material/auto-init","version":"8.0.0-canary.8a39352c8.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.8a39352c8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"22553f8b170ba5674769c345f007c28f7c6ce50a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.8a39352c8.0.tgz","fileCount":14,"integrity":"sha512-kCp+l4KreCEHcJw1Hzbtom9ZMwLSWML44JdyeAScAizz7PaHUZ7KT9j72FGDZDwfqLEUr8jJ6BmeMMP0EJz4+Q==","signatures":[{"sig":"MEUCIQDF3+zrpHFqe++2PjVcw0cS8UZ/vTChO/Chw4EpJ3Wh/AIgWug+NqB5h9pIblYDUxazgJRhQP2fHUMUTaItBt93Mp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhJZCCRA9TVsSAnZWagAAmB4QAJEXZem/+LTcQBkcWd0n\nzBv5DCtsFSmU9NT1DJ23Atib+ZauaWBmp/Q69AVmuq0anOEvzQoBq9izQKdi\nHDLwZOJWcoiJJ35yAVjXVMHR56f0+xN5bXqv/t1a7HwokrxmwTBtvl3Vm71U\ntXtGNuOSFcvo4/UiTZJS449Q1MjbErHp5df1OWxNPkSO7TJ4HbMl7WuSTij1\nFnH8mVzKB0SrudowG2qLOlV/BtIsILHFkZ+euRy+9JvNUvaRs4rzzk+oPa7Z\nG/R6jrbnfn37hzUYrCTOFYH8Tetmq1ECV8sN01NrwLhEOanR/6xvIbUcwpA2\nXoEHwP/M8Vi+E4zbSMl9LbgtoM3B5mod0zHPVC6dIMMmZq1burDNAEaQvPpz\nI09tKEk82oEKjzf8DTnF+9N6eYqcTtNHCVFshuFTOjeyAGr5ljL84t5thHUd\n6saLYYUtJFfW5eS3A9SF+P4DvmHZ9azRql38VWj5CsciYiwKuxzR0RGXEqY0\npfB8csvGzO1Q5PTp8vwTUEKBanPBffxHcc/KhoUj3a6peKeMqM1ZeNqiB0Cv\nxkTBVozIXMjm6GxZ0essJzyRpb3WPOQV/YErz8wfwAcJBLOWIesfbq4H6ch+\n9uL/KByW6UOBys5oMpKQprwCO/O9fRzPG1xpPir6jR22rgBGq/IjGemNW8R7\nb7SN\r\n=IPGO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cedb8cd906516b8d460c813039351e951b960c50","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.8a39352c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.8a39352c8.0_1602524738075_0.16899999782887098","host":"s3://npm-registry-packages"}},"8.0.0-canary.790ca85fd.0":{"name":"@material/auto-init","version":"8.0.0-canary.790ca85fd.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.790ca85fd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a84485f7b3481265263ffe3ad5885c3ff0f76cd6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.790ca85fd.0.tgz","fileCount":14,"integrity":"sha512-3rnBcrIOsRtCHfJuvWmu46zWj6BNpRhWVnfQKth6aLxYFlIjpjtLVJuA9ZVICSNKK1K/cgfmuJeOPJUanAMH0Q==","signatures":[{"sig":"MEUCIQDG59IRwNFaCXEmrhtb86HMnkQQFn9ykHBvbwgTHTw3yAIgHb4qevV9jTsb66zAWkoLV4mWfr6fiiMumYnWlHVsGyw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhNDvCRA9TVsSAnZWagAAPlQQAKPvpeZPe7gLf0fh9M2v\n2c3FKXuThAuP/GIpXUSV3HE7fOTA3sUZ6id1/2Mawa1NWAkSV1LdNlCjue3r\nQhjQymD4EVda4Wi3QoHdH2WHfq4mPDJrBoDAwVZq0thjWvf6uqDB+AXoOVg+\nilHgJz9oUKSofvMiPbUaJ5gpR5R3bVQdYMPVBwDOiJ3e95P3GBzT785rRC3O\njk+8kM5OSUeR8NSmc543UxqC7Cw6s+FhW2wo/jtggz0FYNfIClPHkLd/FVwP\nyxgXVBQkFuNB+kdEzFgH75DcY0j1CK8thO56/dzJQ7TlkHhCEoqSy66FoDro\nRAF6LjLJJogHkpRos/MotR2gUx0GZa+ey5spSOijehc3WgmGBM2/UO1umUcG\nWY+dMS86wLLwsIoary2yn2C5cp/yimeVXcLh+1f4mYTc8stKbuqALiG8V1/l\nsiGscOnMITBlBvwlCiJ0qOi966hXEmLqlzvYxd7xXFo+jByKs4Qog9e9PV9k\nRBNDpRnFHO+GL5J+NlOz4MWz05RZ1NPocjwes5gkNODMkNWtsnuXBPIZP+lI\nIUxrHjUOR1v6xEa3j+fIu6lkcxkFq4uIW3k0w9L2UCQyi75mvXRQkbG9TxRx\nAsq0DT773Qwk1HmBc7oSMBbaLCTvVTyWNjqRzYlTvg/kQprm1uvtIfLYtzSI\nuNVm\r\n=Bz9M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8971e891898c4a8ca082beda756a7b93097f858e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.790ca85fd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.790ca85fd.0_1602539759340_0.3707357295640883","host":"s3://npm-registry-packages"}},"8.0.0-canary.174c0becf.0":{"name":"@material/auto-init","version":"8.0.0-canary.174c0becf.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.174c0becf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3d91b88cd0d449fc4d8af413cbc39d0632ab76e7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.174c0becf.0.tgz","fileCount":14,"integrity":"sha512-Mk6X6nLjsN6l5C+fQB9Bo6qsjJfdark6b+N5sbURDFWiwWLIxOnMp8OYJX+yHw6E1z6YGcbvKvox069EaHbkOQ==","signatures":[{"sig":"MEUCIDdcVseDb0ma8xv4HHfgQEKTNWFmEci01VwkTEE1WHB1AiEA62zxq7YwgjCmEvURa/KxhWjuvvCkBuKwT2YvoTPq2rs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhl8kCRA9TVsSAnZWagAAzwgP+gJIPBxx/CxC5JrJxx7M\nFCGH/TytKyvUcOLIoR267tjfuPgUjoZi5B4d0ieJTDj/G6kfwQlfma+wlJpV\nlDh9fUZ3dZIydYaX22t3NALdq6RutzdV4MEKDQd8tAXlY9XBE4c2jYI5GpBS\n9IVK9vArqadbAFvXaHjSFdyyYhFVzPut/cyrfaZbTCUXZw9gA1EBmaczKrGn\n0Jc3OjxljTMRPkTgCCy02cSa70XbmEUaC/07e5QMe0NEJ4XbN5y1/+Bd03hE\nhrnnMAfWWvko/D1VpZT3pG9ePNXbyMsmNPfkGLp6L4f2UG5DX/43AswpN9Xt\nokBjiaviO1p70ykI1Nw75YpX0lClAJS0BXOR2g480PXmiCjnhIo2YRvgz3j9\nWkMztOTH6JPceiEQHzQN41Vo7BbHxhX0EK2bFejb9vIJuQmdf/vEgldISL45\nBy8D7ZSrts+spXUNJcERO+hO+fHh3RfZK8EJ+1LTaH93HMGQTQe29HMfhGw9\n7PkyyUFGPZjmfe9LGMVMz0WwVjck1DHVfH/KIayzv0/446n7C0BftpN2w1sE\nCmOl8eX7wTKxtreOQ3H6YzwYIYzpFE1p1TNdNf+tQ6uDEBhzX+ccsAw/e5UZ\nFgHteUDZSw8y4hRyiJh8RqBeSUcXtMDBoqwyGebaoyr3SfXl2J4CIL7PYI0k\nGdbF\r\n=P8k1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6dc7561b8695889178b3e884e84f5d9c3d59e100","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.174c0becf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.174c0becf.0_1602641700409_0.7979823392187406","host":"s3://npm-registry-packages"}},"8.0.0-canary.c71ebfa02.0":{"name":"@material/auto-init","version":"8.0.0-canary.c71ebfa02.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c71ebfa02.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f00619a412556f2eebc22a38cfb04e3775bb6681","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c71ebfa02.0.tgz","fileCount":14,"integrity":"sha512-4lM+4wo5L1/H6zc8h8ujaRatAMpbZI/lT4QJrZWlPhqisglLWYxpfBKGyXaNhVu6F35egEf9oLBmP9fj++faFw==","signatures":[{"sig":"MEYCIQDSdmIt5cglG8b7EkFw9daqFZwpmeiCbEgHSqqi6Di5gAIhAJXFlKXD0UzyFoRIdDxnkd7f9dMGsKF9KYY4GPNoxQfG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhnunCRA9TVsSAnZWagAAc8QP/jZbmvLxIkiReldrLxxl\nn/EI8mqE2ikLRh19OSrtt4Vhc14ZTXyq82JQITTBU5ij8E3fxV3uor6QCmsi\nMfj98DQSpOKClO5H/b39BbyEeNKNuaxL/C3t/Z/wJIenXj2Gn203/DFd3IJE\nCRGB8cm3Wx4T6/2UUecsynN6/bLV7+GgckWb8iW0U/QFzl8cNz9HiBoIo2q3\n3ayyluOzeTFQFYghnDA5hGPVU5c60WkEflrrHCmmrGEgDpbqedfSdZuhy0YI\n2Y1nvug+8hA1jNG43gQXCn+XN+YgirFqd6bhNeh3xcvARhWKJR1zP3FrXzMs\nl6v1McpfSGnVsl2TFDrb02JKTalBH3ii/r9QGDmZWdckhfPgqR2oqIdfW984\nhl3M1etCdBT6BGcO92LQL9p8JVO3cfqxWpo6slLCWO/DuW9UziXJih/nEXkF\neL2XPvgs6gTqQfUhG7l6ZZ3rwpCc2P/fYbzuOX1u+rvSQGhjBO9M07Vix8U1\najChl70e4xbZ1mw6HvGlKahjWn5xa3s5/W07po7qLCf+s2sSmG52fvI1yO4x\nb1+c3fq8bk2VEZ+2N4xQwge2XgiJniwm/Z1tPH8VP+IWleF94zdQMEtq5qnd\noyBZO3godjTMuYftlCJ9GkpK9zY0lf+pVl5fBaln7DWlkigCwWcm7wuGzXEr\nXyMa\r\n=zLUx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d1158a184d234471c81501e838b409c54f591268","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c71ebfa02.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c71ebfa02.0_1602648999458_0.7554986554786325","host":"s3://npm-registry-packages"}},"8.0.0-canary.2ab716cbd.0":{"name":"@material/auto-init","version":"8.0.0-canary.2ab716cbd.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.2ab716cbd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ffdcf84b111a5d6757ece5ae29a67b632f7b6601","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.2ab716cbd.0.tgz","fileCount":14,"integrity":"sha512-bm14pq1LNs6ngrSV5P9ImUHK8T6DQ1nIkgUHd5S6skHEFu6BRFCvnXiCA2gDjn7Rfya/wwzEeo3k7nXZCvoVdw==","signatures":[{"sig":"MEQCIAmiVhmn82p6mTRiNhnKI4VyDa3gcWaZu7YNYuA0y5Q9AiB2wPTsJmMeJU5qKzyA8yYO6YkrrVxJxDdob1bv9No5qA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiONTCRA9TVsSAnZWagAAMxUP/ipmUd6lLiyH4ToPW1hk\n9sdZGWwlvzIjmwoYe0OEKd5KLJA2vLFYd/v1zjhEJzF5DFLCNsNx2Zth3fbo\naE7HCL9WgatxdWx0cu9b18m7i8Na5u5HbfArz3ZAbczGf4swLuvo9xsCILuw\nFJGV9leAmeRlUnBAAohL0A3VFsbxvabDyZUSNzk0/blyqHICHhouvX8e50FL\nS/XIQDHpqrntnth9wDrRnLjognWYa6lFxjMvM2ViI3C+FQwAnxSm6DknUI0D\n/+7/99uaBzUAZ9gdBk45nzeMjQRmMWZBwrQ25Rpt7vbjm1l/LUnQsiQVNVLZ\nT7NYQaRvJiCStVjfZ4Sazo+4G/m+WjJk2o2km/DiKKhIoMr3tikOHaMKiqii\nVLhgGLAfjGCkgHQFlfxqrO8QntdmI1dw1AfbAlYLJCZkxc3kRFbjNgn7hcaT\nrCGaM/o4Ntue+/bH36CUOX/VHNGd0H0mpk/qPVetFHllMzsBmejLsNKCSxTK\nfhVVCrF2bis5d94wpCpvvp1gk0OF7hXQ+BgVyyxprYGgvI8+oJqMImo3rM/M\nVd2OTWgDgoquTl2PwErCBbnfSM2BIMlhAjAiH+sKy3B/QzRYTtiT+WmVpcDZ\njYcEMRsyzZTrsaaNX+ApeIeFhQFtcez6QAfYbV01fU6br18yX3mf39nGJzwd\n0fi2\r\n=eWnH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a3f41127e9d90f7e393ee6fa5e01829e52160131","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.2ab716cbd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.2ab716cbd.0_1602806610750_0.7759948738624567","host":"s3://npm-registry-packages"}},"8.0.0-canary.43c1c5e2f.0":{"name":"@material/auto-init","version":"8.0.0-canary.43c1c5e2f.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.43c1c5e2f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cebde69419b6affd3a2dc7b14a64c3c0b5785ef3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.43c1c5e2f.0.tgz","fileCount":14,"integrity":"sha512-iTRP/bndQYiLECtiHGtTFHWa1TfgzfNBTUsEatnTA7MjvnnOlPFYnXAoDHEnuOH4DPnv82eh76o6ngB2qbstlw==","signatures":[{"sig":"MEQCIHRZ/VmfUnsvO+vTG7dqNnu7LbgwhfK+MBUXTVKu7IWFAiBZv4847EEmVMyF/DCkSd4hlxqp0xsbjchwYEg8XY9yGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjZ2XCRA9TVsSAnZWagAArUkP/jXmM4LTRiAeg6popFAh\n8JB8xLWBV/i8HCQg5ouQ0raNLOAsg+rTxv074JEC7hxGPYw3I8DbKIFiZ5x9\nVG9hZEHqMT3WjU/eYMKy3tKqR8cyAlxJXKZL+r6otUt0ueOsuXqE747e7o0D\nFBuQAdTeDY1YgUTtRG0e9eRAoqBFY+h8BCymsVjetw6Q8unxNhquhD1GZt5k\nf4kce3q4USphS/SVHlukGOVt5QoLos+EG0UtnKXiQvWSX4oWVIr4ul51I3va\ncUpAYaiHjdYSafopvu8PYiwHMAjF0xuNRKbDIU0x67RFZv5efIJpy1U99QSV\njToYSFQGG4TEQJAbmiJ6CqRupiCX+apm3tGjE3JD/Y5h1hgeOul1xdW3KycZ\nRbTr8wJ1+8phnFDRzVzp5WZRnXHPBgKuzd0hZOMSW7PHENO19bpay+8vAljL\nlm/+2tIZbTHaa46l2SXmVck28TjZcx5uddNre862JmpzJ390QMHJFgWDYLOY\nxOuSyzVy33QojANdXa3rVIjtegBsObcCUxGtFJ+nutXZAQQdoj9ZZuNBlbdI\nKLeHHg9+obF0cRL4htwcP0NXacoTv6tDr1Resgw6fgt9M8/ggOUWq8eiecWd\ngdqnt2Nv1BZ5962MngFQq6TH8gTR76N8ZRSay8sL9PBjx8/bqB/3WGo9Dm8M\nmmMf\r\n=Syf5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bae89543d5336b4583fd1519cb63078d2a5c39f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.43c1c5e2f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.43c1c5e2f.0_1603116439073_0.4777264543877975","host":"s3://npm-registry-packages"}},"8.0.0-canary.ccc64eea3.0":{"name":"@material/auto-init","version":"8.0.0-canary.ccc64eea3.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.ccc64eea3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6aeef764d757d93640b73b9cf2c6c54fe1189e50","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.ccc64eea3.0.tgz","fileCount":14,"integrity":"sha512-aVmOHSUAWOlHAfSdIVU9zh0G14nd6V3CeWC6HERSl3hrvaiyEU9JDJhM3UT30vxAQhgGLd3BU4U9g5DEMiqfsg==","signatures":[{"sig":"MEYCIQCy28pP6sIAboLXxWcp0mSFbr2vqq8+W+WZhIydFepqWQIhAP2MOYUPrkC0uV7npsaExXrx1gbJCWMuy67zFqcEUIUb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl1LGCRA9TVsSAnZWagAAvFYP/jpEQde1Pd26bXTgWxYV\nWwgYStXdOkJcX1bQI4ae718QnHg3t8YeZGAvZm9voKq6B3w/qf0Bc0zTLg1h\ns7AKfGzfpfbXq8Yg29j4TnIbjvMX6yYjWcW5OB+jVZwkadUx7KYGNxkQu2/S\nzd5PEbLjjdWPhMgx2BBiGdjC9gplKZt+UvicfImlDTj2v6NnIoM6F1wtTIDj\n+AJDoF+BRuce3+gsbDdTOI8ozlxrVxvC7HJStOPg7gO+7LTLpUqTNPLbbjcX\ntMGvECyWppTOAfHTN8WxBbv4q3ukPOO3WiV3aF9zW82YufIe/lBNwRxf0fAo\nYwNJ9psWfgEMWbkQelXdT9i4tVDUiZ9qFK5ENuJvcXW4zdNuDWGg0m+Tcqao\nZtYYd52qi2kK16HxhDayHSUgDxjTnktNCqCljJ4Yfu6RK3NyDhRuwX9Bw9UY\nL6LPOMh3GfgLacHGKTQJjxkOqGzBXL1NDi8bGPPw6GxIa4+hLvuTEKOdEsA1\nky3zbbbotTsCMDN7NMUBmVG8um68/6583vNnA0nHW9VDYOxg6zgcXXIwYp/x\nSfKv6tek5hvPcltXj1DE3LTs4i+o38pVvxP+PkFiJkghAU50uNEJqvUFEaaR\nF9pkd6Oo7KmJ4Pmkem/rwai1icxyWTs3Onuhhvoz4QNQdUtXN6swQRtBz7QI\nF1nA\r\n=iXXU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"26df299f75c86dada6da463cae5df1b0277d5c7f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.ccc64eea3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.ccc64eea3.0_1603752646432_0.8129601689312154","host":"s3://npm-registry-packages"}},"8.0.0-canary.a79cdd019.0":{"name":"@material/auto-init","version":"8.0.0-canary.a79cdd019.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.a79cdd019.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4ce1b5f1873b000742c2ef2c31f433fb561018d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.a79cdd019.0.tgz","fileCount":14,"integrity":"sha512-cIKSvDEV+4H6CMfUQ5eXzI68xobY5MAWiHw8D7qWUrwuXlgKHLazfzbvpF/hoDmYLo1TljfUV9ejkCNCrwiprQ==","signatures":[{"sig":"MEUCIATTx8TK96XGmsD+eE/qjdCNASdnnFQhKiDv73ihWS+iAiEAv7X8ehTTqp0xspvbdJc/ajqmFNFBoGGN7QUXweve2Z0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmEsjCRA9TVsSAnZWagAAPrgQAKTX1TMaxpOSwadclsSP\nBJViydHkUv6fuccGrUumABFo+O9SFVRiH0bC77RpSqYYDDmuNIequY55hg+y\nRc+2gV5c13pDFvwuQx/YJJ+maTRtWny9lWqE15EbZp8od5x4chhupcHfxZYs\nY0wGwTmGNZwp8jwPXIt4YYBrXwz9y9mAnIUHKFINN9CZWNqfcATFlnVzQyoH\nQ2r7fVrLaoNk3tTTVottLA9LVsw84yTAWPuIdDiXGIyA8APm2gmEkoyfN2X5\nj0cwjwoEIDG2U5yNZuEMR2GOsO7W6ICw/UFgE/BrNQK6+uYccAMYI3FePv0k\nSeJzlrER8XYvijihIJxkwzcp5fO71zK2pjTPTvaP6taOpWPe538sEElb7MNf\nnMiyobfsk2Ifk0LjkMAmUoO5/wMF1l2HnCNSRQbgcOCBL4LEEEAkuAQNP8Nx\nJgLszCo9pcrM5Fnd3EJaqTS6PAcsP8I89Q3beRqFVHSEl/XwsW92qMD2Fs7z\nOU9y3g5AXHrs66KEx4EfwwDD89eDBUNkd5jm9T5ud27+808ko26qCkLF07ys\nqBKdrlzr+UucLaUwQuzMLfzbJrq3K1b2KdN15e5xF+S61Y41DTSJIYxmfMGn\n5mrFycS+5UM8T25tUdrRDHBF+cG2nrCHtvbGU1r5/3xqqn59MBIbCOsK/CcV\nTMZn\r\n=uefO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c54ccf71e4018e84948fec32678595d974f80c67","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.a79cdd019.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.a79cdd019.0_1603816226757_0.7682968164079786","host":"s3://npm-registry-packages"}},"8.0.0-canary.596e98424.0":{"name":"@material/auto-init","version":"8.0.0-canary.596e98424.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.596e98424.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"784599ec65242a7ffac4e1db3b525d2d33b6acce","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.596e98424.0.tgz","fileCount":14,"integrity":"sha512-f8NM3EFol0r7ahRUc0KBznZwvbsRi7hIakwUagh5X8FiDfTilp4QkKPg0l44jCc1W3K7mjbOfdDUaPv/nriNHQ==","signatures":[{"sig":"MEUCIQC4ogHDmCLkPJjEASIRnBpwAmZYLD82H+IVq1VQEq8r4gIgBuHitPuP0eiSIfpqR/Cf25bXbGPGQrSdgM7cSqJX050=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmZYjCRA9TVsSAnZWagAAiVAP/R+ru4ziOQBIWNfgobSu\nqbOmrKPQdD25aQ+DYJoimkOPW9Zo4FXCa/3BKBGeNP+K+X1X4WOw9rGwpMC5\nzVfkjJ3ABlwFwqSlNcSlCg577rlAixTGWfbwwEUTWx1S2vgysjTfxTEg4msq\n749fImw9bllmWI47hx9zQs8wXkJU8PIC+Gj1sur5vV6fI2yEZCSRuZ+T3SWb\nu94w2jqN8zJ0gzjdF0y6ON9+Tzn0WWArdyvW9dh2/IRlE170zx2IBP8Efvx6\nGnPqoB27aYXmw3Xv14j7cIU/+kXP0jMh9TzEly5rcTEpVTGGaRckB/1ytaZP\n75N7IEW5aBhFjYQe1vjwrChXh4z8gqjeRa0XfH4HEHyfasmp8WVMYRsCzbZ6\nfjcoHa+P2R8rNKCc/+Mzq8KpzHZrlDWXmKizRxKWMm7ZP6Npv11PaOJi65hY\nVgrY0LmFuHCdGekbSzrttRA4M9d1rkOs6emW/YEaOqxElnCTEFpplVqbg4zh\n6sE+yu19kChRbICgAmqwELtnpoSbOhsk36kLhHpVwNOhAREccSHpEZhX1q5n\nQ2rgBHhuKHM6b0FJMvZBJSUpUggbdU8Y0wqUbneGuaCNjQBOFUAYk6J09HUX\nKq1zjlBYEuRH13dpcdBYcOKp/8pCjkBgtL5DIu2bTidHNNxKIKHRLwb6NKSo\nl7a6\r\n=Db3h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8fdc1f444b4540a876847c7c3fb4a934e75fee2c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.596e98424.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.596e98424.0_1603900962967_0.023065535365025314","host":"s3://npm-registry-packages"}},"8.0.0-canary.05d5facc2.0":{"name":"@material/auto-init","version":"8.0.0-canary.05d5facc2.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.05d5facc2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"df5e3715c8d2fe7187a8228ebbd2780fa2d8bd4b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.05d5facc2.0.tgz","fileCount":14,"integrity":"sha512-sAmSBIYiXCM15O2pev6wAsctDaLUj6IzA0wqAYeyGaMOp4xhok7250oefppEZtu5sD+FI7lH2E4vHUMHrscMjA==","signatures":[{"sig":"MEUCIC6ZxXx18Cb5d2bBa0z+mF8WEzr/+NjFfYgwyCjswTr0AiEA2jUpyioOSgH5uCym4TPTk9oz3jUPwJQM7ctbVilf6gk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmZggCRA9TVsSAnZWagAA+MAP/jSJDAIGJiV94ga6xRK4\nMJ8gdPmviFPjrqVifaKXW4yG7Uxze5tZc3m8I7sw8XAFQfTW1JgZrRWoopCH\nbGg6pu51WY8WJlkhnEN8HjP/0tzLcLpeZnc3ZmSOW0k0AHn3cZSY755+NHYD\nmvg8mnn9xrEIH+SNdEwxJec/dA8Rcbzn4Mue6/WmGLsfge787eDxTDMKQMYm\nufygrrrjRTViWMThV9jCENvumtCt2VrIwZt1raMD1FbqUkO5goCOqezcoouk\nERISSmr1wG5L12CoZ7dJV7btRaB6t0dKlbV7acL7x/VJpokZQuiv2t0akZVE\nhorA13iup1337mSKC4OtbijYuPCQKcQNwd97hMvy/MU8Cq2E5s7WNHCi+fF6\np6WI/+SNUjWBLw/zY25T3bIfOD8EandjxKeZVAmFbpxW5UMFxt5CqPhEZwc8\npj23KqleRPIMG37pMsg746S3tRCbMbqq6XogbMN8958WAA2XtriueEwFhm/B\nS2BQ7mNFh8RUDFr+axMlYyP4t2KfcTxTe68WsO/4jLMT8/JutzFrexEVuMTX\nwCeV6dnEc1E1y10t2y+paMi+f+mSeO6U9Of9p4T5sADPQGvlz6+5l6UUtsny\nlLCYfCeWKFE/YV4q+cDFTMezN26dGAL8m+z9HnFM1+DRECy5JeCUBubHFZu8\nKrdd\r\n=jyvF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"db17092b19dabd6628edec5bf226f0b6a48e4f95","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.05d5facc2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.05d5facc2.0_1603901472136_0.008340172989351746","host":"s3://npm-registry-packages"}},"8.0.0-canary.291b3553d.0":{"name":"@material/auto-init","version":"8.0.0-canary.291b3553d.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.291b3553d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e9aa49a973b911d747cb316eb6cb56a9358172e6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.291b3553d.0.tgz","fileCount":14,"integrity":"sha512-7rcDUfBeEPJAh/yK3PGdS4x5Ovoh6CD8iX9vPirlFndY4Ck1yWHbOlHak8BvsItGHISJFh5P5dVxsma8W7Lw+g==","signatures":[{"sig":"MEUCIFkE4KJe0a4Z8oNYaDhm54U1w+q5FlF7rtxtMvSzRZD+AiEAr+oon9mivza2LvJU47kqAfR4y7MA77dRYqYrZrYyVvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfma3oCRA9TVsSAnZWagAAc8YP/1edoYltZKe9VAGKu9ru\npyinjBbP+HxRemKyJNtzHOiqO7QSqlqTXhYkF4hObyYqYfzxF1VwRTHw/aFY\n3RCr8FSa+PCrDcwepoW2/AUHBT32tqRo2LpKcXkitihzFXAyWYf+4lCOJSMI\nA87r19ktgcobTcR6MfMnXn06TG2gDMZdKY8+ShMztzpno4iNJKAChvA70zEX\nK6Pq1TL0fqoAh0cZZ51bCH0OkjJT7FoWLd8azItaz0mAxMeQrvcRY2y11qzh\naXN/zhmHUewbbmq2YDte26IwDUmdTgBae2moCGeO4LvuHcqSdGsUCPzHROaJ\n8iFBoFMwCG8dBfbbkZ5PyM+Y8yiPTvbMwk2PiNEe5T1rMPdg/cScj00AHJHt\nZNh6KB/6KsQxYclLyWtWgOWiHXi75DI0FBDXIn4jjtALz2KD0QDwAMwJXpGC\nOd2NVCf5rPJ1+wjMAMIpXFglKDY/gzdZg5kE1VHPRi+bPeB7EEuKOPGIhFEH\nb6WEMMrB8DN5VxPSbehwI/94M5O1rvG9/InNAaw8cG4L+Nxl/h6d0NZXNZGe\nOvHXtxAJIas+ld5PcXvxiHesqPxMEzuWG2u2DKZRIeNMx1JXAN/dN4GLVXhW\nAkr0mDmYAeXKOclP0ugOOFEETmamE3Zy2Did3u4Ye9w9qiRnLNmPCiDkOpI0\nDCn4\r\n=izz+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bbd141e6c5168a84cdf50ef1302c9f705f0eb283","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.291b3553d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.291b3553d.0_1603907047977_0.05915050044246395","host":"s3://npm-registry-packages"}},"8.0.0-canary.dbc449b09.0":{"name":"@material/auto-init","version":"8.0.0-canary.dbc449b09.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.dbc449b09.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d2b76e6132dcb81e51fd235d821da3c782c34fdf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.dbc449b09.0.tgz","fileCount":14,"integrity":"sha512-PeDgtnyXI8UyMkKw/xwVnQstlD9/nyzsmEcMGTpUDvNhK1zHLH89spPYYUKlp7YNrafEOJsC56xE34DLOYZyHA==","signatures":[{"sig":"MEYCIQC9mUD0Ife17RhaQHMlE+M2UzAAIpTpo5+5ijiikZVF5wIhALymqBZl9qT6RLMJStLaSJZLT2Lvs3AGNz45C6n/ryGp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmbRnCRA9TVsSAnZWagAAD10P/1PwW3xhQLlX7cyKtecN\nwi7wlXg9JkH1RsfFK8nh0W4oaDOaGoN1IYmYLM7kN9pVAvmD7jpLYPFmbilC\nc9NsElv76Yayb3aMw35zSHZpGlZlkkN/WxAgoFEU4yXdiLID32ntFFjmwTO/\nuUAyEvon2TiGEGWNL3iAOLZhNHNjdpAPS6fpBEt2I5G8uG9vhIFT0kkelHw8\nTO3tc2aXnfkCV6JahYa5nR4/RN6j2uRRfW3TL5sG8g3n4iibx+e/QGz6Wurj\n/bzy+YAmwuSeeRZPeqAiQIQtGtK3oAc3DyY1WSjn15s+ssKVRIpx3KgIxLBc\ndYxs0Z9AtkkYvpdzYenHFDd6fdULdziU7YQeV3NaHPXMVBnQ+FkkmMVrJyXM\nr7rxXydE6g9BrgsP2c7Z0S66WQxEiz39gmUuyX5OsZLgDryoDyu/a7GzsQ4n\ncdPIFsXnbUTnvXP9u3n9JVES1rDpuDqnDjNUY6GQJ1r9flZGHF78r3hQaoqv\nPdLKRzqP5LgIaG/9+GLRdXvzdbJvHxeuCBvSwLkyOm8KmJl7v9Bb2KngpgJH\ndaa2NUISk6C5ywQDdoliNOL4gBXO3+KncjRwmfpLzz2AI+UGuRcjBNxCXsA0\nuQ7a43ZyJJWmFcg/UgrE+YY8xxv81sOWBaQD6uwapsClpiXF8YE/9cMFr9dU\nyo2F\r\n=7H26\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7888f3b13baccffea8b2b02ef5c25e264ae321e4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.dbc449b09.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.dbc449b09.0_1603908710806_0.5775516044675251","host":"s3://npm-registry-packages"}},"8.0.0-canary.4794b25da.0":{"name":"@material/auto-init","version":"8.0.0-canary.4794b25da.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.4794b25da.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5821e4d2ca8ca4ba5f47df7e1a18a76631a19f73","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.4794b25da.0.tgz","fileCount":14,"integrity":"sha512-efFp+/Q10BuIDZWWw7W5ECaA9WqFPyO6OKKKJJ4xtUbRP5ufeF61x1CeYMvY8vFrx7hM86mZS6E0knisEalChw==","signatures":[{"sig":"MEUCIQDJFZ454mtoGI8UDf0I5waQLKUaS4Drc1MlNQHeCsg3NQIgSfptwejaBJm3tE3LJh60EkKeVjmD+F6J3fbNunFK2nQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmbscCRA9TVsSAnZWagAAjaEQAIh4LKXK6q4ZYhF9sybD\nyzNo29lIrRTS8bwe/jh7I8gKhiXxrkJLNZAqdruDJo2UY5cml1YCiudjjzLI\ncJjsCHa9cRy8iPgosuELDWP5Y8ejpxTzwSoJPqRHUbtlVJYaqndfSLPNO2RO\nHHa63oxr/STNQGUOJyZ+IuSCV9ZFl5kVJhO6zzrKLYow+OphEaqf8rS02auu\nEXmtussu9xhmYE72AfVfzCJOop/jTcJXNa9PHW0AM+UR5YfH/5z4ZKTArUfr\n0WPbFCpqQJmFziohGC4mxa6HQ4cRYxXxBe8dnWaKNQR2DF0AIwbe8dRTdN15\nHVnkkxYGWGcnvVyFRz+n6OVfWhv0h9yTkZ6hHCPNzDAhj7oEbqEDXztNuiPK\ndv4mfh8kR1M5IvIw1PU5p3CMoAYfRuBMNWyWsOXQsKV9qVGw/TT5dwFoUvWo\n/JDtYgR15v5LN0MUAXM2VZLFJ6ytPIev6a+LNg/K3tlqJAG4cPmMb3+ashDW\nQOVJjYCMOxCeg8/xRh6zrRf9Nh26oZuCpqWRx/akqkdSZGmtMa3O5RhFJ0Su\nRJ1+M5eVlp/zZHYLnwNglccWo1Yg3B5WL1FWG6uCdc+DmTti4C05QrYMUpI/\nDaqpZA9H+PbozPC4fGtyqAmM3I6JSd8IzoDcfm5b9vLvylLEmzcbzi+xm7nl\nAntP\r\n=lYIL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0c2eec6be7b76adae9376847043bcde093f59d3d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.4794b25da.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.4794b25da.0_1603910428222_0.12490608048409269","host":"s3://npm-registry-packages"}},"8.0.0-canary.c61db90a5.0":{"name":"@material/auto-init","version":"8.0.0-canary.c61db90a5.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.c61db90a5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0f27562068d6c4297360ab55d225e696cd85df79","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.c61db90a5.0.tgz","fileCount":14,"integrity":"sha512-UtDeh8iLmHrfhdDufXzO9O87wvwIoMTIhN1AnBOD+5aUdxi88F41eMWizxwNZaeiQK45pJUFpQCIjnb60sEvyQ==","signatures":[{"sig":"MEUCIQCVdxS3pce9S6aEDpWNvdPW8lTIjiJbdhaf7Jmy1Xa9IwIgGeK4ccPmzGg8emwgmN/pAQTos99zQhV1Y/JdCdM4BHM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmb9qCRA9TVsSAnZWagAAqjMP/25H+XYIiXssSGPVj0mt\nSrwbTBlyQqaQHW/Nkx8xBETEvgxIiW1LtvqykZlQP0Ce5VXeiRb5t/EwFJV3\nDBY+DCFDYl63Mx2b9t7o8VF8Ubt5zRV155ffL8qyWkl2Sb26vGqr2BXx7bU9\nqnMOF+CAZqy0bhgfcQzB1s/lOo7RtO9hFUobt3Lgrvszjt3oj7hLLX/NNMXQ\nbOT34B72sZZUkALAWWoUM2QQYp1BqvikM7arl0LjUGuUsvGoCRBTPaMyEWCq\n/sjQNtEUuipxyltErr1nStbvGmDn2DsVNnenvTmYAXEVDxFoKpDmDBT1mcvc\n4bsFWQy0ChowienfkowrFjJGH0cyMd9/i5E1egIWXqC5DO2niJLmCHQQSPWh\nOYd+m4MAn4isDz3CMHcdgkvax8RvgFdffZO6Jf52jMD9IGsd6xeYhVdZ3LDt\n19zr2ZEd+XhHs+B/+TqBSaQxhyp2QN87pomyFiiPYJBehhRua5AJgk/57TyF\n147FeeXw//3rhXEUfDv9MVuciSIxHpM1Kd/RSL0RrqI3wmeAJXq5/b9OHQu3\nqvggZAELMZ+T3vNuLRFHsTOQR4EbogHgAnaZP8gmheRx/DQ5UXuQ1OzWLSVa\nzVyvibozLMiSsph3F5GniCLpjAZ+fZx4HWc5bEYNFWJxmUaBN5klTTQTvWPr\n30bK\r\n=Iq/+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"695570eb7478c283510b9174ac7c4911866e0868","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.c61db90a5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.c61db90a5.0_1603911529911_0.16509672164549927","host":"s3://npm-registry-packages"}},"8.0.0-canary.6d9648ab2.0":{"name":"@material/auto-init","version":"8.0.0-canary.6d9648ab2.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.6d9648ab2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3514b92654f4e9fdbf15413de4b1413b73d6450f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.6d9648ab2.0.tgz","fileCount":14,"integrity":"sha512-A5HJbIZ93IpK072u2ZHiRZHGU/BwrUSPGlmvYEgQD2Kge6xiDa5jQ8ufkhp6KaTeVOF17GT84Yqw5YZ5OwmdKw==","signatures":[{"sig":"MEUCIEgBBFR05cIhCiXPN6tqOWhakHGAHGxdcD8Rb2sA0iZZAiEA67EpujPfNsq9Pi7KU7yHt+CKDs4ZNyTvuT5sYGYI5uw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmyasCRA9TVsSAnZWagAAmE4P/2yKlcXLQovTIfEtMCLV\n3AmO7kia1mf2MPZnV26rBG1uBy852psBM8kO1yrOErLZPtHMuW6jSjcVOpo4\ngdJc0G/D6Hb5lxzCbEJSNazMLLMBJ8nR9cKgaWPlkze/5HXS3vQP3QyThgst\n8gHp3joXHoWK89XjVe8OPA4rnfO4Ke6O1Vm/9OGtsxQFon1Wsa+xAGXtm3ub\nbXIuVg3aKjJXMaEo/QwZ3DmL1++Qy60Qh+TfTMKG/NMLvWoQAM2/6QfCiDxw\nZRA3+1vHHQObf25Cw5NNkXW9XJQUT4rgcQShgpsmq/mb+9O1AyE1s+EEr19f\n8SjNY5u8aIX6tqDz/deJFujURRTpTrQkq+HQE3WX6eYHa7vWky7tz46GjGuT\nM0+4//KvvdqA0FCsJ35tdAhk/uUcI0LvxxNilTfeb5NseUEAGRd0Gskttqpm\ngk7IlNigQSg5e30yEP0u6fvwmYx2WPr++ig0+u44W6TC/UZuEfKo/SkewYxp\nEoHvmMhk7PhQkOmMVWvLO8LuNwRxaRaXKsEQbuwOVorwjLEoWbdr2XZci0tx\nJY5QvOZ9f27Sd6P/WHOP4Ayl2A+ukg23vQ27zJMnt2ezpGJlrXaVsUvg/A6a\nmhpP81IdsgrBcB1odXyVFkdT0YXPEQC7CDJocAllRulQD9awAVJR+LJaNiSG\nCrge\r\n=XK2p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5de6a39d4b70a98beb71cf8243a219f454b11aa3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.6d9648ab2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.6d9648ab2.0_1604003499565_0.6929614099044539","host":"s3://npm-registry-packages"}},"8.0.0-canary.5511c5254.0":{"name":"@material/auto-init","version":"8.0.0-canary.5511c5254.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.5511c5254.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5ec0752cdf9894df1c59c7abd4c339974a434dd7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.5511c5254.0.tgz","fileCount":14,"integrity":"sha512-1xd4pgVD7cGOL2OX2NZQwNYhkdcfQv1vfk2/c7mbIH+ORasstPLqLhpN2v6MAm5+biPqKgQm2lGZGQ+d9XDEGA==","signatures":[{"sig":"MEYCIQCn0m34SFRLBpYD6TPFH7yRQ3t5LbAjq+34h4Yc3+3fDgIhAN1hQfJ/08MX7u6CPdqd/9uvRzueomygbcA1wTHBrqaN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnFR+CRA9TVsSAnZWagAAM0QP/i5zSQ4aE/4D6g/TtH0V\nUj/ctE7v3DD1tV1TXejcMlynT6vZhdFvbclEdPkX4BUxqbPy7pnzy78IN7KO\n2bYHrpHdsOZi1C0vMtVQTx2LtuiAHxeOfWwf+vdNOi26bHVOsh+U/FqAEeem\nP/bQClbzgcxaQEDSWi93xUxSaYx7jzbUvIlEfNwoYRGmGT4tf4Hb4WZQ9ueT\ncxpb7eJSGFZvbGlsdkVfniTy+RJ76DI4uAyegcuDjL4eBujyeT/SbugcN92n\nE4c2Sct1vyV78bYjc4pNZiw19JTy51DmOdAbQaEGOjMqVv1Fayp2avKNunko\nrYzuaCFqBXVWfIpnkklxMxldZmDkLP79f23kBzXnXvXyDCafYeHJh3ORq3c7\nXxo4+KJzycMlHzWzVnc7KXWIJdXnKFg+uhp9C5DNcrReOSMzGY1TgLH4RmMc\nmqtUrjd+R1QpRsN0mpvioVYGubbveXovYNYRFpWOcGZCUZVY4tVDiUViNGIt\ndNS7c6UB9OHPYpr3IpBVZhAgziPRdpcIS/W8G654C0Tjyp31j1nxHqa1ZaFT\n3niUOAIHj9mUc53BlM476OHyagYlQC1Y5n3iTN9zo+AuAWctY1m7CbZrq8LV\nva2E3+1I6IHdbyDI9L2FwqzFiCJ9n8KqU8qHz3uPBLJLfIIyQImXuIxNIq9f\n5lq/\r\n=UcTj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e847a627e044cecc475be1f0140e17a4e2a68dbc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.5511c5254.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.5511c5254.0_1604080766071_0.29935718336772554","host":"s3://npm-registry-packages"}},"8.0.0-canary.bd6e302a4.0":{"name":"@material/auto-init","version":"8.0.0-canary.bd6e302a4.0","license":"MIT","_id":"@material/auto-init@8.0.0-canary.bd6e302a4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04134c7a6bf6bf2b3b7bc88210ad75c9a112d58a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0-canary.bd6e302a4.0.tgz","fileCount":14,"integrity":"sha512-ors6ajqYr5ZkpuYoUDi0I9nO+49cw6rheulf5jKaOqPR7OgS/OJ7lalS9uj7iZ9c7JuECKUB5rYb6jmF5l7cCg==","signatures":[{"sig":"MEYCIQDyqKd7y3nfGDAih7q+8efQbsP5GB7C/nslXHi0/z8j6gIhAJoseCvq7veCDc0MSte9r7QUDPfj8RzgR9i2MRulOJ36","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoDwACRA9TVsSAnZWagAAkkIQAJT2acd+st1LvwenRnsy\n4B5NTF8lKeJTa9SiLZX3XikukDeQkqRcQrVXvQkjiydy3glvEkhEzsZhv66m\n41CXNeQL8pBZeJ1s0GNh/X1/MEcnmFjkc+65Uvwb1s8gGMeGXZV0wG0miNAh\nkHyo9AFe0A3jjhP07XAD9moihBPNugU3fA81Xt5MlFdHjAtHYbAlTe6ONa16\nq/IyhzTmQcXDx37fLsbolvPRU7BGpjXiuVbMXRh0+LJCW9k5CL3zR/CxHvyV\n/ouCEh+0cRXfmwSGOeCONUgOicBFAVSq8zbtSdcdFQsl8yTcsYFSYfNtJV6s\nb/tSCK0S2VvDlI6OvzQXuZcY5Wip620cP1yH2jSYNrr5TjqxgyB3je7fkWnH\nql+zJYGh8yQkD8BXP5wZIM1zDIHLf1kr1ecNs9m7QES1+H0a4Vy7Wv2CjGZi\nfQKSQldb08mVqDItBj2e72/76GVQwrwuzPmTm/NFZ8cZfvMEPEaTHRF2QiDq\naPJvKf/gbNTTEgJHgytux4idv0WYK32HYJ53L15SVepI05cbp6CXs3fARLvC\nyuAP7PnkCEBN1F56cu7lnRuklOUriPGfHP8k0gfdp+GsW75Q9OE7TRhZSzHe\nywWKsD9+UFSp3u5fvF+UDGZSVb+4RvphkAdSbwtnMmpkZGw+Ohl1k6BfNKQo\n2E/B\r\n=la5C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b48f791b92804fe77eeba96f057b1baa89c48e3f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"8.0.0-canary.bd6e302a4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0-canary.bd6e302a4.0_1604336639710_0.7198237979316429","host":"s3://npm-registry-packages"}},"9.0.0-canary.d6b5cd418.0":{"name":"@material/auto-init","version":"9.0.0-canary.d6b5cd418.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.d6b5cd418.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7b166bd1a8e884a7258b478c2a692f3b6f2636d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.d6b5cd418.0.tgz","fileCount":14,"integrity":"sha512-vdpUUgn+OoOp9yZ9m/iF3hckTJXSADOVBHhR6anBfoMytu1fVbdj7XCfsCNjzja9/TUJiS/GHL029ZzI4M8FIQ==","signatures":[{"sig":"MEYCIQCA1yl7Cp6HozfunYm6B5f2E2yq3OQYNRs1t3FvnnmvJQIhAK1Q0NxiFboZb1VZWEUw7HUbXDlUcAwXbCkbnSbu5mlo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoI8FCRA9TVsSAnZWagAAg4oP/Rw70UjOVD4r/yRBfyLy\ndFIweOioFgQvvVdDQ4zfMRktcLDPNdceR/N5fvWshE1kJqkEEBWZYsEmgnrv\nWe4VDblYPIJn0wz4Vqn1g6VjiBprlkFDXTbXuC06ojGLh9wsT3LwL3WIC53l\nIKSbNmNHFoUhb6H6TBqxxrn6ZNuCoUk0LcOe9fcHSTO8Sd9yRUVFPmlN0OWA\nZKTDTY+ssbd05wbJedp51i+P2Bsq31hh9oPK5XGFmjs6O/K+QZA7ustk+eA7\nzKadQ0k34qulpT1UjPI7NiBImvKpDr90Na7z1FhZK7Gu33OwyHUeUk2Z51W/\n2a8MgW2zKdZ5jBwi6lcqD6rjBRiSRzRNz8Vco4EI1OYJ3GARHS0N0ve9agMP\nDDsP3pzmPvYDs90jpMDdA2Keo2hji8CjyiR6y5Rz8ufv5oqTc/BkVlBpQtC7\nsych4cZtAqpqxGE8dNJgXokqvw3wMxF2iQaGN5VVO18xDQ07gafTxU2oFiqp\nWNbD4sry2hu4cAehFqbH8p+zKJeKQYuSHAQ5EFXMzKjFHk4DbwMLvCzYc9rL\n08i92EeoHBfgrF8a2t0IZaZgiLRbNcMNcXYWLpdTkc2tRwtttMHq0kT3I8zc\nscQQKHam7+SVuHI/+lFl+htx3hNTbs0TshPggVs3Kdd/FW5t5AB3yAfh5Nl4\noRuM\r\n=Bm8/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4fd5e4f9dda92417995fcc822b1d02016642b511","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.d6b5cd418.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.d6b5cd418.0_1604357892894_0.5187596959242782","host":"s3://npm-registry-packages"}},"8.0.0":{"name":"@material/auto-init","version":"8.0.0","license":"MIT","_id":"@material/auto-init@8.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7b5114ecc898df1e52cd1a68aca5bb0e0f0095a4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-8.0.0.tgz","fileCount":13,"integrity":"sha512-HVs1ghR0HY8bQjziF/+n7Q1pFgK+IQbo3I5/xWpSPdBMnrw1ZaJohA8ylukfxLV+M+L/45l1ouOVmbJ60/N2EQ==","signatures":[{"sig":"MEYCIQCzbst70ouiqA7SYqDF+NsRDEZMxp49pxucm0OQt8ixmQIhAKE9zo3rFZA0nJubI58hKAMnkS0Pg3/pChTMwiZH9jKP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoI8aCRA9TVsSAnZWagAA6+QP/2aDotk5FVISyNDYhKKv\noE9+kZ59fqqE02WvubUrfo9pNdN4cjWh9vutLx8IajigoG4w2VeX1Wl+11r/\nbpd5r4Us59tYPCqXHjEk5uRqnGExA+5xr+bIl1UzbIfs0MCDC7pIDBYw0f5d\nbOP6A+ugXpck/q57Z908IpwKNiMtlHPHZqnELKWpO8X3lEXy0zR8xhXivx13\nitP/MMpbyK8+O0QJUTYBNN9KlaTFqsXfb5m5FYjm53UFkR2aJqB5UUOL4k5x\n8GfqL1JZ5rLgXph/AzqrrEKUjDCxsT39sPKDixgmSTzD0jqzG1JgWaf0u7Hm\n4z1KWW+jQRXenxVQhyv1yUhVns45U8HhqkFFh9M1qRIA0meq8y51VrPwaIBF\nLR1lz7PRuTHzf8IwH4jh8/W0eNjMzdlzB0m796DirQcEcPb8zqfVGbzSJ4tS\nEkNSayo2VRcdyHG+IStAe69DncT6RGixSL1ZKBXzL8dI1XxgFa7LpoI1ZAxI\nOxg7pZo21n/D7v6hbCuB7RxtNzjB2yvJd4MVbs0JPH5nNR87XTlEbw5b8Q0L\nc4MBtFFGA8O8R/t9MDyKufYPjSQjRoTRBBd+F3i5AdIyyPn8kbf790yRZNrK\nR733+guyqupLq9hnovQAoRob0324ao3Osxj1HQUgKHYbU8njO0G+ukx8Qnit\n2OwV\r\n=6gdc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"d6b5cd4181d0bf11b598b5ca142343fbc87976b9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"^8.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_8.0.0_1604357913774_0.27393561802223787","host":"s3://npm-registry-packages"}},"9.0.0-canary.fdf9a2634.0":{"name":"@material/auto-init","version":"9.0.0-canary.fdf9a2634.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.fdf9a2634.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"23472e9084355e6982e12c16a512e89d28e4863a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.fdf9a2634.0.tgz","fileCount":14,"integrity":"sha512-dfYJbBJrIlBhJYpM1V5ZEsBo3ZHgZuC1+sZkct2xFowQbqoJ9JiMfoEEXbgJTNCwEfocHePEC5fIFqCMK1hTXA==","signatures":[{"sig":"MEYCIQDv2rYOkuFTqjcAq3gQW7VbikkdYbIRaG2z4muQJldE1wIhANAzbZudXm5n+GmDrtjpXoXl1e07JUSiZqlxStomhr4p","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoeXACRA9TVsSAnZWagAAE7gP/0N5M4dLyrjMZFKMQdsC\nleUPWk/yNJZbCsy9yZhQ/rb2s1u6KqK1oNEC9MyivnApNfHdXzy/MxDLENOd\nvJzWmEQtNwaqgMGAWHkIzIGdHwv59INkRVUpB7z20X7Ummax/npkmA44B+cp\nUnPaoixw+Q21F3M4mvZ/jA0QoGINI+acNN7fYB1D0hfuG1QJ96jXuXbtIF9l\nqSc8GXkWqOV1RLv1VDvXHL8EzRvWG7QHS/t9jUK9Yn2rMl/Us85+/C1IXTm/\nA8DR9/E5Du51vqetyXwzmMOUCeYpukncNvIW9NKSt3++uP2pywh3d8JhSUZ+\nE5/l4OWsrlnPgtvTJVQnt+OObW/DduERzq5SGY9TxfKDMU10ZgBYVEB75Iq9\nOVtqyLB9LovPhYKS4xad63hqBepJK2mx0tDsQeKcCw3CCqWCPJRpNClGxzKu\ntCiCVzkruYcPq3Nhw5c5fpo6M+lohq9mYkgHes2cxmQXV9oWZCYRErzOpv3H\nDY/kc/PwR1gIXXGyivhuhKhmemGiuumAdXKIgavWrx7glVKTWTPA463CD5pG\nwvbnDu/BJFm7TnFOAC3rUQNbY7onyzuua7rrMLeVa0BNomYsL9stGoyHv69T\nIpNpNp5vxGQqDqp+tXtXsRobWKkYPyItfCQRr5wwmHEQlqier+o3g7tUUE/J\np+w6\r\n=7vhI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7d38b3b1a677a24d709697b68fb697f1367fb5d0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.fdf9a2634.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.fdf9a2634.0_1604445631626_0.6702844077385428","host":"s3://npm-registry-packages"}},"9.0.0-canary.4a86f30a0.0":{"name":"@material/auto-init","version":"9.0.0-canary.4a86f30a0.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.4a86f30a0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6ac2a1f93982c8cd7dd4d447d7de4924d3e1155e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.4a86f30a0.0.tgz","fileCount":14,"integrity":"sha512-qVk7+RH4lKnTUUQPaK9DonuojnUjs9be/EnPpRTdkyF6tucaOKvUqZJR8oSNz1sGS1VVQfpm6eVlM98hMCAVQA==","signatures":[{"sig":"MEUCIEfpZGBxLnBwY+bfIRh+MD41F3kF/Aug9t4nBKHACAzzAiEAtpuD17PJIE9dUSeTCMdbWYlwydjxhFmFW32Kl6XeeZ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoedICRA9TVsSAnZWagAAnsIP/3C1UtVdFRBu8KN08J3v\nb8psYZdhwR9AoufVgTNubjbSBrUjC8R719SYFi6rjiJdh4uVD5QLeqO5Vchi\nOEya5UML3gZcEyBQbzKKJiRlcNIwjaVFO29j6zhkrl3HjTGSAvEc0tVKQPis\nfjgrAsXNTCOGyeEL50KyMmel34oXR+V2SZWAyooheQyWh4tsviilA3hzWwL/\naLDpuSj0XR/WyUw+z4tH7qCrfnZrTyDienTjItv2pm1CqpuMPizcYTV44uap\nqJXBYI0zeMOC577A7Lt1m4tiIpnHi6g/FMuBpCjUu6BZybxDzM4Fox/StVC0\nl92jKm/rl7m8xQheUhn7Iis8FF+mFBPSbqxgFJL66VNNHICf0SlJ4FFJ7ZSV\n3dJXqk/+GMiz78Ebua2gbIBwyubTFARE0itkiNs/7uLTS8Ucns48LI1WHeEx\n8YEnqtMqniTmMeZOVtJmX6lyO5q6zURYXF6bj9EO5A2ROA4ADsgVQ1oTaQ/0\nVLGIsqqqQEtX/pDzBvK9wOjPCPcS7WRGAxLyHXP27MNx27zZZR+2uwBCTGNu\nX9aWiSlgphEj42St0pG4A1rT1Kmz1jiJVHV1wE7ScvxFUhMlT7A33Q0d6QKu\nzRv08tiR14aqwey9C9oJcf24HjglAyfslGWBFvFNVvZ9IKnrWs0jcE2sfcua\np9qx\r\n=Ap//\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ae1cc15cda11f90ef629a1f536e69a9648db906a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.4a86f30a0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.4a86f30a0.0_1604446024389_0.8094367968687544","host":"s3://npm-registry-packages"}},"9.0.0-canary.fc8b045f1.0":{"name":"@material/auto-init","version":"9.0.0-canary.fc8b045f1.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.fc8b045f1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e6c509f95c58c7cb00eaf84e2f53215ad6c127f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.fc8b045f1.0.tgz","fileCount":14,"integrity":"sha512-qECoibD1q4N2ZxIQaDVbSoJyR8vAKP9VS0U/QNP4k6+0CizbkgfroNUOaPf05PgxrEvldVvLUl1OyOnEydYz8A==","signatures":[{"sig":"MEYCIQDekslNoU386rCh0N6yFkPa9qyEPUer93YRznmft5eBTgIhAK/ygNYggOXaUtPtAh56VNRQehM1YdHsgH0YAckNOWTV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoel5CRA9TVsSAnZWagAA3NwP/il6CD8P5C8PROlZlLCi\nA9fyzTkreIfDkfLJWVSpLttCXwRYj4El2wqPvBmrd1/Lxq1NOTnWA8ABSGS6\nnhZvmm+GK5UzaPJ3pP/IVzmI0aalRUqP7AbCJIdR4ZFsr4US/MXVgjGwJM7r\nZ7Kws0qVfoPbJJrBvyCS6NlFPiAVs76xGgTav2WcsN7nTdTi3ks2pVzT1RXO\nxNffSEwqbgOgu6UDEgN2fgJuXdGfDQmg5cI62I4Q0yWD6+LzdNmAI87gr3YB\nU11Y9qIIDbbSZuVUlWlBvedlwE0a4qKiFoAgpkFcgo9n4VMN8tthIiU5Rr01\nvOL5tEZiXfGbiOTx6I+q9jaLY8fXFglBBHrj3PBtl0Fj7j7YjRfml79BmgZZ\nv94qbEpGow2N4umx7HwdVj4Ekkcefu8EjIo57pe1BOkBWwaXME6FUJdcoWD6\nVU7BVsKS9Q51FWtacIWfEw1yAo4RC9ehJs3LEW9liqTG6uxjIA0ehYBlABZw\npu5K95oktx8R+TcNwsU+7s59A0TKXBQ5tV8fZ8WFd8/U76PRK1RGV9LehFRv\nOrlmxT09knda79Mgd8lJ2Dcmzn995MR4eWCrHKpO6PPvyu5iPT7h2YPWApcI\ndVYx9x8HNDS/P8Km3eoXHUXOjlfBkKMcGpFjjTWLpkJdvi8JVnvXi9CEv63P\n9gL4\r\n=smb9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7df7659dcee84f0af6a1e7d8617abb4056acceb2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.fc8b045f1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.fc8b045f1.0_1604446584594_0.5941563059297001","host":"s3://npm-registry-packages"}},"9.0.0-canary.a0b2db26b.0":{"name":"@material/auto-init","version":"9.0.0-canary.a0b2db26b.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.a0b2db26b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2d72e08747289ce1bca5fe2fe411c268b8597678","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.a0b2db26b.0.tgz","fileCount":14,"integrity":"sha512-idr/AHAcp5mOb+5cSwKLSLBFe/7HtA23p2C098YtQ8VpPDVhmTwznDCHC4vSg6YEQB3r7JNO7D1TKNj3RHckFA==","signatures":[{"sig":"MEYCIQCj2UxnWrf3chN6WQoCwfLob498nhacExXrmNmcQH4O4QIhAJoJRPL8E82mKdUGk6lyh5enQBlLB8A+3QEPYN3rcAT0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfofDfCRA9TVsSAnZWagAA+RUP/15j4uv56kc2XKCf0huE\n1KF6EjGFbkYsqj2UM/mXRR1uGIMoEbTqIh/z+aCtWQLzMUS9HMNpCQFqZvOe\nDvaUoqSQ8IuGu/Elvyz5MBzaSbn8Ov6lUUTXHfJd52ZFlr6/dEIRZBlevvGH\nMcp4UwHfMuSsrjo/+uPEY0+PYmiYu0j16tQsr7aIpf4Uv6wwXn5meTivDl5o\ncwGzTEbxGXtofuz686iKj3zFGqAvr2DAtW3x17NjyFqacYLWXvTqfU/VRTTX\nAay1w1yrL/2sSJihtJe2O7sgrOz0YW0kaGqmeGaHQEkYBXR2MPzbA9i1qUI6\ndXdR2cVLJHXct5GkTDLEJuqnB+wNQp8GjKHprTV9sHCF3ylHylz3WwSKWKC5\nmnnGEfE6W3+xYrBAZJ8iowBEC59lX6IPVHstvrZtBy0GXPdpV9ZMtlqb3Xnf\nC41OaPC7iopWlQUA7IcSBmOwYnI4gRCaoG9XdzgnmqoFwx772JHoe2bmEKgq\nD0fqACO7hImPR30Zyw+UT5yrxnx9eNEOtEqNLLfC9Lj4MA//HCLqJuqppkRl\nN0ke+QN8Reuf1fXp1s5jyse8pfVzDz4J5WtLFzCugDdn07UOcgcexXdf4kvf\nD47RsEePe6ieWiKkURIetOmNNnBHFniDcA0NBTQ2yXsk9vT3pSIK75vA615J\ncqZJ\r\n=wC/G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"885abc8ece3b0c3cab58996fab25be733f65b5c2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.a0b2db26b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.a0b2db26b.0_1604448479058_0.37360851417769814","host":"s3://npm-registry-packages"}},"9.0.0-canary.419e03572.0":{"name":"@material/auto-init","version":"9.0.0-canary.419e03572.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.419e03572.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f4a3a979c5135242199121246c3aa0df79a0e280","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.419e03572.0.tgz","fileCount":14,"integrity":"sha512-wZrknMKbjlVzfaI5Ydz4LJVEWjX3MnVkFcr5F7MV1JTL9/6z2IEmfu6iMLw3jAXuBqrsYwqkd5nqJ8Z9CLc4Rw==","signatures":[{"sig":"MEYCIQD14W3e3+Hc5bWrPqKX/IC4hnjQYBp6qclNYIf3ygpUXQIhANK9OgLXsiEVaXnU01z4W1ulY+mdSk16gv0eHvcI7Z80","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfogSjCRA9TVsSAnZWagAAWwYP/jMqauC00QXOD9jZOt1J\n7FbNhSP+nPF3ooYz6Ee//uq9maZ6lk23m5UfDkI/oE9NjwHALQwF8iR61Zsz\nWLBkVltBRCHOkoEn1zEOP2sCjX5Vc/finBCS7UFQVaWutpFlcpTf1OGaFOAM\nxS0qy9LnKc7UPjCE3CI9+unnsEsj/ixX/TPdMdFcxr+aZFE6add45r/DPtBR\nxwemAWUrt1WYGNEtZ9LJYlkSRJYVEXrAWi9es0Zj5Z9QDZVpj5KEKnqVRyxh\nGEH0Q+RfaYtqB820e0JaJ1bAW7kHVC8Ny9UA+YFRII7ThmMfVlOyJnIHHqu2\noE2tYWTr17KUhtM4VtsXu7xcpcLjhQhBePIyQxYEchR2AUfBLmwrTUjE6TWd\nJNKCrCeXqyX+hIlIq0uq8RxCliTOMgBQhiKG2FkG3mVWJzl2pHG6gDpxjHoK\n4MViFw6w48bzOqyh2GaJAmC5neCdcC/NHS6yb6AQ5aGaASoP2Cp+pg4LDCGx\nnNKotjtqB5W1poiqJD82iCm4Odu/wxDeVaKOnd+CG/OXuI7UMedCGZOddAGA\n+cQBhyBRcrT1AqvM8phJ76ci88nwmmE7+Q7NMMRsSC8SCLtZEGaHUxCFuWWD\nRJpPUHPFpzsDZFdoglsyI8wl3Q5Qj4CL8icRPhZhF+YJzgLl+YiZIQMLtY+o\nVuyM\r\n=Uo3W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9528e0a61f88c4fa2a5bcc6a5e406ccf027d7d4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.419e03572.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.419e03572.0_1604453539412_0.002087155364172366","host":"s3://npm-registry-packages"}},"9.0.0-canary.a432ad542.0":{"name":"@material/auto-init","version":"9.0.0-canary.a432ad542.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.a432ad542.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d7f5f99e95088a6832cd290839dbfa55a6a03193","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.a432ad542.0.tgz","fileCount":14,"integrity":"sha512-Hq95Nm6sGLQoBwnRqOBauOBmsMPunjU/sKu5z9PjkaHN14v+fO1neJ7n8V7unzlZhN/e2AjrxFm35i3AITUGqA==","signatures":[{"sig":"MEUCIQD+LL8DdjAhOpWsJWR/sZbE3VmuWaWaq3XLBpv1+jSc5wIgZeC+dFs8I7+awB/bh9uvK858XS+ZaeEpEk6NJ4I7AZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpKqrCRA9TVsSAnZWagAArXkP/Rlc87zk74GySM2PgkBN\nw56t7PYd7+/3OBExeAtI7n2OeOa4bxicLgExcSKGxNq1qVYvtMp/SYUQopT7\nJp4wSIgISU82DCY5mcggEs/Og9mtk4Iqy+OwInybrOsXg9GimIkau/IYtc5O\nikaQdH6jjiOsO9+3OHDX1wDZqGMbhPpQHc1IADBdpFIqwzVgEkhO61RgEZCW\nbcg3LNbAknGKfVS8KCqOw8/GM+/9+nHaX/hlcpF6iOuIeycP+OoNyInkESTi\nz2On8wzb2IkODTXxQMJ4egHZbnciOJzGXc/bo/Bn0lLAXF1Lma+8nMM5s4ai\nRNoF+NDJg/4126s8tmXOc++GNZfVN7UFiKnYGqyRQGb8r7nWXLi44Vgarslr\nTXqSCBEaTBhUGOvZzGAJRqQMcA7DEDsXQgMSGTS31lXp+nfjnkNrHwj+FSWL\ntttdCqCkh7A0uihuwhEclYod6DzWElDhnba3F6bML2V0fJLWQbZ1kvsMwNiJ\nZtwUpOgYgop9S+uGm1JQCJuM539hFBpkz7KEXhRBJXjzNsbhj3kCOPw0e81D\n9hJxdtBYMB6QHlzCnQarreHaUt3hqAWFJD0uwZylUD3s9zQNpfwpVdNmRDcV\ncP8lHG0jItJmS1Ta0TXod0zR5YZ/nX8/jU0QxSzR/fRWSn/X1tuOj0eTAyt2\nBzP/\r\n=d9Q9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b873a7878b871d2ced45e7f04055b3d4ef0c7af1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.a432ad542.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.a432ad542.0_1604627115038_0.9683441693882295","host":"s3://npm-registry-packages"}},"9.0.0-canary.e2e8aef1e.0":{"name":"@material/auto-init","version":"9.0.0-canary.e2e8aef1e.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.e2e8aef1e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c8bfb1603411fb52e72f816a68899b778ca4c605","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.e2e8aef1e.0.tgz","fileCount":14,"integrity":"sha512-Rw0oib3kiQDP29IKRtHq+LY83czz+1Y9ZGFzop29yED0smwnYNtobJySCOn7kDHckFMU5asdgouw1HKZyh3W/g==","signatures":[{"sig":"MEUCIQC7OozOzuNdUAQswhUgUlH2pL/vkxD7yLtTE6UicCZPswIgLdZXP1SaxOcxq0S1dwTtjO6gmi7sgFlTW1p76qlICW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpK8yCRA9TVsSAnZWagAAHkUP/iwXg88ogW6BLLLVi8TA\n+N8WPfC/ITUHF8F0spLrUipTqVsLKdz+o3pny8aRhuKqtdz5lVc4znHHiuDz\nY6Sz1y4+yWuV3aDUrwuIvGKDyJJf+fC3qCmO0uukOXMWHcyGiN9OLUD1gI7y\npjkS+mlctozAFPfI/cLVknSTkWM6g+p/n8qGx62zLWrwWKkFv+0F7b6207aD\nBvYj8buSMO6hbp6OcWTTVuOE5LCD0bQhf1AB8uJyv3pINP+SJwddfe2R3VXd\num54yy8sSiglN4Wws+ctaCBt+UeYI3A2cB9osdPb3oESXymUbABA+roFD23G\nlDsBsMu8GqFGDbH9CCwNITbIsMeuCozgBw+600VoWsvqDLLTVEf1WLY04p+y\nl8nrhettpPUzUr7I5HPPJMuDKUoYOhTQvOmvCEmo1uEqiQNsgooIcIPubXDx\nA+adkNFgF3EyWQV8lektzVQE8VYcg0SYuawEIprZWxTw7U0Oc+OdrQFoTB1T\n81LzrI9npwi4Ck8TDV9BNP+zW3Jl0LSM+HL/bufXtCgtvtA7+EnuF5fOIuwi\nm1xVzVrrAFt6gpyB+4JZQl2qVGI5TkYVnhKL6jDKRbPHNx7+GeglNqoeHhz+\n8ibu/WVQNggWiqquUNxIJK1kbN6t7M9xpqv6ad4jBdatnXKhW0Pol1WKFQgP\n8Lss\r\n=fp10\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"59b208be2f946b47ab6905d82c0135e81316f2a3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.e2e8aef1e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.e2e8aef1e.0_1604628274104_0.04312807423162712","host":"s3://npm-registry-packages"}},"9.0.0-canary.ec6b68b34.0":{"name":"@material/auto-init","version":"9.0.0-canary.ec6b68b34.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.ec6b68b34.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"12b34efb031649930f3172653d6c45a144fbfb7a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.ec6b68b34.0.tgz","fileCount":14,"integrity":"sha512-LNfegyw3EUwxCPeAAeDNojAvay17iXt3QFG3kK2quqSuivx8rRHcWO2aoNZZSjyGPuXiCALHWef/oHow3bTPPg==","signatures":[{"sig":"MEQCIGB2o4fWLa2nfCs2hiK+BVezxp5XNQgLdK/I2K8VVgmnAiAMFItbHDJsjwiZcAw/R892H0V6DfuHlQzEZE+0Pcs5qQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpZwxCRA9TVsSAnZWagAAHzIQAJ0VVI7JF+W8JFJaYOIw\nRODvSXT+//dcJ81ao0DgeQLad1gPo8+Q7nSBaTtyB9O9YDNrcvrKp9+LUVAZ\nylF2O/h2NWSOFbsOC0VmhsQ3Hi0X32QORccVGcmM/ghJ7mpBCsZKwJKq9g8e\nfneG87pRPD7nuOngemC0JQIVLlzsFYir4IN5j+ljjD2d1iyURHh1tPx0Qybj\nyFLc3HYmxBwmmzNRXXW+3KJ9aL6pW/KmY/8HIyo6YrcqwZgLNGrLj3CVrb5k\nE73eCrYcdJUFwcTV5sRilhwZTJQPPuFoYWKWUxWuvFLfYxwpWNdb9YDogk/W\n1JCV/P3hG7K7CbrWlrNsg3t7w4v8uhfdSEb2BI9+zB4kd5plOoNYfOB+7JsD\nJsqlHo9eZxXzmTCqekmoFd4MBr0Fakz/pRki4/Q4WoEuYpm9snM6gwRtKqqR\nlzbXlGNXPbyMd5P5SKy1jLtjCJ99nx3S6NS4XeiPfbnyveNz1+lyoIXuTRtl\nudmnyk6wTCAv2m+xmu0NSotVIv4GF0dcHxOTyd8qTks3ps7pRB55J0ZYxKXT\nRYf0Q+cKw4bSydf0kYe9rqsFjuPA2mGlDYKoKnKTb99KvZ323VYnGJWpPUwr\n5cNBMnRQcO+Mm68zqUCHZfHUERuwTmhIvcoSuJAbSf4gbwUjnO3Qc3qZKYbm\nnfmj\r\n=D/0W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a5005840630991931dd5d6aed79aa4986773a5a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.ec6b68b34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.ec6b68b34.0_1604688944710_0.5386172860406373","host":"s3://npm-registry-packages"}},"9.0.0-canary.b39094d14.0":{"name":"@material/auto-init","version":"9.0.0-canary.b39094d14.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.b39094d14.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5d65f0b44e48f95c7dd201763238c3a30c48b659","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.b39094d14.0.tgz","fileCount":14,"integrity":"sha512-kk5rI0hRwS+KvorINlqwBTCUfese0VhdR3pYuhcs3tnbq8YhaVWuTIf1yQArDpyusKDugA7pOt5u/3qc9//pHg==","signatures":[{"sig":"MEUCIDQp/zREkyzclBwhqpXWRXm+CH7ocVPtLqazWeAaWm1KAiEA+3umS/u9sZPgoISFkwhq/micsugft877K5qBNKwDEW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpbzlCRA9TVsSAnZWagAAOm0QAJMcWM22bEVeMNAUgi8I\n7ii55HCl1BgbCn70RAVs0fPiMyOnzNCWf37phADE7hK/B+AqPCLyHO1t4pQ2\ncHdiZOff2Nj4P3FWWnjGPw40hTfe2EpSgJnorqtDzxSpCh8x0PEtKLcmbnhp\njY/f3a/nxtPPsDazKIlJRSHQJeQCjw/O4JSQ+qZrza7WycWk9/mKuTRmm7M8\n1MU0cMrvouqCuWsNtBlAYe7Cc7cWq0lRwAHbgv8dyu1nMRAEna9+aIL+/Esj\n3BO3r7pcbddLeg615i3mP649C/S9LrbrMDke8hB3wYOItyMAiRUe5912OD6p\nDMgj9Pv0lUN3TEwZ/WmbsKAPzUs5Ch60NYONdjsA1j5kkPUyBNMzmasboa7U\nMHv5CVeeRfq81pol2unO5MjZ5NMQ1dWXUQXHNAA6YOAdz5mtLiPJRJpoK8RG\nt6WVuBSHQOcWuhVUnN6jQCwa0+ZeUUz2PL9aguQ/AM1yL2aq4omYxHDxp3qd\n+Q7Y/BEWzFBbVNjROEVfzeyTnB5uV+AqdLt4i7PgYEpoJEzTMdwjLnCH14Rg\nFouGflbn6D9/03CRgHS+jIBqSCgPX8XhRF+JHIPESlj+X80iirVPGEn7GElx\nwlwKD84T66+3mzEXo1Yb4Ne+lGoEa6Z4mYR5tmpb2oMXBFfF0PjX/KEHdVyC\nY2im\r\n=++4J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f8c5ef7d8cee2d0a63421ee4afe42e4e9260cd47","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.b39094d14.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.b39094d14.0_1604697317168_0.16010772291837472","host":"s3://npm-registry-packages"}},"9.0.0-canary.8648b8258.0":{"name":"@material/auto-init","version":"9.0.0-canary.8648b8258.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.8648b8258.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b0bad8be91a3d7af2147fc7457c066d6270a1ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.8648b8258.0.tgz","fileCount":14,"integrity":"sha512-9y3qPznZYWhA2t5vMVbsjFbCh5rgsMP4DUVDv22u6t4hBnDg7QGvb/iWiTnF2oyG5Ti320B3/xn8G3X0HBfgsg==","signatures":[{"sig":"MEUCIQD2wHhLDyIdoql4vRZXe/GHpQ2pzrXZkOGmr5dNVnOgoAIgc1ccah0j41GV+rYM5sE80bpxDjgLPvuKqk6MJnQt4oE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrRHtCRA9TVsSAnZWagAAupwP/1yhqWy9mcH4lOFkr0T0\ndcSgWiC0kb5uWL/Z9IldQeYSHVDMN2BRbCFc29vvshSIeBglkF/uwnX7wa2w\nR53q2g2hlHL3AGXschtm8sIQTJIH7mYl66Lc+VoDLa/bxQFeQH8s/PFcCfzn\nvJlnjJUnpB2uXRHVa0I8+nXzhlY3EuI/iPSiL2zrRxms6SJeq7k02fTDC6WR\n226o3k2uk7ha2MNAsbvov4j/i4t7cpaI3VJgOeNNC8nkL6nXb3LI6rHHDBGU\nFMz/K+IoQT9nfm6G0Jlqv8OZFSjpS778eSCwA3BMbACz6z66Pp0np9AjM9Pg\noRzeTkZsJcMBNHewg2RIhlfIp6dcyriD9rxQjkG+Qn8Rmy+VIS3hNSGgC7f+\nCc6Tc6ov6AOUstte59pUtwmnWLtj7uP3FDsjPuxtpZn723wfspv4U0fk70fi\nawpeljvPiHcD/Lrtf9KXN12kqApYpUakDa9mn1QYMejKz+QWyuK3XHlygr+d\nQeJqCw8C1gq2zWWIsI2zdBZsTfDTDsmfxe4DbzOfUap/cJ172CdVG8QexDEM\nZ//RD/887QKEV98AJFo9a7BbtGqR2nRyJFU0jb2FiSnDqxcZHjZzhAS7+zWQ\nZbL/3LeQHFMr+qSkG2qXHmE4NV+2TZ/ls6KMmIfB2f8PacEH5CfzlJnHuYXs\naDew\r\n=0u6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d98de60dd3d91dc14a84abb664678188ae936030","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.8648b8258.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.8648b8258.0_1605177836602_0.5882485287994319","host":"s3://npm-registry-packages"}},"9.0.0-canary.240c5f74f.0":{"name":"@material/auto-init","version":"9.0.0-canary.240c5f74f.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.240c5f74f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"62cc495b6da58381799ca79cc0b81c97435c20bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.240c5f74f.0.tgz","fileCount":14,"integrity":"sha512-EKsZkNRQbkr/fAou8jxuO/3zcwkdbkV41+/w0r508nhKRrNnI1Dh3NNEfs4lI073oqTQ5g8PBXrxlLS6+kNKQw==","signatures":[{"sig":"MEYCIQCtvWcDs56p3ViZ4Ci9TlyMLUpKdXHxB805Al44JAWinwIhAL8C1btAAfZlVTgvg53inNAz9Dbosz6CKeEvmNBuhc+U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrZjmCRA9TVsSAnZWagAAjFEP/jt7545WVev33R+R2Pqe\nZ+L0/wev0+u1hjFDfq1Jj7tJW7SVy69yHEqGT/kShnzk4GtogEb6jclpnS5S\nOlBUdyS1N59zjBzjUn8jL9YGzKi8x2buC4Ze/94yp1yMpPCybtMj80paKFi4\n8KRWGt7x/F1u6fH1ZoKKEuTt7PuWnt37H3grT0vHNrwpMmqaLvvXK2E5nRlp\nMZmCQTVd8bXlk91dOVomgDla0NIAfghea06ciA8+YfY3d659QyAHmBCodQhi\ndGpbFPENDufejeJyQvnt71fXGoIrDeUpiHcvLadnotk3yt5hxakjDNT9EZ99\nxueEXeY/rRIqmAqtV/XWmGDkSeDytuvSzUdo74ZoovGdN8X1Gj5tonJxXCte\nSpgA+VMWNUETK7cAbb3uuu73eF3aZmCsRGIMWecCoPyRF6K505VIo9xPHotl\n1tgJr+I0jS4rQl/GMaglaMwkEFsdJuLXjNorjjyWzSDipuG/Jyudh9HbtZCJ\ni2Qmj9t0fww3htuGfuLRm485pVwm/F6/aC3GeCX4/4fqVserClAXWHUW2tBJ\nEkYwSDDmcazARPi7cMgcvBmBoyljsYX65DlokNls6CP04YAr5W1u40biKTyo\nOll833JMtSdQyNAhmmy5Lu94P/jSj/mB7KsmAQNJVlkPv5JG2KOTr0Y32EzP\nKoeW\r\n=985S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"33b77622681b24909d892ec906f608e75f5e9809","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.240c5f74f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.240c5f74f.0_1605212389108_0.6764803308406011","host":"s3://npm-registry-packages"}},"9.0.0-canary.6cf6ba4f4.0":{"name":"@material/auto-init","version":"9.0.0-canary.6cf6ba4f4.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.6cf6ba4f4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d309fedd4ef06feedba95b4edaeac9262298124b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.6cf6ba4f4.0.tgz","fileCount":14,"integrity":"sha512-a8Jj6ttYws8kACjj4G8zJOQ1RwoIYYXJM2thtYWJ8iyKZGCjJdM5WGqUsi/M12mSG9Npx7f+05QebZWxm5hOcA==","signatures":[{"sig":"MEUCIBwJk5S6qM98B37c1iVH8h+jAcUt7Lr6LFUU+69ys8h4AiEAg6hxOOF96f8Najp555xLbnnNeNcYBEKJ4CF0UIPu1WI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfssmnCRA9TVsSAnZWagAApW0QAJJdNCWTOFq8kIxtegWZ\nleHkiYh57sNr6kQgsv+s3Vg/Ix6Tux9v2qgio/PaSt3wmx2gyCZksk13ebg2\nfgpvyXuAiVvn9w8vMKtA3dRoEIEDO9JXxgk0qV79kVIEdj1yqA2Ao3hEu0kC\nAJs3M40PxHMFPJgDmZeta9mVUeGdnYI3msHX/NFfSbaMjKKidekXDPNMRl/S\nEYBVppRyQrzzEvj9UiMQUVLeCFP5Arprq5Np/q7hpleIKE676IQSq5XO5T9q\nhKqa5G6R27QY1R0zYcHgoSFDRFJpBmAiPBuHpbQ58DU49ItJ+ktQiG/mL32V\nDeux2ea7Mv2UP8Cht2WCAHAu+OWlYG41XsRUJ6uBp4EavnJcwvfYQSr3ipL3\nV3urQHOMInLuu78guwLDfpd4mv8N/1TAWdvFnygl5VrdGmkklaRkoFrfY3C1\nv7B5DtHvkJOUFzId83S8+3+xzdxeKFD6KVxSS36ZqbC6IvBQUVHAP3lQLt4L\nVjq7WjY5u4nqLfWBJlqmI9Clbc4fpGC3zXPH3mtSvuJM+UyHMZfBSnpJVw80\nM+KEVs2YQ1PT1YvVfEo33epzMsWHnlErYKKp/Bj5FfD4nTjaVaiBjsNSqZOP\n6rDRf+eZCwXzKC40b/3DWqaqfSN3IWPc4MtpUWlny7F2FnEmzgWG+gzVucxO\nmZov\r\n=QpT8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d2d4890ac5812ec797b5f621137f4e8a077c3c0c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.6cf6ba4f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.6cf6ba4f4.0_1605552550577_0.3793971407060488","host":"s3://npm-registry-packages"}},"9.0.0-canary.07f3e01b7.0":{"name":"@material/auto-init","version":"9.0.0-canary.07f3e01b7.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.07f3e01b7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"212a367e93624e0f4456d155a1d710d1aa4e5c1a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.07f3e01b7.0.tgz","fileCount":14,"integrity":"sha512-OFCJk8djg0iEGW9/na51AGJ8nIVuKQowhXNRusG3QKsFMqCGVhJCh4ZDk4IgyQuZuSRu0+sSbzpvvdFKv/2hNQ==","signatures":[{"sig":"MEUCIGIWfKp4rzWKgNWNesYKRfbdGzTvbZjzVL0MYW0GX95HAiEApyv0MyYAIExXHZ8+38cG4sQhrjDrrN9pI9rleWX4RHM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsvLVCRA9TVsSAnZWagAAMn4P/0lpZv3M4FigddSAuAG6\nN5ynU/jjhX9InZTW6SMZ5i70lHARBJmcy9gLzqfaTqhMtMDDACvbzC2fq77y\ntfN3Nk+ElAzrvP1v/C8piw946C+WTlEiLtDf/qHxsRPpXzCxQVgfqE+m/HiQ\nQcsi+IOJfXHrX/TijYwC/laR7x6WnkGSDmsU1L7BFltE0rFR5swZQZeZckqo\nHlFrt53DrLcsQHYmREDARfK4hY/1MGMEEZQz1jztJr5zfSWVSSYFM2tvBamZ\nNqc5gmrEW/dF9K754HL9k/lfVakdDYbyRcdM2TEomPSsQj6EZ4HlZTARJXRV\n7n8RCYQ31g1uxbXe93Y4K42Ue2Al9ej6mdOAsaKTV/FNLxgoOuKyFO3Isg4O\nHH2FFtj0Dj0SnIkmHm1Uo9O8PgrFaNhqNoymUC+UalaCtbPJ8qLXd4WH/Aq2\nw3WVseh3Mz+J1TPeqkItchii9y9bBqTMEwGjmtX1CuoGYkmHEx5O/lGfmdUB\nlZxOoUOtZ8v+TFauMoRcUu9YOH+N8t+JVY2IrCVNv1SnmZSftB4JMEbWqzhe\nqHP+SSQQlD2YOhIgnBGVulMY/9/G7MYYQO2LqR5vVCbDpdvsgyjtkspPpDsE\nk5e0V497pOONs0WQSPtHBLIqUIgF6tkuZGfsokwlfQnfbi74Ud56XdT6lPGJ\ny3Op\r\n=uFzN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"39f1e043d0db0c6881d84b3d7b54423f64cc8c0b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.07f3e01b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.07f3e01b7.0_1605563093327_0.04510459910158349","host":"s3://npm-registry-packages"}},"9.0.0-canary.23491cf85.0":{"name":"@material/auto-init","version":"9.0.0-canary.23491cf85.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.23491cf85.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"80296d0501dd5c5e1e08ff8628ca364698d83859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.23491cf85.0.tgz","fileCount":14,"integrity":"sha512-kuMfSZa1PLoWwAf70ol1KlZSHkdNeUJ9Z9M0DDt32uoCfu6QKZdC8eInfYlOe1tiJz1Fac2GYq8xDEnCLabrNg==","signatures":[{"sig":"MEUCIQCOCWcdBWUkHNQnkfJ8gTyBZRo8AIl04hLnbb3Hmos1xwIgS3EqvSZeIOf3yK+tcKvXzuQGOq7Af6haaA8qTYc1rzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsxZfCRA9TVsSAnZWagAAn60P/0vxO4bHC65rV90OB4KU\nw3s/qqlp12OUzbCGu1JV3KUUYh+vKbiQ7bN49at6c4Z/602fPi76K23PnA9Z\n7kkvNclTayrS5CRgVweE4U7l/BGLosrNfaivBdsWp+4iSl3EZjVgS7ySurdc\nQweLO4kgX0ZuwxHUzax2bH7ohggAATbJJH1ZaVS0n09mUR00Z6kc9OcNDqHD\ntjn37uopQGd6W8fRTwB8CKNmpk8ZhIwEDsS37HVVZpbYiGnXCuyDS3UB7trS\ncQuz/okkbGTVqRQ/I+zutOKLMNJQuQYPoSy9wr+KzQaryRrIpvgVPllr26z0\nbVo9J3hFmv1+EvNibHinjTerjAwR/viZ5qQdlzoSGu+vUahzYBG82trPBVVy\ni/NGPH7x1vkSyYOTlNBd+9PqGEXoAReHhnQwOMbx76jxViAWd5mQyPM2L+l0\nszVgye+z+GP3IS2HS7rm5g0TD4YfzcEOjcsuK1FfgHLOUllXJLClzLjaAEl8\neKl78DiNJplj80NrqwsALla4sOGdeSlRSI9+qxqk9NjqYTOtvp+z0MTo/MzX\n1UB6wsOqOka9plWuB6/0kUuqwBPSmH0G5a8RUeSiamuWFRDIKt0/fuaP23JL\nzgRHJO+fHFmWNN/9FrcVEaESsxLtLDq1jCHtcnBWGoALp3EdYdL6PZR9+59O\nD1kF\r\n=pDim\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc2535ba5f66f73426d236b8a85291d7395ce589","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.23491cf85.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.23491cf85.0_1605572190586_0.34598899089192203","host":"s3://npm-registry-packages"}},"9.0.0-canary.b659d4fc3.0":{"name":"@material/auto-init","version":"9.0.0-canary.b659d4fc3.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.b659d4fc3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b64bc7ce914b53e89f9401acf14f4da72c53217","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.b659d4fc3.0.tgz","fileCount":14,"integrity":"sha512-lm9vx8d8aZGN2a62Zts65VxMxuygWanLNZ1RgYCvz9RZepts0kSnqmd7lcto8cnO4QIV2Zf85wWRNAMvmupydw==","signatures":[{"sig":"MEQCIBvo1HubmA94CypygMSobeFZAVta2cCHBeGV05jQupEFAiBAhuHHx3RPHW5acQDGaQ+k3bS24Inv7PxhO2QgU05ZzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsxgsCRA9TVsSAnZWagAA4bAQAJHEuOSn3LMubnMpubxr\njQIxfcRO4Fqmfq8cCPjDtwLdeYbAm8h6N9Yjqg4vdUzdMj2OpLNvfzYm5aAO\nCCWEChfzlGP2vGDWow93Hi2lTs6KDyS48w4ZVjj+wkz6MuyVGNc7mYF+xtrA\nm179sB3ELachq2lpC0cxSWjZYpDo2rJk4gtokwULGsEb1TwMqKaoWa43pnFu\nXWnLVTlR4hXKL1lYCuDWq7whbl3h4nLvAnncrP1bTvJR8Z4xso8jR8MKknBD\n1DQjJwBMWzOFw7EFrUogwL9mAW4ZpjyYgpGloE7cmJ3ey4fAhIuTUDVRHHFk\nxPkGW7K00waxAMrLIICnx3nRMgih+3gBtZKpkBqL5WBhKmxVbeAWbswqvXZr\nj4QxNm/qiD5tvwX3j7KHUAcCo2r739cAO19Sx90v4FJVZ3yWVc5aq665Cab7\nuKnOZ1cqJAzYIf/fOvDSuKk0fmD6lyeP2MN+dnriwsniD5uHtDAWDPZ6PM9b\n+OYZVCurOe7wn1JGI6y9g4/fZiMb7NxKNLNczvlgnDJ42xVrYX/bfF7MpNVK\nJF93P6qN22BlY2HBC1IAWNHP1+GpNxxeQMB2dG4JLPLyDz2lN9MWrsHQKClm\nzc8TCR97egQQQ3t/ZFzlvyYScWhvjX9Iu/1X8E8oYZDgWH37ok81wOdt4+Ab\nZOJI\r\n=vZpO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"da948526208886bd05bb015d249db8d19d4b3f05","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.b659d4fc3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.b659d4fc3.0_1605572651527_0.536516915102814","host":"s3://npm-registry-packages"}},"9.0.0-canary.d8a3aed67.0":{"name":"@material/auto-init","version":"9.0.0-canary.d8a3aed67.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.d8a3aed67.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ec5e01b54c31a99e39567767de1abcfd3b0faa0e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.d8a3aed67.0.tgz","fileCount":14,"integrity":"sha512-kbV2mTiropGY6hSlXDrrl/1qdnI1wdtrg4VgZmR0WDBpD+TOIrOc1pvlJaM0UaUGoMKgCAwqyMxO94d+pSeWEA==","signatures":[{"sig":"MEUCIQC3To4duFh9buBIrq7qkQkZeZyLDh/0Gui3CFxPYTLvzgIgWqQu/LEgf6V2uzHKuIknjlZ109xXgkpCQ1iLO/UuB/0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs+udCRA9TVsSAnZWagAA8RMQAIjUSuYeS/glA752LS3K\nZuuf4Y+lWlJY8Vbdd8JiyEud298vnaYcHT8crQXO1L0M//eeLZUhykr2ItZV\nLxb+I9z9rPlzZDdx9OU4dyJDuF5/OzPl/9jfEnhtzHR+Q+IVvlkL5ZE+F4iT\nX6pgS3eId4pnFpQaSP4xn5HeEBGDgikQNYro+lfzpMJ84cCGvg9tqUGeUSUF\nrx7yyGYXY1o382FiHy53Wyz1CWGJdQVfUAi47qwF53DUVSN77eHVzfcbIkaH\nM1F3xsTXdlm7KhdbZVJyiofMnMTBqaQDbxiJiInFkpg8yI05OL2lK4ji2ttY\nIWR/Grotyu6qk1TPvBKbLf4RsL5ZJAshgEa7LQndXErhCQBEK9sAXQhn94Yb\nw20wUcJgS93fa526dz1lmkAUG7ew/PIhaIpY1w5Fxx8uFy1s7MSVVAPicB8w\ncCvZ04TfkiLP9b2IcgLh75uQRXUDJyDk6f2lDp7E6ugPGpdwTqIoJN4HMJPj\nN1BHKqWbMGVISjeaT7UnctZky5tYfH6LBRVwdpwsWeMYzRVZi9bzlRekIimq\nkVMmqI7Xrg/An5p23bKk1GYpeZANOLAHob28DvAzijG7U/2zv1uef1mENG1B\n8doFJj8pVQ432WayDN6spFpKshKIdgvz61/d1Z4QwWLRxk3E0gFsDmPpCZgO\ngUi2\r\n=qbiy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e70765503f122fcb3d748ffd41882655d9d4035e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.d8a3aed67.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.d8a3aed67.0_1605626780733_0.6211182173556535","host":"s3://npm-registry-packages"}},"9.0.0-canary.482ff9091.0":{"name":"@material/auto-init","version":"9.0.0-canary.482ff9091.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.482ff9091.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3c1f260fe4501685e3d4c9ff8741fcfbf811ff33","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.482ff9091.0.tgz","fileCount":14,"integrity":"sha512-gQHzP1xuvmP73wmZAf2lSvh+xxu8r393d5OUbXNISmUKU3iJAGJ3iTTAR5m39bZUe/Ozdc886EZ/iXnvh2Ho5g==","signatures":[{"sig":"MEQCIBsbcRd8xd6+K8HfCnPkPffbw66rtaixcaA2I6JHqOE/AiB5PQ0fS1nUMoeLDm+K7LGfSeckDrdlDYsIZ/ve7Sn6uA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftA70CRA9TVsSAnZWagAAGIUP/0VHEMRgbsv9FqCLw2Zr\n0U1EcSjzcACj5ksGDM2t0Kpn0IbMnwt1mYsA+vHBSHvMguKq6bNnr32BD7nT\n/aSck42ZV7CN8r7KfVVzI4I4Hl2HEGYubP4s5V11XTlzlz9hm/KBgZxfiqHV\npsrA20J47Oc/tzdZRhbMircLTH1IYQWlDZVCuXbsxtoDJRamAa7INJfxs529\nBdhGJMRxZ/udfqIkMx/pAZ5TVifJSAYDg3NGB7rCjUe+PkUGSPyek3cPfxKi\noZCwFnmVbim4WBwDnYAVlKYlipLhR/CA+k8TTopkeYiKgUZJB/yZ7Hwrk/yU\nzni0VsneA6E+PpN4o5LqqKXO9Mhzkw6rl0CCImM/0jq6Y/kDf57eYoxgtxoI\nEza2xoGF+z4c4o6F39fdpbudtcyg2scdvPX9Kb8WIRX2IdWbdt7zJPiIVabI\nglqIk/OGz4f+Y5KkVUbbLl9nPUp4JDN3mUXFRSmX852r0TGgfIWuqYj/4rwN\nPi4UsmwZJ4mHkZ/kH98t4GJGJszHh6uwhIHJHrt9vLy8mF5wD2UWAMQBO4xY\nFbZevvs5SPeDZHfx8hnZeoBu8JLV9McKWzqzvhiY+SdPn4eI5j7vkr8MzwMA\nPP3wGF8jgCnroVCOML34p14dv3mftVucOEX4bBIgq/2X7XZeVinpORQOorOp\n7BWP\r\n=NlES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5b4b306ef0e5d1d3654252169bb9fb9d75490dc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.482ff9091.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.482ff9091.0_1605635827971_0.45259084532846594","host":"s3://npm-registry-packages"}},"9.0.0-canary.99cfb6bd5.0":{"name":"@material/auto-init","version":"9.0.0-canary.99cfb6bd5.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.99cfb6bd5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68f5d9cd9029c0ea9b1475a65879a0ba01faf191","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.99cfb6bd5.0.tgz","fileCount":14,"integrity":"sha512-Mr9DhthDLXVP2e/TbL4HjLIqHfugJ0SIMi8ik8K2o6lG7f76NXzGHfoGCvdGPvMq+9BERtq+30L4a2dU7CcEAQ==","signatures":[{"sig":"MEYCIQC2UUxXFGUTQtKq7CqtPuQUVUorK2rHE9pWPfZakOt0DQIhAN2McWnWb8NYZstIfbzZKivhyDbNt53JteT8ETiJ3CP9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftWswCRA9TVsSAnZWagAAj4UP/022RxvhIactrJKMd3Xx\nzhg2fqEbi1nFYbNn+mHu6jnmviFibhipH4MA6MtGlGV7a7o608XYucUDXTDs\nWHHxtPzuoHyXJXacDV7TAf+JtvUomXXAV0MGJe5yqxFYaMLkP6RtsmpbpQ32\nPg/TmaVVYXVrsZIygQnyf6SN7WScwwJG+znuZxMuBZb+KxjXLTcz4AiMJ0EA\nGieW1tyzZQdCYd20tfeAea4UwOlk5UuJ4Q9PmuXt0qLNCIqKDCF4tBztreph\nTuZqUpHPA1QOdGcuKWFkkIJNe8O+pUbcVAatcTvLXvQU8MBF/HPk/jBeeWJP\nZSZk6fMHpyUMxHFwjFlZeeEdxSZih5qc19EDrOB9E2Rnlm6lqwsqa+ZjJIpz\nN/3KC1zTZe2LVrpVGRnqU9xtzVRnZbwW5KZmNGWR7SkzypWcFxPqND83Ev2a\nZVuzFvJAEQ84bLFB1A/P6uRsic+a5/RsVTC526KhRH4au3puE2YHkiIWqCK2\na6knfmjpah4QIpjLdPWCASoJ1fvoo0ZFslttdTEhecEl9SoKf0GdlWPo3DmZ\nJU9t/XUQGjrlPln4/mF5n1blcP50xWREFHQ+OIj7hsyxpuDbRX9Xs6Sx0JiC\n1jXVLpcADd2esMEE0Ul8yQZAN5Hk2ZRX2qnjubceuOXi41yRPStJjqznH6F/\nzEYK\r\n=B/7+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"97b5b434f189a370838c9b867dfe1b766ae52fde","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.99cfb6bd5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.99cfb6bd5.0_1605724975957_0.5389600504911529","host":"s3://npm-registry-packages"}},"9.0.0-canary.b98d15d90.0":{"name":"@material/auto-init","version":"9.0.0-canary.b98d15d90.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.b98d15d90.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ef2083932dff252efb60386cca03f0b00bf2321a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.b98d15d90.0.tgz","fileCount":14,"integrity":"sha512-kTUwjLtSnYpJK5e49Yuk9lWJJ/VfMqJbOqQ533aSJFoS1EQG7DTKEu0uys3sD6ovi4M0xyhiIdvfCWFq+3lxNQ==","signatures":[{"sig":"MEQCIG4IN3n69R7BUOm32an3WIbLHFGbio35DUuEZKPFl22DAiAgK/Sos1AYDwDnUqSDTNeiVcWHURD1O89lPYkgI4mOfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftaFjCRA9TVsSAnZWagAAt/IP/2HTIASxSVZ6gNbS3E3Z\n7cYcW975Sgp6Ixio4qUjUXexvcnAO3pK8IOoxONgdJCeAh8bdQCHJ5AJW21S\nWMNr7Hd/Bb1yv6T4cgczVehmXrIij1TRzmp9svsJ6rs/jM2w/PNJm9UsByHQ\ng5x0Kmr+VT3QrwpSKFQ2qUVgmcJYuK8zUMpyELRZOwPES6CJlpvGLhPgGQV3\nWf36KVfkaZfKjw/MErrlw3J2cd+lWhzi+54KaQPl1JuKNCmdUa4ygmKJLRGM\nhNdKoKpJrKGUd7drfkUvtC5v5kO6vzJyzrsn7ABT9PwTDetUsx5g3OZ55J3p\n7e/ySmZtNhOFgjrsXUyn+4+LFV5iuwqz9FfGlC8KCG42wd7uYCDHZb2t5D2U\nTWlgoMSD7bRihbQvC+T6u+XdOu/heEj4Qpz8C6ncRr3mxrR/tQ20VZ8whTDR\njtlSO9tR/q4ImnIcIsjMNJNSPM9dkAG2q7030XORnQbNi3E60UWsUn57bSnm\nfpwj/o9FUWkhOtYFDD4KXqJ+0ZokfVWIfTU7h/hEzo7tOtqKLSv4fHUxZ9wB\nGLY7JKurfTv1ysq+ZnBbwvBIy8zdlB3HrjiN7wpI2VfgKTK9HZDV3MY5dTDS\n8fCXUHEiTZu+7b+hhySN41MyUdk9rqA4eO2mEN+8EOrKB+8MSMmaMGfxJc1E\nWMqJ\r\n=McAo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"abbd2c5bad9fedd634d7a0c98bb8e4a8b0bf3439","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.b98d15d90.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.b98d15d90.0_1605738850772_0.30426237344908236","host":"s3://npm-registry-packages"}},"9.0.0-canary.30c11bfc2.0":{"name":"@material/auto-init","version":"9.0.0-canary.30c11bfc2.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.30c11bfc2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c9c0faf2be53b032e73b9926e0b143d63bd4e5f9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.30c11bfc2.0.tgz","fileCount":14,"integrity":"sha512-Od2PNiflubnE7RYkjnXNVM0i3W1b9k7VVY6pVnJd+PeXdZPeL7bTIX9MeaNU6jBGxPR8Zo1nqK0BVfHUlVlMMA==","signatures":[{"sig":"MEQCIADmRpT+sGHT3sc9DuE04iUF3mNRMDWuTYgvLUhcprB3AiA6EG1zZntIn+D/Nox3rjolE+MRFZYkCe8um0dGuwsoBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftcl7CRA9TVsSAnZWagAAIOMP/2nOKn22kDqSxwHfv6MY\nx9xB/xwr3NJontcZejBxzsSDfKrhzNGzB2t8POWu5BLBVsQ2WYuDQ5yoqdE7\nZIqw/0beTtqOWy/bnQfY9ecfhCJV5Kj5Zjnj0AO2KVTC9z5JYm4/+hzuj9mB\nEhDWLJbhL7txJEEoZtF679F8PjpkiVFZw6vuwQG23vo6vi+GFv8kM2Ju1ZW2\ni1588vIAb1bsyvXAYwwkmXICmnAfrDFT//qJwlxiKERggA9OGVWQhN1JXXbq\nDbSqHGp41xNL7T8Nl6nZtOM/iGM2kfKg76SmepFW9xV4QM9YMpdVHGFQA5aI\nMllIO+FtdNLtBYDqGJeB50RoIVwQf32+KKKse6akMpREPvSX9WAdBjXoPlid\nejDocqzuCjQ0jNnGJAXidsHuNFyCDnHTuk1FXSJpiFKYLj95gt9GTaLZQo13\nQRfGNfXSvJjF8VLgOZQRDP1WQ7VWIVGk0iL4fCubQY+GHP1l4WtTqWH1cfSm\nEsL3rpRprNIRrsWOfNvYlpZc09rXOugz/wW/41ykC/9APs6j9wMhwkI9dcRE\n8eNKDIm39J2rNgZPsRjCMtKGP0oLWDHU77c++eKq85S606PMrPjEH/J+6oZJ\n0Ql/JWDj/cIEoUdiB9OdRvs7/mmdp8/71Ck2EuS18f8gnCmfR7IhZrfOy8Oh\nYcm0\r\n=891v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bde404a844a4528a097cb2c90d03c4ce8bba9d74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.30c11bfc2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.30c11bfc2.0_1605749114877_0.9061653160392302","host":"s3://npm-registry-packages"}},"9.0.0-canary.1b731d51b.0":{"name":"@material/auto-init","version":"9.0.0-canary.1b731d51b.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.1b731d51b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"97971ae419a9cd2ee3bc3d2157b5d9c196d53888","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.1b731d51b.0.tgz","fileCount":14,"integrity":"sha512-ikOqtamc4iue/LFxqkhJhHuocoiuQ6zQgDLLNANkcuwd+46HfCER04BFiBP/GRTPmgJQqxk/st0GLpF7oA/70g==","signatures":[{"sig":"MEYCIQDvzlNYLS1m/31+wbfvYmMfAxifjWiAt11yr8PnIINGtgIhAIXxTns7UWzlc42q8oqApKkqRilrnnb53xmRQrbIJ3gb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftr6wCRA9TVsSAnZWagAA71YP/1qdiQP4/gLM4JHM7ZA2\nJYSN5Zx27XgNNpkgYD5Tz71hC5ha8DETzh1wioPGkwG6uGjEmkIve78CEJtj\nBO0CjQBZmEhtxAsGf7evLxZWIZY4hw7eAyh+epoL2zqTtOS8yWxvyFoakHL7\nPGpFDKvj2aNHp9A14baFHhRwTlysRSoW/rDJJfFdmBOmqcwe+mrCkz6BD0ac\nZ5HS0QjNK+q94lSNpHqN5U/E/Sy90dPwm2yUZPLE0TU6kzDS76ODw96NQ20R\n6X1G9ZlLO9qw53mx3hwDdCjI7D6Q8ifbMxQ5PIx4QAvACBSwEqIns/Z6MLqy\njG/1UGjYcStLZ9udairQLHVZQQ7pjw/SM/QfP6EKnQ/aEo6ti1T0shD4dRkk\nfOntrxt/0v75Qt1hyEObEGwW/u9WkN3xCtA3JZtYo82NUuuAeulD0JyNip6c\nGdauUWVmt6nCbUi337oheUZw17WnDVG4CR36b0UcDiyf5EX1jeEJY3W120uk\nu/QEdB8U+ixALkubeOPRUEBUgFbnjKs3RFkmYhAPuRBmvZKHOduWzIRhPS1e\ncT0V9pGpk3vS+wZDqfs0EVSJcj9MQOXn1y+PgKX+mmSxS1l2z8mfjqGfTvXg\nvN4WeuFjWvFOYy/xNtUZutRSLATvsh5WPgZXPff4I10INp7nDax+cnQdBhYJ\nZpwI\r\n=DbMV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"22fd036a79b754fbad742c64041cedbac73ce410","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.1b731d51b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.1b731d51b.0_1605811887848_0.5353440202425712","host":"s3://npm-registry-packages"}},"9.0.0-canary.4ae94ff78.0":{"name":"@material/auto-init","version":"9.0.0-canary.4ae94ff78.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.4ae94ff78.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"53bc1079559ac3109468f50e9d07546a4a245c84","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.4ae94ff78.0.tgz","fileCount":14,"integrity":"sha512-hWL3J22fGhYx5YCL2ugp692d1LB0Vf6axL3XoqNo5fEdu9yT12bIjhgHyxnD5nwIY2vVWSzTNbpxHsnqlfSivA==","signatures":[{"sig":"MEYCIQDP4yAVaRf15OD5hYwW/DMIMJJ2GunWtB3EVfnFygbZ6wIhANN/Qq+4uNX2OvPgHTTroHnXl8duJIKVqbnDiUEMxMMF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftr9eCRA9TVsSAnZWagAAF4QQAJH/zsLLWtbundsnVP5x\nShW2aEjdmAbWfhoqOCHIbAdjEFamIKJvnuVxicO/grCz1yFn0XcSe0aB/fnE\nfdR9ZaC1t81FBzkoyOCfTwyOI0wvzjY6jtBr+e9EAJp/rsIB9OWTjHX+lFWU\nSBax92Hvohn+WcpCk6MZruj5bOSQP/7Vj8FkYZmN+yFtyC19SxPimUnfNUck\niq1NItufCT/xRCnws8PbpuLg3UdnJ9iMf+bBcqDYeDL8LaGdyjdELqYcP5gq\nWDxJYU0L5UhQbJMpLfhoIXFqrUsS5bl2cr/WHsG0c54yjHGxAqhxZE55D50F\nhXZc4uSzGjR+vd1vAYyOySmSFMM0qtr2O84ssyCpAA5+4drUrUQXez1HUwnu\nbENkt+h7j8h0yOFRH3oYPaBP/pmuCUuNIzRiq9AwfPpYVHZB04j3QQfibAg7\nTPQ/bKMVe4/GmBarQN3EIQGhbEXVzR4Iqd9RKOHM5v/y/DcReTQFpeTG7HXD\n+B8BryzXnmetpgnmjYTDtUM4sIfubP7n1MDpuz08Rb1nlz+GzJieez5Hf0Kq\n7LIZ1779LUuk4WkmwLyCV5nVS3SZquP7co+6UDLSyuXnaIBKrW6Ikj1ZRaRb\nMOlmbr8qrM6Kh8++MuGz+rJSV1K8JLHK8vQBJ4vwKcvkQgSPnXeFSM9I/6xB\ntuij\r\n=o1uA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34c69ebecd44026cff9ea0d681fc2be3de9900b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.4ae94ff78.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.4ae94ff78.0_1605812062341_0.7804371210277743","host":"s3://npm-registry-packages"}},"9.0.0-canary.7ad038e1d.0":{"name":"@material/auto-init","version":"9.0.0-canary.7ad038e1d.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.7ad038e1d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f64bd4d923f084396744dd3ecfb358ba88c9b0d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.7ad038e1d.0.tgz","fileCount":14,"integrity":"sha512-V7GPQIWiGhC6PWzqyfckj4nj7FMXp/kBOYEqVLx04Q4jZdvSNbvNKbNc1TfdM6Wek+m/T3zhEQJ5ZR/rbHzh7A==","signatures":[{"sig":"MEYCIQC3CGKbevSwfKORWlhtSPPPkxeshcq3DCy4gMznQ9c85QIhALK2KqaP3z2IeZfFE4sKEyOPUczr1T7v3reqaamZDtD0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftsTQCRA9TVsSAnZWagAA/J8QAJwDQz+8CUxaYstzhOI5\nmsS4vQJ0nPQ8H99BtSxR0ysSkP+fXineItBU6vTRC19XbMQ0G9lmDvMAYxC3\n8tDy8jKT8Y8z7MTP5vGKH9GfdtFK9CkfBsQ+j5829nhRDYeXkTA9hatEH54G\npWxRXax36jrQBvRkpmM5tuLJgI4Lc/BSjblrTa/6Ivbe6mAbUXk8Kvjfms72\niyGHlxIHiOkqkjVwy5imp2XW3GpsyB+GP0slfpXdfCvxuZi0L9adT1SaSAVa\nULJpPyVnzd6lR3QfyvwBwrF1XBXvQsYqj7yKdyASVbiFgBKztHsgVuGmJ+L+\njjV9Xp6QkyEn7wCaO7O4ruUtmC76SwnrakB1Ut/wM+uDPBaHy0P7h7N0yaZj\nC2/cZdKVk/NKvdS8PoCTs8yurCq2GVyCW1eOxR1wiK+Ln2efl4q4zkYRZ5C0\nIpbqhl5vdDDUS3OeqWSFaj3YbA2tkyDkp2sSmQmN6Sr8d2aYs6ATIrww0HKd\nyJwVvmzW3q2v7tM7s7RbJW5PCIDYMocUjQc4K8J0HB+JK/ul+UdjyC71OuzZ\n+KD2uh2dGCFBWsEAgMRgIwe5c7FmZ5goi8SEPyB+GXpRvYlj1evo27fSPU0t\n0lcjBkNWNo0snF7b0pJlXrj7Gz6OX0FPRuYG3mnKFUHzkpQ3IytjFd2IcsO3\nz1vY\r\n=jloY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ae5e88e00f948f916eeb8f578dc80b6aa2084116","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.7ad038e1d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.7ad038e1d.0_1605813456457_0.8430313218332397","host":"s3://npm-registry-packages"}},"9.0.0-canary.a41527604.0":{"name":"@material/auto-init","version":"9.0.0-canary.a41527604.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.a41527604.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"034cb87ce34f8878fe54ab8836a6bf895b1bb7e0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.a41527604.0.tgz","fileCount":14,"integrity":"sha512-ClesucdcOSPbEvDeaiyLskPxb8N1zpb024LCWbDUiR0BlwUdoePdoUR1lKVfoiDvyzXUv3DkyX8e568J+AMVnw==","signatures":[{"sig":"MEQCIGpcG8hUuyC3P8DT4UZpIqOLIxr+HrB9DOmTVFxcMJhhAiBSOvLQ5EJgdzQNoyfm/6j272HB70T9C0zQLh1Yk/y9qg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfts6MCRA9TVsSAnZWagAAP10P/ifMEL/DVXB3hKPFnxbH\ncvCRTH7ie432BGY4AuCxkqWqszCciCYqLwXIMSH9zB5YkV7RYCxVN/4TR33u\n1nUEvA+63KRPBkDOcyKxWt6npxdCiQQpJPh+1w3edDNiSZOMFiOnCHeLisVg\nVg8cCAfltFr8359FNFr60OyDs6z7/6STSyCu/rkcjTTp/d5NaOdSMDMp93Nq\n/QefSCvNkKVCeS4xvDT7t7DKIVFh4jnc0MMak5cyfK6BSA4bjq5bdtxzamDD\nNz8yvGllb5dhXuU8FElp0+OhX7LWwNmcqYXjTrD1Q98IdopzmSvgsdWO4rhC\nLhKSs7kpUACYlGelSf6Tu1hzgI/D40EhrG0RTas+qUyTmAKHBu0a/9rzEpc+\nZy/CMOUFtvrbVzJbhab4XfrllB144aD4eTC5XtREOnW4QBHIpv8bTKSX9Z8y\nLZlOPWcwkawTFmfP2zVujc1gl95S1xi4f4ZNhkxP6q7wzoaoH2LgFCVhbP44\nq+6qA98qLbgLjBchbcBr0ERYxrHKGeabZgafSiyLZP/tp6f0PkfUEkeCXb9P\ndqh+72wQi/WsYwVB5+L5tKKrU6oNi2wEwGCy9BXZb+t0B7uT46+cQXmDAAeY\n3AnnYEQrV63VV5p85B7B2KyhkrqiYiyJDq04S5OvvtAVLD9yVoAOcvloQzJ/\nLFEv\r\n=fhFK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4419897c2a5ae382f471047e38ac619bef815058","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.a41527604.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.a41527604.0_1605815947779_0.95084572332336","host":"s3://npm-registry-packages"}},"9.0.0-canary.7b0e2b377.0":{"name":"@material/auto-init","version":"9.0.0-canary.7b0e2b377.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.7b0e2b377.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b922fa71428992737134e91ac2fdfc6d45e960e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.7b0e2b377.0.tgz","fileCount":14,"integrity":"sha512-ui7lSUHdeMysjoZlAQoUoAhQonStW2b4iXLoUpCUOFIsP4Jb/H66z1eAwQrG+F+2BIz2Lam4JiNiX/AbMNtY4w==","signatures":[{"sig":"MEQCIG358ykTfpNooE9KtnY9WUivLeUyx2iO0reTVe5wPxDoAiBtp2LH6kONWpFf3Tr6YDwFsYyDgtr+iHCls8H9ulkM/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuEk2CRA9TVsSAnZWagAAsfAP/2G0oELSp2l/sQe5Cjye\nnz29vObT14ovwbiPabekUOn0su4xHQbERWXZ6YO0fInFCUHCz3iNU+qmWGBW\n/Ood/Vrb14bxVOpdYjGRhg1jRRn9j0RWJW6JUikfF75iAY89XSiD2p4ZNhRV\ntucqcY02RFKnqzT5FPFkgiKIKLFgwrC6Y/Q7ggkRuQe4XgO0dhplxE4BOYLE\n6Z+hEVzumDuJjWII5hcVXPNoeYQlclxkPGtdMS5w/xUlsQXVJpvhIgZVEfS+\nYBYYj6f9kRSI8SgXvNhr1n+qfafwa84yaij9EHasdXgtKZHZNvtbZ2oy5WVy\nJ9xMDBz2pWkq6yzb+KoqaDthT4Nkph02PleCg582Yph+G2qrXVxQDoavsT13\nkwldzgq1wxijz+2Wny5AyGRVkRc3Dq2PgZE2i1FfSps4PxAtlvRvF9W0FA4J\nbLigCCSfQUHlkzRT0+fs4PtM4GC3zyogHRDv6fJD4mVx62HqroQoqMAdaD2c\nsN+klEcvjY8gyJuX/wJRsUNxkYZ1RwWl11JhPiYI4gduSgw9V3wxn47y2jmy\np5yEc6niIh9WPvHjRBG03+X0xH0+ISESnhYx2QwIb00PJounzjrrl2GBv38/\nbV8CkM6EiW+LzURTgK+bjlGWmtBd9P7CaPljuEBjRrYpipKAk1xYWG2LZuhu\nPIDh\r\n=rOmL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"51086f360a63319c786c7b166e515a34aa76c112","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.7b0e2b377.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.7b0e2b377.0_1605912886288_0.6973626844024612","host":"s3://npm-registry-packages"}},"9.0.0-canary.c927a5d05.0":{"name":"@material/auto-init","version":"9.0.0-canary.c927a5d05.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.c927a5d05.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49dc2cff98bb8936066bed6cf5e593d9bdd9ee62","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.c927a5d05.0.tgz","fileCount":14,"integrity":"sha512-dA3GZ/sv+m73YPhytaSyr14diFItFf4Y7XBifKa++GtJ01IgxhID8Hew/DTxOHNBmoN7GPAmmPGlf8IkcRxgPA==","signatures":[{"sig":"MEUCIDPFsi68GMstQmoI5bae+8KmgKDr1SCmyy0t9kZpN35JAiEAgRveONMyG16GoG7mntWuOqEEUzDpAARbN/MgW/bomDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvBGXCRA9TVsSAnZWagAAXekP/04/ifdATA23VfGLTDMg\nvtIzngPPIc4SSV3tXgpOK3oZHIZkqBFxrgMMeML8bheoBvhx6ioAwWrSuatZ\niXErLZ0ucdcZU/Sddnzuib2ZL8CV6W7D7an0BT10rW60mRK189n7c40R9G5F\npUhyuDJfLL5H43RcNjSf4FC19FPxQJdKNtVpddZR8Jw27sgwgYhjAOMKNmMs\nr14Pz/ZDwn1wMViNBh382a6ms/+RT2qkt7Ta7UjmbVcmxSsrRc28FbcpGUeT\nIt2kY+ToPfG8w2Em1npjSSE3XfQ1YWB1sP42tnuLSWMqWJDYkjxzsiwGwjHZ\nu1SP1fFmwv+ilSpYQyqTFzfBr/VFSwOzV1FzljskwdyGpvqyvRTJkX5ERzKK\nHfRRiU7+TRpZr7uXdhDqjSEFoZUGvmjicNZQc0Sp269SRbSqA5s60PdQnK8v\n0FML+7OEcxrOnSkTmHZqwDA5iDe5HEcVMNydU/YM5clu23+rFWJnRLYrpjeH\nmL9YEkmru6/BuYEfdCWtdjTmwDQhdR1Mx5iaT06Uc7BeTMwzejiUKnFPGTvo\nI8356E+npjsri1/jeNC2mr8L8DkEXt3/bhIeCQWErEPBdkzcWYcz9JYtem6Y\nGblI2pe0zUIU/w1dI3kxOHWTEan/o8zB+qaJiDgHG5iWuIOqk/qPZnplMYy3\nWRFE\r\n=nL16\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1e41eddb7d951c0eeca983e08e3fbb7b21cc3776","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.c927a5d05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.c927a5d05.0_1606160790613_0.766366412831486","host":"s3://npm-registry-packages"}},"9.0.0-canary.b349b5185.0":{"name":"@material/auto-init","version":"9.0.0-canary.b349b5185.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.b349b5185.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fdeae6b1282d90eb825b9f0cd6154b3af824251e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.b349b5185.0.tgz","fileCount":14,"integrity":"sha512-Hi6SijfjawnBrq+EBr/GuotLPj/tcUg2ilt4kFPewYXBP0lLiLds2RmgRnm6mtaZUypN3kATFbVE4H0n18DKRQ==","signatures":[{"sig":"MEQCIDuWzSqbOKM8J1y2xlOOsdkhggnzOWANni4yZjqnCbnSAiAMTvp/MzrkZjs14ZQ8HAxAh1P824XRpffK/ycjX7m77w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvT3pCRA9TVsSAnZWagAAuQkP+QHx1V4X6dvsgU0aeB5z\nTXheY1Cz9STchahLIbawsRzQScLKk+3tgevQKkpXniiicMM1y8zi3vw7IxZ8\nF1QrZQgLOlwNtq4fUWU+77SVC6szUf15+2350CeMNb5ouaCbq0Ccr7Y806ZO\nJEf8BWTV+ce2ZXEVGVih6UYh4ZxAvMA4XtQsNVu/A+vh0el9l8jchllTKNp2\nirhIsrb173aW/XUaacBsHAcC+EDbGBvfqh5Gj94p56Kv3OHHh+LbPymmvBA2\nHwWIXQQSdDH76DjbyN7WCg3ev0ESz8A4WL/a2D9QZjEFjATdwOPN8YEfbEbL\nJnI7UdbrD+CLtEWnDfxmo4JJt79Waqm5Ue+MPJM05sDi9AT+7Vzjelsq+ajO\nCmVONaISEay5G2J3ZOWL1HmXNShHK6jT8X23sR6e272sEwkuV5pw9w4uIOj0\nSPMSJU/TQLOENW3QQ7fo1zZX7gkIGhFi13M7UHvz3Gv+q47Slr1q9HPZhV04\nshDqAdE0qAT1AzsicZ0ugCSNRBLqo2Q3fqr0yrC5x+1AiJwMaieXyvNB/jPt\nlRqGV/wzDBAgE85akUgh8fVfle5/RB7k79GLaqFaFIDU7lqRGsGVi7+tFK4p\n/nX8jRauMmyin+RNYo/fHXGHiuVYq/PDfOZJLWME8pEdAOqIJE6dmz9e/ldv\nQ1Au\r\n=eEAv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92e0cccba580778200706f15aef4e667fc007066","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.b349b5185.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.b349b5185.0_1606237673211_0.5623019846757393","host":"s3://npm-registry-packages"}},"9.0.0-canary.9083b7d61.0":{"name":"@material/auto-init","version":"9.0.0-canary.9083b7d61.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.9083b7d61.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50d659238bfb9a5fea34044ae7f89e9558d2f849","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.9083b7d61.0.tgz","fileCount":14,"integrity":"sha512-EkysuXYuMONW75B4SyFe9lNam/pkPjkqHOcTvd8IPLShsbHxFozXcv7WmvspFrLSxQ6pMvhq8PHz8UWL00UOag==","signatures":[{"sig":"MEUCIQCLv5ENN5ZD0ZWPPnE/u9k7kNnZHeVMPg82iRdKadG8RgIgZx3Sl6+jOi/DCNL97B54Jl1vqhMVCKyNegL7MyB8wb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvXfKCRA9TVsSAnZWagAA+3wQAJo3QxBcJUTAwqatAdhi\n0e0P7+ml39FB3O/iJfBKWM7q2XXoa9VRFRiz0QG8zQxC2uBJCjBN6/RLwajY\nJh4tU4mwEmoX26W0KhEt1wArTmZkvs8CqxIwrLguY7Qdm739slDmdn8QQSjw\nbEFQ3pYZiXj2IJG4kLtjgwy1L1v4SXS3p+iBq3Z+9MLaOucolr1gRgHQs5b2\nZndAT63svRkWfQHkAx733rcoQwyKNBNsbv9T9cx7UevJUbN48MW1VkbPUJvK\n/dwM72EPvrSXPqMFdlZ9Z3RcRBbmDIvDB6PQBQafMTmq1fE4O7U+ngLQBI7J\njRiprBWC/t3VzRUewIYK0xG95B+VoOWqfZ01dY8Xh+JJYniEuIm56BTIUBPO\na008xF2lHNLnSZZI0gE6hRNOytizTCoaOI9p0qVvo4Oz6pKTObRKaAxdz7Se\n6lYb3iMFl6JIs8d8umd12cAMwDpj2DPAPwdaxUnL1qDWfwpQ/BGQ61ol+plF\nY3qR5vyYvBzI2lPUEe1S4AHCcL9oABvuMggmldtEz8t8THIvm4n5XH8d/wfb\nQDCurYlwhWgKLbt7E6QelMxzhqCzdUsOdaSaL9W+2wd9ovFNnd1TElVnxRF5\n3Sowk8r/VmLXpAIDhn66iJa+6TBzs1L1yfMOBkaKtcZjyCjwDRWAW3LY5xSF\npmlx\r\n=fNLj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6192773b6d2ce6a74a5b464d7df3e9b57b238d4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.9083b7d61.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.9083b7d61.0_1606252489731_0.9994583601157432","host":"s3://npm-registry-packages"}},"9.0.0-canary.eff7b46ac.0":{"name":"@material/auto-init","version":"9.0.0-canary.eff7b46ac.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.eff7b46ac.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fd913595187a7ba251bf7e5eec7930563cdd94d4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.eff7b46ac.0.tgz","fileCount":14,"integrity":"sha512-2fAACAx/kJO7XLx8TO+OU3tv9MwSkXSCmGzBd3ImdnKaeLnP/Yx86qG5+0uoT3h5qeabZ/RYIvjPPlmWlyRgug==","signatures":[{"sig":"MEYCIQDMIUbb54Wf4KkdRRCnsh1hle6Y04UBc33oBMZQn7LLFQIhAKR4CyGaCjFCl4QoQlIaxtX+nsPS/fEDT5s73f/qu4it","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvZeCCRA9TVsSAnZWagAA+Q8P/0PQgSJki/LZ4r1rx3tW\n6j7VfEx433cn4XkXUy7tv6O7GZSTHu44r4PT7vGCHUgnZm2pSy9zPQ++wAWf\nKUtHURSrnl96rfshKnYaKSsQlZG/sROM9YaCc5RfKMI64tzJyj9uJQqxS1GJ\nJNNplK5UPTpWvj1eLuVThqSwjE4+QiNcEGXfuFTbkQpgyis34HzSCkv/mwCA\niFMCPkEseKQEfRb9LpKK2GBWCC2AEeZsAutckfD4Dgt2/js0TlXrkBBR9vv1\ndJBr/rurIKR2/APjeU71kCtgBzSg/KYxUwDn44cIyOWE+qGBzHXK0xcLQfXa\nOTbNPyGcT1DKUHCbZl8s+oJdn5ikZmenRjWhIdAH/SVyDjbh1+PnjX6rlir/\nDtpjCzhrYON7i1t/df65s2K6aOrnyhpHa4d7D4pkv6gv+nxDiyJB7o7OwZn5\nghN1UA0T712LnZoISdC7l/Lu0UXdSFBIs8uldd6UAkdXPP0wvvhhsWaaahS1\njTQJx/YqDBZECqh0xXc/UnVkOe9MMqTLc1oiXMOz0pmr3oeW3rgTcwsn94mt\nikIczABr5Xb4UUXy5i8AXLu6Ud1tnHICVXOP7DN25BjRV699cPxfZx9UVrU/\nFlkPD8VIsquGG91dp7yB8YcjFxlr2rujBHW4VvDXxeFB67zGywe3R8q2h1GL\nbi41\r\n=MYau\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b8790bb41654e5c7f7a7725e8e58c9dd08551129","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.eff7b46ac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.eff7b46ac.0_1606260610250_0.4574124513361393","host":"s3://npm-registry-packages"}},"9.0.0-canary.ae27b44b0.0":{"name":"@material/auto-init","version":"9.0.0-canary.ae27b44b0.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.ae27b44b0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4aaaa3e9de14c173019af8fe78daa4a2dff71fd0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.ae27b44b0.0.tgz","fileCount":14,"integrity":"sha512-rjgnGHGZiM8fZ9tilnre6HmfQSJ3oVlC2dxQkZ0FyFLbBKQjz3ye3UeHpe44dgr6I6aWapMV2BrfjX9whNuEVg==","signatures":[{"sig":"MEUCIFPEEsvnts+C/tX/KBHEbZCJ6WcH4LizjyRFfLXwLgYfAiEAt5Aq1DoVmAYQQPJEC+hz/XenB32U+vtJMhM4noR08OY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvnjqCRA9TVsSAnZWagAAWJcP/ikRsVtkcbnOdJczFmFd\n/F+YMmjmVoqYJ7KYPY8GP7lrbaMhaCwSWXfjOxNW/EJAWvHWFZ+ts7W5n6c2\n3TujmYQAEsFf31hpOQEGtxZSKxTciFTU+hTmYqTftjbDuM7Hg4yqfoCLHgp6\nskhqred1xCDvvsO5JoUJRQrMDXflwEnbux4uSZidWfwck2PwITZJp+JHq+sI\nHk+2iJ3OXuh530rU3u5olD+1DkdyLahGBjRq9377vA3PA4lLYC0aLB/ZRRMj\nymSet/+Qq6eG9UAQDuWfVM5TWkYvTcRRHPav2Y066W/KsVFwLEgTdfhu4SC1\nm7HSMIFiTqp4nRiPb8mAUCsIysdz7gAb1Va6fTZuhc+78NHAJ1sKW/0BFS+t\nvLYMT8Lp9IXlaTFY6qq2cwsyVWGk3AobcKLTDvxkKezrwYG9CXvu8jlho752\n9xbiCC9V3HwE2TVmlBPZYkNbOM2d66SyNsDGipTHCnEXQu//jVv7hfudOF3w\n7ghctlCm83gyrsPOlUq2i3KhXa/HHiNKxrZNBCu3ZMxqQLOpimvn7BFrehnq\nS5EBzOhEvwVNHjMeXAx1B3TqH4o3HTsfAiRMFtMMR0Pytil4A9Up/oGxUENb\n7DA4kDsC91EjwEDhrDDmTTM9XZKy+oplbLiRLbgtRCatuFtwm2r8QyFNxuEP\niHGW\r\n=dxEx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eb690fa0e9558b61ded00dc6e4b467cbeaed4c4b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.ae27b44b0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.ae27b44b0.0_1606318313791_0.11837266391573498","host":"s3://npm-registry-packages"}},"9.0.0-canary.2fbba2554.0":{"name":"@material/auto-init","version":"9.0.0-canary.2fbba2554.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.2fbba2554.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb53c6274dd871578a172c30c187859b94d1e918","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.2fbba2554.0.tgz","fileCount":14,"integrity":"sha512-3Fs0bglgl11V5/WTR+qr2ZujubXjvxM8XqHHdXWjXi/SYyr+80VksMJv6dNJxWX45t2/G9HfgTEdIIIt50E/DQ==","signatures":[{"sig":"MEQCIF7gsgshVKTmJcw7HbBUQstrLiGgPtyt7T9LsXvrLDDoAiAtKMXQc2+dyTMugENdwjH+8d5pSsUhZ5oCbnlYS59uFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxS5WCRA9TVsSAnZWagAAH9cP/2Rh4xK9Y4twDvjDURkx\n5qsfj9ubPGN2Dq9ccTphBjqEX0/DhxJz7ojico6pwzrKlOOlWo+GlwtgY9dQ\nUBQSoOqC9eWT8HIK11x3h6JMP0wnvySrtLrs9PPvbMFJM2yux5zbg8YMOctK\nFLHJqxk4Wkq/Lyi+qDAWvHrfwr9Rj4KWrgpsdX34VUqYHr61Ff3ZNouzuhxp\n2lgeZ6MynPzjvCXNZnW7BavHr+nu0iVqcHTr5dfIeuJrrWlyNbnC8uXwm07R\nkad7wwG0imh8eMzPmkPUSnljLNUwq93DWwPF0g6W8rqkIpJvqhdbA417runo\nNtMe+Wj5/9zS6UX+V76V6kq7Zt0Sq7YwxV4tsE51z9Dm0oZ9I8nZGHIY0iFM\nyL+gm8XZ1P/bCPqNQc87BXwkoxXtzFFlRqk7IS7cOHrc8LwUqXQEta907vpU\nvsU2qncRoK0by1oMHYTuBvnqPPkWSE4w/W0yZakgoFsSUErVFXFv+GanVkxK\nownuEb0+ys82r5PLxBAwuexESvByAKWeFXfhWIl5+36K57eF6rMlM5fIQx94\nrBAp5RGpa2piFg9qph2fcCMwzeoO1Art2Fk5GBhd4fpD+jYBkCYEkSC6yKId\n7W/vTnerziDn591ryszM/SreP+/A30iU0nVWtUY0y+2tPFzkuhF5Mci5ofnO\nijAL\r\n=UoUw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"93356628825eb23bea706adfd527933f0c5e430d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.2fbba2554.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.2fbba2554.0_1606757974011_0.5692289317976753","host":"s3://npm-registry-packages"}},"9.0.0-canary.6d8574fe1.0":{"name":"@material/auto-init","version":"9.0.0-canary.6d8574fe1.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.6d8574fe1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fc6ef870ddc2256b4b6bfad88bf7ebc4a373722d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.6d8574fe1.0.tgz","fileCount":14,"integrity":"sha512-vthM4BFo/rn+YL5g7zZqFgv2YNnO8TKcMW2ceQseCAb1vN4KvKiZMb1GBzU87LRYED5NmT5hYpwUWQqvNK89kQ==","signatures":[{"sig":"MEYCIQCc2ukh7wLrJV9bAFeogwUo0Av6rDptSb6NyWhdg6nqYAIhANmzrM3JV4dsk+G13h9+akDiy2n0621Ifw3yuF0WmgWX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxTDwCRA9TVsSAnZWagAAQZEP/RutGFy1wRvcMySuMKzJ\nEcKFgjSOdTlvvjr3c8NXdCPx8P0Rl0Cz+Ol9b6WlVj4zTNN2YhQi/rHvlr2L\n4HcghtDmHcMP80rzO8w8IdSTS4Xbm7r+HimUv0Lhx5HjxkND8KRm2ZX3WUEo\n5leEmcpLP/5AM/TMeruY5+LkpF07oUrMskmKLcQQUvrKtyOGp0w7jRfwFLY1\nJ3iHHgrc+kBFldQ1H6IXIaWug/DrhbPpFBkduLz4BjoG0mh1WfqrdwPQ9Bjd\ndXaUawipkOLhPmPQkopEd6O9kTFGYYXNDcB8OdyeffWwUi4nhlCWV5tZRenf\nm1Pg8/L7VDRTo07Yutz6Sm2Nd7vAzZRw03LANrlxtilUB6G58pmZ1ZAYFgY0\nDAWqWbzcrL09WGCWN36Q6P2c87oo/iuy1BIoe6cH3gqnaAh98e4vNRBQv2sf\nrq+zqwAqqHfxotq7VsofmW4d4Bgcw64okyhSm4vhbplE+HVDdRMF1cw5natc\nHCxBPfz6Wgfm+ixStTj3sdCvKFGLIxsjcohJj3zxBlEzPBRHKJ/2ZArpPrV4\nynfyLWZSj3kMSEX0EqCRUVMIQwCdFZPaZ1lWpIDrXTFO/T7Zm5ppGD/KyDd3\nCKfF6n86ca/qj1NDnLgHf1Pdfj2nhEhKTySXzzEkucdvQ2qe+Cf2SLk6KkpJ\nyZXa\r\n=5hCE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b98a165c81d2497f6c0e8e5652743d71d87029e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.6d8574fe1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.6d8574fe1.0_1606758639888_0.5578981042021207","host":"s3://npm-registry-packages"}},"9.0.0-canary.fd22355f7.0":{"name":"@material/auto-init","version":"9.0.0-canary.fd22355f7.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.fd22355f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"532a1ebdf3195712e5842bfe6aeb3122ab1cdf9c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.fd22355f7.0.tgz","fileCount":14,"integrity":"sha512-iJYf13+OQfrha154G8OqG9XfDdlTz+k8w4SH/7q4bHtdmdTEFRsx4YJf0Gh3yQ/BZPA2IzrRX6XL5V8R2T3obA==","signatures":[{"sig":"MEYCIQDP7H8RxbzZ4BweHoM4qviVm9VtVNW2AY5pgTzGbZmRpQIhAKOMcIaL28PuBELwZvwZpcdDnS6cA39K9Eh/mN1XN2Ce","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxXkmCRA9TVsSAnZWagAA2YcP/25fLWUh24NwVbUVJ0eo\nL1Ic1h+LfQQmEhYzGsnmGs/UP467E+pQR48cwVqE+pd1Vx2H+Cli69tmMScG\nGfLCTN3NVkpJgzjC7+DuTwzVSIf8gz+6IWYBrtOa5oky7/VistYrjWZgVW9Y\ndMZp2TsngJWyq5+PTIrqW8ek8Gt0Iv7fDpjoCq3mconzECVpNhbj5s+FjYAw\nA5QqKX4eIkMXbO7qcidDhbFMnNArsp+vmKcZK7pQykwi8t/9y8TF8tj7pptA\nzCYJlD4XJZVcHNh8bFijDDVykWeGFksVpstFjsV/kAJXTDD3sWb16e2ix+3R\nXCISe8H/QXCtHQuMc6T/AtmyjsWom2B1NI7t7m6FugMbboXRSGNCmrsflXZY\ni0QZL2JykK743PqnUHTWeCYRgRcsDw0B0a8lJslbyHcQ6xysFXTQN8W7THJe\nsN7f8YcjpSb2Fqjs71R4eCo0gIdAOV3kMjSlfUCcvwXS8L19mrYArL+cg3gm\n59NYTb7w9eIiUcJHU+UgjFM/GBjnyXvh9wQHmPB0uItvXFMaXJf5ch4ei3EU\nkT0wNIr0fJisyMH2UhsxwFfMIdjH4DQ2uKowf0s6IFAhbqqHG0d3XjzTZuIY\n60gjW97RyQvsGhQ767OFHqppIfLsRRdW+kRiT3Sn7vwzNy/vCvucDwVX5vkz\njBf8\r\n=U1xr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"86a40292baea3adb58a6c26ed8c68a9a425cef18","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.fd22355f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.fd22355f7.0_1606777125543_0.43486955047933185","host":"s3://npm-registry-packages"}},"9.0.0-canary.c4ab98722.0":{"name":"@material/auto-init","version":"9.0.0-canary.c4ab98722.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.c4ab98722.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"313c7484fba02ddc665f085b762de35d3e79cefb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.c4ab98722.0.tgz","fileCount":14,"integrity":"sha512-XV8Hfr0WYM6ztWde1c96G8fgMTYOsGjXWneIvraOUvlIPOM5IJKVOy5jRR3a6Atgfs1t+ez9RNtXXEpuQVi3Bg==","signatures":[{"sig":"MEYCIQDsptzQ+/iZlg8dJXVFoY9ti6kmwfJkjbWxoVfM2gAzTAIhAJCY6lK4X5e7KzqIBr5fB7fH3gCpKDIPPIZkkbFivGwf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxuYPCRA9TVsSAnZWagAAujgP/2pcccdjUTP6NicOyzFg\nvx4CFTwBCBW/cuTdD6AlQb/KuUURPQ0thuJ8HEjmY6I3yytFY7gsm+8ijv+P\nwU4S2H0anSOC5ikojQnnz3vF1NhkXlnZjShxLOi2csYilQRVz66g243on8+F\nSNjFzjoyFCBWC83ZK9I4FUqgyF/n5XfK1UF2evDwmXFMUZIFwF4mjggm4feP\n39Qo+uelHJxMpZ1kPWfJtXkx60WSu8nkMXDvBtrPyLX2aOnnc3b6jjeR0uDA\nnl/OMRe3Td6l2rgywsQICnqI6cm+OpWqt4LQ+Uh2Dp9+QW868+L5iHi/wIjV\n5l4V+RVgt6sBRHvQ78p+sYNKJZWvJXmOLC92VKPoBTuaEw0KAJfe3KoIViNx\nKOu4lgEcUtK3ic4GaSg48nvRid/r2Z/I8pPtuyrZKScK/YNt60mS/wQfwCWR\nb8s1wpVQ8BWhiimHUVpyZOc5xBJv1LlvEvh/RM6gDPSbhSZGSC8EEfu0+ib1\nbKx2Qgobq+Uhae1CdenitGELx8/CCrtwApH1aiulxC928gm5iOsWA0gsWhRa\n+RDgqwUY30LzriG2eA6QfPIt0IWDIdb/lltMYDPEMMZ+r/FMZgAW/L879ATS\nc6bjaXLrkD/cYU7xB0mBu5UXXaJ3UwQrPJROPDC4G0nt3pk6LXQbGZsJ0Z/L\nw0/H\r\n=E3kz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e6187eb74996c124e1abdcea72dfb697bdb1820f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.c4ab98722.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.c4ab98722.0_1606870542718_0.3885737402369005","host":"s3://npm-registry-packages"}},"9.0.0-canary.977585650.0":{"name":"@material/auto-init","version":"9.0.0-canary.977585650.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.977585650.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fee3ef21683233bf563ca52ca9c4a61c72576952","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.977585650.0.tgz","fileCount":14,"integrity":"sha512-ldVZdx5ZAZMZFHEoJgJgXa108qnT/gXSJMZP5IGgFJJXcjbT+3HKrxj+QjF8X0HCmLj5hFD6NxwVrj0BGOIqqA==","signatures":[{"sig":"MEQCIE93EzBNHCAflI2q2xJ43B9lmYe+iqvEW4cD7hhBmfZuAiB85LufS3lDUfZVu6IMLVOwYeuhvP8SDCzqG+MKdJFnOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx6eFCRA9TVsSAnZWagAA/3oP/3uLP+K244rXcpNRw4Ix\nzp8xSvIDhuN1hpVEcBr0OV4MLcQlscbgBNYyZJVb/xmPr/tzCQyNMvB3QtbL\no+V7+pOmMTslvNbfSmt4BcwPKQSshX7hLo2QvvT6yCNVrA2qSICbDQ575NGP\n4Ju6BeZYVAdbobrDN0uXHVoYUhgnJzfYERjUeSsuaqUVjc6Xgfr7NcXr+nth\nV90jsZx9qvQS/qqblFVGLiQDjGyoCsOEcd4B/oSMPALAdHbh43EQgpDGEKSQ\nvOLlUzt8UvsukoPEY9rg8IKe+XU7k6AJJbRnZnGfGnZIjQ7EKTCnahNAc2Lu\neiEmkW2RtwDPHHWGluSV6nslWm1+Mmt7uQqap9x+KTtDkqqb4tjMvPfr5MWf\nrLGNuKwOk6l5Ncsd3qWr9cvUqIOfmbKEslzT9CxnkjNMF07D7KOB+7XQy8CU\ntKEX4h3TIalACU32Bqe3biCtcUtpF1uEqXRNYiTS/zG2Yne2PurigVPRKRFj\n7XVcAFngXELL0qK8LUsBSdIO9wYPDhD0B5D/4hJzy32AwviZ9yhUsQ7ssHkQ\nMcdEQODfmwpkG2GVvjmEMQNMGz7o5X1AknYBBiVHSl3LhFSUo3UiMx5/26GH\n2fiVzKHSHLKLiEH6B54PngofzT4mNg6xUxbCgh96XBQ9SHbWJ/HDh4d0pbgA\niuB9\r\n=TXL1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b008ede8c0d581314d3b967bd295990ca8eee38e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.977585650.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.977585650.0_1606920068575_0.2301994821876261","host":"s3://npm-registry-packages"}},"9.0.0-canary.c7edfc7b6.0":{"name":"@material/auto-init","version":"9.0.0-canary.c7edfc7b6.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.c7edfc7b6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"77590e9f5601de161af2c8ad4144d1c43c484f8d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.c7edfc7b6.0.tgz","fileCount":14,"integrity":"sha512-GWvzTEHBaEq7v20SCCvADmc5UePLtuLaWbBGGPunqRHAwg5lPQC0l5Bj/i0qM2nq4S88OwxPrhRFUH3QflqmoA==","signatures":[{"sig":"MEQCIHLHvZfWHdoTgUJUar0nBMNmp2Dy4aTmfRLL6pODFfZgAiAb1bKl0rSAAGIm2c1BtP11CNdQGgOyQ9fA5HmLgCrqGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx6lNCRA9TVsSAnZWagAApKEP/jnABUmNZS/GnPj4Ttsl\nRLgrRzYj0Npwj+9I8NeXu3O3y44Zderro7hUvhlI6KF0dFZT8Ot642dF1iSW\nIF4ebvcNILqo/GZM8T7sk3yRhXPCBWjJBk5z+WMeBOozNOFewth7h66ahmRg\nfu4vYiTNgFaMaXliV/D8T4M1ZuuvKVtcw26ArH6UPIVyTwhtftEZz/eOOLVs\n7Yk/YeH2PldedO4tzGQ6zo6XISJ4mFUGq8LFf2WAuW3Q/k568xZT92FY2JD1\nMM4tQOhQlvRtBymPPfuEZSePxSBhT2WSIMcs/LnUqqxSyNggW0wtbY44OekF\nWCtY+xUtNQiwzqXe9DC+pyu7HlSC2l+qlKVBYbICxUhOtE+a6uFYlv+h0n2u\nvXSEovW11ps78WJ2cuU5xuWTtT2qgKs4lUk/0i3+Jw6I3cmfHfhgzfXRssi0\nZC8eY08g0jm4s4yIlYcaRJ+Jar46whKxjnsaEM8Zd/PxWhtpl6xESCDZlZwt\nZUOwegttX5zPa218MklloNup1bE51SFDP7D/8lfofgqtr87XUWm/XSQCFI/i\nauo1+75Awl5Oki3LMqQGT82KIbmd2I7qNotOKWwwNSJR6wHxztD8PLUUADy0\n9ZGN7ZXzZlTYb0jya8o1Dd4PHlX6ayIsrk4cWZE//xWq/5Iw5KfusyysSDHj\n9sOv\r\n=6Irm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"791973660a1d63a77aa10d2bd0df7c0e6ea94698","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.c7edfc7b6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.c7edfc7b6.0_1606920525362_0.7213254312029356","host":"s3://npm-registry-packages"}},"9.0.0-canary.4f3347306.0":{"name":"@material/auto-init","version":"9.0.0-canary.4f3347306.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.4f3347306.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4358337fae0fe4cccc7cf3785c2c4c4668300598","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.4f3347306.0.tgz","fileCount":14,"integrity":"sha512-p5P0U26gedxlh8IPA9lcsS/1yCcCCcIUjxWAjtsIuGUUFR0Bg9jC8inDRa4CWbYazeFigAJ40BGNo3ML2uOMnw==","signatures":[{"sig":"MEQCIH/NN7QmZNVQh6ucrBRFYjaYTU3YyustaZinW/SwSjK5AiB2kCnn8khhAV194OkMPbks58N3hMwyZuROhuwiQaWyOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx62CCRA9TVsSAnZWagAAzZAP/3WNzM/5H8JJaZegkZYC\nLsIOfrtidgrNUj6a8Ok+wynNYQctH3JaQEl6cSkUcsase6dX8b1O2RJh84nt\n3PLdn1m8gfqV/YDUCpdL4ZpRN0K//z60ugmlMz5VBfZxJ5/htKvRDwgRwdbs\n9vJkaJ+f1mK6lVo/K01wPTO5mWPD2AjiDI4mqPdX50FY9V2vJ3YtlXbzXibc\nA0o6NCaJRKu9PMhfbiDi9Zf6n4dVmTP9x1CqF4DTJQQ4IgLa7kqbeYy0LYzS\nm1gSSpg0Ibgthj2Er01jnhBdG6Jsik/vf88cmZz40wUwqt9CVMDgo6/2psb4\nPLX0jiGU219/IlXkCAo3ht9NXy9v/NVaDmHPO2veGXQwu8lmxQgg0HMzEElf\nmRe3OHLi4lQ4gSP/Abn2oaIP1PMhfMkjQaeHxCgM1jnH9WiMIMp9ZR0Uq+Re\n5k/rD36RKtSflsDHYNbaeoA+GRNRV7KK8cmuXaAuc3ukE8gmyOo5GOjrtccV\n0qJkgC48f0CumI6ICU3pvnhuWvVpmeMEtrZGHe0e14EIKHQKAxQYmAFMzgwz\nZOlKpIssDPQOKyvzKQZ6ciyM0UcgaceYQGLoaNnv2uZU4AcEsJOVtWibBm70\nOk4TjveauUj554kH2deBHwErmIE6B9gpLR3t9y04kOKCjukQEJ2SpKTFiyhA\nied+\r\n=bElz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"31d08595c0470096709a4d5518ba7444313882e7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.4f3347306.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.4f3347306.0_1606921602287_0.06702763854092231","host":"s3://npm-registry-packages"}},"9.0.0-canary.37fbae10d.0":{"name":"@material/auto-init","version":"9.0.0-canary.37fbae10d.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.37fbae10d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"836509224296fbdfb2647fe7e0224f6b73382945","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.37fbae10d.0.tgz","fileCount":14,"integrity":"sha512-WXngHiZFIgd4hDbFPpXYZlLco75KTR3EtMMdNi1+9qj2rAv596nX6oP5qSmVOyL4xO4SJr1/Oe0HSvnCvBwgow==","signatures":[{"sig":"MEUCICfgMCW3+ygcV4yfer0FAZxG6ETg/PzP9ays9P8dpt5rAiEAjG3vsLCXUFZCkE7GSzHQiA+bniRDBUzxONIZ7LB/qeE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx9nKCRA9TVsSAnZWagAAkCQP/i4zKy/o9Mxw7eHUl7zb\njEkoqIYaNRPRiheC8ZWxS5yMwC7mvVxdjSN0e8jNFcidCiFJ3M08/IRrEaPi\nTHYCOYCopvZOxiq2R9awDk4PUmu+W8uuXuXzGYGmMYE9F+y5LqpE+qRem8Ou\n/1wPsUatw+TSFo7uL48aVuaN+dZLf5nyIiDErwONCb0DE2hkW0sSPDctu/w0\nX2EYbOmkQ/Yqs0Zsl3LMk9unVBg6B2H49IoW12Wrwp6GK0u35irAksQq/LFY\nHW3DJUpjqraNe8G8fOxB5fZ3cosvh8Q0IXAK99O5f6aEmNsNOF/486mbCCdw\n4UNa1mKEpvxfSz3Vgkd6EegYf+22wVLx8MX4SWXSzO4gQdDyvFy99lE5DIca\ncTxjsbH2bki7tsJ4kjnhhEHe8vvdJpiNOAyhlA0meRbunqXyct2TNQZyO437\nZDf4NtEPTKBExGx19QM7YCtiMJZVWODOC7tHbDUIg34BVnhjw+OKH6ketCqN\nijFC2C86JdU1m9DcNqSV8MA3e4tQCJhi2mhgPrRRD37q5uQtXnLzg3owLsAo\nkn8WnJAwYswCNbpbibLtJ7g5KXBdqML7O1PCSpWEAuHHbmw1NR2yxo/PTEKE\nXPmISh0F7kjquuej0bY+SxD7MdAPm4h98sgxjyyCsWvfCsOaYo60TXNZ1sxf\nmQGV\r\n=BYJl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"104ddf5dd99e7bc09a57e2cae74614b7726fa235","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.37fbae10d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.37fbae10d.0_1606932938048_0.7277084814666746","host":"s3://npm-registry-packages"}},"9.0.0-canary.11da3c0db.0":{"name":"@material/auto-init","version":"9.0.0-canary.11da3c0db.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.11da3c0db.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b3c3ec84cd46e1137a64f0a3773924949ff309cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.11da3c0db.0.tgz","fileCount":14,"integrity":"sha512-O/ESQnV8HSU/UO7gAK0KOk8rrQBuRA4A+GJFZtKs7XaqnSHQ+IxHZrfYAk/tYG76edI30Y3FpYqXR7j3l1/bXg==","signatures":[{"sig":"MEUCID9G53396mwlHZZCu6/0ze66B9lnLxnafM0JmY9gUkhiAiEA20pAbnx9M5iWTp0JzGyJ9ZLjuiiRkru71bolvnhZ0DE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx/dNCRA9TVsSAnZWagAAQjUP/idV7vr4trOXYoVJLWvj\nPZZOmCQUlM4KnfMLz6SZrlTVSNpCVYF5yMorHm0/nPG2s4EoDkJ7uSP4bXP6\ndN6M4F1dvLAucicq4oSOR3e0V9W/rtXNB7411OSJ6q7EdiKye7IgyjDuRZPK\nmjMqkFNQn4LybYdcKsez/iLVe5vLmwoZyrX3Dri9DfIXi7nCOcidBpspBvVo\nsbYgSGVYHaqaqFjnE/m91hS2BDBgRUloSEjYuRxrHmhxxIxd+XGKFphKH/sx\ndx5ud4Ns4n1RK30D7uWWsS6YG3Yvfw8cgMBrq/XvG6gaNgNV/0LUEfsZZF0O\nKPgavt4Qf+lzCorVRaEbFii0BRI7lPguAQ8zzR5TSr48HIkwxM5H9IEVATcm\nEiZR0o7HCHEHL/u6pXYOlmuDHpAr/Nxy1HvLTzwOowLXaUztqD8dSKjfgT/d\nR1P2Y0R8QUadYoFsQzRtZvrvG24Db72la6jkvJFClPNTnsJdKA90umyI7qfy\nG1uU1kgbYr4bEtiNiHaqepUgiq2r+lBntd3YX+W9aYxCddW0UnhjFYEcCZP1\nsbM105L0NWKlfXcImdX+aKNS4tqW7pdSOlRfYflfDjmck96N+nTZC8IAz3wj\nkM8IEt+eUmoUEuumf+j09AaSnSbZ54oQHGt72/9XRNMYi7YQGSQkdzFSu4sk\nU0hz\r\n=tifS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"db8b5af79bc8221682000a74eab75c30395590f1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.11da3c0db.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.11da3c0db.0_1606940493309_0.16168048619257203","host":"s3://npm-registry-packages"}},"9.0.0-canary.489d4c219.0":{"name":"@material/auto-init","version":"9.0.0-canary.489d4c219.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.489d4c219.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f4ab52a735f2d5ac6a8734c1ec929abaac965677","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.489d4c219.0.tgz","fileCount":14,"integrity":"sha512-8U9Dxb6VJuPPyxXVjWC8iox8k/UTYYkZlAsVtbbE4get+1bZg+l9yKQNHb5gq08JAm9/2e/EzXCbqXKZNucEjQ==","signatures":[{"sig":"MEYCIQDHyStgxInd+ThM3vT9zpTj3Uei7xCAWUrX2eRlK9kiOQIhAJiRHIHEoFkVqLerHSsgUAZgCVxvAV65LtcTKGPVppSw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyQQ0CRA9TVsSAnZWagAARlkP/1IC6q+0a3Emde7f46M8\n6eQ00ZQy0NZehPv2q3PBDwZPj7xqslSgzOcj5gAY2p5ndkSXulvOLaKizzwN\nCB2SB+e5K7jEXW3G8XkNSGTkN6cLhvMaqgZwop+qiYQXZkKoEEfzwx8AL/Vy\nDSZtZGF4pPYMke1Nuo1XAwUKEw4As1VYEaWji4XQ0w4DU/FS5Cmdx6PJRJN6\nzsvT070A+Z5mjei4qSHEjEC4i2xacsAsRmXfQqR3U0pGkaxI3CwR7frhbJWh\nWou3fcTfVgIJ5hIhJoduc4InhlHTPTm94nYvObyUosw42GoGxXWy8ymYESTO\n03JndWuRisdo+4ucUgFRtUQud/tWeNGZgINnKSrPCVR8G0sRqjU3szCSVwrw\n2lCXM6CJPOuOBZtXRvZc84hyNDpvVl5ZlCcC+jMZ82z0afgVWL9VJRaDA5T2\nNjoiYwKGkBpLITHZYd+xGYsDVwKrNexs9HBZnE2WORqjHjCBKUlwgqjoT3Yy\n3NIizvnKGwm3WNyyMAGd4HO+OiGKE6FJgk8XASWSM3Phzc5LxvgHAgQL1y3U\nQ1GNYXG6RWNASdAU3+BCiePvu7fWO59GkPAy8iRX4a12TquW7GDWZ4eKVUwN\n+nkTCI1/eI6MbNEbAvsPpUsoAWyBprY3ZQOvQ3T9u6m2blUscIaefX/Hkznk\n+cuD\r\n=y0M2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1c4ecae655bd87a48f6065e7c292d4b30cda43b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.489d4c219.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.489d4c219.0_1607009332077_0.9101142859874267","host":"s3://npm-registry-packages"}},"9.0.0-canary.6557a69d9.0":{"name":"@material/auto-init","version":"9.0.0-canary.6557a69d9.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.6557a69d9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7f1b34ffae8fd6404d90b53e883214564a0142d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.6557a69d9.0.tgz","fileCount":14,"integrity":"sha512-RztVasH59EXul4HIm1E5oHHCRb81VFivF4pa18rOZoS8DtLHAKZk3zMW+48ynTo5Q9rbWI0jGjH4E0/EgK/2qw==","signatures":[{"sig":"MEUCIEDjCSHbf86ubWe1gI9cNcIjBPn/etP31WDC60LmKUA+AiEA7VmClnun/aC/RGqfQfTELs5s/zfKgpAQfUfvcicOEGo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyQb7CRA9TVsSAnZWagAAcdgP/jRamD3GQCjskjOjJRlO\n82XlewAy9l+pZI8QbQ/1MB2bz4l9DBvcqRutDu1sv9zr2lSccTJ2ljj1Dpwm\nk0AoT6fjPdW9MW59YnMjvdxWQ5mtNPpQr8vGIk4+Ij3y6v1tHrHYfdXDgau2\nqR2AYdDRFbofuwIGrxuLGgObyjH1QcJiqNAzKNiONGXFGC1NNLRkMonnb1qN\nN9hNKe51ZkwBNvfcJaIKWFpGcJlS2QlXIhQ4YCYAsPOHbBY7hKhg+5xMzWzf\nQjny+Vk0mkHpCokqDHN4oGmysok+kDfBXGDrIlEI4W4x4IE+DJU5z4D9ixRw\nnzHEhdXRRaCfw+meTJupk62N6rmJBMDLyxBo1Zqyx38lJiMAPBx+J7pRkbAj\nRC4vsyBinFf7YNF5/1xE5GGarLsKJRO3kRvo9W2ACIRUgYxVTk9Q9a+2tank\nM5SNKAFObWPvvvis0JfJ6znHUKzavatrccvjKIFHzdQFRq9mgWlRhyU8sWxh\nviRgrqVdJaWsA2kRWHYslAZMNklhAlK1c0rK1uE5cKpc8/2NT1hFRV1QdyLO\ndm8XeGuxFr2TMtw4Jk+ptSxyziNm5C/ZBbOmbBYnAe+Xd9AkSNVzthtzsX/d\nHf28jnYEoarXX7J5lia9Q3wXKIa4N1VZ+a4tBnsXuDuXvWF73GRzVYq9A5CN\nt5gy\r\n=klCz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"55ff05f1fcd2efe299d07cfd81279127a6fcaa5f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.6557a69d9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.6557a69d9.0_1607010043167_0.024144332458915674","host":"s3://npm-registry-packages"}},"9.0.0-canary.4ea1b7c69.0":{"name":"@material/auto-init","version":"9.0.0-canary.4ea1b7c69.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.4ea1b7c69.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ed9152ddfa0ebd5eb97238ab4a9999a007f94e5a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.4ea1b7c69.0.tgz","fileCount":14,"integrity":"sha512-3vSeZKyD1KillifbMKbk2JKsbph3jKDCLlnBFY1SUqiFompmjdIH36I1Pu+3/CTwhBWy8FEQ++ojIN1S275vNw==","signatures":[{"sig":"MEYCIQD3wK0FqD3w1Y+ymRMTPh/CsRYmlsgkfFrw78ufc7he+QIhAPJKE4B4RzFiJGT4yOjJHvOAOc9pit28N42P/Qsr9jRa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyQrjCRA9TVsSAnZWagAAgJMP/jtorAtNOB06xGHNR8CA\n3KFp+yxKcXXj1pwApR6mdRP4XL0ExIbTYWWfi8mBX90G3MvrdeQVST4LGHF0\nLzMMv9m/UD7eg5g5+cjvR5IIevMuZ1lvwERdXF8M8hWsfuWLPtrmzQHzRIdI\n6ooLseiJenCdV/zV0aMMjvoXtIU5Q60rqNoRNomQgk75ouXprCfxZcadl4wC\nxyc2T+V0TNgrQUPQnfAopL32OpLGaCLAolQefFaN27AoTLurRGKhl6EezzYr\nBqPaVszyzg0/HaW/rSpknLfj3MHENk/+MS8Aa1NBWLbjRSSuO9Ddv2vL1DvJ\n7MmID4tvdcg2d+7efR8Og+lK04P+UbrNI2/OVmzdFSjrIpT9Q6/hu1Ab0rOX\nAENesDwXJK60r72iHR11AsWDsJCzHlFiXZNTDDyw3x458uwPSu/xuX76zU75\neOEzok1Aryd0wa7OXTI54XnO9gK5Gy5pzbKNSwoao5DGRtUVbydwtajVO5Z8\nQwI761tUJz/0SOpsqa+NUpr+hCw7J58fywOFoVe+ZQUsk+EGzNhVA6GF2q6W\n3AWufpqkGqA3lcZdQCa85yEuL0xbkg/yg6N4ANEa4y9O2DxG2wPowflHTgY4\nnHH79occoPME9gAwVJWA2rukoQfn9Cz8tG28fX/7rw55/GIRsKvU/m5wbMAU\n9cO4\r\n=lfOR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7307ed831dded5d9e22a8faf595a7411258793f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.4ea1b7c69.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.4ea1b7c69.0_1607011043134_0.6486321471033114","host":"s3://npm-registry-packages"}},"9.0.0-canary.eaeb78ce3.0":{"name":"@material/auto-init","version":"9.0.0-canary.eaeb78ce3.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.eaeb78ce3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"79df69cc61896c03809dfb7796fb10bb73b0a23c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.eaeb78ce3.0.tgz","fileCount":14,"integrity":"sha512-a0LhDHU9PA3MClD22Jmm6PsnjHZO02/DYaFipkohp6Cb8T7YVCLxXLSYZHsMiTCevszrZAgEImJSkd1NcyVJ3A==","signatures":[{"sig":"MEQCIEWewZU3G8IiS/c80FshRFPrJzZzjSrBcbWWRRL/EE08AiAHU/7n+jGAR1dU+zG0VvBSGKOMAstJQyechZBjaNvHgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyRmtCRA9TVsSAnZWagAAi5IP/00CdDnPXwIvYRleIMrg\nVky3bpRJuh8I5XmXvPp2QSLDzd8FHDbJONUPljJ6U3Q6AepZvnqDnOvaMf0B\nvy9rc+nFTLixFKf8CxS9GyxiiJamRvDlaIIhcvHlOwuHD+gVb6wbDGOKzdFj\nvk3bhUhavGTibGi/EboV2PvIe/Vw+BFZ4bdn0szRoAKcUO2d6zG72O6UD1UX\nYUF22babzAEWeSIfKCWFa6EbUM82n1lVbdZThoHpTnlrIr3QoUmFquiFGqmu\nkMREkIcgi3m4O5C3aPXPLwuLLtRBtl+sWLG/NF9WzlYtzGEzFI/beT+FV0/B\nq0ii44kbondJQmQ5fzQVTvEaojTO4ek7THY/MC73gtegjQQh4W2e9YUEuogm\n/90l8tqtUuWJVN3fGNXJJXDp+Fd9tNHuElRDXeB4O46GEozOJZfTjgnBDGNk\nN2lM/2iv52sknnu8I6qrij1IA03NlwBqMnlIUYUyV3jGP0s3A7U1M8MXo/zF\nId1OR5DzBmMIGByJIYAf2Vs8uZIUzJwYdQJPqh0+vh7tojEEOsEX+JyxGiUh\nCOJE2geSN7tXv6BmHHz4afFG6uuLUqUddidHLvfQdbyW0A0HswAVkblKNO4o\nyxdG55PpqcfmwjW+Mh2vHasVaCokWbFySXRSYeZK0lC9BjyL7NPOLqIPurk9\nQNLq\r\n=7yhJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9902fe5ed18fabe2d289f92e75dbf17abebe5a80","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.eaeb78ce3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.eaeb78ce3.0_1607014829099_0.6581673247054769","host":"s3://npm-registry-packages"}},"9.0.0-canary.1c156d69d.0":{"name":"@material/auto-init","version":"9.0.0-canary.1c156d69d.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.1c156d69d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3128a454862c33acfe49dcf1ad501f8812b96176","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.1c156d69d.0.tgz","fileCount":14,"integrity":"sha512-nBNLivD8zxXk5tg4O/5RwJ066u84oLMtqmLKW1W/mIsWn9iFITnu0znf2FxsObZD8GhN4BfEtSmeVooCLI8m1w==","signatures":[{"sig":"MEUCIQCnYidZie605C3MxvVRuo2wafo3OmLZ3SCZbO4vvBpgPQIgPkbDMOI+lC91QKjWSFP4+jpc8zLIk20EJPYnWmi7oUU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyU4JCRA9TVsSAnZWagAAc44P/RAMnRAIkzy+clhoRTZ5\ngqWjswsT1yNVzQgVHDdy9KykKLLwd13VUjhHcJxEw+ASDtVU9tnENJ9RYML1\nntflj9LZZFafQL7pRUpyYg+2fMSgH/CZrdzfMrIAJae6BjHRlmlMHjWMvb00\ngP/6FDDU2eR2g2oJospspEvY9D47IUhJQEMUH1i9w6RoIluWzsp8svWoJLFs\neYOWuP9F/iHAW5lv56+E0DKEttCkxTRUX4W600iTSB2/7LkZzK3yllnTIr/i\nW0KUXSrTo2HpoW6HGYxwB7Zj7OYEbxtln6o7VeGmwTX+L3ALp77YAODPJeMp\nB4ZtC17gT3lrTeNSsrNXlHcHFw8xN0R8B+vNb1qocU4Rql9anTIU1IzSTCxT\nn5J3ouGp3MyYO/L+If4DetEWqStNwWo0Mn19d/TKzd33YiLIu5FTBIhs97O2\nZ8SnfnGp3PRsUfgbMYSrcsGiv2Ti9AuGohQwkvtUhw3i2K1ZkI7UgnCEFiBr\nC5Z/vyb6wDonGuOqOuAqVF9NdedclIs7yO03jop9gOFyhwaWwWtrKk5Hwge+\nDxFdxJOTVjf7kxpa0c9umoFBhuuNQeUYaNPJbZaWJQNUMsew3G1muCmfvscN\n3u1+V7qTVA3koezzEO+pOvoWFY16itF3Qfe7injolK4lqgzrNFFTPkGkIlno\nm14X\r\n=5ikQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2239befcb4baad98eef5bd67444b0f759e58a812","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.1c156d69d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.1c156d69d.0_1607028233053_0.1499882653978959","host":"s3://npm-registry-packages"}},"9.0.0-canary.832668d33.0":{"name":"@material/auto-init","version":"9.0.0-canary.832668d33.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.832668d33.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca5cc18a2b97883aed3fbab678948fd4fa39f8d7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.832668d33.0.tgz","fileCount":14,"integrity":"sha512-PMWwvH0D3kynkUK0DCAAyHN1r6a6XxYSfO7RawMYRDl/Mb8AmQLXViEkg85yLnVia1sWC72d6yaRdos1TavltA==","signatures":[{"sig":"MEQCIBBsfseYsVNYW63RtceB4EXytb7MhYyoDZAVxoKL4VJqAiA7bmlxW8iDtk7whe1hk4qtl3Lx6JNP5t5DVucXzLXT0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfynpICRA9TVsSAnZWagAA+OgQAJ3Q5D/Lcs1v3tWzuQUE\noeRmtbUg63/m+nz7LTdvpTltC/lZ1uoLkxJAv/b58xN/rVRdnqRNK+kYobth\nSubdT4bx4lzsDHnLKCG7d13Eu//HSBgH/Z7P4IK38A4QuC3r9Y7cXhWuweiR\nw70RhapT/7/pQ4ihZMKAbwL5iqEM2xv6STvvMJOPXCRSMECHm3gSCmQ7ubeI\nWhcdPr71yaOPtty6Y2zha/aSf4wTxN1XbyL7+G8R6ILmI3pAantYykSdpUlz\nmwhwGkXJpWtGVZkVG03bf8GAd9oI2maLs36mfAquwd89RKds1D6+MLM0t1A0\nPEL8GIP9mg+mldKNH6tWh1tW+0sjSKDhdcfrNURx/4RumP+IgTjJ8Eqf0kQM\nPo0QzkZyJ/wKB41lBVbYJoByHsK57hF+/sV0486kia4c5GI9rx9UPRjZp/Ah\nOv0u2/pQ3R+z3gWtuEdbFvD0tXpzcqStxssVhT4RfJKSsgdPC3wLRZUGvqfz\nVGiFy0xnzwEnSwBkO/68xLxs/gNApPfn6YR27nxwBZxCqJvHQIyIgQ//6iFX\ncqzVeiFEr8DVOQ8irvjc6fgn0UyqjD8vx4PHCibA1rycCWskt4Pf5HdM95PF\n8KORZIsRA5UB2D89vxLz0cs32y2nwck3Vd+LgtVPg7whJgS6oX8L8QZkg/Ul\nFAoe\r\n=gNSo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5744d71a59950726441cfb1b4e3ae33706069b94","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.832668d33.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.832668d33.0_1607105096320_0.5934434322023632","host":"s3://npm-registry-packages"}},"9.0.0-canary.4321323e4.0":{"name":"@material/auto-init","version":"9.0.0-canary.4321323e4.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.4321323e4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"382336cca1a9c84fc9ba3db4d485e3add3e861d4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.4321323e4.0.tgz","fileCount":14,"integrity":"sha512-7TC4j9bjQsVQqm3UndTiu+AQoPZZrDEHddsYHtYgVeiWR/sepo9oSSm9jJivrW8uJyopZ7TMRvHT5w0JDT1cpg==","signatures":[{"sig":"MEYCIQDfMXbeZIsR+6mixcjQT4bY5JVTBVcBs3lpEl0QyyH8ygIhALTAkIUukqcBBRyXp4EUiKVaEZ5VbdEDc42F3uQPfCE8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzhHLCRA9TVsSAnZWagAATq0P+wfr8g1yxKWOa/gkiYOk\ni7MZl/qKhMi1WHcYtiAgKsEDjOW7eWxZHeXMsdMcLMc/lUhHEP3yW/YC4knF\nhq5VVVPsAVEKhQ70eNLlc0RLenvb12vuoGyB1h9esbuUccr7t2EdTwzvouZt\nmwaYL57WUls94Tmf+t/73z2lKqFl05SD5qsTjDRaAl9xAwUtoFTtK6mBRT97\nHqqk72dVOR4CIVNYKG+tMvcRePzcYOCEMAt6KiXFoGQwrq6Ji2LwMcpu88qS\n7cPtOiiBf6UDPLJh+X1y+XfwsXXTaXS4N1b6I3LL9dq2r3XOP5GicLzRrl02\nGXVlyMXgFqLVInHAfjxGcfcLEfYBc3bDF4SydL+9M9WXV1GE0Alm2OIYS6bv\nOyRbLvqPKLSpyGrRN/9SN4ccOWlay9tPlqhAyJPtGTy43LYONbVZFyIT3/6f\nKYUOj+2aSBOQTIDSUq8au3bl05k1UBKh5utq7Zbaf70gbpBp0HSDAUoNGxUY\nbaUB+23d8IovfRCK3qh52+23jCjPuyivEukixbqfUGBo4mOHcAuupnnbXyE5\nhY8Xovg/PVeqtr8KOsLohJkAkNTwPrchPpcdUmb1+D292mVto2iw3DmmVpzu\nES1HmKtI6sw22X5kcBQOIrtUcapr/ggw/ZpZ+RTqMF4CchjkgF9hXPCY5wdf\n2bvU\r\n=e+CJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a838a6bc72ee56a967d493a841d4c69ace1f3f13","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.4321323e4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.4321323e4.0_1607340491359_0.24311819760097597","host":"s3://npm-registry-packages"}},"9.0.0-canary.2d5f32d41.0":{"name":"@material/auto-init","version":"9.0.0-canary.2d5f32d41.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.2d5f32d41.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4960d0d18422bff08704f4f6b379238e0862654","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.2d5f32d41.0.tgz","fileCount":14,"integrity":"sha512-0NGvTRh05+KbTBFbeNPRtAJp9+A9M0FBZIplq+TFN/kHHTYuKjzTKWBtgOsnpwqJWkTR9+B0KkDeuM8oncWgYA==","signatures":[{"sig":"MEUCIGICbEvTI/OpihpD8LpKI2dOBzAuWGSouUeYK0qJeEBWAiEArpVlDCIPK/34Wn1Abl88xh5XQtbaKkj2UJDpfQiPD9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzlseCRA9TVsSAnZWagAAqqUP/ivzuqDe4b4Jm4HhHfCF\nlSXCBPCSHS/r1B0eslUoUOcHe300lbT0JIgHDv+TkhPF4ZZEFC4lDaCgwGhQ\nfnQNtY6bdCzCp+RIdXrYEQIyWjJxW5VwG/PgArFjIKrMb8Iv/nCxei4YmXNY\ncyPeARlKT89lGlSQT/6P9oXnzcw6BYT/tRNeEIKdPZXudcCuAqZPSUO+7yed\nVmF19EZShxHKcZMH5/Lsc24mIp4RgOhs6aPFONLFEvm6aYmy6RDsCuf5Q4T+\nzxg2sPw0FePRsZdpAD8MhaZkiObFmdZPLwXuqF6xGNQIehMy/5ZwwFUjg9nT\nnFsVaKbC+ts/6VWxaMcwWnUbUs74CQAllJYXdviYnc3D9qNbdn+ASR8H8MUm\ngmpQJqHbek7fVhWiTSD1jy+f3lebonYsz756XThguhafR6wTwQqVVwmP/SeC\nzTC/ydUhp2n/YRwx8I8iI5XnadejfLrGFJ6dFy0ZlRLBbTR9qPJOqDNDL6gA\n6coUdPqO5WfxG9qCnmdPRrrk3Pc4yLlcFJ5mJJXH/tz7qHYlGXmDrZsB9Jou\nx5K545rPr+g8NPDeJyfyqPJDWgMwbKabH8gjfK0VFulhaYWGlaZYfDBTluzr\nu/vxvIwaAPpCQyQsUaD5XnECN+QeUmI9aosycOR3MvBubFN/3esiXDPAhWGw\nsTMt\r\n=mVNr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2c385d3016a738d32bd3c03bcc91bccf82981fed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.2d5f32d41.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.2d5f32d41.0_1607359262068_0.18519575035921276","host":"s3://npm-registry-packages"}},"9.0.0-canary.8239afc64.0":{"name":"@material/auto-init","version":"9.0.0-canary.8239afc64.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.8239afc64.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae481be290f9bbedc3da8428b7d85e843635c059","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.8239afc64.0.tgz","fileCount":14,"integrity":"sha512-5SB4Cp1EJ+clwQ5E9mn+rlvIqwi7SAXma3vop0ZBuaBJRmVLO0ipBdVLBI3dXeblZXuW+oD9WEQDT4+72qm90Q==","signatures":[{"sig":"MEUCIERPL32YSv1imXZAXw0EsCKuMIpYxi0+P4mhNLdsqHugAiEAv/LApl3yHchnA4fOYq2j0X4wRjx2Srzv2KmW8qfKCvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzocWCRA9TVsSAnZWagAAZhoP/A2QXf84rdURve5pNTci\ngKD7N18KTMrq2xQIKCnrRiU3gqyjosbZIKRcAGXDKHEFflW84yAUjcCFfEjO\nxd4B4ZLTH1sdAjM4u1EhEPWGlK0hXV7A8OvfSh47qvSIsXXGxZwCCFMRLZMv\nrFAm/AxaNvNP5wim+yws7XMwcqmJ9yxNR1LubN83KL+cixKn4lh3efyAY8bl\nMSBGz8hJVWrNKFzFJkjC+NSmf2VYoDOJ2RGVuXSUMewowfFkUQuTYoe16eQS\n1Ph5PwoJf4M3JsrOJJ1mFey/oT5adzKFt8cCHEVuP1O8CGKVLOrSrG0SUJtO\nEDofyCdX4b10fa+T7bIvSR8a/lzDt6HbA8UGgZ4dU878eUbiNef+X3lTYZEV\ng7tDvkCUHW/SZQrKw0tvECiOEdnjcOSEup/OpyKHYNyIh1QtE+guenrh3i+O\nmFIuz2JUBsItOI2uABVlNh9/tsonW2MO+6j7JaFaLZXaewylmpqzAj2bDRMl\ngCwPseyJbn26b++s02tucLv/T2oxKg7XeBAahlOdapgZsIKZtNN/maZv+4Q5\n6Mgi33xGMmVCzsM7sIWbVDcxZjSIa8kisSxCzaVHoiZ5m+XVe5s0d1AAiMYy\nEU8mdMC7+H+VD8ZadrXYDgnDgnI8pPBOiV1OLcm4FIIuS36kDVixlksJLbgs\nYaal\r\n=Xxoz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3ba24284e7fdc10c5aba869e2a2d3175867e0f15","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.8239afc64.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.8239afc64.0_1607370517438_0.44047253825939214","host":"s3://npm-registry-packages"}},"9.0.0-canary.6871336f1.0":{"name":"@material/auto-init","version":"9.0.0-canary.6871336f1.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.6871336f1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"722cdfd4200ba65fdea042656f39f40da91ebdde","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.6871336f1.0.tgz","fileCount":14,"integrity":"sha512-SHbEByVrV+D9ZSOvjOOp5TfkKNh2Fl5BevU3DjnP6ZlHKhfTtMuKBIueq/LNTd/Cj6TIf0sON3KJ6XiVgcKqkw==","signatures":[{"sig":"MEQCICn71F28G4j3ny3L34wxvmSs1W5v4S1xwCytsPcoREr4AiAXOCIHo2jCkKByXDn1b2T1jDoypcWpOdoL5xt4vV9/dg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz6MmCRA9TVsSAnZWagAANrcP/jozoW9qH3tEZq4A6PgU\nSNKjVXjrUmp3V8YGqI7BZph2dmmU/DDgoYc5JAnALN7ctwap5tQJsxRz6aQ1\nCO3+8iUsuRJbKmpVKx1jq6a6GJDnjdoIqYKJaN9K2iq1YApqXQWzLqq4D0bM\nAbPE1sFA9uq6m2QAIRyIZ4mSH1P2tVPVfO4adllT96DoHTZ3tt1fdX/1BEd5\nL4AEQ86YxHMAixCTa2vEk1bPiwVo9VCHLpoz49gjcnbavYz2hPk/DH+UaIIL\nxhCdntxkmzZRXmQ7Pe/Y2FuP1C8M53zFg7wZjWKXMkvAtifmlea1A6n3AV5E\nk8ZThcBSJVpI1iEiJ3IwdxMYEZh2yMv0emHCN/zaD2zCD78asxnkzI6bnlyG\nLf+pl9bM4exyhmj46GoxDYJsZVGjlaEA/O6HW1sPWczb4m7FUszQ5O4eRIrG\ni5KwtkZFtiecmSZoJ3n0J4YBbWCdtTEtbksjEzxeMRLTEyyY1hfd5YPdzp5C\n+rvjMtlX2l8YWA4K7uMgMN45pgo5o5SZMuBHatk4WPRkFpbpZzP6RqfXBBBI\nz85UaxVaQbSNW4YIKrVnccGW/ltcVGYUd2RTzoEckjiayb4rD6WLRQbFk0xz\nWzEI2OSvIirfZM+kxNC4ZccAXNjZBrY5TtzlwpdD2pNmZpv8rR1c3yL+JBIO\nkXUE\r\n=aY7G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aed20b07d4f2597c382a6ce4b7c723f6df0c3efc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.6871336f1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.6871336f1.0_1607443238163_0.8240677238605449","host":"s3://npm-registry-packages"}},"9.0.0-canary.9f718da94.0":{"name":"@material/auto-init","version":"9.0.0-canary.9f718da94.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.9f718da94.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"715112da4f81176e3b193068f4245dda14be825e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.9f718da94.0.tgz","fileCount":14,"integrity":"sha512-Ee1bjA9lRIEFVmIK0AW4sa/fQxJt5NyfgIkIQw/YoVsF2ebuETOxSMWquxE2N4HCgaJeOOzPngIPp7iXH9PzKA==","signatures":[{"sig":"MEUCIDWkjVX7ulePI7qoM2cEnQqCeXjVjkMlAloGGP0TN0LyAiEAy9Mk/kAIvjCNdGY5TrppCe8akDOSvof8dJKCc/3gv+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz6XkCRA9TVsSAnZWagAAS9UP/jr3VbXixixyVfDz+xaZ\n4LuM52JYns+fU4MXTEZPN+oExTk84nNuX39aidyVba3kr5N2CFYnz29IK9k4\n9bI/dhcYUbBHpS7qB7uVrHDLm8cKdM7QwOVBHa2yq1Q6NHbNNlbwRxZ+aZqU\n+STg58RCiSoqq4ipjOOlAutwLpldHASAaRO0D9gzNclZ0Mcjfn9NI3etFv/A\ngumajxOX4JtBUM7PhV5S9aNiQqg4JbwZS+29jHQFMt/xAeOLK7qgiJ2QrUky\nqefWvV9zv6be+0YXfvpGH6CfS9TYjfP3q6vrkj0dpn6wQK4nx0uKN11K5mgD\nlXPMbdmHMSUjcghSJZfyqHxdjQ6aM8HKJT9N1vNEG1CcvivC2v+Nd4nuQxFt\nBwT6OHLn1DHP3vHcvUIw4rY9nRWvck/TKUZH5a/RXeLs9TWVQaSWJlM2ux+o\nlMirOaBUbq4aO9A1fWIqkKXL3lHaMO+DuhGzqfALm+fnH4D19wDwEvM2UEyM\n4iLJkw/tTsNInvJPtyUEHySF0Vrww87TlI0bGqqbo500YPXPT3CgvFDM/O4W\nFidV9ZR17wjiLx7yeEvjEUg1oaKVZ8Bflqm91UxvUH/6EbFTcq0Te6CcZ9Kq\nM3gi4SCxlQjzlWnKt1Riz0exnuyZcjd8Qd7xNV0BpCS7sOf6fpvToMPmj/pe\ngmCq\r\n=ONxL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7fb6692f329c5482f22dc9fe691a20fe4c6dd38c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.9f718da94.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.9f718da94.0_1607443940442_0.18726103690796836","host":"s3://npm-registry-packages"}},"9.0.0-canary.1fccb1418.0":{"name":"@material/auto-init","version":"9.0.0-canary.1fccb1418.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.1fccb1418.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8d4cbba8e039580ecc97fca19b4623620f741680","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.1fccb1418.0.tgz","fileCount":14,"integrity":"sha512-TNe4cCaSe3JWvupGeq5ylL1oHSK4f4zhdntxZb1ZlbZ9RPm7V9swGBQxKyJZWNCA2ZvdXxwo3F+FZPG7Op3sUg==","signatures":[{"sig":"MEUCIHZkrXot/Y2gKzDCz8zrmAJMfEIBngIuiIt5vQPUWSGkAiEArgvdPzgScmCH7EsLUt7eVlXm+yX7yXmJuEZWphUjlqk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz6lwCRA9TVsSAnZWagAAqqMP/iKt2g+FMKPyZk+4SlTs\n67CZaOjKRDh6dIDOvYJDyV2n4HM0uof8JSJQF+R7F7wDvpbpUvL/aVsz1mHe\nH1fAizUVIV2j1aSihZ16M6DXrl4x3BedByaFGv7MVLmXlcw2rEKI2CHIr7aR\nPA6a2QhtTy91xb2bv/0gFX/WSL1pXoJup21FzcD5sFNCteOtqhk4BZJm8PuB\nOj3QgY7EgCGnsrLYTSe8XiFPR5DpgbmAvc2TchgUe02HUhMQDAj1cqoxQytx\nRBMzj6jWzQCkxjc7LPrwgSW8lhDWek22jeZVvssEV8v8MxYJ/ng+W0xGx9wo\nMHEvwTMoIjBzPlxVp8Cq9bXvdc1vC02DyxHN7nOzBclZlxqbIR9Bq/Z0AEI2\nS1ZFwhoSBnOWILQK9gZBMK+cf8FGI/Zzmhjwk5X18yH9e39f5HgbKDj4iz57\nnmUsJeN2mTnd2CEsd6GiwUEowHazb8mfVGWG1mcyiiHyGboM6qn07+2rnqiT\neBe1zKDuLseghW4GZ1t/CJEbO/mmi9AWIWga6DNyzncXUUaQ6ubc+MA9R/5E\n81gc00zEFXcTc5uUGFN6LWDb3YmH61GHZYQrp9I0H0yexsBC0P0TGqPRTyDN\n7zPYuMiWQZHpZ2ev+5+kKveHNucF6l2wIL22hRWRVAd1gUnw81vRVj7VRoWQ\ngkYx\r\n=PQHX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9dd96ea7afbac37dca91bc879dc44ce4523c442","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.1fccb1418.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.1fccb1418.0_1607444848428_0.04905342972485749","host":"s3://npm-registry-packages"}},"9.0.0-canary.afb68894e.0":{"name":"@material/auto-init","version":"9.0.0-canary.afb68894e.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.afb68894e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"569d8caddd5e1e5a25bfd1970f04b99df0d1a0d9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.afb68894e.0.tgz","fileCount":14,"integrity":"sha512-zOnzfGIT3T3VPyamQ7JHtg1YD9Wb7ThUI6aPxuDHD8IomaE0qfdEMdbFw42sRCBM3+tKJLd7/Lssu4Mr+UlVnA==","signatures":[{"sig":"MEYCIQDuzR3UqfxdXSPwts1qnN+kbcz+EdRW6mClRmg6caxE7AIhAPZ8zVL0vBlBMWTga6gSOlxIroXbcOP8BN6LRGrkF1/z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz6paCRA9TVsSAnZWagAARc0P/iqGLl8ONt0TsEI1W659\nzSwymfi//gcXjyLPPmAv3H8kI8U8Epa9qMcaOy6ILpWFw4gIUgTp2NBksaal\nQ5TjdxHcyUQ7qDhAr/aFv/8TDmoSODmmBmjGL1JzZN81QjzGM+b5wXiMyww2\nrwtbcmp/ZRn3n2WcTVqvSgmfY7ALq2eLYFRLAHf0bkELIROjyitikt5ErrRU\n5nhza93Y1sTVbOfVGKzX3iXRxjxFAqH6+lBzkJr7cjJxGKDdVNOHLPOuFLBC\nHMqcXmqiyZQDL+XzyEmHMIBu+kcRua9aKqzWiJ5QDiBV2KDjB4LCiCNIV38Y\nutPOHt7CDtOClIfwU6qJh4PVLOUXJr9ARzsPGFBcB1pMcpFzW9sSZDlY8i0l\nkhm9Q6u42OgIzCtupaXO4gjWN9fEoO6olDFKUqDYK/oZyzKV7XAK00rdpcIL\n26L+9bhBKkZvjct8yDOGI+Xq0thR3dvCsGFbDSoMT7YDxl9ShnJo02yFgURg\nxMpc6Hsc1BAnoHqXndPDi8ykOf6QAWsjXKsLIMzCVah+o3xdPZZT79o3NiHM\nHbWVPF3h5/JT15/8WWM+NjLUKC1mzdqA8fmOSfstQGC8hKT7vURJWN3Jp0Oz\nQHeMXV1GDrmdEF8hpR2zaNvB9H+C0bkh/DEv/bAWjgERGWxjpLY39tm7tc94\nYE7q\r\n=/Cbo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a3ec1a501083d67f1c342fcf5b11a765a586ca0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.afb68894e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.afb68894e.0_1607445081756_0.9990735144201803","host":"s3://npm-registry-packages"}},"9.0.0-canary.fd88d40c2.0":{"name":"@material/auto-init","version":"9.0.0-canary.fd88d40c2.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.fd88d40c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ed6925c3931e3a46d2e54252e996991bbb81f63f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.fd88d40c2.0.tgz","fileCount":14,"integrity":"sha512-vX3/5VwqFFUSq4eCEeStCLPfYDlgiaATABR10wugzdHs9NFMy6ujW7eIkqS2IdjAbjY8SU0rF+4Rm8cwerK+9g==","signatures":[{"sig":"MEYCIQDn4mCXrbUjhonRYACv2znc0TeVUy2894IpwS/VwniAFgIhALjV2rD0/UIViHr5m6aEkTZd7Zwd89p+dmWJ8pqv8yW2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz61lCRA9TVsSAnZWagAAHfcP/3sewT88lZrZpXiwJA23\nrI4U6j6JyQaBCgfLLwu1gO+mRiEPDP6rJvegOZUUHvc+V93jrF8oT+CJccTg\nAWLAGb8yzX3Py5gEy2DiACy/Ba5fVBwI2WGYxKDW+bHRguMoh06Peby52V/N\nkG8fjIXVQtRc6Oyvf32a37W0b7wzB3bLCBv+zLZ6SgIZVKTQjiOmboMG735j\n1Btg3DADGqGHFMgZ6NTFXn9falLnG2dHs3BUTN3dKtViw4MTKbobkk5LhiI3\n+9ZUeKsqrykZr98RSP0DMyV/GvbXAcBl8hXY6nA/hK9Eh3vxmuT7yhtOI9+L\n1JXBtUB7MP3U3ohggGuen8gaWP6lDeUZEiaJ9jy68snVwt1AeHLUDVarZIFx\nUiQ8pDVOYxfvH5OSnLDOr32D2tu0nSMHlF+FDRx57xwwxvs4au/rtbDKkcYQ\nmp4m2RF0HI+TwkSef0Zxa8Cc10TWOseeSj5X0NwBrIkX50ZtVHwr2ZdpuVM6\nAtp4iDdYPIIFXkjV7vGL8lpfVowI85tHWS7z/H7/pr+05Go2401ZshxcHZzk\nRCsy9fELl1qpfgFauEq5xp0B3i39pNMQB4+SPB36Jdqkz8l9/y2vJyNVwdVC\ngfE7RvRGFWgEuZusJy5qr5OpQHSuEeC9dVLTeRRYsG5vmR7u+6d3qAZcaOJ0\nROJW\r\n=crQ5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b0f8299700bd0ac44ef5acfdd0234b464d837131","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.fd88d40c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.fd88d40c2.0_1607445861270_0.7247214644422981","host":"s3://npm-registry-packages"}},"9.0.0-canary.ba9e3109c.0":{"name":"@material/auto-init","version":"9.0.0-canary.ba9e3109c.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.ba9e3109c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e91ffe77781a8a07f6455f03eab20aef04b9e0d5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.ba9e3109c.0.tgz","fileCount":14,"integrity":"sha512-BCI9xboGHMiWzzTCVoGOsEcybP/7dQxEGLlYqazAzuIc+MfZVLj1QQFFHJGDOOLqrYKvp/LKvzt60RxM5p2JEg==","signatures":[{"sig":"MEYCIQCN19lMKlo5hyM1HGTRHdcrwt5s9HoKS0sYJZ88DjP9qwIhAPkwOKJf+KjUDA2QZj5tyMgiar03Wr6DRv8BFxBl4gZl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz849CRA9TVsSAnZWagAAGlwP/iHYfU4eCQufBYN034sj\nUq3r3EOn+YuFhgbA3tiNFTTWp4c2m4MD0P5Id5/uHyc7ZXq45INe5bgrkezF\nAI6vub+xpfovizasNTI9NLHf2iDt37Me/46S/bl4L8FH8cS5sV22m+WBh4z8\n6Or7/4STHV21eX53TC9WIjviF8uJEgypFef+LkQAO3vFsGVNvST1K11SZnka\njQkJj9r20Wa/pwMriScuGpfQsqhnJdM+ZvlZpMHxLLTCCWN3FyBuvaoEcQ6d\njMrQrJsX8yPxt9jVFv37OT5N/puHcLoXsmlPkePPMiFv5go92ry/M1OdZr65\nzQthbRFP8awwH5UkLNLXNQcbIOCcp1m5E/sd05Dr9CrWr7Qa7RxJmYakJE9h\nuxOJo3tUk+23V1Z26N8xiZ7/WZbijWkmEYWXOJGMkKL+IcvZc77caPLbQ96c\nrl/Z38pB25MZjxcxz/UeVl43juqPd/nx43h6zQGyg69TJw+kDElOw5EO0CCL\npShcHTRjC1ntFy8u81D2QPESBzgo9nVa/atlzKTbvoO3cYcIRfDuQ5jdzV2P\nJ5rB3H4o5JBRa7qu0cZrBR8tG0bMuH7ksLWHLCiy/V4KytPIFm5ews06cl1s\nMj2CyM43luuq1+MDQQpxloLRiMMGB+VS4wFmQcje/PRNXhvYdhz42QvEbZjq\nn33a\r\n=2kgw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"84bc4a2a193fb62b5721555a77b59e7bce321bd3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.ba9e3109c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.ba9e3109c.0_1607454269223_0.7890987837362449","host":"s3://npm-registry-packages"}},"9.0.0-canary.1085c3b2d.0":{"name":"@material/auto-init","version":"9.0.0-canary.1085c3b2d.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.1085c3b2d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3255cf1529bcc1f0d162f5c388661cb1dc848506","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.1085c3b2d.0.tgz","fileCount":14,"integrity":"sha512-hM/4MVLYlDlfqvEeaNTPkBdvkI26cad7wbDQIPIIqZZuGlBMyC0ozirXa/EDB9dbvm8XoIXvMNwFid9ePnKR3A==","signatures":[{"sig":"MEUCIG7CVdwkrJ4jfy6C5frX/ApYdA+f0nBXHUYPlOvABZToAiEArnbbqk90n/XIN5MEWW/dw3QOuASbZaYUQb+6QxTjsvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0SESCRA9TVsSAnZWagAApDYP/iGeiM6+Y3H8cAXOQ2D8\nwZm3k/p+mK8lFPW9nvTzexXAI9a5CQ+1+fX3VJ93K6gXBQ1Tl+jmLLTZfr1J\np1V4oJjg/f8jRWOGmjjy1R1fYirP9WbL1hKanzPQAlH9ADBG9PUNEk+lPYMc\nP7hCdswUZi+rPKChdvIzwnoTuSqg/D6SXpxLgqBQfuLHKoVIZ+xoaVkIrBv6\nn0yy3n8q2pzaKXDXjWVTYJ5qXVTp0uvkKJAKjclPgLE0f24tWkSO2wbdgZpj\nV0jZYGYUp97mrcJX3Aw/fH3I7Gubo8rmZxgBism2ElzyD3RxoQ9223pGm3fA\nJLpMUNdBIVlfviHW3Gae9liYbsyHYBhoqwq1zgpoc/N8mKHFqm1URjMWs8zr\nGHtApDzr1jDWXD28eO/eMXEdALWQ742tuXBLjMgRE1VyU9MpsaRqc6RFXHda\nqXX+X5dLs74RBC8Qte7/1GnkgNSybb+04MVdiaqBVHdtzozaxRScQzdmQGyn\n06sjYq3IeYyohVxGZBOAVHsll5/JixF9b/kEyETBMVf4T1AStO5Iyt8Q/5sP\nd3k84K6MUueN61o+zQe1kYD0KzPIvLN8h0u+KYhz44PkKLl2tWjeUHwmKl7l\nbm/BwgAXvu05giDW0KjJNzRoEbGDOCjaWSyZy8ZX4Guz4ksnwy4XCxZ0kClm\n2N89\r\n=aSQt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a223e0b83a78bac523ca498cc8389f361cd0f4e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.1085c3b2d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.1085c3b2d.0_1607541010484_0.38495778463082186","host":"s3://npm-registry-packages"}},"9.0.0-canary.c5dda809d.0":{"name":"@material/auto-init","version":"9.0.0-canary.c5dda809d.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.c5dda809d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2950859ae150d4800721a2e69e71ab6d96ac2338","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.c5dda809d.0.tgz","fileCount":14,"integrity":"sha512-9dDLEfsngk/IzXJtl+IGdl/dtnCOV1wwoVGD/v+pFrcIAN4HQ9scbYhZli0NLs9Tw0kWeOgk70BMwkpNoJTtAw==","signatures":[{"sig":"MEYCIQDK+GN3kyit+s508Oi0ZzCli5kAMpa31N0YexOhtWyVuwIhAMvstLqLHrFmnKlC40OEu3fVI9nlNuwz3q6M4mLagpYN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0TgzCRA9TVsSAnZWagAATJ0P/3LLCep7I9MeuVhwK5qt\n6XlCYCX79LVZVshBe4mAQSr8ppmL7ZEUJixIYJESQzqQ2LtsTH+EZl4vM7TL\nnk7cvwhWsz9ZKGN2YOg+Pt8uYaM+9vqogb/J48PtbWdBW8QPCpJGdQmPOx8L\nDf3dwkEzKNHSBvavUOAFVcI6R3gZKZoohdx3c8tWtasNg6DJeR0N/m0H6I+O\nnu8j2Svi3dB+jTo7mjYfvS87/y9/jGd0+pge+LMpzl/0eHjkcjgYFenV+hBX\n4kTEJnMkSHaF4LecdjEr5dvPzdYU1Em99I18jHTbilzCLgMA+TnKI71/UE/p\n83FJerXm8SvK708TgZ4JSGcz2JyJ97/VtNLU+1/TUgoOgFrOR2SysI4MfGQD\nwgzMUhXfDsNCoXKibd35ZBxK2Hsy5DD7mtT/tpJVxEjtUIkFwwzdROvEb6Oi\neB7piW2cnSOilOUHiZ8o/MctfuvJNyAdzRJLr6rHyHCCN6s/YjS9/K6dBhmU\ngQU+UxrarhBF9eyVPCl0I559DJWXbwl76MmCC23WNZdGrj3jttEqQRNwO0EW\n3pSLJqpKJXRAKzU3KaT+ND9tceD7OFDa7pRKr6ZG7nIlWR9B6CuWLM8ZYCHC\nrGeNXjFmZitr/7UR/azodEXIoe2FreWSO/gZFNJ3oUXAYSHQrd2nt/JaqgII\nesmk\r\n=7M1i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c2bc7206e40f2f31377a09e53af457109018ff02","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.c5dda809d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.c5dda809d.0_1607546930865_0.8381472697663133","host":"s3://npm-registry-packages"}},"9.0.0-canary.f5f1bd86a.0":{"name":"@material/auto-init","version":"9.0.0-canary.f5f1bd86a.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.f5f1bd86a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"26384ac082e47dfa9af01f81ae36bbb36d802ae2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.f5f1bd86a.0.tgz","fileCount":14,"integrity":"sha512-sFu/zVtheb4OAfNN8zgj+Pou75P4hScf/YIy241cdJSV0PL+LoBj+LqxXvaSDdoI4IMzNn/WALz6VUXVNURdBw==","signatures":[{"sig":"MEUCIQDGqK/C8RUrC+Y37RYRyf4POrp4+GV1ziAeU7vx9h9kKQIgQ7SAZ5/KwjxmGHlTaZJa0sk3KUqee6lGWnfuTlVw9+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0Tx1CRA9TVsSAnZWagAA/9IP/29bcPC/4MkQqEKtW0u8\nyGJr3/G+3kbyFMUp6ECRzir23vjsgXgDYT50iYFhMDeJa8vy/1xzB53Pnt9k\nvHS6DlNmS8YURTuVZddHVlnKmZ6h8b0Rx18Ampv3csvEfLx3vCmwOAOhP0Up\n0CUYNDr1+Iwqj2dFxJevDM02lvf6Wm5kd6bOcbNfcT2xJzuPVJH7COGWmViR\ncIE6moOzbBP1yHcCQBjOOHEHLm9JnBpx+UnO4RjgqEqmBVK2Rhf25oe/SJLK\nBOKE8VD5yTaeiR41kh24LaDXZi7fpqvBPgh9tVI1/iP2IXs8UIWBV6b+Zu2k\nf1sJL3br30+MeJ7QUO3HxRclOLYWHmp9poUqDpFj+ZOn/TPNFSnqj6/nRhaD\nhDuAAGXVtdbxmVDQwltkaJu6xGb4UQcMyUOs/LcSnzTSOG3uoqfomKzQCuUr\nv8GlcRF5wKR01H2o34aptp2OsO+//x/JY8ogGT3qnT7lpSv8NK2HE9tYibHT\ns03k6/dBbOo3QhuOkYFNSOhpxBTaC76pHCEXNMUHbT6iTaZtD94LUPW0CR47\nQzqDrYB9w3eXGDpO0xyR3OMVVlDk4nWkWqlUITftkORE0UX2aE0qcrQyGaP4\nhY3KT/ILDbkpVHHIHqvWYygehargvc8CLFcgU/+lqjrjYNbVSldLqaC9DDCQ\nfI5f\r\n=+Hcl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"86cb1fcac08fb433af0662cec8583dcdf435eede","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.f5f1bd86a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.f5f1bd86a.0_1607548021073_0.8107460913918856","host":"s3://npm-registry-packages"}},"9.0.0-canary.00f38200f.0":{"name":"@material/auto-init","version":"9.0.0-canary.00f38200f.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.00f38200f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9cb88e3d447f384bccf9259cc0bdb16ba7e05079","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.00f38200f.0.tgz","fileCount":14,"integrity":"sha512-/IyyLFwXZBmz2Ofei+sxuUQd29J1I71mXYmkG+xetFtlW1uxXAxbES+1jGSvyVVCcKgJhVbjaC/etttUGywNbg==","signatures":[{"sig":"MEUCIQCxorlXnWuWGihHeBWdsrxem7bjD6+lAY43lLioEAVJtwIgH2IJhQfYpJxcmGlQogpdaDSES7b6mfL5vZ3pm2zexSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf05ODCRA9TVsSAnZWagAAKncP/3YAuR/4/YZ+eNXjeZDG\nbrC6aLbkOqR0uaOXWM2ssUWG+Yt2WA3Mv1puMW6z+ZQgzEw8Wp7k+bJPOouU\nmrx5PpPRLB/gQi2RWALpMPudNY0Q9G7jtV0oEse7t2FEEVjaxcdis/OLQXRz\nuJf8fwwBpeIy+TzM5S/h0tvRdjnNM1wkUSvAOL3p5h8ejGnceT7bX9IK+qKh\nXdptxQykMiVHVmwdHBJRwp2ScQFfrpwEafIJwXrTZnpYJ7GzhYs/Bh4VSrum\nnBKDjkmo6xgYHYlNpBUoTul1D9Q66fYs0VLp3KyQKHz8PFZDKHXigsFKdp/H\nchcx1CBcmYx4LbbBIjxG5pS4xHROcYZsaZap+psi7g/zvX/UT2zCESIAkHp7\nY7FxNe/v9UsFu8SmTbwTWMYm3WHzJY0WaoBcRZ3VkuecW1ppq8UeLp8Jpc2J\n7GhaoKhbuMOcCnOFveS2fjd3u1ERVdhdXY9eduDUVXpRhfUJkj/MgbpWx/i3\nIo6r7O3Lf1fJyE1NSNseqGuSmTUFWSh/fJONohbxIVErQbY3YsGQnUYUTNNF\nPFch09Tu4xQbhUlVBo4o+JzznQDc5K0+6+2J2GroJd5iGFXbc596uoj7enhU\nvxk/5qikT0+OCMapmxAcuFrS9vc2GOhBZvqPT8/lTF5dxNn9ydQqjv9VffCF\nzGet\r\n=i/aI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2771c0048541c1dde142fd7f565741f0dbb83c20","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.00f38200f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.00f38200f.0_1607701379398_0.18790247119423076","host":"s3://npm-registry-packages"}},"9.0.0-canary.ac41a5729.0":{"name":"@material/auto-init","version":"9.0.0-canary.ac41a5729.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.ac41a5729.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f2594147d969086e5455b97e79f52b238e1a124","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.ac41a5729.0.tgz","fileCount":14,"integrity":"sha512-xJiAZ9IZAourksx16X4YcUjq9znEV84Y0RrMhd5GfBWCT2uptShXs9ZJ/xqmDD+NlOZuuynVHhcKyIAtAJCmVw==","signatures":[{"sig":"MEUCIQCsc5wFwqz6fv5EcWmak1qMx0JSLSIZU5N9mNc3GPzHYgIgHcdp6brLRdMbpyretX2SepiJT0A9/IXFuDF8AnNgIf8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf053YCRA9TVsSAnZWagAAe/sQAJ413770W/dmg+qqUDjO\nkiiOkk1Y3xdYErNorCoB/vR4D7NJ5Gdz/Q0vE1CN5Vj5t0JnMlNoCkDDr0Pf\nIH3NkCnPrTg7kNG9EBc4Msq3zxCsBVsQInfWz7IMSXbCv6qiydRp9meVT65b\n+XuZXTb66S0+2eqWXJGHLQNWTkxq75LxzH7bFDiPiVa5HlDWHy4JnTzn2ko5\nHjN4Q4+F5VC7yrgrMyJ/WUitxqhDfZGonXFU5+VcCa8zfdqfK8U+EGu7O4Kp\n9BgMPGGrQ2VP6nqatfubbZHi6lkxLO/iuGWhy1huZBsc1IlTiqVT7IJXY2Ss\nxcmKOqi+d1n8vQalmg0M0N/kD1E4D41QIkp/I2v506fT8HWvSQ5vdO9VbiDS\nLtUon1aVAokwjjo71NKU/wBE4qZi/5owsHl525DVRGM29gi9GGJgZeDhs2K7\nyH9V/Ne+KnmApQ777mgQzuhkSpa/Dn75FnrJFMbzqaihZ60ZqjjyIIV3yDut\nAcF+StFY5+HhcBEaFxMzHm5PIYtkLB4fEBzMJO7TTHDdZt8zIz6P1WoYKH39\n7lU0SiQl4aOIexqJT9Lib5Tz0Bah1s+CKSjjPYvg7EI9LopHa9Z1s5lUE7JF\nUU2Ru44PcILXBnlW2BUV2AshjS1CtB4ba2gQaMMgK73Yfbqh2d9ORdw1XQT8\nCVsX\r\n=SYG7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a8313ebe32ee1c67ef38d5e9ba2b5a4ee2d08f77","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.ac41a5729.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.ac41a5729.0_1607704023774_0.4039288353578945","host":"s3://npm-registry-packages"}},"9.0.0-canary.7fe0e4f05.0":{"name":"@material/auto-init","version":"9.0.0-canary.7fe0e4f05.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.7fe0e4f05.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f131abd681f66c8928fcf8e9ec08d9338eac5c22","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.7fe0e4f05.0.tgz","fileCount":14,"integrity":"sha512-rhn3bNN7fuRBUssxqnbUfJODevZ51+0wQS166bJPk5m4EZIxMDLBVuJxcLu1Fi/Go9YMalkDPHBgkK4XXDnENw==","signatures":[{"sig":"MEQCIDOQVaSdO3Lrvq1RytqVCbucNOrmJ3DlEoUvU/GnqZu6AiBCVXilb9nN4TwlgJeSKtBx7wYCOwYLq/aG+/y6uVMD9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf06agCRA9TVsSAnZWagAAUZMQAInSkNglwVqahu4W/o4L\nYqtvcGFI0BOuaA/LQVDK6h4GNxFtxLVXSxgsGOgxJhcWVf8vbsix40IlvCMV\ntvaXNPW+1hS83yOaEHLzdDWRkQokQj4cWB+SyxfHCN/8/MsjdxMsKo28D0PR\nxhU1Nk3/ehWM2sMgO2PkS2ftona8Rf5S6xVovfMqHIScOAWTpGqSBNFFDspZ\n6K8S8ymJvVrwVWSUhgWGAnxASxUkq/h1AMPqm8lza/FtviVNYL8JRhSZZlGL\nHR6q3BBGMukOAKOEqrAKMWve4HQjZtvUo3UoDplEf2DwOfAYoOTlRe3HpMox\nPdF69j+c5hArPDwNZzWARWcPhYQsLf5XkFK803n3W9nyKXpfBH4FlAoHo7gq\no//0R7agX7E80RpqGJHnMcbPB44zwMrq2cdGuqz6cLieICoi0fjcrZthENkI\nE697C96AqLhhlCWMcVvU8GvLFwgO+hcN/h6R7XKiW7+n1/oen1/hiQXlowOf\nWID6+WhSJLxTjznwOTQwqH3iRs5Ltm6YIfkkcts00DzR3kxcQns60yHB0Mfe\nCN3VaF0fH8Bk2g7QOICFIXk8GAMgI05Xj7TN0iMRibbCduTp7GRA/RnaVtJw\n7wJi9IADz16Knf1/j5lpqqL66KAYG13TVY3P/BSfhFefgZaVssjaPJwvGv6D\nebD/\r\n=CFrA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"174435b67952da2f175e31e1db54647a2722499a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.7fe0e4f05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.7fe0e4f05.0_1607706272155_0.44584263223059906","host":"s3://npm-registry-packages"}},"9.0.0-canary.9244508bd.0":{"name":"@material/auto-init","version":"9.0.0-canary.9244508bd.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.9244508bd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"11b07630e22e8949d07e4e232bd79194475fa88b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.9244508bd.0.tgz","fileCount":14,"integrity":"sha512-nyPboNdIQ9DNqGmhV5zB4JRVyNCXG4XREcVMyuTpcs9/jRTMVbw6NEI6V+JABSEGs/3hAtOvLrqAAfr0A8AMww==","signatures":[{"sig":"MEUCIQCV+0gBE/lrOANdNngqUfyZCRmiKMJHYDhkiH6mT7qQjgIgL/LeWurw01bqKMwpCJDUgraUTqsi81Jy5zA8ZIZwe5c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf08MdCRA9TVsSAnZWagAAbfoP/iwd34obWDtRR0i/kDD6\nCP5xvm69maJFtSZj35iqV4sAtrH1FPYQE/7iRXQRLLl5EeFKFTU9axu6t3yt\nau7Eh57pTmQvlXLrTtSOa13kLRfHLHUZy5Zd6/jJUtPTaL0kJObM+oRdWaQU\n+/np3iMYsjcDZzOUUlzCBrBRhoWGNcJC+Ra2+4PmY771HJZJQOIfiJJHYpfT\nQ+nYm3PpI5/+KJImy/BIVV+EIVmZa9H39XJ/YZwzdWWxAz6c4wPw47/Ga+Uh\nv7hgOBhewSYE7LRRUua4SByJ4uiT2aSqu0THpLEWcGbW7kv3zWAxi74Pf2PU\n5sdqeoLJCvUYXs/90vLDHd8Ag4d843RISg3vDbc7R4qqBXPmWNsOEW8mqOpg\n0E9+5MXg0tz3ECKgR3FHkz4W69CSNHDDhcpLQuiqER7UElfxK+j0c1FgPb1a\ntHoK4Lt5THrT8XUiGakWaMbI0CmL8cYF+vraM4bg4IPhXEaLjibq3swEKkn+\nqCxnf8a/xckSKtcijdIbrqnjilqVCxIRu0JcdJIcnFAH0B9/IVqMDGceZcPC\na1PfFKvvYA9vXkqbOzTvIAbB0bhB3iebwR1wk7/eD7VxP2oR8BUnkml59PrY\ntnXBoyaalLV0Sj8YxZZln7zm5r9VJbFbWN0MgOQi/FidDhuWNeuanvJx2RrM\nw5oR\r\n=ddmG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8d704729c3b4ba17ed088d900fb2ddfd57d5803b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.9244508bd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.9244508bd.0_1607713565454_0.5634707916245767","host":"s3://npm-registry-packages"}},"9.0.0-canary.384a8eeb1.0":{"name":"@material/auto-init","version":"9.0.0-canary.384a8eeb1.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.384a8eeb1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4c86e95759d79786ecb502f53301b4c0f185558","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.384a8eeb1.0.tgz","fileCount":14,"integrity":"sha512-2qWO/qb8QILEHY0aaI6hLEa0V76WTZrdFjof0ZRBYzhFIaQRdwohd3JXx76lxMQEe247VVdJ+9MCpr03dfuDRA==","signatures":[{"sig":"MEQCIFXzKvHZWx6JRrO0nOMaQaGTMgJdr31fAE4JpAajxE5OAiAn2UbKolg7w1vJLH/NZwgpD69kZ8kBY5NbcmeUrbAw6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2j1OCRA9TVsSAnZWagAARkgP/AvP4H3OrKfz3a3YQBIl\n7c5AzmnhEpiYCpqlmzrN03SMJgVWemm8dFVSMj2AfBtlYZ+MhkPsD7ghp+xn\nIc6KU4Ud0RWFF+R7o/stiVj7MFZjelNud7SpBTNBJD8qcU1znLUN+ytztKGJ\n/FvGMbpFjajasJTkh91hR1tQRb8n2Co3DIdxVdJHUB4Zgtswi81t55ytFimj\nwOoXIIGF15bQsRoOoD/g/V7oVXJYtG+j98bi07fNQgFMrZGX83l+qqkvFCcj\nXL/rL9g6vSg8f5lpLXKsy1XN7IgDtqdb+rDcNM/oOC3HPYci8OI6nGniyI5s\nxSDnw/hPDDmJO7+iFa3XTgH6vMNnqLLeYesWdcFbKDb0OJY7NRl3DBgHJFar\nah5sukiC4Gco3ViXbGeHu9etBj9seL0mwAJjAE0/VrjCRRjOXbD/rGjWC5tx\nAT0+HBMm0zFywEwvdM248EXs6V6Ut+yr6IDoszhCYsngbHVFtMkR4dQ1h2l7\nm4KtCR3yNHh3g0J0NcPVGr/n8LjWrog8L3OiHLR+XVW5n3zuceH9pzHSwJsI\nFwdp+qgPme/X1P1X17kVKiVCkpW7ggImZcwXa4GIkxaa3RFAOjaxYVerhmjk\nyT2vNjplEm1JG9HQ42ME6+woKM8jcIZ2FZIfX9RqBLOtXL09zLjNiKZVOfxy\nMKz1\r\n=35Uv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"21b2ddce32077f19c001df17ebc3c8ca9c48f8e5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.384a8eeb1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.384a8eeb1.0_1608138062158_0.6402946077261906","host":"s3://npm-registry-packages"}},"9.0.0-canary.eabf9d5c2.0":{"name":"@material/auto-init","version":"9.0.0-canary.eabf9d5c2.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.eabf9d5c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ef24bad5724eae765d4bf81df9d74c196cd3875","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.eabf9d5c2.0.tgz","fileCount":14,"integrity":"sha512-oFg4HhwafTFFZBHwG5u27k3WRPnXZWLmQTXI1QRVQJPmBGGFlhLnY9uChD8yBHwNiGk1SVK24GNRUAFKQqaReg==","signatures":[{"sig":"MEUCIAyiRYWLe1u4rjObVMFWFle3Xj2VwxlZycX2MZREcc40AiEA6Quwfl/AbnvF0kZeTmOM1uK6iSrdTUeRQeSDdit9o6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2lFiCRA9TVsSAnZWagAAdYkP/iLm0tMV7JC6Rfo4CGvA\nxyYZUi6idWUE2MWFTSeogsMiWKveR1sFgdjHy1LQe2ptTIw5xPTYuU/gX8QY\nCsM7Tx0ZwaEC3v4qqDaWPkRH+HUQPO58EVJwbLmxjbcONwgih+JAWNy7QUea\n23hTrZWG2zAa4dD/ww3ztbGKT2W3aGem0sJ13UFEXE3KoBYAyo2jCznQ8lmi\nSYC10VCwxgwZ+gNBA6NQACOuiKBBfsAhkb/atiMRrFyHCUP3ziUk7RzNkOvi\nKA4bcd675mQ8B13Y0pApZMyRY0f8ycCkaQmcrKT8b0hO2NEuA63ScIYtEqKj\njrY7PyKJ2mTixl3XDwnruFC4Qe/JWkAkQ9wNnnopeuqFkinqOI5EvxJK2B+0\nvgo70Q/uNQ/kgkA3neoINP7Trl/JCaihtNZl3rKogXfmrx9zqW9MQjYULVmX\nGwoiLDbvadReFD9ltiK09BYycVDnkvyJACjMXOhz/8Yb+2NcRmdtzUNAhilc\nEbsHJbVOntm0SsJXgZ2/vte/uwFqPNfBs9xeSRseRYpycYd/y/UZht+MgLq6\ne9CXRLMm2IowaKU3Kk/dFC96dg+Pzw3N9JSgtBcTiEKsJ6rMCP26Y/9ISBCl\nQu3fj2u29Mszyyd3QpPXL90Y3m4NRtL04nJfsvMcvDa/svqR8VWMs9nC+8Ku\n/1bO\r\n=WOek\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"78b3a67c04374ddb43be73dc4daf2613746d08b1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.eabf9d5c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.eabf9d5c2.0_1608143201761_0.6664007852474145","host":"s3://npm-registry-packages"}},"9.0.0-canary.30fdfd06e.0":{"name":"@material/auto-init","version":"9.0.0-canary.30fdfd06e.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.30fdfd06e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50fd0e9787d8a7fa9631a5b19098eaf09d298dab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.30fdfd06e.0.tgz","fileCount":14,"integrity":"sha512-GYDfyEA2S7OBOzpLwesoPNJ1B1/tEw6R8TgRXfhEyFA7yplAgMhQNWLM5miNc2sHflDSTeLZ0IS2aZseyu9DDw==","signatures":[{"sig":"MEYCIQDb+KhtLoOSxZ7QtpEAiKB/IEbA6OsJPn+zS5OtBOgUcQIhAOs/hr+eAPgptRJ+C+P0kKqriWCBBh+q2fQjROr5z5Ij","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2lq8CRA9TVsSAnZWagAAr4wP/0L5yeoesH+Cb0ECVnij\nM2rwN/MucZ8SzpqIxD9h/EOuRGZJFkaJIgj14LzMATPgvyJAi0V9OqX4/E66\nwksXLS31A2MJBVGQ5heVfTsPlAiWEXVmnu0vJpURFU1psilVsqEErduyNlTe\nFXdRzUfg2b+Xo2uGwuTTAGzV4ufQXYuKBH4fk7uruzhsIYZDoyKOn4uERMLG\n3wkWK5CCD4Dc/NF5sdQUzsa7saWBksw1WwhD6GiZe35VGimfQcTEOzCi13+R\nI9OgMClXSq4mPesYMDFI4zgumupI5bQuFmFghghgJdP9aN0AakeCvk/5/jnF\ncOwza5BSypKT863yWZY8lwsCKeMyqaO2RyiJezk5O/lfNE5MMasxhfmx2OJY\n//tNSEMkRa/Sxt5FxSzxhEVw/9mmft9wTEaNGCm7w9p4JgxAtrgY+ItqIl9n\nsbUa/xAH9qguVTmvuERDcicj8RraDxWVEm9e1H7UO6eOnlDr04mMsRAaHCxR\ntNo59BFsj3Lsi3Jaid7A2Mpylr4+KnXYPUrCTo43Hhkn1DuhHxNLP48BAW7x\nZ+gtNFNCtw9MdLGeeEZdBto+Iv33UCUzULVA63WhVzwLfjk6GIXwWSI4kt+H\n/iXicdwFNLAfsgKypANShCIuK2Q5MIXhIK14WEXQnuqlNWDGZxO1Fv9XbLao\n31+B\r\n=f7Us\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9c9fe091a06230b038ac8a71ccd652c7c662b96","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.30fdfd06e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.30fdfd06e.0_1608145595803_0.733258101873516","host":"s3://npm-registry-packages"}},"9.0.0-canary.9590a8f90.0":{"name":"@material/auto-init","version":"9.0.0-canary.9590a8f90.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.9590a8f90.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b880b0e175250e305adf48cd8d0b165873d982b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.9590a8f90.0.tgz","fileCount":14,"integrity":"sha512-5Wd6tCMeHkvDQ0zrORik91azAQOIGNoQyoScAqliE+YPReEWIEyphSR+0R/ISCrQBEunRan8M0U+FgSr5OpZ0w==","signatures":[{"sig":"MEQCIBGWuxnC99030ZsIXv44yXlA31pDz/03SZQq9eEZbwzMAiBmUuD9i2K4r3Uyfavpf6VhXMgALm+3cakqqh+FXIq4fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4i+1CRA9TVsSAnZWagAADtkP/3lS7giiiz4QdeGUm7z2\n0b52/7cqHvuI7uuVcT6BQ6KxdTDTSd3xDAPRHSqpEwqNV/+l8pl2hU1sPk4H\nNFxKz/zSDgacj5lxO0vO/immREgri7H/8iydw0yo60rxvJUQUAK3WrjDLNs3\ntd6l/eqKaJU6zu2WCoGc5rSg/AwNdei/6CJb0WvUO/bdo3R/aNxze8dAe0E+\nR2sIVmJsSWMpJgTHkV08lbM28JaQoGNfpDUzZjh9YDsdcm1wDD5B1QJQLDEQ\ngS7kjtL59sX6+0TUp4+ypg1Elo+WwoUdbLHZ6Z42dUub1AaeEWZ8Xh8N3Tw2\nCiLbOv2N5E+lGQ7wibllB5uh5pA4jP8HDI3VvA/uB8okrNxrche2o91HbfyD\nHXvbic9lLka/ea9+6I1O24JsCpV2N9J4g27OCH0Kp6H7wE+xtee0Y3z/UwAc\njGxLvQR8GbBWltOAqKeC13RW5vbqbaEy3lI8rNLtrKY62Uj0JliNmRl11pz3\nMPBenVoVS00E9TGxPywG/14F039+px1rkGt3wvBdumgLpwzjSyo0AI9PDOa0\nBEL5qO8J0R/02Q0+AUrqoewfDT7rzKwOt1TkUfT75fZRoEfJ2x9JMlS2ubis\ny3USAuhfE9VcQ/ugeRdzeAqxI6OrZ7HOcza1Q5m/jXl3BeYkEZlVgAfeF8Pw\nCW/P\r\n=PXoc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a592a11a03887b1e1535d4d49ea05db1b6f72789","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.9590a8f90.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.9590a8f90.0_1608658868955_0.12346173625347312","host":"s3://npm-registry-packages"}},"9.0.0-canary.f89d8b8f2.0":{"name":"@material/auto-init","version":"9.0.0-canary.f89d8b8f2.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.f89d8b8f2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"257318e513f9451fa3eb5a54907108db5235e753","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.f89d8b8f2.0.tgz","fileCount":14,"integrity":"sha512-/sx2zPtdvtG8kuWoEL4MCuIFcgRKGKTd9lTvhZzrUQXYmjqUNAFgY6u7ETE0ThrznidCRrpjJcRLJ40MhEh0Fg==","signatures":[{"sig":"MEQCIHGvS7VY57OmtdQiD4Q4Q6IXvYixbPxapZxHQrcLgNFuAiA+xz2D3MQYFigjxRXumCFb8NaDQQJ6PTFg+nvnYcUUpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4ntnCRA9TVsSAnZWagAAGZkQAJyFYdz9vhRXSk7S0yLv\nNX4lJwqIni9iyQXb0xbsqK442SjlROMExhziyO1GaNjWuSwoYAt3042AaTY5\nnrLI+2tDGE+I+wlDNoeHFE+6QrWBZwBIwVkrlvXbYiMkaHCwyL5IS/EQVDNs\nrarg5LGYzSKJQMZYx9WxWsH1Fhsoge1s+e88/j5l7o3xONNFTX0ZyPOfAB2z\nTDbc6P2gvTcTdtNyYwcyRdOCsw3uNo6M85LhtVBkP/L4v9G+0pODd6uoYNzM\ns2uaEFQGDp+j+7fieSqfVyFpqkFzyMKab+XKHHZroHe1ZKYdp+y7ZCxMHEM4\n0Iy69d4ITdzJtqNGHCtXuiJKNnE1OW25XV552MlUu2DX6aND4IYz4Gv8KZj0\nZjrabvE2McwhQ9Kbo4CqN2aEZ03JopFFaJNRfNARs55pbwyvo0qMnnDJo8AR\nspCn49fm7Tuqoo1ppdMk6hce2zSY+Ae4KXKmFWwsO55IH3AO+3CwBqBJSX3Y\ne97qwTusROXsQkMBi6S5OWnIn/D1YxxmAv6JQQJZkWb+wy6qyBdbH7yEiVSu\nJImN6rOvaGBUyc39UhUJuQwcqpXrVKWFxzeyHUkDukjgSVQiiXJmJpfVJUox\n0zHvsbpGA735Q6e2vatcPEj8nVjOLts0tfa6ynY52n/FT5hO/4r6438Z1R7y\nw8wv\r\n=x9yi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0d61155aa611a1a8573762d75379cbb25d2e7c0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.f89d8b8f2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.f89d8b8f2.0_1608678247318_0.28250555349149","host":"s3://npm-registry-packages"}},"9.0.0-canary.fb194dd35.0":{"name":"@material/auto-init","version":"9.0.0-canary.fb194dd35.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.fb194dd35.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"32e7add595d958dce09bd665a48b2c9f1abff5a2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.fb194dd35.0.tgz","fileCount":14,"integrity":"sha512-DDui37KrJRh+B4hI9zuvaJpfDOTgokCeLUpAEwaETU+acGny7d4IKPuaOWH3kjpKCg8C6lKvDi/JZFRWO3KsXQ==","signatures":[{"sig":"MEQCIGnLtl6HLM3xNIqHS4jjSTYQbSDU1IlKKrg7d5aJ6VObAiAxdAye2QKHJ5hFztzoxeQvq/E/B1r6/Td/Lz9ErWsyQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6kPDCRA9TVsSAnZWagAANzMP/2uMZEi4mJtQ5bpfEsgz\noo22uBt8eUans+JwtGXSeFMHCUZP2fCbgtic1Wq5Xo12a7RkfZ50UqkKQSk3\nJ2isEZUVMy29rXflLBBSyONi1ePEGR8uxuTetwBoFfga3ubIGjltBOKEIy5a\nKjzEsVEqySYLbhPbZ6VyLQ85r6erfprT38zMP7RSo55Zlpz+q0hTttx4lESf\nxXWs/Uqcpc+cUvB/YepgYB+UZWgpZX/KwnL3P2r7MnM5e9Z0UwCxWi4AT/1/\nNfoe9Eca96/9jKSzXJXylKmQYGnivwYDX+tEVCKIIU1eHWczgjY7aAFs9uyE\nNFZpmRxfB6gul5UiZle9l0nId00eeZ5shwVWpttKLQ5fRGWEMsfXQ1bOgzIH\nl6iKn7rlP48ImYGrUpdNBAArlmSyOvOsq92FTswteX5rTTAkIn7BviIyfKwf\nzcRliHXUGGEgIYk0l0Pg6GtZhhyw2bn/WBZcynSDgXfn0B/pb6RPsP30VKkb\noag3KyzivSVeywx/0FJ6n0zR3wVeDU7wPDLf2PXI4PpyxHdxzsK3RwHgScKa\n/9pOBOyI4dKB9zuNw+pOT3kSrMEPVcfxnP4wjC0HW1RtxG7mPmf+CavBCDD1\nAWCjeW33umJ3vAnJfdin419Vql57UT+brxQp2wFhbsOFM3iYmDv9up3cdtpI\nOiRc\r\n=yscq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"57a5b34de1026133757436905fc54dc5b326d3e8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.fb194dd35.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.fb194dd35.0_1609188291450_0.9235891969460932","host":"s3://npm-registry-packages"}},"9.0.0-canary.64f36e287.0":{"name":"@material/auto-init","version":"9.0.0-canary.64f36e287.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.64f36e287.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4c7e2ec561bf1a757204f93ce8695e849e134c33","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.64f36e287.0.tgz","fileCount":14,"integrity":"sha512-LLAf9e5Vm+J6kmGQqtm5vijHhW5TVv7BLQ9fvaFMOsyWnY/z21iFgfdNfO5eP2U6umSObg+vl0sENRSEPMJUog==","signatures":[{"sig":"MEYCIQDrINbcj7pmjgCNWfpGuUay95bUTB0JQ1RcCV4ekGFB9AIhANXw7JEivjG9abk1gy3iklAhqZ2HjWdOEVTWOG13V/PY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6kkeCRA9TVsSAnZWagAACZYP/01kg///alAv+UK6Ve69\n9iXUKeZ/rWuxsC8OZuLv51ZuU1b08ajHPsWO5kvHQWacsG6rrSGMip+AvqB0\n6ACq1Gy37GpNuHhLUrRwiQdaEozIjAfSAB1gXyj4gqdh8237ISssJ12bJDRW\nsZZzTBfhGh94L+FdGqyF+vKPQDk6xYcq8LJUCFoNxm/0TBeFTQwDFXSicF1q\nl7ii8sk1T2qB0npsbKerVGeQt/mLfLNM5HX3fqKOr6T/W5nxYsuYfIj02CcC\nIcAvFpZRNW9ESkmBtGRPv6oXMrXYA5GdIUMidWeMSUL4eqQ1vDVavrZsm0eL\nfOR0SGgt1tiLYBArZ03XsqRPrqFybmP2Z0weUR+ciR9B68k4T1+amuZWjkQg\nuOafZ7VClQ2FiaqtCwDcWiQaL05sfidAzh80VuEr4vGgRivrGHfpnJGlTEbR\nO2VGd0iKhT/CertJvjn5pTB2YnjG7VF3X1SHSM1IJ8rtNMzJ//g0DtW7WU7u\nakUs7p8+xHID+Mh2UDYkdy3MaMUdUQUWGZ+V0g8tKUiqY2cZdxP12QPe+A5d\nmvSjI8cMMJDKATG6djh8zs/KfrAdD0D26J8XnaXsoAbUacAfkeptgBai+BSE\nidSEJLabZKfLOf6h3LRp84miZ3znkF5cGzx+rq+w+HHZnQpoN9WXu6M2unoN\nCxUw\r\n=U0iZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"23f6770d284ec6c17b1aad9913827f8d456418f2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.64f36e287.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.64f36e287.0_1609189662328_0.9826243459823012","host":"s3://npm-registry-packages"}},"9.0.0-canary.b7bbe7022.0":{"name":"@material/auto-init","version":"9.0.0-canary.b7bbe7022.0","license":"MIT","_id":"@material/auto-init@9.0.0-canary.b7bbe7022.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"162b451754648ac35c686ca19e8ae5473c4d3e87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0-canary.b7bbe7022.0.tgz","fileCount":14,"integrity":"sha512-UaVsN1PEnmE6hz589MAlICtuvOqGYoiAJPvfKnjj82ZdFRPuIwYDhI198BhbwAlTIQqxPtHhcm1M23ve+xcQ8Q==","signatures":[{"sig":"MEUCIH3a3Gt8o9/N0Btt4lh3TbCee7EqdroLDV3OhbqjVHJxAiEAocUaN6cA+cyy31un7GpLR7PX5Lf3Jd+3ESn79YqPNjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf63mnCRA9TVsSAnZWagAAXqcP/3WzEBcIk+Fo4X+5tCr1\nLzyGdfL9U/4f9t57ARjDlLWPDDEPMLoeMQSQeFHtYWGLuPfTw50pF2uR8HAG\n/OIJTeBi0mygUtN2hgHWGxoGhR7MQEDF6xGcUWucQmEEfyrViXkqTZdAHZD+\n1DkVHhLvr7NQWAxl9xQyWPed+TuZZu3s3GCiq2QLT4Zh4eCtSQXZwcMpCQtV\nxEM/GNv9hAYGyC38aEOED0yY0YcZomewZqF8eQRHX9US/uXIQnjEQEJt4Edq\nJC5q5qqiDjRcYn10lL9Ot1k51enJ3r5OwKM22Vd3caamskuvb6NEqILsRMMA\nbnPb39V1WqZlhuMtIFliJJk5c2/viV0huLdxkQ3Jp6sfsh09Th3YpAXXh2va\nxOQ4PcvSxDQ9GuR6oGM4JjMzSzMhtgwiuhgdTmVoOxXTLxiMk4rLBAIfL0gB\nAzuth3nBAoxdwrpIIX1j8OXQWl/Sq6Ax0CJkD3uXdkdwFhFdSKkQuio3mBne\ndFWiIvU7qlQXO4i5mZbkMALhzW8x6TqDMbNNsKpqXw0hsSnA2jscTd7eDzB7\n8GBuOrpsPCcIkqWhoLw/HVh9pU+KdzRq81MtDZXDoRU548wO/vSKVmI1pggT\nKfXcOeF8tssPi2raHO5GgQJClSSIEbJlvULnLXePyJeloxTmayhkQoXH5QMO\nT1Vc\r\n=vKRX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"81238a3912ea8bf30c97b0318ac2ce65f297eece","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"9.0.0-canary.b7bbe7022.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0-canary.b7bbe7022.0_1609267622949_0.14838709814825113","host":"s3://npm-registry-packages"}},"9.0.0":{"name":"@material/auto-init","version":"9.0.0","license":"MIT","_id":"@material/auto-init@9.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"afc96c11f45f73fc083a64a415d3b1537186c8f4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-9.0.0.tgz","fileCount":13,"integrity":"sha512-Fn3EUApNuQSloxl+Q7bQp4rScKatODF3HyHzjfMDR5/mCM4Ih5hdcokbvGrycw6Tqaai6BHeMOxK2kFzH0Pe5w==","signatures":[{"sig":"MEUCIQD9lPkXYdCMguQJBsDcHQEHbaI6G//zD+5dc81qwWgRLQIgSKbgEqujgNE02Dw+J6jWmRXpnqaZ9Q+V0mLLC76AVU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64dFCRA9TVsSAnZWagAAeqYQAJFU4OBtPoi9xwEs9UOX\n5Ru+HDnqmaoOLULornkMt5swTE87KehBPuf7Ejx/4lTMOMXih47WHW7ayLg/\nE5s3++/+icoJcSTjr+MEHW2kAQr0mE6Sc6viUf05bcqo39PChffdH+8JTDRi\n0ZRUUwozJ2xJK6/Kdy/U8Gowzon30lr31ANVuDMzC7+XHwllwca7PwpSP29h\nYjzVKgxFuOZ5hi3q0thtxKjfVROE9hGGcBkA8Au+7vNA2+n9auF3tEj6/4jv\nOaRvr8iLDCpe5KMykB4VriBRcXGWgcJl5WuF+dbfVhL54tE8wX2sjbvvJLG2\nZbTEPOoXjyv2JZ7Cvu/23vj/wJAontFYozKDIwEI63mFxxc98VeppHjTleQ0\nZDNPTx1Fn7UovWJ7nmRQa0iiqdBuJURjsjibTRrx4FVdChttMSZuE8H5Shks\nD9bXUOQdcL+P/daorVh5iO9xL1x7vOz+250EiE1RxlnbAoXw3ZMLmHLttTjG\n8kYEDIzUgypAWpKjv214dEqRhX2LCN9FSATn0ODYi9PrE0UHE+fWmHFVvjjw\n3ffOym1+4N5WnA4K0AoyBnI61dC91Q8gAAPcR5LXMkYCoqqVgTG0j9ZhirMy\nmBsWk2xyaMAeDK09s94xifpuAlKGE755OujYCl5dI0qoWFDRR4FQOZzV/w/G\ng1wy\r\n=zyCC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"555aecce59125bc3f162b065dca47384bb5822b1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"^9.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_9.0.0_1609271109058_0.2070577301600529","host":"s3://npm-registry-packages"}},"10.0.0-canary.555aecce5.0":{"name":"@material/auto-init","version":"10.0.0-canary.555aecce5.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.555aecce5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2cc275f1e6b92bacc955931b2cc8d04a6f91c629","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.555aecce5.0.tgz","fileCount":14,"integrity":"sha512-IMjK8jp6pfG7wtsSO7MtA+F/ozq1lXG8awKwjdZrz1k+0ctiXqKGU2huLgVxXqNg8uX9WVfIlIoYrL2U7hvSPg==","signatures":[{"sig":"MEQCIDJt9HZVglfkkitkz6tD9xPhEIXA68Z8FtmLAmbYnlgxAiBvuOS2lMr8pdDmbKZKARp64fPQ7p1F+OR61FhqI0pR/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64dQCRA9TVsSAnZWagAAqsUP/Rr5cbeboxKlZNOLzaaV\npvF3FRP96SIifgz9fSVQ1ckibtr1PetVru0hWTZHkjF7Zv0vq/yUsDCCtx98\nfPFZvFQg2OWxtyYEVf9RX/Ourji2ynIU530AIXUC78W27LR9w8mgOqGKdtTb\nbDqobNy6yg5UvpZj31gE8RLyLyjnx/DT1RMfNiT+kkqE1RdN4y4tiJN738de\n9exfUmY602yzWHFkqfiMqMh7aQ1FinCewcUG2elpP1LJWZOYl8A6a5YobHG5\nzMi9qJBkJ27Ud+dtF/ww2Eizkm5sCAkjdtDSSmtuj21nx+kY1TtxBlreLkSS\njhmf1GKFYEALS8O129mfv2oTaWbeHG0JTv6d2PSy7PCrd7JOsQtTygNdtnMl\nXMBc2XubSrEie5iOs36xUfsTGG2JzF9WVZb3hgtCrrgwqJPzb8q9iEJoUuIo\n6qbORIdvU0cxnXejD33Y/uLfD/64GuUjElbMsKIT/oy/3p2wqADz2nU2Z9SO\neko6XT60wn1kAe3DHdeHXqoSGnScPTydBAHYWzg/akoBrQwO1UIR1bE94mVI\n3Ajo/dXmUarsFSCrhkhM1CW8NUu2Xl4ANVBY7cRLGsQjTjOAmoYFQgOeAHgY\niTXtMFuBlRq3a0RgOUAbVxr+Sfnd1XbHZ3N0C20GLA6gAquMUJUAL4Os0qcx\njgv+\r\n=x8gO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e455ee4f81b05c032a5b779ad5dacc2b952e989a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.555aecce5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.555aecce5.0_1609271119857_0.8776128371705187","host":"s3://npm-registry-packages"}},"10.0.0-canary.776c18681.0":{"name":"@material/auto-init","version":"10.0.0-canary.776c18681.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.776c18681.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85c10e5b0e43557e3ee598ee38dc45e1c3d27f2a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.776c18681.0.tgz","fileCount":14,"integrity":"sha512-6N+PGJ7aXlt5kOUl+gc96g+ulo8jNalotmwkLZnBb2gNe8wPHgCNYma6MgEbEFhudpS9DNRZW6Z9PEk9kkCiEA==","signatures":[{"sig":"MEYCIQDlFnNsIF1xqB2VEcbJ2cy4aQnORKPWN/He77sfDdwAvwIhAK2C3ylFuhaqIjqFL1yzFRHRb89fJxxosdCHeqgJCddG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf68w5CRA9TVsSAnZWagAAbhQP/0abLV7VfVYbjJGd5cIi\nOZcRhdgGLGh9tns0snWt+gT08UMDKs3xoFOEzPk19V1/HUlc8JFyoVfYqEET\nmgTdnMgGgXOJW8mvoC7T8ubwInGOm+mCH1qIYeVVBA1BzDFVt4IjkiUjEhbo\nivfXvhQvCtX4rrpGkCBONsUojaaesZMstU7Mug0Nhgcz4j7F2eXgmex76pdK\nQD2sEh86cE22O8eYRzEtbNzl6YA7A7vf1aoXZbgsmTef9PkdE5GnIoi95J2/\nuJS0B7R38q2qUGhehZ/WNx3CB9y9wpaNCJzfmZzLGcDFg28KqRkmZQJEFIIa\nfHf4hmJJbTbvve5Ve/xHvb2yaMy7RumD2aII5YSCjZIScM5PCeymNaq7k1Zg\n6mgR1Vjg8yRMJnsubREDk6g90a16NwPrqzmkgheBFUlmgwzNTpJvMHGcRXJc\nlT+AaAdGuyVtGNblC6fyAtdbU4aC0YSXvkra/PP6zvvAydFl95jKxO14q0DA\nhcr8ZMcL04aJbiDFEXORdWH+CQaxrLAFYQzny4lZQIxMaGONMZWeVSA+8gxr\nCT0+qsnF39+Yfvmzr02yve88enYSJQh6Owry2GeDqRMhmFU+hxNuusfyY8x/\nO0JuofIVzIZbVrqcROGpK8JnXUvVAoevPnXfR/jQHBrmJNIhb2DWmqn7bTVG\nOsdK\r\n=AFDO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"920f8ec98e9709a32b0564a5334ae434137478dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.776c18681.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.776c18681.0_1609288760824_0.2931424114580681","host":"s3://npm-registry-packages"}},"10.0.0-canary.671d72d95.0":{"name":"@material/auto-init","version":"10.0.0-canary.671d72d95.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.671d72d95.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55a8855b95f539ebfb86bf07ea16eb5983243815","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.671d72d95.0.tgz","fileCount":14,"integrity":"sha512-VRQeTvDJewzMJYoc90ZRVuc1+1KmnyPyDakgzeWQxBtga5P5Z56srwqH1mW6JETz7RjW/pxQ0lFU5E4UYAv2TQ==","signatures":[{"sig":"MEYCIQC3f2CMLEU79x/ov50p5qJJHLhT1w7aMi4iwy9GzXZjDAIhAPmb4Bpj5TnbG/zwXu9OjjqtTwbMgC7JcP1g01zHfJbl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7N7TCRA9TVsSAnZWagAAprcP/RoJWWPEi6R+W1uxj9nn\neGakFvzul7hkmRUm8r5HSoUiu+3nq2B0udqF+mBbPbvGmRVM3xmdIb+iVcRD\nD51ahDkkY+4Epf+S7hoJcFnR7B8ysU7HTv7pO0fs8wW0yOAZow07h4hQvSgy\nhEOaGcY3wAJRTzn7x7rFsDMZPRhcPyO1CGxVfqpkx/tEeRkk0FzsdGdFYVxD\nz2M5Ci2or/B7CCyd4tFJd8OWzv91JFbnaPPlrcvjmabXaWQrqIq9NiLefyMW\neVoJtyr+otxsk4ew9YgMAVc74YFCh7S6PvwQvUlAkSP08rSs1FLqdovSACpn\nkD+MFu9oCceA7PlnUM0POPu5HdG3wfQ5kc57Pxkqz1jqZNY1gDi7QjWcoRDe\nU4GfR/Xl0or77LyaLzzIdnqggSV14WpsS9LHmJ1wKMSraqX+IQgsleOnwPME\n9oib6gs3N3ynl2F6GM5UaTYlz6dq3K+NsbowBAf7+3glUjdcqJ/hVvb5c7Nx\ne0vY9Ak697vZli1pTVNsNVg2PfBWi4TQ3u37LhpFbTeR/pZ5fLLAeEWqZ+rS\nwHAb9nPpvyGKsD4A2GTZrZBqLEgsFyfcIN8R6VrLDj4U775d1JKJXGpKvf3a\nVrxt1d8eqPuO/uVW0qZhr40SUyciCxbiSh+4D97dcNlxLp3utYNYdTJp2Pou\nhRL1\r\n=LQcW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c22803ec93a76c661222622456cf6f5c5a17459f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.671d72d95.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.671d72d95.0_1609359059044_0.8636772336207106","host":"s3://npm-registry-packages"}},"10.0.0-canary.b4f5a1c9e.0":{"name":"@material/auto-init","version":"10.0.0-canary.b4f5a1c9e.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b4f5a1c9e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"75d9ec291d51f648c9d534d69ccb9844ca17d845","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b4f5a1c9e.0.tgz","fileCount":14,"integrity":"sha512-IW8j6tLHwuC5deESF4Qiu4Ma8oSgNM7KbZMAd1+dZCk72K1ldSAYBjM/FxfVT9QZz0vNYGIq39j/9cA8q6ZEfA==","signatures":[{"sig":"MEYCIQC0+r5H9XaSBkzq8WbU56p0DRNxVeGYh1dRiMOCszB+oQIhAKN76fiMgENbuqZaIl0sUqNke6XfwzB9g4hBs7QISkn+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7PUECRA9TVsSAnZWagAAGA0QAIc9Pw2E7P2sFtFH9Tbe\no0HnOSg3MiPJwdLIulHHzsLqOomS67+686Tvh/wY/cUgCnxC+7oj4p1jj52B\n8NAB95RUc0E32Uhai9BntLlnqxBhTTqFVk8R5jIgcsTfpnHd98uequbzmgZe\nu55upjutiGzC0Wh6AVWU8idwd/muCZredhhdxzVHR8SF6sxWZfHn+v10jeKs\nKI3sFTBa46f9h/0OWbveFQ7cqjBgEcEZx4DOYsbdDxi81IURJm6RK7eUou9v\nmjOq9NWTucpS2+9rzZT+32S4Rn6obEi0Gno6mf6uXOmQohvcL48E/KmoEy5C\n2Fz9Q5G5OQY85eiyyWwnuGgfNkj7tdPnwDoESH7Zp7e+b4qGiYovT8gO3IaB\ngjoE+PCpRQ1pVy8Q8CEaeAg4BxUIdqUD2FDZlGNmrDn7sIymYAuPrjyYuipM\n1QVwmb/1pHYvK8QV6H+7KwqI8Pi7rqIFow899TUQSno8QQC9r5ZCtZz9oGfr\nPOiYlLf62F2QgUdGl+1F4A1hGMVWoQb6W3NcXxxAYjin/EIL7fR1R4SMqAJF\njJG6f6TJQM8+atB6YvnJZ7+JX+XrYnyMxXRcaIYQxBscqYlELBQ2OB50762/\nLnlETIV8iv6Qmux2F6xf1BQbshnelH19Qe7bFVYK2/U4IgKFgU+pGd+OKUK9\ntUee\r\n=aJMT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1db47387aa8e99022677270066e7cba1da23732d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b4f5a1c9e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b4f5a1c9e.0_1609364739715_0.6507350187061367","host":"s3://npm-registry-packages"}},"10.0.0-canary.a94bd8deb.0":{"name":"@material/auto-init","version":"10.0.0-canary.a94bd8deb.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.a94bd8deb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fa1e212c431e3bc66b59ba9fc0c40b040394ca9a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.a94bd8deb.0.tgz","fileCount":14,"integrity":"sha512-RSSL+Cmkbpgnc1OeRMT8TD5TFSEiWGizAphFK2rke5ARjIVcRu2J/qbB6vnLLKk5EoLWPhKqJuDolXfqJ8vvUA==","signatures":[{"sig":"MEYCIQD3RLtqlS1MluFby6yLTv03AFhsWJ6JZaBjp33zj0V3AwIhAJmg+uOm1lfscrCRlmY3VZ4F7TFn8rlrY/rWpvAbHnvk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7PkzCRA9TVsSAnZWagAAeqYP/1Ksr4ObNxm6QWN8GJKg\n0D0+KMb+l5hdhuqeHAGfiOTb4U/UqDlruoW/fHHsI3wLcyvcNPJWM8SGJXWd\n6xvpHiygbCLZ0PdP0NLU7e8j9FnLbvVvkdeUowLn0A/3n1g01z8nmV/3OV77\nJzcAFBi66/R0qMIqB0M9rLLK3jV9ci2HmHfOBBwStsjHyNWUXv/OB076kuYL\nDLL/LBLGLHWmIPLdlu0xO1KyUKReMotmoxNu5xTyxIa2MYKL/o/UK0GsHyDh\nCrj+T+jdEwD5MEYM1x4jdiZyNBwudALQfAb5M93MOg9Oyl0CcAGqyqSobgwi\nepdJAZHXHuVhgt7f5PBsyDhahNG1mYL+c1BiBU8bpeM1TU1SuXM06OM+VPvx\nyv89qz+6UjbcKOb+OEeO+PW1RrXlLQGqVW0SnC7FztjH81mkvjHodHlbQrzj\n3dqGRqXqp9MrNMCZl1mJVtA+n+kPYm9AxQmX9v1tkXxihm+eo1KFNxPNLHTa\ndRmGnFM7IRkVEmDQ7oP3OxoJu7V6u7/hv8sVCe1YEmy6doWJKJwmXCsCmH/A\nRI58I9HIHtTjWnLPANkH4iPpq43c1HhhhUsBTAILz9uX6XkUNastCVSHLYfh\nYu0dz2crT7pEQ+k9Bp/P3/YiL9eH1fShhwSdcJU6ij7JjuWUvTYxNMWZ24pM\nI6dM\r\n=LFE3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"12c943490c76f911dda3861f863c68d7abf77ce5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.a94bd8deb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.a94bd8deb.0_1609365810576_0.9775094309124295","host":"s3://npm-registry-packages"}},"10.0.0-canary.5d128511b.0":{"name":"@material/auto-init","version":"10.0.0-canary.5d128511b.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.5d128511b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"385fbb005b6c8539758bc80f02e8ad35fa093e68","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.5d128511b.0.tgz","fileCount":14,"integrity":"sha512-GW683eOkViLnD9y7bFwrXEwT9zHbcSwxoO1RRNmLVlAGHp8YQkjG7OX8B/lAaVvIfdRR+QfECFy0VYIDUUwMFQ==","signatures":[{"sig":"MEUCIAjcP2mtVBgMMnhX0MW8cFdkgFiIGXfe9VuuACTGWVVOAiEA4Ivj5T9R13eK3zbKR99/Tybj/+oB+HktH4bH8zcK6qU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7Pp2CRA9TVsSAnZWagAAlVQP/AthwFdFE5o94wk3kAex\nBrIlVkO4BzUpU6OyzYSbXsyZHRV8gSgNJ2cAUVgUjvLDGpBLP2npZfYUGhoG\nKe/OzmwJV2Hkn0muuv+1WK33R3xP60hNVwMbkbE0XpMSPbobZLBXZ2Vs3fDr\nKrKrnznNzJerGARcA0xT8z5BXRVqmh9SKTND7vS3KQx8nskST5nz5dyhv6ia\njiCIvfdzwXH7EFlbAvMqbSa9KMzkEbR6SlDa66VIY8ZI1l44gYaz22rImIm8\n+270LnGIqqDcTBuepwaZZ57z+vxVR/7PoK4o8v/8obTohZ+G2+LIyFi7eUGB\nim60B9o0u8+wBuwru/Z85nJ0MC4rDncrtvGX/R0ITyLV9eZdiXeQGQ1FfZaK\nYXQNXuP5MgxchCqAQTTA8pOPArLlCQQqLYHfz4Z6ezJkSfmf7PisAf7AN6xJ\ncntLe3Vr59u2yVcChHiwBH82Qb/s6cGJYtWVX536fDPX2Z1ha5u8cRsh7+cj\na7SuXRpj0r2XTq9vy1osTsDIlauhzhlfPrvLRhcD49bxJpKaoPfnPlUwStJd\nltFJD/MjN60JXapmXQ87RaRgudQ0yCMulVIFZIEJh047s1O6qfdRjvGk4Qti\neVfF+0zkjPt11zkjmYA7zEccb5LBgKqQI7TqsKkICm3B3Vxo98e1Prf9ivUT\nISJO\r\n=Ct6Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"05d17b41cbad4a8aebac080f082633a26be09a3c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.5d128511b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.5d128511b.0_1609366134299_0.5756279464427876","host":"s3://npm-registry-packages"}},"10.0.0-canary.365c69360.0":{"name":"@material/auto-init","version":"10.0.0-canary.365c69360.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.365c69360.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5c1d7b1f24b62e631f017387cfacf5c1a22cef7c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.365c69360.0.tgz","fileCount":14,"integrity":"sha512-FRe06IbIVc+v2aO4Z3ng+3BJyMXK9uw3IPPUr01ONaM8gmciSUc19a+B0E2LsGLHqsTG6b5Q2TCgrPZxjcLKjw==","signatures":[{"sig":"MEUCIQCC6SWU8xubcVdmwAHOc0Sv6ydqst4PXJS3+yL7nIkw3wIgSTuvGeeCd1a1naURAdm9jMIAsB8Vrh9GHLRMxMwcMUI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9KYrCRA9TVsSAnZWagAADOAQAIFtMPT609qzkRm9V83G\n3VYdgo9vi9CZAtLFO+QIaT4W40zKqoOW0sd+S8zHsi6R3zPDI2QF9roVlw4Z\ndsFGM13YDA5fUpeL7XyaQksGNGxsptQPz5PfX1E/wO0GMrC50s7rC2c73wsX\niyRVM0R3Vyh0xoiFFafXfa1+Lq9L+85DRGcB6M9EP9PvGZKugR67Axqixx9K\nInA4Tn2jZsTVHdqPhMQONaYUHYcPXZMRMKpQdGhQBxw8cDPPVF8Qr/OaXKKd\nQOYAj7a8GqQzKWtsIthkoOVIkeymrYvba1rPZkzUTB2yCd8cHLNOTTuY37po\nSF45S7noWMV8JDu/HN5l8Hth3ficoMLRfJzHDDn/6Bjqd9K3Tz4R1p+Atuvo\nkL/Pm+O2n4X3AylcwQV+i5b1MCj18uDcqbZ+Yz3wod2jhzgyXXf5R0HT5gP1\nUTLolguZASCUkcLQPON7Vk1NnmTxNGl9PnP1wR6jnseL1a82mFRw+fBQydN8\ngeAXjqgDcIWr9grFqt9VT3jJFtySQv5ZHa4shD1XRjfshTft5JxUSYWTCHpV\nLokRRpGVLrjRPEmiGl2kIZR3DurYTu3RBEkOzoBHnPB44L7VgdjM8XvoOgID\njRjlxjMKBNmZGplofX73Mds/qHUDouXaMBRbrdPEM6+k2bNKCZrO2H/F3JRV\nupC/\r\n=boMY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0b060c30e2974c71db5d5ed87e3ab7918656edeb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.365c69360.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.365c69360.0_1609868843004_0.6349338652577332","host":"s3://npm-registry-packages"}},"10.0.0-canary.700a8261a.0":{"name":"@material/auto-init","version":"10.0.0-canary.700a8261a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.700a8261a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c09e704f9ce5482617200a4da4dd127a24cc5463","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.700a8261a.0.tgz","fileCount":14,"integrity":"sha512-bZd83HRmz3CA0cur2Tg74+OEgn9rzuOclKSz4euNAb5nbXDJmrnXYCCmn7qc5XoNEv+UimuIdfS/lbkcIcmVOw==","signatures":[{"sig":"MEUCIHtX0+EEkGqHo8vIt0B9IymLAL0dHcXZdoOHYam1oa3XAiEA1BL4hXQjBsvJu++P0DstNW9EMJA614f6uNh9Jd1Ru44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9NM6CRA9TVsSAnZWagAAOhoP/R89vhY8oL5cA+ZVai/3\nVBuaL1ORjm43eF2GtFWLekLsCcW3YQHrKFCQp2osZ18t0JZNtiSR6jBs7UvX\n64eSwajXHQwLApVUl6Rdb1vzaWvVd7/c85wCOXqjjOSP/KeJal/g5HM7GVEI\nCafA6enGZLfy1Vv//sKTIADPkkcs18RB0anZTYdERPxl0wt0OC71XD/Bwa3b\nwrgJAwa4KthSoi9nWBwU/Xx2gBlHYil1PfyJuImxMskdfO9XDWgUKBh+MWlJ\n3s0MiWacMFWGiN0BxS2sf7NkbebRhC7b1CrX+PRWJMo9mvTvw7tb5ajD2dMM\nJRlq07y2ut8Xj0gorqIO5mOLTW5Y1EXEv9P/RQzE6zELlps82yQVDVvhBj6f\nEU2zz+k/hhVzHh74XOGbMTOuNSpEENyt30T6/gGQmJPOiCG+ZbxMXneguE2a\n71DHxSjawNWITllPNR4Bysuqd9D8qmI2PPZipSIpv/QhJhbChA78P6G7/QlA\nSO3eIZV0EC8BHvzbC3dsSM4PxakWgSqBT06BsoAh5IB2Wjowxin3jvs2hKNb\nOGw+7y6O5Qj7Tvcpt27NinRsggt6htD2+FeERfH882LDQjErgKUsoKklws8A\nIfCu+mnf8x5VcBpSEusPlVRYqaBIm2Pft8u2umk4UR/Kfp0tokh7MeXGfWzI\n0GO7\r\n=E487\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0e9aee4feea82b83f34c723b52aac42fda1cdbd2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.700a8261a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.700a8261a.0_1609880377526_0.018103371873652296","host":"s3://npm-registry-packages"}},"10.0.0-canary.766981c15.0":{"name":"@material/auto-init","version":"10.0.0-canary.766981c15.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.766981c15.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"76c091b351df76411236c942727ee6eb34a82bba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.766981c15.0.tgz","fileCount":14,"integrity":"sha512-WMwzOYNq4O/3XZlbo4RyigcbBOdWWP/j26V2E7jCFLcvUND463LKo+rdz3C7gkCAOZTLDna1gj5d+6So2pRBoQ==","signatures":[{"sig":"MEYCIQDjE5XE3SZaci4ZQhRHFA4ibq4LkFPXvGnzW+jYaM+KvwIhAKOnsI90WZmaz0+orZtSIjpNMY3TJCKPtkpWT4u/KKKn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9OqXCRA9TVsSAnZWagAA0GYP/i5hY6a/mym1NE+L+Msl\n5e3e63epCb0ZEoFGwy28Wwd4ASmDlb+13vpbB6cqTq+8OpV7E2S4KPKCRNUt\nrtjMSIoQFWigrTfhFaodKq2IiOmm2jNWreHUrlLd1vdbzvt6GsTHkqBGnxk0\ntakvQ2jgw+Ip3hiuxNxz+OuPN2/BytUw9pYMjf4T7w9gN3n6aFM35Zo3RUwp\ndGPnVaFJOXmwv00hL1tDOeGPt8+M1NunG+Xx3F82JmOa/PAoMMRm02QSP+1d\nBvTND2XemMAL0/gorDtHVMSszIz6sIpbwMjyJxCqQ5fm2fmG+BtVdcpW9omW\nWhcJFrYtbx7Ct6E+XKwk5oEeRb9SmBk63I6qbfJtPv3zcx99izhXsQYHyJrp\nn6I4gUJji850xdKwB3QPvY5YUt9QzHsVZp7ralKKQq7luZMU/DQBMqFr5Bx8\nd6Y62CHYvnQhrfjlmNyE6bXCDGxWWTdkoCqgq2UUZRVZ7vIffDD6URAsEd4w\nCFfNCk3olB5Rwu6f4H0nBh86DbO3rE2YrI9k6RdeARzRIMU/ay98lbRGqjCA\nHZT2cJoHpHuPXW9tuGfwLROa+6tuCdIqD8sgHRWJLueIZyrlTMR8zgvjdvf6\n/2br1pKLNXilnWliaQPF8DeHIX6S5tvh6loFODekf6WS0HCqpqfWROqVC9+k\nxrRM\r\n=MLey\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"40a13adf47648f48d6dfb1daac9ded2f7f0bd442","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.766981c15.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.766981c15.0_1609886359127_0.4214305867239183","host":"s3://npm-registry-packages"}},"10.0.0-canary.b28c576d9.0":{"name":"@material/auto-init","version":"10.0.0-canary.b28c576d9.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b28c576d9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"349df44f833a0c16cd841fad546afcc148ba168f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b28c576d9.0.tgz","fileCount":14,"integrity":"sha512-ZGh2aDBp+E470IrBuAqt8lvT0PoGYzrE9Xn227xU7pNUh73ABBrTtJy5F9ztAWOpm3ZrSi7UqgSEVcig6tkgcQ==","signatures":[{"sig":"MEUCIQDjViKfEFwunu2JkoDygfpqPyx99sI2kQTZH/IYaOmI0AIgbKTEJCzEN6Jyb2kemGZjCzsl8rKmxa5eA2vyXkhAohg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9OznCRA9TVsSAnZWagAAXIAQAKAyyoNEh8iByBY1q0wC\nqcL1AGtrDZ9FDkrzF221bIXQTI089o7/P71IB+F6Zsd0Z4syTkmfjUYfi5em\nt3hTNR4E8NpjmKRn+IgVI6vGtgleqrQEcx9R0d8qsyrYhKsThPQtHemBgX5n\nX60mATXDFZHamc0yPL8fnUwxDJBAg/yowsf8+t+/xCt4TSXGc1X4YXT6wnyU\n1+3VmyQ+JKNI9A6uXnMv9790HSgKQGcv08ZFPiT9kmpssmSsS2ciE8SGDiz/\nNQC3R/28k4BIhBdcTAFIEIh6fgyCAZXw+S7bPUuudn/rQ80pvodgdvCgMhdf\n+OOPA2jWg41bHg8MIUOH0U0d1mUKgaHXi+0R/XXc/yyGmO9V+i/EHPAZUyme\nbNK4eDHvqSKuhrD4w2zpWiGk4JF18EKzbb141bPnKGf75gIRpUEI6XSdQYmT\nwbEFnQPqu/iRyTOhVh16YWSUOOGepJX4CvpvjhODzdErieyDdiPsiPBcwzwW\naVD4ZtDUh+dRMd5gS6IMhi/Ks9Prxji4AzszIsaqobbjtivCldEFanNHMkKl\n7PNVhiIw0Q0hvJkzbRj6/WNdL36wNDsPNwTEBtM6IK0tyu/L9z5f99wdg98a\nNVDHsQlu9YsjQuvSNm95A+mdnDCYOYpZ85MvvCYntN0XbxireREScjO4BjEH\n5IzP\r\n=zaYG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f11c5039e5e02253cd6e3eaebf7ee15629f3c182","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b28c576d9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b28c576d9.0_1609886951166_0.7503372259180467","host":"s3://npm-registry-packages"}},"10.0.0-canary.968735356.0":{"name":"@material/auto-init","version":"10.0.0-canary.968735356.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.968735356.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dd3ce1d02d5aefada2fb5c141908d92096e399cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.968735356.0.tgz","fileCount":14,"integrity":"sha512-BNEAmxNLmnrpB0/ml95oDgjbau0XizSu4kFDgZ4WKzJHv6SFE9erf4Z8dDo4k1aVlkf11AnaCIyE6q72hqKBzg==","signatures":[{"sig":"MEUCIQDSiNVK0VW+7n61Hr0wUHoXPH3OpdQvgsMtRDZmxIwXwwIgFK3u1C5uFRbjwAzswB46UGYkGasOFbUAaeNGnfKeqzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9dwcCRA9TVsSAnZWagAAj9oP/jAsPn0oDcC5yCBcpZ4G\n3Aq+0UO22v3BL2K4AtQEXn14JqtDrXkWA2iOLoRhkDrWNN/R1e13Tdl443tv\npreIOiOMxhleCbU/lE2B1eBKrlfQa9CdOG49pUaN5KGihBrjMu9yRiln0o+i\nYphqiK9NB//k263NwaB7TEF1yihj/39BLfv20ttcaznHNf+aCUppeIJV8ezX\nnYRtALXrwhSHsjGf680YXDEJJbl9RQSToIgzvCAlAa2SN24qr3XQ08EhECfS\nT0Oc7t+on/qBPtMxhXNYsvznxyPokti4YiF7lhcscHX7GeD4sTt7BOoXgzU/\nnypAIgdaOjz4TkHhzEwiGrGyh4DfMd5W0iZM4caP66v99VuU2P2x2k8IDu6E\nUpcknpfaDuqnSJzm2bQt8cHFKT68Igfw8ypBdtHTb2unxzd9B00ZQIIsWvgd\ny8UzzGuI/cq3ue0YD2pGPtaW33pT+NUPqPiPgB4sfCxo0KbvhJmI6HdxvPH9\nerR/3e3uKkYy293ehdt3kaJ10vuvWe5g07RsmoD66kpIDovoDXveRcw0i5kF\n/swpCPiIgXSXSZFyXJ7P4tSLFm6pMy9CSetsras4sBYSpGfWUKcqW4FhzZyJ\nUcb+/luAvERBEveqx/7CK3ns0WD+Y3bSh1L+hI4NlEwOlftLE6ZryKj3egpl\n2xAr\r\n=yl2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"016bf1732e983523c8ba8007681b058735467018","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.968735356.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.968735356.0_1609948187471_0.7615669607660105","host":"s3://npm-registry-packages"}},"10.0.0-canary.c5e18b020.0":{"name":"@material/auto-init","version":"10.0.0-canary.c5e18b020.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.c5e18b020.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68fc105d6984d6028a88cdff78d6d87becb98a86","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.c5e18b020.0.tgz","fileCount":14,"integrity":"sha512-oTszhES+oYLu1ZC4RFDf4AOtB+FT3yKuGEFICPtqrXywK81m9XlfFqYIzkV/ocOT0ExYzgOfjFomjQB1E7i4jg==","signatures":[{"sig":"MEUCIFH2P1/4tldhYqdn/2eWIjqaG/cQ8Y4qkplVkqgjAE5kAiEAn5Li1CW866CCCieATrAfbLZ38Q3zuJrOAJXScVrkn9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9hLVCRA9TVsSAnZWagAAkqcP/1cFJvbNQfB87q5mvddV\nbXcREGuJXw1S8ghsvWoayt1wnbBUxYXTlk9qs0R3A7q/fQ/27TAWv1KZZE7p\nzVFuFNHnsPNmnXenbK/dlsCjAWUCiSpxJroUDujPwVvMwKpaWSyH4Z2IhFYc\nwjSzOhDhKv+VcIWIqTPVT8w3hUg6ockEvq8f5OE3roW0XjynnStp58WeKBTt\noqfbo76DXgmg2z2mdWwxuOeL3SggH4l42oDntOkNjvTydGsnhOOtdpMxwnv/\n49Q4CRUbh1xxSn0kXFnS2U4jLvF7+/jZu2+7aoJWmT5WidoUW/B5DHzqrkhF\neTDe5mgvqxtCiEePWTXrM/CgXNyrBwxw97kc3LLN2lbyrP8V9y2LDSkTZA3l\nz6LS4uxdBDGzl53GAxa+7XQcZI6oVMqzdYwBue1uFCBD+nFouyIKOVOsWZpz\n2+7xQvLILmZ/OhET2vfodhPxs2WJBdetkKriUaqTa2Gqj1tpggC80KTmZCbw\nEmV94hukqQ1olyuWzsIY4wk02SyISlBut8DZNLn0LHq5i90OICUo8G/c4jXf\ntNMa4Uj3WDA0DOcZL7czmeev58pRjydFJBdPlYyudEcAyXvAeIt+T3aDs3Hn\nWb2GZSTYVi2B6PoAVMJS/f5fkXbZxfBVDcXXu6h9oGq31YHeDFFViybhzxL1\nqyB1\r\n=MuL5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"16a60c2c89ea18fb88971304d4491f612734e932","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.c5e18b020.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.c5e18b020.0_1609962197347_0.5545175562683649","host":"s3://npm-registry-packages"}},"10.0.0-canary.bcff8a66a.0":{"name":"@material/auto-init","version":"10.0.0-canary.bcff8a66a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.bcff8a66a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"25864c675a1576593bc1ddaf6eae50980ff3de90","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.bcff8a66a.0.tgz","fileCount":14,"integrity":"sha512-fI2IKjaMW/utylR7Un1gA0zvU0u4VqYeg5JZZZa+Xld+ZawXOQqphSMHb0OgwS7BjOWVMuZcHGTs8608ZCT/eg==","signatures":[{"sig":"MEUCIQDYMZqRcNhj1TZY5nA8ENK7z2wagrGvQDFTEOYeXe6UpgIgGaWZ6RlWvjN9PJyt3c1EFiXQp4i3OVHmfIUYV3Ju/d4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9hyiCRA9TVsSAnZWagAAowEP/3gm4sav79Eva8MjN9X+\nwTgbJA2MMeiGNT3EHfYNVr6fWVRDyb0nVbQzWoNzUYV47GmpW2+p3HGiiXcD\nsSg1/0AdkJiAXQVULhsgVqRpRM3QpRPaX90H2iiPrbsL2CCWQz5+ZWmQKAPU\nA5agTU7huXfOtHucT/f9u9PQPd3M0WGN+SL6gZ4Xmvuce681oKnZKDrd7ph6\nl9y3flEhgEEHDLTMoc3MIO5OBYhkjbXoimQZT+vA9+rr4PDfsMzrIxIkx7S+\nWEUZzSVFWgpvnKfFnThzdiIWswbbPNsAT3Ua7JEi+LqJU9Lgd2NWDAfSyG9/\nRxQ+S2e8UPZMqCIdVzoSs/zLKzQe0YyZyrguOcCVsqaUw8OYP6glDZH1Q+6X\nvHT5oPclTrPVbjyDGEJPlCqavGSYwBuOy4Y9/ot2Qs1dpdCASWg2WHC8tyva\nfznxhHv0zvTRxpHsln0+Ilw+KsQAZVPe/kL/kgNvdrevhTiWjVAmeiR1PqQZ\nNet5OWZONOWPX6YQCwLugwuYmGNSsYyFSoXfniPERPcvQWw3a/PQXQske968\nbf+EQIT5EEQo7RyEHsOqJYadY9KDD7SPM1aPIAxF2/tQJAvANhircUAo56B9\nc3NXI9WYd/pwSW6yJFk8Adl2XTIkuHQcQwxZySHVjXwENkQMQhUpesUomiIm\nu8Fa\r\n=3dYh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"81af087ae7601c8b819dbada709de8d76ddab960","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.bcff8a66a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.bcff8a66a.0_1609964705809_0.3573877330220723","host":"s3://npm-registry-packages"}},"10.0.0-canary.79328c9ff.0":{"name":"@material/auto-init","version":"10.0.0-canary.79328c9ff.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.79328c9ff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db0cf5c11ca2e051c356cb1aa5971108bea3fd0c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.79328c9ff.0.tgz","fileCount":14,"integrity":"sha512-ME0Amhqa5Z3tX9yoRRMNpnAWJdM47qwZyg9wf8bBBkvndeCVWe4nrBRhiQ0Rvm5ANvgB3naK4PeCn2BmADwuPw==","signatures":[{"sig":"MEQCIDDD5gCGBbFj1eeHdI7mR4zW5WtFCuHi1oJSw8EsxeiEAiB7cC7li1LmyNHA/8UAbFbBJ19SmkSZaymefGG9uk8jyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9nLwCRA9TVsSAnZWagAA2QkP/RuMLggsQm/3uULYrZ/C\nzFRVHkLcWNotSmWPM/MTtJkFKesd//Dd8uz7o2XWZd4vMDaFlblit5F1aO8A\nkpwj+wY7TcTk5EIVsFCx99adRvmbuxpEAO/RQs7smIi/PPdc0rQyrcmjmDla\nwwHfzcCn2wg0m7P3K2GbxEE6qIKi3eIYLV8CNcQG5efMDJPMHHd0/0jNsdkX\ngbRE5ZDe/N8RZZ/12n6H3fJ/8lbB83vewZEUQ6LomVkZDFTwaIQGdib3w9z4\nIExc/IlW1FR3BEauFZ55E0rNpVYKYuGQbxRc/tyC6eDsu3MQJ4chhrpmVK+q\nRDZdSsVBIFVjCSQ3Ts4mFL2PpbQRrrMBNNF8eAg6Dz0r9h9ovB05eX6RpgWs\nMg/HaYstXrYdmR/YnaGzJ/axT9FvyyCQ2GDq8sKAl3fqgRwRWy8ipG8wmYSp\nRbmfJUkvywaq2T02HxK2g4gMn8l1uWsa08gKW5hsmLIBkMXYqxnQU3GdLbcy\n3K2PMRKWrRlB1b4Td03n8gjYZt2OUtA5K0towqax4WM44gU4u9W3gz1G7ENZ\nQjUayNno/e44rt1PSi4e0RA0uDdJ08lU2iBXrm+gRYKutvSh87oKYOvYnbtj\nfq1irqJeytK7RmdAW+pU8JZ58rIFyEqHfbYdY/EQSplHvWjfDejomaw00AC+\njk+E\r\n=a8mv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"15dd1d7d9065f275f9f9779094b959944d33197a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.79328c9ff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.79328c9ff.0_1609986800420_0.5452803480069861","host":"s3://npm-registry-packages"}},"10.0.0-canary.121e1f303.0":{"name":"@material/auto-init","version":"10.0.0-canary.121e1f303.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.121e1f303.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"36cab4e7d44efa2b92b285670bada3af5b14ff66","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.121e1f303.0.tgz","fileCount":14,"integrity":"sha512-YJ0//whoAg56jcOgQxSpmay1BwJ3WGsRA66A8Cy42M+aCT2ej0nDzRo9BbPfLXBmUMo/e7U2t67mlq82JYA6WA==","signatures":[{"sig":"MEQCIAZhVUybMrojD6t5BOKQ5j4MSe2pzUHdDpQj+o1u5Lq3AiAC4DE8Tq05lJWGqfy3JAku0/HKCaXVZUW0jSeul9rBww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf95bhCRA9TVsSAnZWagAAnaAQAJzECYlWMkVNST3NQdy2\nw9JSVOBf2R1HQHmBeRhI1orakGpc61oSsAvxhdU08DnTvqRqjaIjgaQ55bAM\n8adtFohcQ5P1WsKYxNFaUYFXCInlH9TIvAEfxYQPVBRPONyVWugsp43K/J58\nd13RxpfxNmsEqUPm39MmsgagwQcxFtfKpKirUD/mD/n8POH4qIacWPyusXLi\nY7x8YUilpHhaomHLGJmcW5B8lTLjwxtCO3wX61N0GFfaNgUx5Ah3Y8f32CV0\nX6UBkn+XpRp8oVw/XCH6CtBR+aAD/sC/ddA6vLdd9TE8R7MQj94H4buwHEwP\nYRgkrOG6Cqv68w50KbUS4yn0L+0n8nPYL+oqVg7t/YeJCtYqORKhu6Y0rGcV\nyLbXJzh2S6kEdtQ2VQr63hoyh6JTTkUJyfuisKHpSWolY083h17EVBvA7L2v\ncT2v71Bydt5Ar/pAFX6ODd8O4FTfXlXfuieVFJPyJEjIzSOAKqbnPiUy0M/O\nmQSxF8Cwf0NkeB44iMbD0m6wJ3XikGGLeUK971CcN1j7o/349FpDn9WWoHRi\nBhhmk4Bhb0jCjsejVtQpiLVoVvGsp+4Z0o8k1pdGCYbwvzL/urhJg/WGxMPR\nqiGp6NfdgSc6iV/wDliJ0lbAqeny8RrakPEy75GEIXMYlr5n0WWDeeD6F7JL\nTg8W\r\n=NctI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6ae814dae9eac40570f13ed9d7b821cceddf838f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.121e1f303.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.121e1f303.0_1610061537284_0.8012978891591329","host":"s3://npm-registry-packages"}},"10.0.0-canary.abdd10065.0":{"name":"@material/auto-init","version":"10.0.0-canary.abdd10065.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.abdd10065.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fcf025ce7531fd3849d2dff4f7f2b84fbe9a0feb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.abdd10065.0.tgz","fileCount":14,"integrity":"sha512-K1sF27vt/QnhA0SDkSAQ0o0zgQYkt1WfNhtRcLwAYN3MFl6a+R6HPkgCGerI/F89QZglUZ5ew2WM2NcvxobLBQ==","signatures":[{"sig":"MEYCIQDZP1bb8+b+ze9A769SOQfh9eQmknW5hI+BFhXQe6JxswIhANjKVu6YqvfZ1eIXNL8b4FJEe8AMC7F5D4t5EoATDhgv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+JtxCRA9TVsSAnZWagAA9sUQAI5TMUdXESi1DggDgtm/\ntLdTXuhhIxzWN4irQXE1HbUlnrN9o1LdfVG7qm6AB5Xz4R2Yu7wTdnNMabbJ\nTlSbQpeAHU0s2oCtv2ieUxpf1pLkWmReIMaby/8hPY9cIgXMhuQZYw2Nz4sX\n1sYfkEcHw7XrrwgE8Lzi07r47YY6PqWrc/FwGbqratdOjr/4SEJPRlcPXB1D\njNUs4zAeM3wKsB+lRw+vGbVauRFjFXss/F2IQfZ+14IKuDOSOTAWBumhoypG\nfjJD2SkR0e+ZTdWNZXFqDIDbRkNv/fk+Jclrv5y33t98KaRtwmcvyLd0uxnh\n/7WLy+FT97uArYg3zJbsUGY59NS49E3Abk7k7iLU/UDr2LrOJouD8UPh2+b7\nBiolwvMj+RUouMPNXegDwv9z3FERNQmMpYdm9S7vrqwoefRrV1XeogEd72/F\nv99Yc79+9KSsZjFqYu0rXyHZ5G6T7iUKQkT8Q6YKSJJcqFwEvqA+eyOslbaJ\nkkmwx6RuVym4T+ESOJZdGWDDjYy8AH9b0YFezcYuDHNALOzV+c//kCXdodMv\n78KA1wECqL/N8ZXvRIALxAUR7hGCsCRQBXAj9URci9IYsJQIKJh3BSuU17kN\nVPEHBKl0pC+YL6JEMJ4vLcsOCm3jy3jWABDDNFoGJgoBVsLY9aqL+Gwq7Yr2\no/Ni\r\n=vm5Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bc8986a19721edfc6facb62cf839cd222de97d02","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.abdd10065.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.abdd10065.0_1610128241095_0.41362443809020766","host":"s3://npm-registry-packages"}},"10.0.0-canary.089de519c.0":{"name":"@material/auto-init","version":"10.0.0-canary.089de519c.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.089de519c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e612d27d8e2a6c94d3a5aff6b45be7aff29552e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.089de519c.0.tgz","fileCount":14,"integrity":"sha512-BhiKqqEay0xVNsuKssb/TXUOkoo5u6NvzYVvOZ5itRKypCjszOKDD7wcxeRUSQzyeztKDrPXk/KF0dVT2G72Bg==","signatures":[{"sig":"MEYCIQC8YGxXppHlo2I99kF3CfM8a2g21/Y5iV/UwzRE1UU/BgIhAMWvUf01th8m46VRbSWQoT4NpRAUMql/cN6V3bmalUbW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+NqGCRA9TVsSAnZWagAAgyoQAJ4iFhmSZC/qDrwpGVRx\nu2sBIOvyFsKycGf73lgPs5iHoqERfesWGNXViw1JOa5Mh0pvtqnG6Aa1vJvC\n8UuuNEseeagJXJMFtuBOyV6VU6PKb/EiWO4f7GJ1vNYQZwatZesh7RgGGwHt\nxgXRF7nEB04QarFCnoAdzUs00ALP+irDHJiu2fTyd6vRyEV7hOpYqoYZ/SWU\nOgfMpxg/0N3w4InEWohK2xaMJvL9osMyCPTYDfE+Kt8lqYlukSxmdj2xEctr\nnBstR8afmTNjwvmaVT2HZHzkLDVb2xfLvq9FAb/vuDsoIQck7FJFtvNTEjf7\ng7j4szlOIWPMm8m633mIycNAgdDh0jcNKj48EPEvQL0sO2iQgr+af3K9uXcX\ntfyBuzR2dWNpPoi1Zof5imdhvDF5HLUS0rY28jRn4RV/+rrsj0KahOMckhhf\nL52kJpjtVy7PcOmZN8/YfQqDL0MbVtorQUy2C+1pJBuB5xEVeb2Ab+yxv3yx\nb0j9JbH5KucbRMeEVX1W8n8D9m4r3xJH2Bc5cG6vTT/CFv0mntbhX/84G5b6\nzc6ez8lkYfStGe/yFimr5sP5JzYLT1vqYtQqf7vbbi0ndI1QuxC/RIT2HdcS\n3YBYJiGqmODOuMU+T2IZZSSuPRLTCS1uWYDDP/fY64MJfso3+jvO9NtPJnx4\n7EiL\r\n=KaFP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6a64709b5be73a45401fe82d1e6d126d7312fd21","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.089de519c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.089de519c.0_1610144389742_0.2776359817824703","host":"s3://npm-registry-packages"}},"10.0.0-canary.163119837.0":{"name":"@material/auto-init","version":"10.0.0-canary.163119837.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.163119837.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"91b85df921243add641558e98ebb45615867b3a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.163119837.0.tgz","fileCount":14,"integrity":"sha512-H674ZB+Pnidxb7gMYYNxvmpo2dM8a+MKhD32tWWAFYzosudt03aRYgr7g5H4tFKDUdJvksvrYCSdfUat4zcPPw==","signatures":[{"sig":"MEQCIBenr8yybg8+KeaE9XJqWCVVbs3k7NNh9IqR6VyU32Z7AiBjwnuB9wKevGmHyn9h6s2KY1c9pNnoDRccuBghx5tnvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+O5QCRA9TVsSAnZWagAATeAP/08daIjGTtYpXswSN8RR\n7IyTaZ/fyRRWm4a4CNU6PW9O0D5bpIWM/X9AX2HXSPJziRfijnljT+nhgbmd\nbTg8VZdnMpKchTrG6yCD4xII/dwGjbUrorwSJ9iCfRFWte04lBDUOEavtmGh\nbqM7pQPt893Mxp32UGpZJfgfeEiwO0z58dz3G6msreokhOqviB1GMpzp86g0\nWyLEheZKBIMJOjsqrGdlHc+VFmwbWdkLlhGBHoXm8B/3j4Vcwla6CgwsLDcG\nZMBVW90IQTg2wTBNXK4mIW4oMo6a8EAtepUv7racSBk6f1TDlWIn1RR2WXvN\nWaszCl0R0Hq8IGu1/dCUIlS89CckVDbA+IJQMvokhH0KM6qwOX+Z+jk6ZAVB\nN9L8FyKF5K1HhgWviqIT9L2PTKbxuBDXskYPv6jfBj38ch9FIIQBcacubbU6\njMYGJEnnRaDBdBjtTPQRjU7yuob9G4TVUvVoIxObnjQuInrfnW9WW4mRlJLb\nqAmw8E6iDTthN9aMUTp19pn5YFW4CTocn3XefK9NaAdK6HvWU8l32Hjzh6SR\nxym9+MyleQ8dio8DEsVVWrlk6eYqFzMf7rkcDdPTXJBbAXEmhiquE2ns5kM/\n/uVVVpPfBQpTEjPFZymGHUomnjZOqMCMKMsMIp2Mj5mVatRel3B1KXe7Qk7x\n2/8v\r\n=sYF8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"86f8af57c151ec42ed920ac445544bc384ce0975","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.163119837.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.163119837.0_1610149456492_0.6040277151546545","host":"s3://npm-registry-packages"}},"10.0.0-canary.b8a1a58e4.0":{"name":"@material/auto-init","version":"10.0.0-canary.b8a1a58e4.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b8a1a58e4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"44f303fbc0c5247f03477ed16e016636d7ddc715","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b8a1a58e4.0.tgz","fileCount":14,"integrity":"sha512-eTqVprxH3ieFN4GbG/SkDjSMSkfeEgSgMj7QbwVSartvxwdnKB+G1V69mynWwX6v5j/dUmodYWcTMdTu+fcBWA==","signatures":[{"sig":"MEUCIQDwwrT5LSoprHeuWNHtWDEMRGfxC4CvkNXIp5PMhcc6mwIgM4kQbDfcZ8pYxulOwWRi410wKe2oaPSAXXTKYB2mNIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/HtzCRA9TVsSAnZWagAAPOUP/A40oUm3zSq9BMvThKTL\nSxUWiv9AieQt7Iby4+OQ3qCnHNZbLZ5o8WlB95LGgLBrbG7Eo7tuN70JsywI\nAJ33xAVdYwG0oMIk6g5E6LRw9OT6bW+TUxcvzxkL57Wfo8KsiLI7g92nitWX\n7QZy/9jXzQ7PwFOtOfOEjwbjnVHFdVynA+EzR2LdjOfmqaoDReoEQGf7HU7o\nQ3teSQYM7IwlL1gC7iT6er/Wbgwth1Q2m5m9dJZ+V2UpKmeftnAqKTc2mtJN\n7XPG8DNi2ggRPAltA4zkSDWubSMJnSiQoKTJRcPlIqNgeMJKd/4abAYRkuzk\nfrp/DpQaxHjDdecsTzh2aMnTmPk+d9FDmYBtPZ+OAbKvD3xp5114AEfuyS95\nvlZguZNCyTF82JzTsZIC4sPK3HciQQ+s+qv3+AflndpZlgmmXXptH2GlEVCx\nfbyk5TD5bYLd12nNx/8GDhvAu4DykzL7b0Sapi/CHGh7GDAdiNGbAaIYB3uC\nvcKj6GVibb4XqMQ9qLI+knIWFgn6HUFyKA79rTp7zvmx0J0vIQ/1q142/8Rg\nBMptFVr97rAKjQ/Zt4g2mo37QpYj1S8SHeyLei3E1MP2qkHTMk9pNy8l7RRM\nHfPgolh+LTjI4QIL1rPK5T8RehqjW568E+LRStxRi9IiWUVWIm0U8O3htHB1\nthHd\r\n=IB1s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3b735aa03cc784b7346905168638eb6a486435b9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b8a1a58e4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b8a1a58e4.0_1610382195428_0.7986816403437924","host":"s3://npm-registry-packages"}},"10.0.0-canary.7584267ff.0":{"name":"@material/auto-init","version":"10.0.0-canary.7584267ff.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.7584267ff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0ad8e3cb17edcd0b08ad99d169dd3ad2c9ddbe26","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.7584267ff.0.tgz","fileCount":14,"integrity":"sha512-yGP35EXhGNYIv9l/t8pQFbx0JxbiWvvnSj4+N/+5waLxkoIN0c8KycWUacYdnX6nmmpOWcIMiwRPWSrn7Eu0CQ==","signatures":[{"sig":"MEQCIGNrNycIKRiXGiIDUEGg2ZqzQcg4AIJGAgarT77ZzXWtAiAMZ8xii+LKWxyLwARxG3E/gr7LRGgwe7VMqCU73l8LZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Pc1CRA9TVsSAnZWagAAloMP/jKU2ntFst7QbuSzYcaT\nc82WuXL5i8foyKp6SK1xlxSvs2L97CtacVgXfFbMe3m+9kPyv4wG2YMDYkbM\nV6GkILZgOKdVDbBIwLLhb/X3m0T0N0q0pflKhvl6SBoDLlca5wsCaGkh6pDT\n8ojlMpXGc3OawqnBcVIpVZmSUwuH+FIWvgeQNfMIuHCh2Pu1ZPoVuDpSQxHU\nhteD7tK/17GU35tmDP6LV5xDVOMeYQ3SBMd+DJ8w+PwKRP/nyq9SNcCPZpoR\nIBoRyiT0kBEBXEUcniUKwPVdLTaUJjHBka12qnf/aOR/OyhapZsaAHTzguOS\nheaLohLbYuwXBmtJFrUgw5qthNuXx5UDCZ1IdjosltMTZJ+rLF3Kg6ifR9nZ\ncoeVNBhIlv5vi2uhaU83O1zENnlJaaPk8u1elhjv7LTyhRMwxfJJVHY2cCo2\n42FIAV1qD+ybAQTOFo2LuVT1G+dAUpToBZZLeO3w8rPIr71Ok8dh5m1r7ttq\nAWrj9T0JRGHE6pNNREiEWeX6hjlqYetbNfD12N2a356lgxxZ5ZoXtv2Dz/k+\nulHTr11/+cwAMzFIHTGfxIadw31UMRxUmrAmPKF0EOvDNinbH1RC0ptsBD7F\nicjEb0YvSOEg0QYm1oIHgV7w4qCKSEbvk7UgbkWdjVdHtwga2/MB0xJhgImU\nysGQ\r\n=DvcP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"89cedd80674ac536aacf2762f084fd7d1640873f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.7584267ff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.7584267ff.0_1610413876846_0.08261919816544405","host":"s3://npm-registry-packages"}},"10.0.0-canary.251ac04c0.0":{"name":"@material/auto-init","version":"10.0.0-canary.251ac04c0.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.251ac04c0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55de70cb095c7c0e14ba82c4139daf90e36798d5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.251ac04c0.0.tgz","fileCount":14,"integrity":"sha512-mxzqfXXIrxuHNu5G1RYX5uyR6KI6UtQgk0BjiWchcBlDorp3P3kn44D1UVXA7lRXDwIl5huuvb1ITR0vr/VefQ==","signatures":[{"sig":"MEUCIQDo3oxCsm1+Pnr1sOXwTt3lk4Jr4DvPyNKMn3Rekm457wIgYXFaSz5XUgxaRMYX3Mq01cGlUMmhjf4wAgnkKT1Nnns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/f5fCRA9TVsSAnZWagAANcsP/jSxtX+payr6822uuPce\nRvdGKIyg5v+vQv8T0FZFK/SBnNxLBzhXWo9Ok/SKwZwUDHZgcG0C2bdjN/LK\n5x91VmfQ+x5bf1twVxiX/MJnr2zhGJPA2H5fo2WQmmwlVAtM9KuthBvgWmd1\nnj2GLllsQy0ckmXr6thXnpi1Xu8l4YS/CJksxYCzuGbX784nkvq6398rCtCy\nxqSy9BP9pbib6xK06eNdk8xwW1xTfBrGzp1NkzJ3N+GT7+x6DzIr/QjQyV0M\nUq8tO0MY8UZuxdQS73LrqlQo+jFbDP0hTCKstyVrkqjB5GqhFOESs6tKMF56\niHLXUA5FgRzT2Tx9CmiRsXj1MEWOqLpCSkGgpcmRw6SRCeK6Z55FDQsWS2/+\noPxHBUF7iVafI0/6xyIvYcmvkhTpmh9hA4e98uHmphyqxCGiFhwk7DVO7IKg\nyLDh1J60g2W3CkmyabDQfMBaAiuwkZLSsImSBSCKfuX/1eMNdysF5fwtUZfj\nGJoUOOqYn2W4pZ7mPlvXgae/VPRyplF0V5vIorx6HFX8MqIoKdCdDw8nnVGW\nQzE1rd8aWpeern8ipipxo86IB6czztds11Y8DbZvv+rTVxiBIxpPCGUAxTLk\nimxrsRNPMz9j3QPzS5JtStfQwrHhspE6Is+CzEyeynE36+KLeXxsgmbKXjnK\nIBiA\r\n=vFZM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bacdc97357600156630f8321ac8a3a8746474194","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.251ac04c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.251ac04c0.0_1610481246743_0.6351131186578243","host":"s3://npm-registry-packages"}},"10.0.0-canary.772cc1068.0":{"name":"@material/auto-init","version":"10.0.0-canary.772cc1068.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.772cc1068.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"99b66dc9aeb7dddeeef1d8f3c7938cb365232c43","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.772cc1068.0.tgz","fileCount":14,"integrity":"sha512-B0y0nfuOQyGwKKoVCkOS/5gLMOeZOyTCVE8kH88wFk/itdcOhZ86J6cVVDrlN9y/O9l4I1clhvUxmfwcLbQRfw==","signatures":[{"sig":"MEUCIQCZtpCGo2zgBOL791ar11E+IQZHnzCUdLhDlT2VZgusswIgEO8sISt2J89Yx+nYNrn7yf7FudxE2yEKmKXNmvIT7t4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/4rjCRA9TVsSAnZWagAAiY4P/RwEXM34SG+uWFfPzoJj\np9aAW0lzyaDpCqqm2erzk2Kv9xpVwW3DNyeo+LgiJBLthzwHfHbRvqI1f+D8\ncIdzMuPu/Xa2cY4oikBAN5kG142hhoHRk8fQmyUoXaKZEYBT5OrX3a/zlh74\nk1ExT3u2LP5rFOcfr6p7ZX5e8hVp0P2Ml5j1CrZD0lG9Rp912KT7wAQ4+S9Q\n2c5xLzPgjEZk87oYuIEBMjMHBqw/e52wyb+zaVYos3Bv0S2GFWepwHdhWvFo\nKLLQtxkHpsEc14fPqHh9bYRDQbOw/N3oJSjdblx8JsipSjmbe973kiTOpofd\nrX0b+FdwzT1Ucssz2owiBO0Vqwkt3mW4vCsY0uYSwAsiMFV61WD6xcoDnL/J\nhUBKdRnusoo+Tt7M8I5fA+8pvZ55Sw67n6oKatMwjY39IJocguvI8EBOoTrF\npc90DNFcagh/hJjVRn+g0Tq7ZvQbhIfETpKOeO7ye2A6NLamWr+wUZz49SdB\neQmLXQCNFsyjQz33Qbq8KVACpne6hNFOoQykKMRaoYoUC4odShL+atO0AqeT\nTmeH1ksIvyQQ7eRUYp15heidpfvfJRrk1MnZS5+44SAm3F0WLLnLnV6oGLsr\n60uw6Dm8aEjFZf06lM3bbbU9JgmQqKLyY8VzTgrMiRSPjaAyCLDlTNBt4DqO\nINUZ\r\n=gwCM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e8dfb103b25351e76ae27e482ed4f13c4bf997c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.772cc1068.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.772cc1068.0_1610582754575_0.21160563011875455","host":"s3://npm-registry-packages"}},"10.0.0-canary.fe13dd130.0":{"name":"@material/auto-init","version":"10.0.0-canary.fe13dd130.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.fe13dd130.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f305bde78bf041f1c9db3341cbf884bbb661370","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.fe13dd130.0.tgz","fileCount":14,"integrity":"sha512-cm8tXZ+ysC60rrkKeJyiJuQ8LGdbnJe/VJnYh37bSDs6YV1cZ7PVirNbZD1khy75bew3/QW/egPDg3lzw7CA5Q==","signatures":[{"sig":"MEQCIAyiVoscykfTHHh4qNmKWeSb9S9QdtS2OEWeodoVawp2AiAOIFMd1bNyQ06gvYuHmGP8uQK/MmL1s2wWMjHKY/sh6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/5nDCRA9TVsSAnZWagAAyeoP/3nvq/GG6MJ2fQXJrTGe\nU7dzO3gXRPH/YbdF5Psi0f3A93YE3vdiY+G8TPS/PBhvcY7CK09etqhRL6Vx\nU4V2TTU/EDpepasHlqTi9ZvzVEt0NB1NWQBzQ0rsvuNhA7e8Jmh9cQbSH3TK\nOcJiiWnprr/l/4aQhL+WI7ZLHUm3hqnM/+1wN0prLU8aigY+MMPWdvSGvuk3\nWc9TRCBT3E/T5QpVDc/OyVXcaTx/PEDHb8mPSWD49UlZQZ9tomX3hqmbDUGy\n8hd28JdNibJ6pIqw+CToOskjFJCFXvz2wwFLpWzcOPcbPEQtYUKQCO/QP0nV\nhgSmAZG9X+tsi/3qAiXLNRrMNFoWpDR56dGlVx+Qdpnuywsg+lqvMtBiqoqZ\nWLMBn60MTkSiuHxQBFTB1Kg7QtIbK+6nFFMCkV4HvHIjyQ1/JRt/ZDmLvy0j\nvYKYl/eZL2kha1hMeMvZZvVnzlcPL+5Mzit3BY6nb12hrTbOjWOXgCv66jKc\nHrnerM4Kq4hRmytgNL0A41PkqjRJvFKs1WdahEqMEQStFo0iErvNLj05p39q\nzsQZuQLJn1E5r04U3V3oU/Yr78yWspCU1QCRDJam3qlmYxK1o2BBNojfz70C\nvsemqDAkvli+M4YKpgKS/X3jqN1hWNHjvzknpLpeKPM//HMe/ixt+95wmdFu\niobY\r\n=K/EP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8825c25e04c8e88b7430f2f8e148da8a9197c02e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.fe13dd130.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.fe13dd130.0_1610586562459_0.6833285080218134","host":"s3://npm-registry-packages"}},"10.0.0-canary.c7c5da28f.0":{"name":"@material/auto-init","version":"10.0.0-canary.c7c5da28f.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.c7c5da28f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"df907163aa23c85e7a59a47d5db360c2b25e48a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.c7c5da28f.0.tgz","fileCount":14,"integrity":"sha512-pagXOz7+f+/c9hdso8N6+TjG4XrQDeVLsWH6gS7clAhP/wXtN7ERj71XcpKWY1fBnRUzBAAYaFgkotYY4herCA==","signatures":[{"sig":"MEUCIQCy9XegTFxlnac73oBJSdZzW0EzwNk08Ou+FNONeLBnWgIgTZJOIJhCJ00R2H8OdrVMf/3bIJ6wD2hBjpDO+fTx1rs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/59SCRA9TVsSAnZWagAA9x0P/RgFNhESKNUzKZpjNc9I\nc5iKYnupoyl0/hhEOvrdJwwjBU4k6K6JVTM+0co31iWE+590mAE3UHulDVqm\n0kT724l17KrJvLOXnmy5389wKE/o3Ar24YhDgRdTrajrm9FwinY1sU2r7JQ7\nnI03hQU0MdQRNhpF88qEpSsJreXS9zJWMtNQJCslwNlAidf5f31nypzy4XW6\nJqZnYNx88cDkoTV87/BxvuaGk/H6GLPPBaVRM+ccMurvTHfin+yD0Ko3qoKF\nMQvlmd6/rmbof1p2IYYe7culpdBbZwhvUlUzTV6WceCoe04IH1GlBrsZ8oca\nv6uy4TcrRSZS4D+GQK772UFpmVXf6YxB43QGtmyMVpd60XCid2zsLsqdfS29\nlPHHo++4LBjcoWNOP1Z6uWVj8TQjctJjXy3f47SL/ZWIW36oJWgQ5YfhJypV\nD5IsAMF5YeGBT9G5SH90MN8uLe7ZUmiTwTiPnFApNro1l/T4VCbj68Id91SC\nq0tSHPOWHy9OywhkETNqB5FEXZ2eSRAOacdPzNr+5Uqx18d873xOE/2la6aO\nTUy5Vswpghc2vlNFd2x7W+Kg2p5imUnJ6STQfwYI71lA1fZv04L7JfJFzjbU\nXnQIYAHz1Njjxbq0rxLg5Jf+tdVHt+hUfOUAVTfCNSv816D5TNr1cRiJcg0l\nXvJb\r\n=x1RD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5d3f3a72d4e9757f2993684a89928b04ad29c6a1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.c7c5da28f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.c7c5da28f.0_1610587986260_0.12471127670103521","host":"s3://npm-registry-packages"}},"10.0.0-canary.b2faa116a.0":{"name":"@material/auto-init","version":"10.0.0-canary.b2faa116a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b2faa116a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1e5c55ce9ef1c22cad6ce888a08f0b0c1629a2ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b2faa116a.0.tgz","fileCount":14,"integrity":"sha512-dX6J+lPj9S08ezGKu75i50D7Hi+0WmzzcAxL9/mRoYnUNcBbdtQ4C6Hi1OMONALsUAUVgkkBeNnBHQJFax03Dw==","signatures":[{"sig":"MEUCIQCnW95hCzfTP6ewrs1Xj6pbk7XQHf896UxXxJzXl5eK4AIgNy02pqOhRC1nL/+8nLYPHKqFqYHTIBXzveoiXh8FGhQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBzI2CRA9TVsSAnZWagAAG0gP/1oBeOWNw2KQogTuTD+7\ntuDv9eEC8gZCfSiO8q6YkZqzcDygQwgjYXESS8mCEM5/1XJfkXH20omC6zjV\n4I52y52QMB+HbmotMDgvGVxbX+oQ7K0Wtb60t2fY0W1Vr4TRSWrVWAUEi9k4\nbWdBRoPuKRXcgeGUCLRIlEjWu6rrsWEJkSrXQ+tfSDAfxON46/Y/G++0/xl9\nw2icbfLj5KwrIY8iRqQup+6krearrPnwb9MtvXGZvJYhTVv4CfhKSdjkkZgQ\nyMx1gKlgXA5StiIDu/D7XktIPkqS/tRrZLo2aM4A4sp51zEEHIBzXexJieDT\nZoab5VbbNzS4QlDPJrDk1oZJbhKkEC1fGb34o+7srLCrzvAPxVfBd8YNWRQn\nLwJbrNSkoMc0vP6r3a8Fc4+OEZcrcpscQZtttr8lFxfYJplTwQopmc9FrNV5\n6YK6Ynvywtg/t8YrUQhaPJRmR7Cyb2BNKATpc+t/LEETlsZzyNeFePkl6vXR\ns/Y3vZEXl2wrx6QZiInsMoBTyprdk4EAdcnp9gP1ZeTTfH1/Vy1Y21bScOrK\n+y5HB03i4VI5JlkSVGDpFjr/GURLYKVbSVS2o5DrE5qdAZsHwo0vqMnpfrgG\nY1CLbniMWXYWg29KRTtyuwm65U6dW9cSyaLamDkVkAAuiqQAOj/v/rvaS7cF\nhkT5\r\n=lK4L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8c83e6751cbdbda8095b6ae0686196398066d600","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b2faa116a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b2faa116a.0_1611084342330_0.749183098601742","host":"s3://npm-registry-packages"}},"10.0.0-canary.0c95c9f7b.0":{"name":"@material/auto-init","version":"10.0.0-canary.0c95c9f7b.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.0c95c9f7b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3d7443f215567dc40cec852a7256a6b50fbd56f3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.0c95c9f7b.0.tgz","fileCount":14,"integrity":"sha512-WQzKx/7rLXSaaL6m+4CNeeP2Z/bCmv4xnRi6FB6DSZmpCO6bMVWDFSXyl6Gbs47vqp6rtz71D/gw38ke9RD87g==","signatures":[{"sig":"MEQCICmHaRenZp29JIKo1hbQWwBytFAk+oQFQ0eaXGfEiDkLAiBePk8bOF3RjI+GHaigeXzccP5uXFE/xAUrO0+1U9JdUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB2LLCRA9TVsSAnZWagAAvSkP/0dGI7ULK1GNw0JvqydN\nxFgbQBZuOCqBeGdhQYPlbwKkF2l0beK4NILqwoGMq6DGMmg3Cmscz5nq1bhx\nfor/7MlFbhiEhPPIiQlP3oxUTQjgxbfK9z99Ng6SIGMWr5g0cvJu/4GrOMT7\nRTXgy38pmZNc5O1SCuaU1dutBOaC57Dd92PGYONT/1HL8Z9UxIpgdBl0x5M5\n1N2KkYtcLMay33ezLfwUxCv9L2pohCXifcfHTfzOzL9RH9mCaaL1ba+B6ZDI\nUgoetUMntdHUDHPzB1y4P4op8PLwzKxvE+WonbPxtZh4GFwKL2lTz/7hBVyX\nIhBeCvly+CW2ceIUzk7XR3W2xZTMgPQml0TpUsOhv21cw1k4Mtuh9fWnK4+5\niZX3D3QXeO6Bcy1TwkMUpaGg9Bht2zGwOsR2piaHmaHXOW9Uj3+G/FYCGCSA\n2X+5aiC28q/GX9+7pUKTr8EiwVvjgyF4falKZjkMtLBoVsGOmzvaYlvT8abb\nei2CsPlUpiRg0UkW2D72ITOZ/72KpAahv0B+QTqw+7/F6cg8WoY8coor3PsO\n2PVmG0NmKFoQqqsEyweY20RAEiDZFld++IFuGVu1rSJOixW/A0ROx316t6jl\nxkO9v/78exUQZ1GD3kQUuab7L80NaQY83WDiQ3qy3/S2giOFqYPMf75wXo46\nY0B8\r\n=Frzm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9db31c38cf439af3f1498600e029c2dd812acb2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.0c95c9f7b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.0c95c9f7b.0_1611096778893_0.1599180957176083","host":"s3://npm-registry-packages"}},"10.0.0-canary.5268222c4.0":{"name":"@material/auto-init","version":"10.0.0-canary.5268222c4.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.5268222c4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d1ff6ab6e5f0449ef17c641a9cca3cd491de57b2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.5268222c4.0.tgz","fileCount":14,"integrity":"sha512-0QiRnL0ON8Pfpb2eJwYK6ZLEVPefnmimjS8qLWiGcL6w9CkfcfWSEGBO8B/bfpyfj1pza51Ty/c6KvBqTw7CyA==","signatures":[{"sig":"MEQCIBn5iIP4f99xll8zvUlq/GZqntJtZzj8Do5jCSsP4YEXAiAr3xlT0OUNZVrBMAi3OaZxAK64vPxWZyR1seOy83yMFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCIH2CRA9TVsSAnZWagAAMBIP/0o6oYLZLFSXkLWipoyP\ny4ms5HfX+NjyHypOZF2Q5dRRoycNxyIi2NOOK1VieFBgmh0GT2IFt423qsLN\nzhQsRnrYo1EYg1xClU7/TSZIPMWpOpQwNWI89+KmbEpDxgQ54SWyRPDDV1qI\nyf84cX5mF/+LdnflSYpCkXULQURRKpvLTBMJH1iWXyaSQodagruOGnONsVjA\nxH+i6VG7nulp7Gvm2hNYfMML0BzLcwypee1qrAw2CYh4zlIMcjFW4mSYNl7+\nWk5HtYvIUpRsNz3yGh+IEfNpThudt7bkRmOlXRqHV9a2Hwt9VxUU0YPd0OL4\n9A0oym+6lA4pH4+phKvS2l3cldflSllRQavH7i2x3pvQMDOFiArlOhLZLRKL\nizXZYZvZA5PdxsuoWHIcU7wYP3QGAMa2H3tomdv7xAxn8cVpCsRJro3OKa2x\nm+XHuP/fwc+/mzSWWszXYuwzXkV4Miva9lCDq1o7zaL/CFeW/7sFfB2H/f+L\nPD4m6ay4SSr4pD6BRd3XKNVjzXdxvfiu7ZVW9vSBuVrhAz2reCvoimPMUJdl\nUyaqbrb5HyB3S5uMrHxcRaD1QsqWcXU3/hlp7dSUvzQjW1qnBrjDQ2Q3YEa1\nYhrfdwZzQF/PoLKzfoUs2yhTjCamnLVczG/Ox9Gimbie80erh3erw0j+6ZAK\nfmUO\r\n=Zsbs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"149775a975bdac97e3f25a99b254c8b632e6ebd4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.5268222c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.5268222c4.0_1611170294114_0.7496153173639679","host":"s3://npm-registry-packages"}},"10.0.0-canary.2ed2d829b.0":{"name":"@material/auto-init","version":"10.0.0-canary.2ed2d829b.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.2ed2d829b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05e05d714f4b1c6bb3eb0e87b507dca777ae44dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.2ed2d829b.0.tgz","fileCount":14,"integrity":"sha512-aJFmvXRjvQXB8VvlrqslYYVyXzw2m/C21Q3A6o7FFnGhabP8cjmJbxh49vfc+xgGUzTjs8nUfimWDbWQf84dcw==","signatures":[{"sig":"MEUCICYoL0oJE7iEJotfnuL5eM+Egjd2mOyobn0ezJkmnvnIAiEA5KQ9UeNKalXo3seE0/GqtVRwFrgRLZrZeVEAMWiT7r4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCLedCRA9TVsSAnZWagAApvoP/jt70esU/oKL/0KTIISM\nixYMEerkKIGVOX3VhBXhRYmyXvO+ihJSZE1SovbrTJj/JjHDXtCjFLNwWiyx\n4eVT8m9FvWktSK0aDDqudkGY5F9SNpo9Gzal6ZqQKOXaGenEvs4uFjWTuJZz\nX8U9PDiJ9ISrz3HENFuSu3ydNpyRTXWuZ5a07HriMCJUK8JivYuXUcYOl25a\nwSXPh/C+iSrDxI4dFQv1Qk4q9qzRHQ4p2lyHZqXJppoC0N6XIP9ZM9qM/f+g\nR5hWRvRC2PotmqBbswFrjImT+KQmjYShm3/VWgqq/kDuC6mcyIQSQqeFE4lW\nsvwDIMCnRdDAWIVO4st50hfHmzxPyPDfGZqa+lOR/UujmP0ivxlo03eOuSr0\nNz30H3R9BxRdkbld4BEOs4Tpfet+D42Z1WpNUe/Megjl/OR1XJwSvNM0UVg9\ngOdQNlyvFh5LaAXTXNSNrapimaee5r8NLRzsvgnQvWDSKbyVJwNM7MNIc+Md\nd/sPB23WjZFalgS7swlNk+joGsCzok8XzkAsK9L/YAIP3ka3jJcDt9gVbDVR\nTeSGRdrAN2/V19IVgKXqDHMDMskGJQa1veE0HqiEHnB+6B3fz+ObrquRuzPE\nF93hH2aQhzhfVFSCh/bRmDAVbVF+4rYlzDbSrUF/Qm+l4Fb74K7XD708EPZ6\nbBWQ\r\n=7Hmu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e937a8c393e2170307639b8126f0a461ffaf9e6c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.2ed2d829b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.2ed2d829b.0_1611184028595_0.8591907276771651","host":"s3://npm-registry-packages"}},"10.0.0-canary.df00c2b30.0":{"name":"@material/auto-init","version":"10.0.0-canary.df00c2b30.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.df00c2b30.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"691cc74059949dee2be11b155ab7cea2dcc38c3f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.df00c2b30.0.tgz","fileCount":14,"integrity":"sha512-eBdrA3cjeXfjaR2AnW/J9vN8iHEmH0xNDoDv172w+P9tma2pcdcIpoefZTrMdA3Lee4WDq2eov+QQiiieJld4A==","signatures":[{"sig":"MEUCICOCoAovnOoFXW3sPtKYaulOtG9N6ymRDYu7TJjGqO0dAiEAuHuTmIbFRQBzbLoVGlgGXNRYB7XWs1aRIJDeF38gmzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCdvUCRA9TVsSAnZWagAAKQIQAJjvOIflE85uM/M6lwuh\ntZolG9uNL4gwibGyZ8Z9hIxW8xD5sOmu+wtftD4FIMJgJjFQfhNyT4s15U6L\nmTeUTovkAhIqcu/sI1mcQLy55p4etZhwCbDXwGXumo3xA1zeuQtVnuZW2+bh\nEdn3hEaI4GLivorbHHYhTX0y1dvVOlazj5Jlt7vGdngA0/8+97UEfZ/gEenl\nESSyluQcZEjehDInGjBFfKvcNupo72/hXOjCOWYPSPcmWOB5MrGfDyzYY/La\nvFaHBCw50Vzwtk5dF8pZqxXz+LwYUl8Vf+I6bL6OM8K+U2oET4P20yOS6Vjk\ngPNJvN1REKSbnJgo3WJ8yuNPr/Ybp4YndLOXA0QOU/qDlbfOvQ2j1GTDC5tc\n60cBKWPemvedwPmDpHO1iCOl6utYI1tl2hSAE8ilLv4JJXtX7ypKpeCYHlIJ\n/6+qluGmp9NTt3Hb8ZzmbYViXPLB+2qHOB3M2G6UMgYSC3KB6WrR1p03ok5d\nolNZbfBT08Xm1HA/2aCT41NYFhEssgYBMAjULPbmUpprwMBkh21CVnizXEPx\nNTpvUd+LrEWb9MxLM2ZIpryty/2rdtF6O+jpbtQaNE1o6lzCVYge3fJJoZJd\nSlY/sDKwgFIIbnxo+AF+CpeAwwM1n7Du0TpxCCvIArg2aLPgUpB/1BhC8t7d\nC23+\r\n=P0WX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b80e68ca5ce1e4ff7a83ec06c805029869aaa5fd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.df00c2b30.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.df00c2b30.0_1611258836530_0.23184321232510596","host":"s3://npm-registry-packages"}},"10.0.0-canary.fd61b0476.0":{"name":"@material/auto-init","version":"10.0.0-canary.fd61b0476.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.fd61b0476.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e91879f9ecc292a3a99ce9c4cce86615f5e294f3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.fd61b0476.0.tgz","fileCount":14,"integrity":"sha512-biiw2NyxhQpqhGLtfxeTIjt7JucKzgfmD/od/HlM5Btj644o+xoNII9Fbf+Ip6q4E7a8wvcHtU+M9OIkp8S+Bw==","signatures":[{"sig":"MEQCIBGkn+eReXkw7g6zYeiP4ME7hY8cheBApY25uY0LKfGRAiBmv7C1g2zREeL/E0q5phK2KwneP4sVxu2ql8clyD8rOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCd9ICRA9TVsSAnZWagAAB4YP/AlsWGfkPrbUhio1xW97\nAsmFAGkCSsettsN7eCLzoCH7X8LOCNpAcEe0U9mWMYN71wD7P3Q2KfUFNsEV\nmOvzcAq29x5enqICMvSg2Py25inhqPp5Xs9Tcs9QZkUt1II2A+sV+rmBEb/T\nrbE7JneT8fAlvCbLTdVW7Dbv+DR86uN5T8Tmq4RBEbwERbA8gKH44zYbnLfX\niJE0USnDKychTocDVz3qlDZ8uASF+4VPhZhnKBoFdptTmi/A7GK7PUQzQUBC\noqulfx3ORRzluq69oHJYFRyEqk1tki9XEEINhhKiyaNu6irBZffROd7D2T0z\nA6MIFCyiswMi0lzH+st4pSQS5f5Z1XEDNPiOR0b+JFU/iWupECWyoe2yriOD\nRrOfBU3bM2At6N/ku/gY9t7id+YMJuK2lYszbhuKaTGLE8aYfUfk1zFUWoWO\n5U/ambEabuK/QfY0hiOrM296jDDzPREJszXVYpt2ClZc5v1SOmVoooVJn4Np\ndum3tMCuaR5QPZBhUH/MUpZT8xLSsCZCJTvAhINQduYsUU6AY8HBaJB7Ss6p\nEB+QtpwFlQ9Rd4yzHlzUASwexPZ6/KFdOcNqTF0y4NGZn+QuHJFxKvSRIhXk\nOll9qsiohUxJvWbqlI0ppjXPYSdqBoFMD8Quz+uwOIiHBFU278ww9pFgpRso\n0RZe\r\n=ar2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"67853fc809fc128218f211f5b54f854f102d1ec1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.fd61b0476.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.fd61b0476.0_1611259720066_0.9052164825262046","host":"s3://npm-registry-packages"}},"10.0.0-canary.3fb3a0265.0":{"name":"@material/auto-init","version":"10.0.0-canary.3fb3a0265.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.3fb3a0265.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1a6fe5824dd8d5214ee03b642fab13e0379008e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.3fb3a0265.0.tgz","fileCount":14,"integrity":"sha512-u8nq8LWW6A19b5ZrmixBBbCCjfVnbq6EtpGFPo9RMo1lkREHSpzFrZxHPI39Mfx5hisB+YhU641AoqRxk4+leA==","signatures":[{"sig":"MEYCIQC5AJurbiX69cgmMYILHroAaCVSMQNgw/PZpjcgK82oqQIhAOkEwdyuvOo9BR+ZIyJq8l7b58GY/Jq5K9VyUmVPOQEI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgChZpCRA9TVsSAnZWagAAOTIP/jvOwr3Fdhic62EHWCDc\n3mH6XJWcDYdKhSXPordZESO9s7kXShnx/Spj4XTmvTTFLgwBRQn33KAUfbxo\nrA1tzGIcY+dc6RrmEpOTDpZp//EV2tDrC0tecBC5556M5WeBsuyNBgJo2UH7\nMcU+wD8Dkgr3LsrCRmw5RoMZZKgiFYYVDpJSG4y2ijx04w68uDsSNfruB7jB\nGmThb2m+5JImbEC+lCPwaXD/F8rsxSXtwo8QTg2pCdlVVULym+nHyAwwKD0D\nN/ngLJr6b6Inwy96vFFil6GydMSfDcy9JN2ZvamYLJRpOgoiq6nlNbVknLzA\n7kVSzmKPtvLdWJ9dFRVMYR226Sj83xN4njUJufLJUxonvuT+6/A48/VlO+FG\new3OIA0Bx9fhA5JYQ/hMBELCnnkHmfRwxiPF87FQlFmZ1S6YqU3eKpO//RiC\nKTQ2VQUxyfYi76eWREoCvMduaQOWnDMXEy0DSFM1cgUQwvGd1mbarZzu9s1b\nRNDnXFXE2XLw+eazs8e/3bsUv8etDjDiI0+Gv3FEp8k7XtIXIX1K5PikQ9xg\ny88Fm/4WhEaMiepjbwm7fitPKldTEcRKZpn8WjMsQxGclu/sJjR5Y3l8TG9L\nt+FRQX9dIclQge7oHlbObEtj56tr5LnTXo98JRJk1bSDdP25FAFEbSSDHfoY\nYDn6\r\n=l3jL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5e619e42cc5398fa779a726d775cc7e9a72a1acf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.3fb3a0265.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.3fb3a0265.0_1611273832891_0.617081461326543","host":"s3://npm-registry-packages"}},"10.0.0-canary.07deaec27.0":{"name":"@material/auto-init","version":"10.0.0-canary.07deaec27.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.07deaec27.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1f818d55248b2aba02b3ba8d7eaaf04aee3ea945","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.07deaec27.0.tgz","fileCount":14,"integrity":"sha512-kfXtCvm1i0M0Z78Ja9xqcfVOQrdAFxliweSTfWO3LHgkIYheu4/qLtzsGrfwHZ9DL2ytEXCTqxzGZPuv3mieQw==","signatures":[{"sig":"MEYCIQCCZ7XueZxNyeSC8EI+HO0di5wssXqm9ttayxiOoZRFbgIhAIfh++oNIKLnMKpAP5a9C0tDh6nxUkodXNTQpK3KAiGz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCwN/CRA9TVsSAnZWagAAmucP/0KW31VT7cACDLeYCgK7\ntW8F7W+4vyd/Bi/5/J/9TbY+QZMdO6KpqJcUB3QavGUmz8bNNieY980MDpYM\nYu2Z1b4t9ltEzZDGHeg+e+rM+xnnUwDOdoeDKbYMLXruoBf+LvU6pEf0u1Qj\n7yPo2w1qAWzilZfs9gWr+4m9/XD2PVMvDqUPPvlLt0hpFZqTu1FmuDsLH41o\nC790bnemYflTzvNP+eTEirOUMeJY+Gc6lLTKQ7sflzlf3GqPlKdNrzTLDGol\nf41H0DBm7JT2l7PDLihyZleuUQ+N7NqldfnRqqzk5NAHKKkV/qmuGbHfeyel\nlzrdT+tupZDT2/n3NCwnXdp3I8/nKzWcFQPCu4HdT30/jfMtXl2Myj3xHFV9\nRLBowMlBStOqUtijOim9aQ6P+E1p82OJS0rSXigEqbDHTwKXr7ZbZjrdgok5\nB1jP2WsQJOXtxfuFnpUWnEKBHtF16lWm/8wnZtkvnnmhZ0CiCGuGqwPFpmeR\n5RitxEwTrxWvG1dfInKncAanVbBebAbEM1H1pHWrSL7kbBcdpmVxd4icsGWN\nnxJo6MhHC+At3k1WfykvitRQe9a29uxkByPbRS3EK6vcvgMd2O2mZ2LUNwOJ\nkrE8z6jIVrK6KO9BvcFhH5qThoouWK0gXbTZegdcOYDdbWa5cW7tZ6j/uO14\nCUbh\r\n=YkUq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"be75b8d81f1ed6f8ebe94c8673f32110d71cec7c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.07deaec27.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.07deaec27.0_1611334526867_0.6372765534211822","host":"s3://npm-registry-packages"}},"10.0.0-canary.d2959b16c.0":{"name":"@material/auto-init","version":"10.0.0-canary.d2959b16c.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.d2959b16c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"36525aff91fb4b99ef47580f9aa85a292eb0754f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.d2959b16c.0.tgz","fileCount":14,"integrity":"sha512-pSoc2sr9eHukw2AWoMfSVxtr4GBaS6xNeQGHxPnhqDv6wDEWqCQLV3OLEHPGRZ3j6YgKfC2vAg/qk+xBP3urPA==","signatures":[{"sig":"MEYCIQCQF8yhNciSMogCvLlK/YuuM/sYmLmPXQuhp0O6Uy/ilwIhAMisG/rnFHYYelZuvLYUwfZr7lBEpHf2vN64NoVsxkY2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCx6kCRA9TVsSAnZWagAAN24P/3nasBqZZ5iG1a4g8tXj\nZcbo+LHMzRZ2PIp3h7KFcFHsy3k0fsoCF1D8qKGWFB1icMmSk6dXPYh44vBD\nbCUgZkTPEUuOr5+L2DM3JmoyYD2sMumLawNiEOfMDH2lS+988EUzke7ZMVx+\n2zdiBOwL+/YEgH2hNWaRjmXfQtUsrb/R1lvyNjad5UEf8NMsTYhOAkIPLx1I\n3L1XTJiRpX8OAXVERh0fOtvGiH/yNkmCiDF4pzkOWhSs8kgHHTqkyKZvSICR\nZHcCNvgwhEISU3XzkO0rh06k2ivJYzKS+YYMXG+5URKwAhnxpzNu+dwuLAaO\nkFSNwBv7fp/xM4rZm5sSDDhNLalVDeQ7C5h5NMmnvu3Dje91Gc+qtilVuTCm\nOVkVo65cMTtw9unMsbGdxT/fogA3gdQPFg6JFYpRynPROCN+XRuPHJBWVdlt\nX8Cyb/Rtobz6ee0XO5C71EZ2B2/iNQkop6UrkRxcDWld6+UquUl5ML/TC7If\nN65T7rNtPEGwEMsalty+a5avZ2f0kPkHAVp45vf9Bcg60hbvzq7rLJTxyg/9\no6xawslNuE2WuNk2eCcmz/EeA4P7K2clNt6TBMxAWqWkkyq/AlFWdFa6LbDp\nSK6AeEyitL3avg2xdrD48Z/KVUAtrg8KKplJy/0ShVl8EYMr5UQ/SYTwryER\nWU+c\r\n=9hGU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9a89df0257ea15e66bbd565cfea291993f0c4ef6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.d2959b16c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.d2959b16c.0_1611341475532_0.5554114483857737","host":"s3://npm-registry-packages"}},"10.0.0-canary.75f3bfe7c.0":{"name":"@material/auto-init","version":"10.0.0-canary.75f3bfe7c.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.75f3bfe7c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"54a3cc44a05bb3650c814b4b8b16856c65e45bcc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.75f3bfe7c.0.tgz","fileCount":14,"integrity":"sha512-gH20s0rruiPYJ4/wtAGHMIFCL+MCtdBHpFU9MCFV9tYtGm1clbctDWIYbCK3Pibxwoh9HTU7yDy/oV2gVLLYhg==","signatures":[{"sig":"MEYCIQC06Lk4k463B2N/wpcIWPxkiTTPdTn0JeGNaVB7FLDltQIhAK5q0e6sBvxGpCJWefu6+zv8rQ7i7H4i4Vl0aLxvHUUh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC1a1CRA9TVsSAnZWagAA1NsP/2IiWEK3RLhxedTmVJ+9\njEAOJcTpbd8FvZWbs2Ur4cWHmQO+EtSQxTikISdp1K5R51OHfiwkjUHnJNPY\n5/bzfgNaAW9ycoWoog0P56e6euUmVVck7R5ZhJsP3uW2iLZESMgy5WEDy3Gu\nO1LHlKQgOZrn9T/K8gW+uj9A7G6IFgF4/YaSh34DSKw8bSIVP2PjdJJ1y0g/\nlS7eu2IbtP566ftdt2aEt2+aXIXySslCsJGk76hIp27r29N6QNQnyWxQODUO\nLleIO09Y4jBrNTaRhFnlB7NiWSzlYyPOn9M/4w1JiABukvUOYOl/QpXjRwmP\nhrTdSXT7baxypzd+QU1Qpj5zn7am4XWtQ6iJay6ELBcfBYnNNsuiSYR2SKVJ\nsMHq+LS3Wcl421M4tnwr2S46ECfHn88JpeQ8SljjTZN5Af/m1mo+WkGgua5U\n07VzFLa9fw+tilV/7xgxYN3zheqW6U+cfz5YLSdffFFHGARrQymDMwdxYWBZ\nHZx+JnyFXcr58J90eVdOp27h6xjP88uuP2Y61hqAyoCH3/0eBb2WVfoebEhT\nVKtespN2jCw3i1kH4rZ7tyqpunXPG7rqkz/0/gp+RVMVBrIA5I+C7vIdZHDy\nXFDkMF+1WUpF6Z+NxH8PHgXREnmRDqNLTHKo0KEGbD4P5bDbpZwXg6UOMmyu\nsKAD\r\n=vYL6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"057941e604e02f88d571d61967040f58bf499bdc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.75f3bfe7c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.75f3bfe7c.0_1611355828888_0.7084844134957142","host":"s3://npm-registry-packages"}},"10.0.0-canary.b9adb7a0f.0":{"name":"@material/auto-init","version":"10.0.0-canary.b9adb7a0f.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b9adb7a0f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"30f29f4fabb1e4ceabd029462ceac2c2a7d7c4f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b9adb7a0f.0.tgz","fileCount":14,"integrity":"sha512-Coo+I42aUAuCUVCCjzu6pavDK6Wm5Wq+LIqW5VpP9jOch1qaWYpQ0niMH0uLoQIU1IQTmX77iPndXOHEkG3HAg==","signatures":[{"sig":"MEUCIQCMQu6ci2fr39cxg75nVf/L6KuNroEM/N+uxMMf1LcRzQIgR0cJwXOu83hIoezRVlSslZ5kvLFBbK+jGDxulr0qj6U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC2D8CRA9TVsSAnZWagAAkz8P+QDWvx5L8vgFtMtgKdmK\nu5TzfiNMRhFeav+Cy4EhVJgzKND6B6+IEMenyFFldTyh2yv3/l239hqvQwaX\nTwExRPUU+clsPzGx1UAFfCHg7e+5lCscZ102WSx3uN22vvwEMtGWir+J58oV\n+kTY4VHYDt4u8vKqcu5n/3iPOSxeodujTGNimtsWxOFbkgVrkLdVT8Nms20S\nyvxc396zuR4TZ/gZtA91sdB4wp01hzm6W8P/2alb/AstQHw8sIsia1XlifBA\nIf0F5lBZ22B2wfqWBjnD+Fl0ru1XXE3lnzZkaFKxN7xZsc3jVE8FA3g7RfxK\nXS+4+8r9Wo9VWWpmev8AyfMhqMn5sLn+jDSbKnoah75YsR+Rj/QaXKGNhQf3\njftUT7p4HE7BFl8z+kprAy6WOZU8iaDHVJyVTF2DIH+PmjM4qa2pcx65U2K/\n7sf1Vxn0TRFr4ZIbQqbfxQUHEEahERoBCUuUCSdDKcmZGsIqQtz9GdjCeJUC\nOWzt+UG4a2feTq14kPhx4TWy6+k1gXbBY7Psm0KnldtkDFmaQHjfYAPuGrSG\nkc7SGzoqgb9D3JKo7jGsvCRwaRi0L40TMagJIrGhPDCCLYiuWUqSuGTdpU1Q\nYQp/FczVRZ9XDKII4UEqqI+tMJCVYS2dcGgby5A+wPGzVPHd3Wds1A9mQPIb\ne6K9\r\n=lh4+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a591eb080c699d02013eb9ab0090fdd5e9813a72","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b9adb7a0f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b9adb7a0f.0_1611358459444_0.5872975047423175","host":"s3://npm-registry-packages"}},"10.0.0-canary.d29ec2862.0":{"name":"@material/auto-init","version":"10.0.0-canary.d29ec2862.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.d29ec2862.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b246ae4e547fb0e45c0898717ff7d6dbedc99c5b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.d29ec2862.0.tgz","fileCount":14,"integrity":"sha512-YEvxt+g4nRbhehlTNmURTqeLQLuUvfzriiJzd7wC0mZQGLmltkW2iHSQa3cnKL9XgU5C1GscXHEqgmknWkOV/g==","signatures":[{"sig":"MEUCIQCjOUW38b65Zb1QUBSr6PH1D1+ksjIN9LFXP3oGp+4s7AIgax1yan8G7LzhofLKpSZ57EBghI1s+yofb5IHjP8WEls=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDvBPCRA9TVsSAnZWagAAnTgP/A6fpbQceIl8t02ZiF3I\ncbP/qXBguVMXcVJxypYWoPrnjm3Gj2JbEN2H8dDJ9pO+Ru5eFJ1M/SfjwSmB\n8S2dN7QSavLCf1Qg/OIc+02YwcXgkBpsvRR8RYkHUrY1FaoqhHaUVNUVu36e\nbw2mziOCi1QCc40HTle36iRPVlPKLwYR7eL+h97Ahxn+tyH3Z9F0AuKQUdbs\nodqrCcJgPgCnaAm+I6sfu2HkdxWYL3aIz2VceSfUMBlXnw+1HtWKamKG0P++\nbLqsQ0uObk7P10ngjpB/Eb5MQM4V1QeMAO/rr2gAUqD1ARNX/hq2F9Yvsl1+\nrgQpXo2Mu7+eItL0U7mlyJVp9EkQQuCJU1PtgR0Uy/3M1CzDz9/zd+LC+9ks\n2q3hKh93vSaYkStLdNbA97021DFTn8kVsRrPTZdke4g/bf7HarL/SiJQKgIw\nGtKDWIhTZC2WbFclFwXXu9vF6/SsmpmbqYoVXNl/MGl0NTjimbm4uMYZ4jy6\nAWYumndrQOh5ngdapihh4ciIqpCxwiFqvNvldq5rl+ggJb30KUUNsxORGGJx\nlXpfB+dNuuv2AS90LeWsV9vh9fODoXcpl9+YM264Z4H4BKao/eHUB1TKJrBG\nFIo+YRkEo4OPN5dZ3JNgQTPva83w9ObYBi76un05ru9vcPi+Jd01KbDveq/Q\nv5sN\r\n=rq9x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f2d18d6e94fa1f0808b7d768169b9f4827dc692","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.d29ec2862.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.d29ec2862.0_1611591758980_0.6263549129183763","host":"s3://npm-registry-packages"}},"10.0.0-canary.96be07c68.0":{"name":"@material/auto-init","version":"10.0.0-canary.96be07c68.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.96be07c68.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a7f18941615075d7a0a5e96d6f1cd2f82a708b81","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.96be07c68.0.tgz","fileCount":14,"integrity":"sha512-GSwRZJvxzA61rp3icg1m84HqesydiiOIQHD4+4DZgc2kqjQ4Uuy9BTen5O+OskQExAUrSJiBywteaEbdjCCczA==","signatures":[{"sig":"MEUCIQCqVEZLbsd2WzGuaaWMKFsGa7KMe7O/cIcPlyPUdK2GVwIgNagK39Hfom0lMxDbCJoL3EhbBS22WWQg6TLweP/OfRw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD12cCRA9TVsSAnZWagAAYV8P/0qKFweesigUyW6Pruk3\nekQ2SBl+yRtceJSlNZB9LRTGwiw10CguNuz+2aqdsJe8GS+WNtt1qLuGvaRl\nkdhpyhlw1SdhOt6p87SJnyFzZa7bu3fU44QB6HFCEACeTImDUdby3CwhxP0Q\n44ssRP8Wb4Whlw7lR39EPuGOiP4ud5gnNmrhPZzhRDwAUAwQ10tyrKvLjRMQ\nFv+yvFFhG6SsG9AZanOzJQGvGxMHYOeSo26z7E/DTVaVwR3KmC83UeZLaYKS\n/bk/Oa5q9Q9bV/8ARH4466MiRvQXjBMlCSzbAL2rZpaYlnwHcFFexEI1iJIp\nWS7dnLOrX4O8jbAxSmCIftkAI16ULY7JOwqhbqed7PNjpH/gxM9feIoIudU2\ndC6h3KGmgx54cRr0PB569A0BRw60UybpkZlNfWfjRZUd0Vcm2YR4gxmJwI7Z\ne40w2xhhy97OTyJLFZ03xNdPsWPbs1J3gX57JR3DAMze3bn5w0in7g4JHDIq\ncIE48RwXsFcNk5bgF3GJNf77fi8D2cII5Dee7EF9qnwu9KDDrTxVWjbdLdq7\ncm/+LDe7OriKaEmSATLmX6o0W17Qj7pFZM8DouRlCsiXB9WD3tWh2kn23mei\n9s+0EdLL+kAo8+xOzt24ifQZfD81pBp8AN6YVCFcSfT5mQh8WRcmO6H8Id2A\njMxf\r\n=3yRo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ad510acabea4f02cd7399e109ef73d3b0bb52e0f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.96be07c68.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.96be07c68.0_1611619740263_0.5302584425043855","host":"s3://npm-registry-packages"}},"10.0.0-canary.e383944e9.0":{"name":"@material/auto-init","version":"10.0.0-canary.e383944e9.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.e383944e9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"78a6cdab2efd2cf9d23bf2037744e77849373980","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.e383944e9.0.tgz","fileCount":14,"integrity":"sha512-T03fOOJ85n7x8cBNtm9pyS2u9/1xloDG6Gsa1oirFTWdaEoLRnAA+++m2kc9LyJAynRBH3DQBsWCOgoyKdItdA==","signatures":[{"sig":"MEYCIQCWuLnlEYOPCJKGfVAg7PHlyIN4gO6cT0RSflYmqfsYMQIhAJRtY8+JETxfLK/Y2snd5vfALQXnaz6Q3Cx2yWP5n8fv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD3PoCRA9TVsSAnZWagAA5qkP/Aqu/lhTfM1TfoJxDUvD\niwAPW5ScSAfB2AWON/arebpAMFRBWUXvTdPRc1Dr/nuO8EFa9Ro64lyS0OtS\nnA4zjcqZZbG56lBiWbru67q8vFYov1Qd92TDMeP3JLFnjY2sJhBZkjWwEPxk\n0OoyjTFRdye+AUfxoA4TyxMnrjHci6N08NrThpF4iDlx7bfags5F/Xb9ZIsT\nJ3Ee16fntFn6aVP7IWc7EoTArlpHVTMFpVzCx1eikL52vLysFgbXBTFBmtDi\nn8PgZ6q0Yp9UvgAKWOSDr+3yBmw01k0CwC1KTHYebxBSZEfIC1NdPELwzTFd\nBOmX0udOr6rvycC/fRJJ8k2npthMs7pEGTz8a8fws0BFbB4mnG1TD/zS9Dhi\n8ErD2c1NLrVvGCZTMGYD8P9K4eCnd5EhxFz/AfE120v6CLHAi2gas+y9yUPe\nfAS0cJx38hLL1MaV6FGm9TPs0PgkGTy2HwQ68K/z4b/0yvjlMID+q3RCx7ip\nDveOPSHzabYU3EpgLi6jKEvgbHRzKNoBxA73xkv+NMMIBFUcqHupdFk/fMEE\neUzdmrVDTVSzJ+WUwRnpZMkgBeym/06CltLE7d09hmHzTNedML+XtoQkcf4Z\n4i2F/23vXTusH6NaZqux0au9a+C1EmQ6QRxBh0FhX8Gaf5bvaPEdROtJiyFB\nvgPD\r\n=Rr8C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc6dc4efb9210fc9c70fb089edb90278a8ab66f8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.e383944e9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.e383944e9.0_1611625448365_0.6218385098926777","host":"s3://npm-registry-packages"}},"10.0.0-canary.623af861e.0":{"name":"@material/auto-init","version":"10.0.0-canary.623af861e.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.623af861e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a72d6397eb127560c8c720f8923af260051baafc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.623af861e.0.tgz","fileCount":14,"integrity":"sha512-A9hbaiFJ7AVlqQc/gUhMXeTeurspA32AH8vt4fkc2ZC6R069jeWPIr+HV5Q8f60JGBOE1wnUx4yUZ5/GmOWOfQ==","signatures":[{"sig":"MEUCIQCW9j3KyECGhQYznZSwUDitH6bRXin+yN5EG/7tboK2JAIgHa7GmwP9r7IyOjLT4TJouLrNwryLdmar+grA0UAwfJQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD5AZCRA9TVsSAnZWagAAsi4P/1XHbJXCtzGHGUIfgo0y\nVGBTN6M7CWLtVf2TByBNvvSuOoKdQbPnqdcHuQZMbEu9PPohj03z+dGWLUDM\nxTyGU3jqsM6qWQueTUUOpWpgRTzkusj9rWexgLFNTl23IrKHx5vMtJOjost0\nOlr6Wx8oCzVSp9jxWF/wMra6/SOZC4jSew3bQDFbZdtOBba45h0mK0rQNXUk\nHJ8LaYI3flhsA1oh8Y0WiQAllH72pvWQIJOfP5YvlCsXzorqpwTkm1XwdhKp\nHTupEiZx4PVVX7vLBgHfGCWDGyMGhduHSp3CK7OFt8piXJHWz1mvjzF9Mhjx\nstHqdkFGiIhmKMJ11WI74CvThIzyylxtBtLNtRGaUEf4A0FNMmxA2bTvsuEc\nUDTPruLXs5CFcYTRxeL8R3Tq5VLB7uCqiF2sRbbqfGjAE4UCHXPH64hXoELJ\nypDT6YAr7SMaPELQ0AfhcfgEnmJDFNxjI0zaTE8unvzqp4TYFu/zPvXVHut8\nk4cj1y+YfH5xy1xL1O759QsgLuu0eHruSAt3oDtYwD8sWZNsXAdYg0b6i/7n\nZpWsO5pV9kHac8+jmxaEKl2IbxCNKgL0xXwskuZq9oL6o0spiHfZqU1P8Dt7\nn1VMH2YqjniaxtnSVnnDJEU76ugVTnAPCo2u9fkTYC7AOVJIC2fQ7iW6Fi/F\nVS3/\r\n=UYyh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5906815761339487fac225651c29aa422211a72b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.623af861e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.623af861e.0_1611632665244_0.34839834818326976","host":"s3://npm-registry-packages"}},"10.0.0-canary.6863fd43a.0":{"name":"@material/auto-init","version":"10.0.0-canary.6863fd43a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.6863fd43a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f730564a9dc451bafed34afb64aa1c7d4b54106c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.6863fd43a.0.tgz","fileCount":14,"integrity":"sha512-yVztt4AKL4uT3Dg7canhcwlwmQR5KoBXAD50YbGTqJ3AnjLhI4gjkZf0usiBKysvcX4EbW1QSJKxGlv7z87b4Q==","signatures":[{"sig":"MEQCID7eJWFVTxlJJ/CRmUZijij7ICOwGkAC+IPR5Ul4AZ9BAiBOx1QRaPc3gGdoLX+pgRu5DJgo6IcVIzfvC2dv3RY8aw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEIpFCRA9TVsSAnZWagAAfJEP/R/Mmge/E8GC+zAcZjZP\nJkSkT0MrdjQG8OBzjI43ynZFZpgAdOkpUmgEw4ub9NANUMJGrifXqjWcS3gT\nGDDjb9317H4KhhOcJWRcgd18OIK1aXJTOfoIRjrkB8k0OcaCo7JnnrRR7hR9\nOLW+FVDqJb3m3IITwda1sNVHDZLtPojXTIkkzsDL5iXhnV83XVKBVd/YMjBf\nZtRQRELdTEiGGvhkqfBYELydVlrtcwSPgHZoPuITq6pi6C4WoMO5mjE6IXAe\n3fP/n5nRfhSAZ4u02J1prl/sThQeCvb2e2Hes42pnLqvzSPXQAbTlonKEVzd\nroKQJ07yjF7lyhlQMBMIi9WwB155LskNEOPeq9MBxGkyWgRX47O9R1SOiziU\naIMWbXiZrfKtkpTMKVqXuiwLUULLGhzoELa8jQWUi0cD6YF5OzPpo0JWIEmN\n9Js3J0Yd8ZxEd5UF54I0BnYxuIh06c7KONdaVmdZ9b02LDzR48Ps/rEJIdeY\nvUdmamIwwZbZPOjyU9cceE7Wsm9imrKXPV/DuQSIldsCQefHCq91jRshXPXw\n/RcS42D0d+aJ22mwxl5tCQqG5p22ALQfOROh012gNiSm25NPg2pqhfWt3T60\n5hoUIUBP9Tkh3LwsDAv9dGD+lw8+XFyKXVfb+uc7uUxLZAip4hAqzm/9Mu6w\nSxXG\r\n=AkPZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"49d0dacd3a675991bd5b8c454304b1f10dbcfda4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.6863fd43a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.6863fd43a.0_1611696708957_0.7912423682461176","host":"s3://npm-registry-packages"}},"10.0.0-canary.ea55b87ca.0":{"name":"@material/auto-init","version":"10.0.0-canary.ea55b87ca.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.ea55b87ca.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a2dd5beea4ad52cc85f79ab4b34d613c53ad5439","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.ea55b87ca.0.tgz","fileCount":14,"integrity":"sha512-eoU5dQ5py27PkryFyqqwFMkEtGxc0jkmiikxjSCPb84Ish7eSTK7tiKUL1MKXil3py/uAdMtFX75THUmbx0TYw==","signatures":[{"sig":"MEUCIQDJFOJJg99SbrAJu8Inm8Zx7JL3nXRWFDU/slATCUyFgQIgYQFwzVCJU7Xpc+apE4DdhbhKepayHbDYKv1E6qznhrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEKl0CRA9TVsSAnZWagAA2pMP/28QhUZcWHG/m1Vxo5/K\n4yMBGgqVUcsqIsfDSDbvZXX9PgbR5OBAQQIifRfzeZiiQPm3WHWgjeXrdjpQ\nbQQS1Iwb4y3vE82JAvLX1cPU93hvYixURcCR7ra92ca3Chj7fnPIRSf3ZpGc\nHa7yKCtJUVm08RFRK9p+sot8G4mSaqbF3h7AuWr2suEr7ZVKggCuS1ZqzqMj\nE7J8ZAR68dx2xtGyjK1bYQk8mhacPa4DOZzYDQgWI4fuJ1VxBRYvIOMTWg6Q\nGGA67p5qQzmiJGUfg345IDX5Z8vWy0a6e/ORpKlncHZWtbYZiOeKTZV8k6Vx\nDhQ/kxNtjhFAEN9RCrHm6bHwrANS9XLSLjjcY5wYm4U0d0RwGk+5NC++u8NP\nSFi7OIszjXjQF8HKLKd31fRXCBFCY3/5UK+lpsIEf+rfCVBsGHR6kwUp1jEN\nB/UssOmjjGakQTqHnENQt6P4GVcS2dTqnJq/uKaNVO6pSgB7yHMzxPsOu+ge\nvsF5mIzl9a9n+JnLDjROWdZq32RSv2xnO+5XfvckUIipfmNZO2XC4NAK8Xps\nU5efD+n/xSNZ8m6BsOsUhWVJTdZOisjyD9DpMjW6LKY+7yKvWBtKmvOFDXBr\nufJV0N+lIX96g2a1/RVXOwUmD1xjtssnabRopVrVZN11K2LGkASkIzbU8ecl\np+LY\r\n=pEZx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00e7569feb0aac4c4dbbfb9b292c9f53adb608bd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.ea55b87ca.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.ea55b87ca.0_1611704692049_0.3381285679490724","host":"s3://npm-registry-packages"}},"10.0.0-canary.e902ff05f.0":{"name":"@material/auto-init","version":"10.0.0-canary.e902ff05f.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.e902ff05f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"14424c9c63ede62f2b1e5e285f7bc2110504f8d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.e902ff05f.0.tgz","fileCount":14,"integrity":"sha512-uN5F06O9eOW5OBI6TjLlc83ZiKKoCuz8ygZ2vny4Vvs+arD4Q89Vrl5dF/3bhl/1P25ptLyJMTB+7iotEYiLSw==","signatures":[{"sig":"MEUCIFo6hc2n2rsxcn7O9eHddnwHr+czxif6NlqjIP4k5i6TAiEAuU0GB2AJ6BRWEFbR262hS9UC5v8RbI+qj1yYZ5HI1fY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEK26CRA9TVsSAnZWagAANH0P/0wbNyt9OLiECA54N7ab\nQK6/+zrGOn82YEtx2cYvGUz27YSA24f6yzYpdHr3Eiv79AeeEq/oIFojK4CY\nN3faGJ7sWoNtN0xc4QApUsoLe7szf9a2WyawiJQ5DDsvLUHAj5Nx2DZi9XP1\n8QuCjJTxJXgUYAiTvhMtbj+PLo9IbsV1IY4U2dbIk6mclpJicqlkwls4ENIc\nerk8v+2gBMW6FdDT93lMkctIOrdJ3T09Nq28znMaV+sVQBVFqke6YsVzO4RX\nZelRe8xkrJuWUPiWM2Pk0QI8WL9+aJntzJygqwXAKYhPg04mQsvYrAF6jVhJ\nR4ciLOyAWnbLhGWDUFsoQdHPon+RAweLSegrHKTu5h+eZdMhAefYIpyPruTG\ndzBFPh6UpjkK8p1SbkO9f7SLwWjjZkRfamr5VUcD7X9kxK5DVh/Ru0TeTDa+\ngMwmVbV8U1pYUdLeXFyV6Xy1nM3yUz/U9dCf/e4WgC9JOVwgL7r74DIsTxCy\nsfKr0Tlhp5WDqYUE2ePrDEVbUJ1sccSHUxHdjGI0DbIlJZC1qK/NPgMNxrgG\nlGjtAiI9G0iXWZ92qhwAFTlkUmo3khb/6SMwfvSt0OLVfPC5PzRatEHUa8D2\nANHGYusgm6xcdA3NEoZDavchYUtecyjbXsHu6G3jpqpt8NcyN3QHs1ywqB4h\nZuus\r\n=3MZq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ae6ee07772b70becfa69208ee5a4849f86c2fea","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.e902ff05f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.e902ff05f.0_1611705785917_0.24723492375235434","host":"s3://npm-registry-packages"}},"10.0.0-canary.2c9fc538a.0":{"name":"@material/auto-init","version":"10.0.0-canary.2c9fc538a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.2c9fc538a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4d60e78fcee1d5b27b40d1818841e4f62c969e4d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.2c9fc538a.0.tgz","fileCount":14,"integrity":"sha512-y28lrah9oEQ5zXEDsde/2OdlHl12ojv+V62rkC88itbxXG+LN2kv+iYSpg7/4IuIzRIY3YYc+VQjwTeA/U2Fbw==","signatures":[{"sig":"MEUCIQC7AM7ATReEMRsN67H3i+guyA7Jo91vEB1hkbed994NWwIgayHjKdxD0SHk39HIjjuGE9TLp0xrX8tNtiuox51BihY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgELMsCRA9TVsSAnZWagAAdtoQAJfZJ7Y5g/07iiGCoYGq\noeOLwDI1xrgERnyTIOW7GWQgaO/aFtvBa0VzI5UtRyyZN90LyVuXQ7WOFWfF\n7YRDQgw1bqCr2vPj4/hEHsk867c1V4lvlfBQqWhvd7LoiUmc2/M3mwy4B9RK\n6FBV7Bv99dz8gld1Mim0f8HW9M9PIjEREtxwPlFKTLo/53XrHuGsutzBrvkX\nqbaHoE7ur6Md8/SI2hXNmEH3pKnTPVn8+MjE0WBKrct2Ukg0SpgcXbP5kHAB\neP0eQo3uVyuP+XnqULGmcqvWi6v6XeoK4X9fwAaQzPzxvOiG+p1kmp0nV3g8\nEMvjmISZjgfRZ/7VgWK5XKFs67+h0sD9Pn2VvOFB2JD6hrkeAZ7fYjrB1e4p\n6ClQa7cjzbhhf2rDnN08d1dbCuk9Vmr2li2BQkO3tWJOssNeJW2PT//UOhAd\nPf7aIpOzAk6nfGZIAO8ACRKQbYtaYvb4qJFjfR7spZMtKhkZp/mhqdTKk/WY\nQC6c+dv2z/rc66i9aJys9jm11/qSU+9QTmsoUC0bnK1J6oI7NUqlqgBHZNMe\n8LPaH41XcETqs92/HwxLD58JmUjX2nV/ZiAmeQ1ksJdzqwnJ2jA3D9wcwwE0\n+cQzXyLLhPRz7whVnGfQ5O1OWLG+q2vBLw2smSHBV347kp4BeBVoNnwW/x6Q\nYy9o\r\n=TrnU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4bc5fff9ddee1f7703010e418626d050ca883474","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.2c9fc538a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.2c9fc538a.0_1611707179763_0.6216780615108739","host":"s3://npm-registry-packages"}},"10.0.0-canary.6bf56aaa4.0":{"name":"@material/auto-init","version":"10.0.0-canary.6bf56aaa4.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.6bf56aaa4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9883a3e5d826adb12df52f08705c8b449b66cfb6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.6bf56aaa4.0.tgz","fileCount":14,"integrity":"sha512-HLNzWZPNEXLIswKgZ2vjXC1xo6vvvYOi8FtHy1bXEteBW0AD5FfGn3NUoL1I4I46Cek6GEdbea5e2HGbQ5KRrw==","signatures":[{"sig":"MEUCIQCQEZyjVVPuPlgBNmNzdDF5AitQ0N+mjlMF1zPzT8wmhgIgHXmOoeaH/M1JdMg+6rX+p3bFbyFXNBjqOkAUcL1zs8Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEL+KCRA9TVsSAnZWagAAmg4P/jpLGW3FPm8T5MYGj0IB\nTvt2Zh9hTUy1Eufi8ndV8x92O6PYAQSYAqeZ7b++CAN2CrpkIICQRA5KYxUY\nKkI1nfIHt/sO1SKqGqrlIFEl21HCPFFXS/sRD1XFrfLwmqMFiPxFFAx1AsfM\nrpmesk3OTDJqbmEvKza14bmVYQ1dh85fVlMeY41uDD0BmyHNAkRTVpZLB3km\nH4ynwHNWtfxb9+Uo5u407zIkBAnPL/mjyWO/9iDsgOz+lceECM4n2xP3Aa7M\n9kyRYMQeRhLStYgIjryfRUE92E7iy07EVLNW3dOfAcclwd0O3MgPry5JQpxQ\nZXSDC4Y9Onviy0ajwAZz63cMZxuI/uZDrdvtCWtntTYwn9Njb1w9Ne++OyPC\nzsT0AoFL8VD3UI1a6JXtqeerrYSmGFsPKU7CbMfV0mo8krNfoRiki7AjrC15\nhUo40PKQdBac/qcsfvYWR7Em6XPw9L5GzAVtZxySkZiAoI+I44ZS1ZA5YXpC\nCTltv5Nz03zvlKlfxesEk7cABZqbwpHhDJRRj6AlfBsb5IuMkGIlE2A+dNQX\nlNS52+ZGFUrzu4JSv1FDrsvrKQLdDHHVYfjuJLYlDNn1Wc7DomJAGvq6Mqel\nadW6OjFxWZhIdXKYr6Kw2MRQUKSsNuzjMfUUWDnLpxoTxumRZMTj0eMiEwTp\nqok0\r\n=j1rO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"557b9cd09fc15e60ea09bd17651230487a292b59","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.6bf56aaa4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.6bf56aaa4.0_1611710345718_0.20801496262031782","host":"s3://npm-registry-packages"}},"10.0.0-canary.994873795.0":{"name":"@material/auto-init","version":"10.0.0-canary.994873795.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.994873795.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"27d390eb80259ff3bc6def38c5a00b04ec2fc2b2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.994873795.0.tgz","fileCount":14,"integrity":"sha512-mmZmLHOU1pNnmad3pnKdxO4Wz9zSVj/WFoijs1uGUs40U+Hp8fk967cwtnxxStlvSzhUaKwJDkOU1wGckCOIaQ==","signatures":[{"sig":"MEUCIHeGd6t3mvOUn9d6buEf9gO0kJUgzGjDEPUki0TGS1qQAiEA6xPw532yTGOmL9JRddbwA1DwxDzlwEKZYS0NAe9GF8w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEX2eCRA9TVsSAnZWagAAeFcP/00iSwQnoqIqpvZ4JK2l\nLr7jYZmvCT7Qwom/dossqDEd5IY3eNLMFbJ7CW6kYPrY2jPfaaCfKmeoSl7q\nDDzrs6j3ODS3CSDbijtmPsxCXtSAwPhhMJdxPhiwjquvjIqeyGBZRsjZnXX3\nZ2fFHOWeD9ZeSQYIlEOSAhc+ODDdzkkMBFPm6bnc6iQQwaBnqOROv6IkHvB/\nJ3Fei/4pL7RomAVAa7WwJIFSD118r4E3vHNfOj3JI1EJrGUg+BLTgyEmFLeW\nJ7B7TtL3KbyCfis9WeKcjh4qDtq9puhHCdS2HH8SLy2sXu7pTjwQHKW+ZLBS\n8Dkdx7beYGR9AOCtDQTZDzk+TXydqYqtH8DH7+LxbpiyckvLOhA+AiDqXVJq\nIM0l1oRut3cuVyDxArA5vN6fdFz/LkwcctEx5nErs2yYjaZ4ccHOusWvLFPA\nudAgmrK1wQ7Jplj8CD403JWowczqwk5G3aXupjfGR534JRczmXNiiEzRb03w\nMz6nAI6D3JDS0pwKuHonVnGI3qMIaVknrVKdUsuRfzb7rsVsiLNmeYUWJcnF\nJNmiCu1KqrdX/hEuOFTIiJeDhdctoK3DdrG9Lq5iCK+mG4G32KMxV+mvFBkV\nrSYh0pzXZnopx0ONXv1xyIqI1/NblPFgtNGPMzbsaOALMUkhWjoiRD2AEFOg\n9e8Q\r\n=l9QS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8d1337af6a27bed9f06167ca1cc1c996fffdd9a8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.994873795.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.994873795.0_1611759005961_0.5454394183903768","host":"s3://npm-registry-packages"}},"10.0.0-canary.96878e1d0.0":{"name":"@material/auto-init","version":"10.0.0-canary.96878e1d0.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.96878e1d0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"339ad3b38c35bd639416008e923d00b51d053ce4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.96878e1d0.0.tgz","fileCount":14,"integrity":"sha512-gHh29JvG+MrkLouMQJ8ZF3Ss3KDd+DxCgVL9r2n/9XhSVT/VCM3Nz41Iv5H0CCx6vVP+fsGSZdCKhUUS+ylgrg==","signatures":[{"sig":"MEQCIFMdbSkEIPfH4CVAo5JByUUaULGl3W5+dpul/Nsl/045AiBls9ZwI6spCYW/XpNh5sc7FBg6sKjAXwEVSPzgFdQ9PA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEapkCRA9TVsSAnZWagAAQhgP/37EM67HbkmTcfC0wA0s\nTNsW4esxYzF8CEnwAMNf6kESEuJCcW/QWkzILly+4fIuq2MLNgHeiZJheoO4\nUWgvLVot02EDhXulU7kPZOsxm4Q4oOJBBTYJ8lPKE8sPVTPDUzmbD6GFmV54\nvTRWgyuj/pVpI05mAX4U1JLC9/GxQv5mtj2Y5RQHjDGgn1R/OryfugNg/tyD\nzFF17U65U7CucKuDJjqQeR/oNPITOdzR9zemazEWWoyyE3QUCHUuIPMytZgs\nMYT9XVXzJft8mHWma8MTN6ylDbkzURQeMfBxVCfk1zV+U3sZh0OGklID1zPc\ny2KixFn90EFuMI1+c2frTJp6buLESMnp9L0+Ow9HMSY2cHiGLj+T4tD9AzAD\n6ivBei3qOt0FGDUK6+VNSpbeX+wzSoQD2Rw7cMRK8S6tqW8SKutP8N5BH1Tb\nUjlFerx32uypvvsp3x6EfBTYwCwHa6V0Z4PkPPiAMMgCkAYqx82GUzpNMiW7\nFjBdPgh4QXpIHy8Gq+ac1aRwkUbTk3KIHK6zcHUDvHovngO8Br5+3jlLITMT\n780yOR1wZRoTaXxN9bhZG9Poxy49czezsa6fYu7Wzxp11cmTsh0uixplTpeW\nHGUAIAqxunmXBXknWCj5UrJZfgruLftUGQN5vK3BNA55cHLipG3Z+yskH/2v\nLUYI\r\n=9n2O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc9f62002fbbf03874065eac25971ed2b49a47ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.96878e1d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.96878e1d0.0_1611770468338_0.8970316625444554","host":"s3://npm-registry-packages"}},"10.0.0-canary.3c117cdcc.0":{"name":"@material/auto-init","version":"10.0.0-canary.3c117cdcc.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.3c117cdcc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db20203dd87f8be273f1e68682e425e5432d9049","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.3c117cdcc.0.tgz","fileCount":14,"integrity":"sha512-GpgiF0A6hX6TIqu5LfAZjnG1c01fcu0A3/jqdNNVfK0w5HS8fkdmLdkr1gs1vlbi7ZO/SLmQe4RFbwXNBPdJvg==","signatures":[{"sig":"MEYCIQCe4XBZE7A9L0ZU3hVJW2cR+4HCSH1UMxKGpJLohcQKewIhAOxZms9p0rIBHFNlAWCu+rhkP5g8sP6ntSoJqsTn3gEl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEbF4CRA9TVsSAnZWagAA8JAQAJQsKcGm8o0pDyTX87Rh\ndzajsCd07cxgxQnjFkZXpjK3UWbz08scysbtHR4MiBMw1erndCBInNz6cx41\nt+jwAQucDFOthGspEjblDqoZe5DrD/+QzjjSEwfYyNScE503wmCPUeDUKcte\n+PAL+meuHoL+qz5S9GTO8rt+KU7dlWZsvIc7YOfgdv6cDTP1+wGva8sw1AI9\nqqzqL6mvIFXDCz58YH3BkC5a7JXDU8CnUhs78bkNRP++I0AWlnfwS3dCZ/vD\n93RltZMNMUzKuCcXEMWK5oPOMwLD/5uPbhlYQjmKwqPoodueBlfpnabXRJSB\nossBZjmuNJTJ2PSOqlVFP0QHitepeMZaVF8sWI1jlwaN2cEWY4b0n3gm5ba5\nfaLOKdOBE7pN2zvTHqX4ROKsFmv5ZtcN38cdnpfwLWJZXb42TjWE1qQjBPiN\nkV4nk4uwv5VIDwpm49892B8jTp37mOJbY2OdKTfGsvPEg0d32oqoqcULInw7\nfMiX5eyUfwfrU76u7n+ygk5ryB8Clc02szgUm+yQ4j1AK3MgUYt9mfCaWgld\nPiGYJ5AH/adZrbanJ0qoM8eXPiYFsOnmwoHorR6l207Ccs3HAOi3J5DHrXz6\njCUOHPKU/2UOqYS2Mk8oXp4Lb7BOGW7rcszRrAvEmJcB946IBpIb8R4YBqpS\nMdkK\r\n=h1z4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dfd1ede4a4727199e63765d305bb36d91509dde8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.3c117cdcc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.3c117cdcc.0_1611772279609_0.2271018461476635","host":"s3://npm-registry-packages"}},"10.0.0-canary.b411e7033.0":{"name":"@material/auto-init","version":"10.0.0-canary.b411e7033.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.b411e7033.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1bdc8f3e40ac663945cff09712644a54042f04e6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.b411e7033.0.tgz","fileCount":14,"integrity":"sha512-jy0jdkJlER35uqvGF904qclSbpZHFPBb6inLEo0WScNsH/DslqAOaAF5KCD/X5JPfIKgxmc4RWqlURJ+fNfLhA==","signatures":[{"sig":"MEYCIQDm/0/FZjPgdNYlWaPJNaMSnsrQFYUeOIzjxbKZJ8K9LQIhAMUGXgXDumQUtH7icDUeYzVL4Y9vSViY8OmivZas6jeJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEeL8CRA9TVsSAnZWagAAk3IP/3LvkKgpSwIZYZdCJ3Z3\n75+EjhS9k+y68uVgha+Yec89NEPbsTLDKKQAf8dKD1eGHlNo+jh7pnlxff7V\nOWBZ0nL5TxC19j49YqKDoz1LbmPWIRhzI4FUtuWgpINKyOlbUemjxke+i4+R\nhE1MJc0eF5Kb0fjIp5TyXMDSWxW+nKZr309ww5OyLXIh6dhlmEmaZB2LWFo1\nyyvqE49+dvPpk46uJDvJdE6E9Wa9vdQsQkFDOqJp3dwUxlK5Yk4OmvY4yJBG\no2eUH2BQFrv8t5Vr22eSGzrWMEC5Lr7drqlEYGMY7md+/klD1XEuByjAJoCC\nwbKjqTcCdU14DBtyOGCWN/rmPW0j6Fcrm9AKK45Jo2Q5bRJ3ZCSC42PxHcOt\n2FTi3mBf98WEs9wC3UA93gfve1j8cu9mtKKUtGVl2yHrpyojSsmNkvI2PEwX\nbnrL5jYp92Kv76w/HHMnzauLwBkEldYdGmsfBMYJKCmyjZSY3dUSZLFsK1EH\nxNDwKt9HKasvP5I4uijnl+c2ZO8D1YMwQ9eGDCpDUaTOCdtmRYdM0j0lvT8U\nJkbkrGXmNfcCpzIOz4DSAMj6+iamxhQshhQXz7DWAxX9kyToR6u4j5BdSJIO\n08r1Q/9r8tj3mX7Y8He91UeI5wwx4yK/E+MsCiemMaWBMb6UBhxqw6RryIvr\nzssA\r\n=iRcm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d12550a6229cb648f6739f83d7ba5feeaa67dac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.b411e7033.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.b411e7033.0_1611784955396_0.83099963577222","host":"s3://npm-registry-packages"}},"10.0.0-canary.a9ac16b4a.0":{"name":"@material/auto-init","version":"10.0.0-canary.a9ac16b4a.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.a9ac16b4a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"edcfe0d5ca0caca3e74cf273124fe9c79e3cc054","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.a9ac16b4a.0.tgz","fileCount":14,"integrity":"sha512-WAK19B21KFNP/xsiJY3UhL9m2cXygBmjx9wnI/qkXbDK5AwkTrweDGmiRu9jRZuREQCnPj9LJXIkYqF6DMTT8w==","signatures":[{"sig":"MEUCIQCNHJxHgAkslmo1lUH4PkEPpGa9sdgwv3RFbuV87t/6zwIgd3KbABGLKxiYPIhelvgRi4HZK4RpxwQILHyqzQIz7Z4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEfEFCRA9TVsSAnZWagAABfMQAKIW4G7o6zTFmqLSOM9A\nrwg2tNXa1V6I9E6eGQ1U76IZ2EtXkytvsI4LoyJuw0Ujt9b96kdLh988WWH3\nOSBQZqwpNknavEWCHVNYTCPp0br4q4npME7qD0mMHCesgtZ5jRPyNax3/CEe\nXehfmd4KvRGFTrhLzopLFR1Y2TOfHrXWpu6TLAfrQBFNNsPwg/f2S7i8k3N0\ndbK1mBHy9mIxsiHIexyqUHo9S+CBs9TZXAuQBWdPQrWNDsKbtnk/12iCNskS\nNFndc/Wh0dTp/tiPzRk/Fb5r3ngYJAzLQS1HztyqJfHN/WwUyCWNNk5dYqN3\natx8sboG3n2tHksjc2nWhz3On4vflu3apIeRY3nDI1Q1fMpQWa5YlQT8PWTK\n2GyM69F4I6pJw7TqaahNYsfvYTEvG6EXW33+x+FrHmSfw/EkQJzpk8Ecg+j6\nll2YSQ9DyOMGunGI7q0DGtkPh1KyoXC7uPthX5tecQyzFXOs24ADlXpL4jjI\npzG79EdCUZHpoVF6D6gfPCJDf0GyJlMj9UteAUcxHZ7XYwnXrEtgJbGjetYU\nivyHVJzKQOaKZg0+weOfv5ILHGb71+Sum3TWEVnQIZ2KLHpv1+uCvIWAUhWB\n3Qurr/QIxIzKQQpsXYL8oxMbxklDsRAkb7Q9lqZqTDRvF8ApdbfsxlXK91CC\n8YR0\r\n=iItE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1635bad405a8d329ac4e844d0a2b5f3bac553113","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.a9ac16b4a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.a9ac16b4a.0_1611788549230_0.7954806595826769","host":"s3://npm-registry-packages"}},"10.0.0-canary.fec7b42ca.0":{"name":"@material/auto-init","version":"10.0.0-canary.fec7b42ca.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.fec7b42ca.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a0c1df14879615f6454a029f4adcca737de44ec8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.fec7b42ca.0.tgz","fileCount":14,"integrity":"sha512-m4Ol86P9qJQj2hhb7/DyshatzeUGRTew39eXdKTTj6ohHDNKiMcnRaYHZSM4/F3qv5ITnvvXu2ykqwM+T4cLxg==","signatures":[{"sig":"MEUCIQDDaD/GvBhUfP09htgx2KLTd8wekb5/WNxJ3Ni1MYYPqAIgFfabHPDJHi6JLkIWY4muNItsPgJk+OeOeJea7Ir8iMk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEwznCRA9TVsSAnZWagAAFuEP+wba+OzHs3K+MjAVv1HP\nkQRcJhZc8bUQAq4D7OhGOyn/VulEYaZLw4zfiLFfmjNGfwRWEoGcNHXgmMzc\nb5YKotV0WzFTLDIxTHnw1P8k66lGBhzYdTeuWdN6u2IJPv+F0jf2ZP3exncG\nGPi16nP/bNYZduq9Te43/04LkHXaGUrRtEfZt1ZLwQKXJUfuzCnyNcZwNXMW\nK6kUUBlXrVGJjoZg/IEH1E8bTkAq37UIHXJTahBFpyXznJd2Xoi6n6yd1b+p\nNfk3/2+Gza7+5FrLMRNq1qaxoyKsz04xa2jUzU4s3dFaf7NaBB9ljlgGzD9p\nHj9pBOMnfvjqyWEQd1y+/C3zJFt4F1pZQLhq6WxAlWfl6PPcSE+2klyJ6Lrx\n6xqx92DpZQPs4CD5aXPIw9OLcz+AeusHOgXsJhO0QQxbmlju1uFud9MoXVkf\nD2FKuOT96cHGhFzFlmSphQlB7b0GZPKvdbBwiOOwFiB/Y3ROr5WD7FLZZcT3\nedVZdupqEluOIa+LQ+ZKFVXAiOjp2W2xvpikUGospicPuASV7n1sEfZl6m7J\nYKEcrz0BPQwe9mKMaYLFtopRxlw0LSDdhZ2WA2QnrNLDvk5aSnbZzbb9Bus5\nG8ul5euzW0haIfkiUn2YP4Req0JJpm3zLAWi5yuj/6aZY/5dOfy568yQhIAJ\npt6L\r\n=ibqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c05b9618cc2b93ff9a68314dc20c83c691206159","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.fec7b42ca.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.fec7b42ca.0_1611861223125_0.3385682185266323","host":"s3://npm-registry-packages"}},"10.0.0-canary.8e66dbfee.0":{"name":"@material/auto-init","version":"10.0.0-canary.8e66dbfee.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.8e66dbfee.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b556058142d075550c577991b19e9aa37d59da9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.8e66dbfee.0.tgz","fileCount":14,"integrity":"sha512-V0z2zhE9TVBUTfeF9xUvFh+wh47U5uizloaAO6klEl0UBmsJIaGwmn+dmYUWv+bMpl58+Hc3yJ0+Q0zdaY31Lg==","signatures":[{"sig":"MEUCIQDA5w/gmJeTKnQTtmu2hkrFYuLamN8sOtF7E+r7gQvkNgIgCWjm5Qj52hb8PKsSfXXm0qmwc7UhlkANsh1ca0x+5zo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIyBCRA9TVsSAnZWagAA8qYP/0WEwMNpwIZN5/7tr6D3\nldod5um8dtGfqRFk49HgifCgxmuMJfbd4ChiOWuM3GYY8y+LMzrbrRLtMPTJ\nLPXhUFpW/l4FlG2Rsa1WmDsua5xwW35oHXpKohDshBRqZLSX2AESmOE8h1FI\nSknYaagyMYMUtSupvaTr1t2+ciUdwoqk18RKVL+eJcccnv/vb2kTPnhvlxVr\nNFc8a14Gp0FzaIKybygPSe5+Ev8j3OGraYd5N+1hBug7WgcFMSIVnEFy10cg\nrKr6X+Kr6zozvuv/EvtmMHjdhAfOPypiElaS3FL2DXfZUSSGQgChdFuqcfKS\n5s0i/UznbdMxTyKwkmC9sDhB8Bx0rR50lDgUHNjoBqUDjxkcex5o2Lqn4sIF\nJJLelV/QELfIqF8wgzGVKt7xtx7bmtjTp/6xWcovOygAkZERN26Z+/HKNTmy\n5jOorHhcxfWuJnG49X/1xr+2+khPX2p32cK5tMEtOvzzRIrRJ38IpQ0xL3HZ\nza0cdtZz60rYFeaWjEW+SRSiuuy0y/c2r6HowUEFwgTu1cvMyhSZQuL6vWZm\nq7nz4ek6NkIIpL28uGHgoCHejn5yUmIlCqQdTaF6LxCQQ/hJ2IvzSiaAwJnL\nqp86yQMkncio21CJYoMZzvhS+xtaRpVvSQrMR8pp8Xk1Doo+/VX9rXIWmkWD\nQo4I\r\n=QzCw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"63606d4d60d94cbfccb1897812018e02aa13bd18","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.8e66dbfee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.8e66dbfee.0_1612221569433_0.5718001835366786","host":"s3://npm-registry-packages"}},"10.0.0-canary.637d15da6.0":{"name":"@material/auto-init","version":"10.0.0-canary.637d15da6.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.637d15da6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b7af7c39c9259705330041c00a9c3e2f3266497f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.637d15da6.0.tgz","fileCount":14,"integrity":"sha512-uSeay4SDH/bIi5UlPiPoQL9xi2BK1GDrwCf+bfS18qPsNPLRAi22bpqHWn5Mg+LabO0bcTk46Ow9KQijHHGwzQ==","signatures":[{"sig":"MEUCIGZNvzI8irAncaKVF4avz621Y4QYV8kzWSNG02MFluJhAiEA9D9QtFf3cRbf2UJuXqM03l2sD6Mb8ztGImwPShttIg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGZ5kCRA9TVsSAnZWagAAYyMP/1MyQAX5B/Yr/otq2RBS\no6nVmm2ybvNyZ+9tB8Pb9bPqLDFUWY53u42y3Tv+jzjzUwYN/c5mUJy9Wa06\ncBRNyxEyGHuz5qiiS2yKtEwkW6KUQkOXBByNyosIxDEVt6sRWqbpr2WAE/rz\nnqOR8FeunMMEtH3GVFC1qKT7hqqHZDe+jVb7UEsfbx4r2ChW7Z41ZRhRrJfh\ntuQy881JK3ZWif+aZijZl9ezPRr1zFUpDQyqr/tWCUiqu1XK4RiKGBC1jzXM\nB7GQqpP804oiUQJcrWj/lEmk/4/UwBr1YEKVXV2OocRLUb1NNETsGyfNGwem\nJAWBrk4VzHlnUujKr+gYiodQO1auSV9Tu4AM7ArBzLuz7+z1IJz7a37q+AUN\nogr2kHiPWBjolbOFNgUkW4ShKrwPvc34px44PwfgRLimHKIVpIlORSBbXjbb\nmZsLEBWl+oRgacbUGJ2KXzQFXwHTsAY1n+Da3xX8dTwJZ4NXArU7EwaJrLqa\n6PTx1Gv1ug6OSkVL5OMlbgoo7uN1zY1DVoqGe7ZqsbMTdNUYGIQO6i5gvtU4\nGLjkEssStDUdZ48c161C93xSsqzZUDtDmqyXoTmmydpQRZHpZF8PtReSGkUZ\ngeMKDaPH/3IAe3mh6rSHnlS2iXk1UwM8h/PwvrqtUVLNJ1wEKnjE8MUE6RXZ\nn0Cg\r\n=hh+M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"264dfb09f81436a3537d88f2366133e250344864","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.637d15da6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.637d15da6.0_1612291683864_0.36751879700440204","host":"s3://npm-registry-packages"}},"10.0.0-canary.fb793939e.0":{"name":"@material/auto-init","version":"10.0.0-canary.fb793939e.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.fb793939e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08cbfe5b6e46301501df46cfa39ee1464f437773","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.fb793939e.0.tgz","fileCount":14,"integrity":"sha512-5VpFKbj7QEQBfAedn2ICjfg+fQ3sbn4ryYFfHGju1/n3bP/tVKRySOMiD8dTayByqHJ4+uVTtwrvQDeV9xY27g==","signatures":[{"sig":"MEUCIQCqJARwVdHV0hLb9ON3FOTpN7wlS+ENUNhnPoiS1dz2ngIgHOxFCPCkYkpQqBCKrPqQppCVx4QlKXiMelnFfHsTyx0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGeMvCRA9TVsSAnZWagAAvtUP/15SRxSlEVgIIc52v4Is\nWIdosAJMwyD8XuHbNS4qG22OwHXFjB7ofuRQAUkspJZKjeurH+OmDwqLTqiI\nJq/DUAtrgg7op0hCEqpDNTnzqArqhWEmkj4iECSq0g3qkLfi6x4thmuLW71T\noZI3qYIe8U297MMK8PPvF13obucgOppQilUbT0mphKxGJjwDGVsVgbnC4aDv\neiKdD39PqWK5Eg3VATuAbIKgyWQXZuEyvic14D7ziNp4oilrn9FlZbk9VVh7\nQBJtfTBDJj+XwOgSW0ql2O0+1DaniJJDW/cSKtSZL4di4y/uCh8YDyS9a7BL\nqr/fmWatQDe3ut0X4btToPGF7sMk0fcaQadplwNCtQdUEZYdiygt5M8izICf\nzkg8eEseZoqmgT3OYCQzuy10BnIIbzbKIMY/sCMn6PNW5RJTFcNHnUgwQHcm\njT9D88h50AsiED0IDiu1wG+IJ81q6MLsSgXKa/hfMt/qGKuj9Ptordzhyf7o\nLcHFHrK73Hptq23QW9ouzazzwt4umdpjjmD6ksgZEnEnCZAaa0RWrHeqvv32\nkx+yM7pu25m7CMM+7t+hWMvrIgVqiessxCOYNdmhLTDRbXvxZ3iczykJAIBX\n7Nt4AlCRUOM48uRANXXoHDkInmRK1v/c/bD8up+AS+O2GKH2mS1I+KZDSh7r\nKU7/\r\n=ZoH1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b89489007d2a0c1f3821bd2291e448d44723ac68","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.fb793939e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.fb793939e.0_1612309294824_0.9015280088374571","host":"s3://npm-registry-packages"}},"10.0.0-canary.15a4d40dd.0":{"name":"@material/auto-init","version":"10.0.0-canary.15a4d40dd.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.15a4d40dd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"826c35a36cd950853d4783e524de73effeb6b2ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.15a4d40dd.0.tgz","fileCount":14,"integrity":"sha512-NguuJyehiOuUlA53l1Un1cfBgwBAdw9hIg7kJ+VOqF/oXPx2tm44wDd+Te4t70PO62a62dPy94/i3YdUyRfvZA==","signatures":[{"sig":"MEUCIQDVuvGJkePK+K5eciMVblLqShzRtWAEqzvWhdPuHFEYPgIgfNiHLtTCnt6EcDSfn8KqyRJPJuzilXObSq8voBGf3x0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgfGCRA9TVsSAnZWagAA0kQP/1kL0P4PPL8fMs8HnmEJ\nZz2KgXvlL9OFbJ9rkGnBjlEePlyCYCNBmupAgw/P+l+6I3DqKE8JciA6H0Hx\n+7fl2K1r966H28YI7TG6BAjbVg9NNA/gYW9cD69CGa2wHqZpU/Dmo513kXFs\njC+zkIXQzntTrNHF7koVrT0jQ6zlJ1AXgRagjWIrIAnaVgM8k9/SnBMBu7Tb\nDclmAE+4+eaTq+qPiJWTTUI3yX90QzB8qo7atFEmHM2MMfNNj8RtEDueH5L/\nrYflceLALRziHBUOisvpz1lcp4+HjxYepVA+z+tT1EeE7OE+G4LwMyJZvpGW\nufYLsk1dxeNIBxBiNRyeI7Q73PoLuFYBsUaEfg9CnGN9eDW/il2W1phZpkjO\nFioUfaHwvjLVJuSQBUrrV04Jmpk8TLDIRyC7Qo11ObOLy9Y8+ZA+Xyxmnfak\nkswaA411eerbL6wUAvYHIXqMM6+8+T2IrP+kBYILO8rFD7Jcw5ndOcZYi2Om\nDqIJntBgWRP0w9w8AxrGsXg+TUI6FxFfdNdWn5a9ptMSgjYWESy3DXZTc/53\nLBUlayv/dk+koaTsCCJzUdDGMnCqFLYwkVv55feRrvPFcPrITbsbx1tKJH3d\nikwz0UscCBLok57WI5jhWWkh+kk122Zg7MWmzJ8TWA9JMdmSN2vcH1iGlHb0\nd5m8\r\n=GZCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a6b5f072852f1f101d03fb492c57fc97f7f0ca9e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.15a4d40dd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.15a4d40dd.0_1612318661990_0.37593977430531056","host":"s3://npm-registry-packages"}},"10.0.0-canary.7a003acf0.0":{"name":"@material/auto-init","version":"10.0.0-canary.7a003acf0.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.7a003acf0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4890b69d3ecdb97aa98789b255feb4fbdc8fae36","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.7a003acf0.0.tgz","fileCount":14,"integrity":"sha512-NL2TORzxVDV4m48WOvABS57c0B7d+LaPh/9O4qSTWZOVpMHHZ4Yk7M6+nk1yuAFLl0RkEqat0uaoIOHuW4Fk2g==","signatures":[{"sig":"MEQCIHVpWm4D9AVypwyAxs4H20ogL+Y614QVlX8aD69VseGyAiBCmDkTr87j5oMWMWPtTEscDhnQPdCharbkDszonimgZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG1zfCRA9TVsSAnZWagAAE5cP/i5GSJ14m/Ap240F/UI4\nsKpbn6uPEWL00+2KHZ05j9fzL82EVtHOmVlpSmPYqxUO0F6z/Gkb6ZAsQtX+\n/s44y/g1jfPhYb2fc1tDiqeIkda+/8WUUq9ANgO9Gf1qPohvKUC9/6tXaJR/\nTZt0ryW2gPZ2ROOiqQ9ye0mykVUXzmC9kLHXW2hcM76p6CvbEhjxHWyuyxoM\nhhQgfBgLFQ+eUgutsKqGg3r3Yf0R+MOrY4rUwFTJDmD8XJFilfG4aiQJP61y\n7XawQ3LhYiY30ZxTXfjOuc+NxoqHqyxL/YjoK/U7ggwVUcpbX+f3047yMtnW\nTMoMe2dPdz1v/yttG3AM41eBPWFVlfqNovPpHaUenrrygbLGBgYdb8O/b7cn\nFWtK/555WhfOyJOe+FooLa0oMWKGVrtmgR48yk5zXemHkLD3iLsKx2oWOm9K\nRTLbg+n1s2cufv7asipnGZ1c4ko4VR97ISq0DGnkIWLlzTAkfsxqlFPic0J6\nH9fbIcxFWlr+j2k1pTw65Rx/69kX7sfD0IMARbj8YPaRuM+VpA9pccA63Vpk\nFeL8TpXCP4tGE0VPaQonGkBv4+ooLauiBS30bJUFdQuHtFeMXv9hVg1wIBH+\nibWtVhFRNjb+p76HDF2s8TeWBhWHPriZ27HTjxrdMB41E4kTwcEqYiHgSn2W\nLJt3\r\n=l3Qg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50aca8110f6412e14432e118e1f9229dafb02d85","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.7a003acf0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.7a003acf0.0_1612405982967_0.7751929675265294","host":"s3://npm-registry-packages"}},"10.0.0-canary.05f249666.0":{"name":"@material/auto-init","version":"10.0.0-canary.05f249666.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.05f249666.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"40b8a19f2f576529d6723d53e5e2e098367711aa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.05f249666.0.tgz","fileCount":14,"integrity":"sha512-elq9iQpfQMTS3VVzxuCuVeHdoTmHfVTLJt0xKKSVQ47Jel+u3MdOpAHxxezJFkKmRV/SoGqovLjhr2U1J2aA4g==","signatures":[{"sig":"MEUCIGMrY1O08YJJ9QhbB4jy5t3mW3Jc3lkCpVUrR0PJCwt3AiEAvrkejnlByhWz9Xq8bDq+Vhm6gKImWQgaSqX61qxXE9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHDOVCRA9TVsSAnZWagAALxMP/A9G72Pkr60ecayi+L85\nBJ0qb6SYPV0HlBysdF5JAP6ZP6Jfitm0HgiM6biPB4WhKuuWxAweVpnYguuM\ny22TjUWY2GQMvLVjFFv88vHAamzYV5LJ/3jfBZ3z6wqMhEHtLjxWc0ZQXGqH\n1Xi68qGTS9ZEAq5ZCkUXiiMPNWMV4+955ALrCiQhqbfHwlid55ustHaloh/a\n1mhWoPWiKNzhZMaU9G/c/Y/xh5av2VOordhMVcSI473IAMZNCRzZnTqjLOWF\n2rhF8qOHZn/XJc4FtXVqo9RLoYb24IDIFxfp57A0RIMGuhH0pvXctx2aYPRm\nHUvcQHmlwFCVI5ZTXaUSlDPiLjqwOHHG/n/+GtjK0EymSKvFvNhVgVKEp0iU\nSNTebpbWXppwsMf1f/sBKkzAmrBeaGv/yhP6NNNwPBMS2aPl2XRsvHJW7Cy9\nOyBuNfMc83GoqmPcF4q1nC3cLVfy5cZX5+DxGjD6F89kPC4sSYvHCuBUt1Nz\nX9k86aqAhe68TE/ViIYVsTMH0uCPfzml8f/65KLpnIECG3B17o5Mcr6S5FNW\nAAkWoZIytY/uDzYbK9PziyUfKSwNtyIUXLFniSI2jgMydSvCKadwdLBPVgRY\nr8SIPukAtrB2KIu+OH69O0BR3nKJ+devznHh3CMfqdWPY+5fyIncZ2g5Bz4h\nith/\r\n=NMc2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f1fffc7e905a3d49f007f288c26a4b5ea11dfd0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.05f249666.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.05f249666.0_1612460948335_0.01959217629430743","host":"s3://npm-registry-packages"}},"10.0.0-canary.1a3a39629.0":{"name":"@material/auto-init","version":"10.0.0-canary.1a3a39629.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.1a3a39629.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0281d319835f6e8900ed33e7babde81af59703d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.1a3a39629.0.tgz","fileCount":14,"integrity":"sha512-xhSX1uhKOZKq0hv12j2unrUx5c52EwnCTlz6tSG5mBxZoRdRMbyT8wAyN70gr2461lJKoqSz55eTkpa8g47c/A==","signatures":[{"sig":"MEUCIBg1hc8Xk9CJY0mJS0j4BAWJtQgSSMtQNJcyFdUapHsVAiEAhBUZSLUe5Rjrd9QuIaiOtM0Goy8olzUfeptLiIlSgGc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHEAECRA9TVsSAnZWagAAvq4QAKOAT2LlbmKiKRiynE9V\n96nXtwnY6hPRDtjGUXPUlgkUZppjQOfv14PsYB3W0+Ecpo484QxTF2oWIv4N\njw0FXQOXPO2SG5cHpU2Vc6Y3qdc1FpMoB01vsIHFuvjTd7S6T321PFucYpll\nV0gWK7dBqFw8qEAS96wjeIOquLFi235FFVHI0cN08AHf+AIiOUQyT1uPNW3s\nU8oea71v6XDV01royYpRkM0GRlDkgkgrNX0FeC8Vs9xPVTSrviAqIFEkeZcV\nBTj8vyVQrJPzBBsqqpFVWenj2IU+kLshqTkik9gSFbZHlf4DoE4G7vhFT/Kn\nc6SyLTVe4gVNhfVbeDj9ivIPR1X5cG9iuGTtMjRaVQn/CY55u2onmSlOcDiV\nqycKCtEFFTsx9g4EHgPj2aPk17uf4mssE5jth3K7Cj3H9bAqoHiEDqXSkP5a\nTpH/GnQeYjFMN/PYdMsYMb9f10xsx6eg40FXTxyk/UszDI0laa39C3z3R9TO\npQRfOFGvP53WOdqINTUmUEvuOcu9ZzoiadxBvwsP9DkRNlCKPLmeexGV/8CR\nRORwlwtXbBhf9leyy4WireZOmoh3NUCokZ2aXR1H0WdXimOTUosHQTx1odxa\napN7pD9DVpVwQN1ereNAN+ECT1AmwYp+D5p5BSyc6U9F158d2xuOhlMb+SSZ\n38th\r\n=DBQx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"87d65275f85db5a2c4e630df10d231afaba36449","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.1a3a39629.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.1a3a39629.0_1612464131876_0.7996779087597161","host":"s3://npm-registry-packages"}},"10.0.0-canary.8b1cdb1be.0":{"name":"@material/auto-init","version":"10.0.0-canary.8b1cdb1be.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.8b1cdb1be.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"94fcdd9b90e890eeecd774453be7670b3e5c8fb1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.8b1cdb1be.0.tgz","fileCount":14,"integrity":"sha512-q5N/y+Sd5Ep8edf9KP3X5kaVHZvKpKSiBcxHobz7jGW6g+1kQm4OJ8JVVKO6FNdfQ0TodUqI69oR9IQtYIfTbg==","signatures":[{"sig":"MEQCIH8Lx0WaDvfIwDCYuBCWk5JoJDNJPGOFlnDicgJepgmPAiACVONCCorbDNTaYiWzLwP0jO6Qp97rIqCkf07LMTbUVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHHZJCRA9TVsSAnZWagAAP58P/0+8EPkRH6q6OfeFcphT\n1IYdnLUNgEraKhUznn89WSAPi/d4DlptwAiv3sAde70986etXFtigvB3TIg3\nX/mxumceH34th6tBRMVBl3yMlyceSn6ej3Oa+Akoi9gIcdNRFmVCDB3siH/r\nivtV4L89d6DANmXG7KbZDXAHCoG42PHiHmaqgF9b9PUwFuuW2MMJ9Uj20oWO\nusX2hPGBUynct8TLzqLZ8gS6ecCB7hcCDbVxIUOJaRB+wAcNCX8rNm7MisV6\n+1qr92WIBHLBuc9ibrdX70B3QjKY1ofJerkXhheTDCdwLHT3m96dpA1bfdA1\n/y+KpyBE5F0ZbBlXVg2jHiLtnHwhx92W8Rxuvb8coEj5PZ12vZv1o52rzmU+\nEjNd/QeOltFy9K73wqqSp+XG7w32tnac3jHZOMruxZxgwoqQTeI2Vctn7K8a\nFTqvJ2TiircXrTSWqpwEH1yJeRf/QOBPFtsGMTyVmnvjgA3UFmmO4EZPtfny\ntFJ/CrU30gpsZs+7yhbj5LOcUlDmoI0uwLfTicSnK3APVbZ+uosq0e7WcniF\niGjWOPRU33yrrAj5n/hL9hhwx+KHq91YPvOXODuWVJabkiKIYLEkTF+BCxfC\nNyOPV2ijmsuhUbJY9QBV4/Q5sSVn+XWiBBJTqC2ZtpKTw6RCKbVl4lu8yRN9\nLTd9\r\n=/i44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"73f8ad23c72c2fe32bd1a9e5e102b6aca8ce21d1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.8b1cdb1be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.8b1cdb1be.0_1612478025106_0.35678088080986314","host":"s3://npm-registry-packages"}},"10.0.0-canary.8271f00f7.0":{"name":"@material/auto-init","version":"10.0.0-canary.8271f00f7.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.8271f00f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"baaa9c9d8419dc3d6f0148b44d9f92a8c70b21f1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.8271f00f7.0.tgz","fileCount":14,"integrity":"sha512-27b/0v6huz1n51xpJW/mpN/UaElNqxstCfFfZI7pdMki1VzZEHoO3ESabse53o0BdT+DrtXSO3+c/BMM9wsS3A==","signatures":[{"sig":"MEUCIQD8fCjkWnKRts8ROy9W5bN4WioUedb/xNXCQ0BEzXY20AIgIXPpQ6c7mYPcs2Xw47EeDCwkXBFmYZj/DzVXmYECZNU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHHxfCRA9TVsSAnZWagAArOoP/i+1AGPMwAVEa4eDKEx6\numN6rQ/fLVgZkwsuaSO3zx/tH1PyhZPCzWp3lLJ4SyuXCmsbgiz0IXmWstzT\nWu7g+GhBkMaF70RIFXqHa8sP7+vUokWe0RfCrkuVx60vUfLfO2XEirqQ67wC\nBWAgx//SaAHQSWTTxqJF5Bjksa/5I8T31XOpAJg1Ur9UExUVXVF77VIndp6b\n1V1tmeoW+yugGZ+f+Q8Ql4jeqqIiO/hlq9M8+qfj0NFE+eRKHYsSUps2H39T\nXDLJYO9Jjk0bYYsTxIHZcHMeiO3UojUl/tpDDFskZrIJsO15bruu2Du+Mlrm\nsfjSIZhUj5ZGtCKvGgGisN6+DC1cg8XOehT5gGEdEC8pFISGWhmcudDs7TH7\nWmIrvV9vZEn5RqQpFvZy3nLN5DQb9libmrnmgc9hjsFUNUWRZ5fK2lHRqPqa\ntnvpLaOH4lfSES2o1srjG4C2sdmRcoh2RpoPXYPFTI/31G3ua4/SeqxVoke9\nKykpewMGA+gFfMiDvSh21uIY52+IYVGR4Wxadaeq5ACnWgdPTl9iA4mRWQRG\nABQ68keMdKLAN56lE3MfCkZAc3c4upJNeah2rmfUSAguAdyW+bBy1lzn3GLo\ngmsFkgUrFDUIjmFeSNK7BiMX6eCbWfsREJM8zq0se4FwmEwFNauEbrcQIaC4\n2TJj\r\n=Yvj9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e210c5292564fea23c9cedf08acd2b8ecf86e94d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.8271f00f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.8271f00f7.0_1612479583326_0.19436876640312373","host":"s3://npm-registry-packages"}},"10.0.0-canary.533092a90.0":{"name":"@material/auto-init","version":"10.0.0-canary.533092a90.0","license":"MIT","_id":"@material/auto-init@10.0.0-canary.533092a90.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6feef2fef18bd86f365ac4bfb7066da8a8487ab6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0-canary.533092a90.0.tgz","fileCount":14,"integrity":"sha512-bQd0uSPbmfl8zhM/qEpVbH6E4mw/n96lBVJNwn7ybwqYPypBALMpSZSzwTXUjcNA2zBqVOte9Hnakduv6qkxJA==","signatures":[{"sig":"MEYCIQC//eDWXsfJSFsoA5PCvQTARTF9BcNYcLCo1x6bDGb9MwIhANwV3bqGWr4+470RIJZr+tCdXprVRSvhDciVPd7iU1rl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHL9xCRA9TVsSAnZWagAADUwQAJ8SRwHFXYqVJE9VLKMB\nxpApNGqYN2YlRdg8PCnQYF2Dv/WzwfKd346pZpfP4gMBTdtKm6tdJI1WsxTT\ntSqlQ+dSNp73xJFjtWlVDv7i2OaU1Fyx80HA7w91C9uuBk+mSrTrfF/WvSAw\nxCJNKzEZFONtK+GSH1XIs/9isiPcrqBtr14sL+jZboUB2zRv/LxVG9F4C1if\nfo7WM7oEZdQ7yg55dni0ZfD3z+vaz9py4szOwBhlC3N7Ufz50fHRtTg987B7\n309J1nkT1IttV4ZCLOlMxIa6fTOJD5Oa33UFhUyNm3ujDHpj+sp9+1/b89Ue\nzCNR5DAOp6H7vAnu00tu8v4Zvl2jQfOsGpCThjJpTy6kz6U1TQJAPVv6oiLV\nPMa07aCVRdLfgsr4OhEM2ZFfwKflCwHSFjr5sc8ZU0Z2s2nGAx59dvO6hksZ\nprTCT2BvxCy+se3H84Hwzo1sb4qcAXD+r9R9NSkslexdYOStLPv5ZKry3ZdT\nisUP1M4MYGQZPd9GEG4Y6cVM3j2Ub8AydFA/m+0ejMe5OyAyUecu2TjWotgD\n9QqsYL6rDJJGyTZlw7kk47eYa2wcgOjKO5gAAnbfwoPbo6UH++eNPigGxhEF\nRt2bgxCb7Lj1myYwCyR4El+nUj5twwP3864+OrdUkSEjU1HO+x1Pma9uyLFM\n2z3z\r\n=4xSi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f76aa244e85ddde7348716259e771c739c09f23","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"10.0.0-canary.533092a90.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0-canary.533092a90.0_1612496753144_0.3037650414714643","host":"s3://npm-registry-packages"}},"11.0.0-canary.633a9fc7a.0":{"name":"@material/auto-init","version":"11.0.0-canary.633a9fc7a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.633a9fc7a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"11511a6eb9976f60925ce22eca6a607b609e317c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.633a9fc7a.0.tgz","fileCount":14,"integrity":"sha512-XRKC7op4efDCqLsbfiCjYXYnMIhR0euCUBM2x7nua14D1trT3SOjlZi59seLSt4bcooE1Swke+wwarkmEghUTQ==","signatures":[{"sig":"MEUCIDt/iPuQeUf7GbZwzvCepmdZ0sP3zlv8YWMznBw+L5xJAiEAqCM0XDi0NyCuAFIih+ZdxZYgD6/FnsmwFPmu+ixHMj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHW9WCRA9TVsSAnZWagAA2YMP/jZGtoZBY7Mvsb1UsHOa\n2qhVBy76k51tKkyvnNK7X1Wjz4pb42yywhbKjJKj5rixd5tCO51wUF9rGF4L\ng0uV6dA0owAfVt4tthqITqQVwAGACCSvIDqwIowpe/TX2jW9h0Uy0L2JtwAW\nGSdHaSQDJ+AWLjEm6nualKfn5z5pW9+UpVa+qKsvcBXY5ndodKUmKjP13zm+\nBbzLpt9Dy5yKWoLnAUwtv7atAEPVGPTuPDEEkDJNpUTX3bZQaY2zKHsnfmJN\nGftQV1Vod6nPHBTmqZjBkwmchSAhpxUF17EsaoVocGCOegqaWia5ug7KRL2l\nPSIIhTHU3s3XO/s1BIvNATiW0nO3YnnW1M/qkzkoPVRRcmYdJtL4K3fTjmht\ngd1uMNDgVGN2tIwmHhAcxOZGxyEFxBz4nHjJbXDACk6duy4+HtwOpBCHU5lh\nJdG3EF+QJSolN+9+W0RKvQq6+0Hm2Gs94U5gMgnPsk1ES9SYcDMf/ps0R/0v\nlPiFIyRdGpz7dpA7Ut/Xs5KR91mCP1lDkclkttLUPk7sTkxSiByx+fBhA7Fw\nT3SlUNmwjxxL9XVv8TLKzseS09X7ajqeNih+YTsxcBe/ppHjc/kAYOI/ngPM\nVG777FttjTr+Fy0HlwOtF8Mg1isX34MD72998qvD0e0e3zIueJrmZsrOh1r6\nMw/l\r\n=kv48\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9fe28e8829bc50c384861e340d551c0718dac053","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.633a9fc7a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.633a9fc7a.0_1612541781630_0.01427787011789139","host":"s3://npm-registry-packages"}},"10.0.0":{"name":"@material/auto-init","version":"10.0.0","license":"MIT","_id":"@material/auto-init@10.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4c2cfd5450f06b709e7b99ec263254e835f3813c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-10.0.0.tgz","fileCount":13,"integrity":"sha512-Deawx+0P7D7A6kCeYcG40sM+pi3O1qAp838fu16Rupy6ZdZ4z3fXQbcHXq4ZQNysRxIdC6S7DjJ/VI340HI+mA==","signatures":[{"sig":"MEYCIQDyoG4p4415Y8dXb0gtYRCo4dbbkO1pg412ciOk8O75NgIhAJR4qDKntoplnTL+DzKHshtbgNQ4vjYEO9QngelfJiFP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHW+jCRA9TVsSAnZWagAAOXcP/2kO4ZeXTZMvsOfcrXHs\nzDhQZ2h8Oh8iYlaSBVwTiVotv59NeCzgdSghqWdaWLhfjMRZWEQJU5jjBacC\nfJZThJ6C9ONuIYh6ZetWD7wpb9Ad0EgSBa1ubPf8hVmTEU20dgBmyW4W2e+Q\nbMGWtyCU8lL8mStwu2oSngv3u9bVSUBsXnEm8iO9NWwVKAusC6cdW2oDDggv\noiVjKXjXZFz9RLTSXYIuIoLudVeILI2c2XgT8oOeR0iwVZGFpp/C+wSYyoHY\n6pV/gdG8C99f6RRSjxm65zAxRRs2C6qbr4STWcx5uTWnEwv8CvA5KTA/QDgv\nmvU0fbyf3up1JXw9BaDq76OCCDn43qw5EBdogYQvLV/Eu/g587ZvrYN1O9LO\n2A1LnWQA/X9VtUMAvOWpJxBW0pfsXGTOy76/mdwTfGhEej7vH+cu33LDfNH8\n3uTQGjWWJAkXVFpJoo9TCUdvs1KG3iwiaA+trEFGyRbUWM/R9olaLMJeZIV3\nRoqYZVraTqMtN0/OMaLFvf0CAxlgEJOUQOieQ81rdwIx5TwoFW7WiJpPFNUd\n8kmV/7W8dISyFKPNxV+rIlOcBRrsVPjzRxfp+rCrjrUn6A2aLh+/YESFXQue\n070rn3qYSZVWQp+6RCSQNgfl3NX7+IKHId7SDLxJbCDe6j37CAhY2pQKHMJz\nJ8Sk\r\n=AOtY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"633a9fc7a98d0d9bdc177bc9ccbd49beb25bd5b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"^10.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_10.0.0_1612541858726_0.30974989579365086","host":"s3://npm-registry-packages"}},"11.0.0-canary.b5227247d.0":{"name":"@material/auto-init","version":"11.0.0-canary.b5227247d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.b5227247d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d1b537838f96bacc7a938a88dd425e4cc7cfece4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.b5227247d.0.tgz","fileCount":14,"integrity":"sha512-rW2qNZPKZXA8rpPZGg07w3uxCVF2E/NeBsjC7KZCPP97GpiWyBXt09/LpS96bSDl4wQKYO5BpogymtPqJ4itmw==","signatures":[{"sig":"MEUCIQDkEjSd/OJHFADyBjXt+JOQodwHParjz2hVcLtwelCUeQIgDwtztVtA/KLHgaKN6oZL7qT6+KDOEa4kB9B5/BFNFFk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHYMvCRA9TVsSAnZWagAAT9YP/2UFLNjsH4BIrSnlBySO\nBNznytVl4Qr9rGSmVHMPcdO7jbej6SaFkFAHKxNrtZCeKfncA6pbOTpV6KTl\nnSoGUZOJsNSed0EeC7wkFpOKYm0B+mlPjPiHSqAcsRVyOXI4PIT/UENvT5t/\ng+U7EA7miZ3DgjgkmoF6uJ8LvNmp9dqmDZR8zEvJSw2c2BTjVARJtSu8ynWW\nk8CiFLNGr4QrSXbniCfNOGeJqHbZrEBUgxlGZtZHcSMfj4b5U4mpdPodh0SI\nmDc8P7td6ECg6VyYWEdoMbSZVfN4rB1Af1QtmTHOWRwq+A29FChgVenAd6tY\nEP6BzBoqF78uF6KTZ4Yghz8QrF/h42jEcauYoHdjZMUmApG1DVewGStlbSZn\nP39S6utzWNYIoXRG4BQ6XIcZMXhhTMW5JEY7ruZASMUJE9PceMJssHR3FWF9\n0tHMI09VOoyT5uTLGR2Ci+fWhcNMZQ6q6hk+t95sp+HxRD0E6DDhVEWXOSBB\nqKqK8DCy6NmOqueVuEDqUrqcPG9so+U57i5ZgIx43n039rrQDxBXJhzNCmXF\ne7I6IssckALs32GoXdaBPFaPC2Iw9TWuZmaiUkqVRh21hT4uXt6Z/y+BqsS6\neiXASGILe8MEXhevIMPU/oOFaHybFkkxBon8eQQ5/gC6IvzE0K+V5JnjVOWU\neW3e\r\n=7KIH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f733c52a8cabe9fdd3ba4c35cb19e5526d8b312","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.b5227247d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.b5227247d.0_1612546863086_0.44569816538643403","host":"s3://npm-registry-packages"}},"11.0.0-canary.95322b11e.0":{"name":"@material/auto-init","version":"11.0.0-canary.95322b11e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.95322b11e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e4c0e5a66db8ef2ec05edd49e8272a8b8c5b710e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.95322b11e.0.tgz","fileCount":14,"integrity":"sha512-Uq6RLcqiVUX6ctch00FSLRGt00WC9XdLSlDw5CQNTynNRsiDuvTK2t8DQVA1T775GzN9qA3a8tZfJX/uJQc1BA==","signatures":[{"sig":"MEQCID4EGSPLorWxRoVd6lGrlsokiMkI9xBmG5KHORNW+Ad4AiBGkH1Yqof6Le1X/DwFRlZkf9Nkqvq2dKbgEzh1J1pZLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHdUmCRA9TVsSAnZWagAATRUQAJRq2W8doviTCaLDKSfB\nVwMV1WlTXrExRuu5uyTuql4n1KcqYVX+rtIKAnVZH5rgyMRb566IO6nYzpwh\nJIyF2qchgQmLTwVcYfy3mtkBFujOgePyOdp/LgJFCJ4a7rRHzoM4AzoQhRYJ\nPCU6WEputEq+ensDbzofIi6J9chnBk+HFbPylAFD6yOY1HJl3aY9SD2VTkpN\n2PhVHPpuFbZOBEZi3cGPQwGnCfHk28WK/5m7+4vYg3DvaGpfKAuEHCLpkw44\nISYwr9lkTgyTux+ntUZBqxhFHAyhT9u0x+KLO9jH6/dmaOmD1Sy3OfTbl6vO\nkaZBA0DItcibDajpcA6Ja4ybJs4hYMtbUXnzRaQnqpr6EEZS6EGIs4/D8Zjo\n5KJoJMEMQwLAJBh2Ggs4bj4qCSanNhqDUlvp7TdfiydZS4LkTErbEvQ0+WTN\n57UbzSw3iLevSZgMh87BXcVu5o0kN6sblqRhb5et5Xxm0eKVkjzMKInbYHJp\nebpAQZyN95v9tIxq0rz8pYXKXeN+XS3F6nZPPRGQqlInRBziC43ALqPBz4sW\nY147cAwWKhCZoCuFsWDYV1FoUAGX5Ibpzz9bacnJqsH/DtlkrrfkUzNVSMFh\nf/uamxlRso59ObxBJmbhjLYwsI3dlYHqipdFr8gBKNeIfJm2Ki2WPG3zwh0V\n7HN0\r\n=b2EN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"96cbc49ea4bd39eb1c275fdae68b6bae32b59ad9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.95322b11e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.95322b11e.0_1612567846007_0.45475622115368175","host":"s3://npm-registry-packages"}},"11.0.0-canary.1f318ff0f.0":{"name":"@material/auto-init","version":"11.0.0-canary.1f318ff0f.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.1f318ff0f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0aefd6d872850de9df73336bba9e94b6b7c45e0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.1f318ff0f.0.tgz","fileCount":14,"integrity":"sha512-rzEUv1+OpQDv0kptNFkL6E7hgutTZiqMO5dlIWvwEgDm2aGvkJnLXYrHTmaRX7xVko2taqHQk8qNodT1rQQzsg==","signatures":[{"sig":"MEYCIQCsQTMoBdZDL0UKfbOW5cCHNqwI0ZECOtIa/63SvWsO0wIhALGBu8w3cKcdJCchUhUYwPkTpXb2R37A9Hah6PbnZfTc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHdzvCRA9TVsSAnZWagAAD50P/jiNtMfQSgf1qnbRBbxd\nmF6o3YsIg4xvES2EAv/ZqQ46UUCZKmPYTRnwu3dpBsd8CKLI1pI0pZXebw2Z\n4ada7hF+J11qQ1d7Td9NAgKB1o5ZPaxEyyvAIXWUZLr5QNsC2zW52sovQ1ZX\n33bc2EDq8fvmdSzFlWcVY7sAwZyxZnQoPi2YQU7rg4I5TbwRv0v90tnyohfG\n3gGohgGv9zO6HunRi1V1vso635QjqiwAfoRoarrs8vMPadg3DOfx5N5rXzbz\nAansU0f1nLuhlWSHqziqf9L0u8EuXUczBS4AKKneJdPtPFvfS/Pyt1I9UGgf\n5jlthVPZVUM/+EgHlCzfhgNhqTK+m2C/SrUuCRNWjSSfNbaguS6Nlq2l3Vo0\na2ChtVMK2DB1EcosnvjkoCQeWwBV9UzjMkl2JQe2bZAMG36bAdA0hjAiWp8Z\nf4lJde/Eu/IBbtZOuRTiTHyplWxF6Kluq9QDeepqsNuQuWKjNsgTbzAPi6H5\naHiSYia2BVRP28gXwy8CXnD7DRE2a7sB07Lx4jKaSYm0+vjLMz2KFxfOmK5O\nVJ13LYRoK5JK8k1+t7HP743H2Csiow12G2OMSjr97iW0wn+8Bxk6zfUmssCk\nXySUmFoC+DE+Blf8pGvgAKOsLkjvNx9YGQBPTT+A/WzdXv5lVAouacQXMi35\nNx1E\r\n=S8AV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fbdc53421d5701ba23a43e18a010bebd179dbae0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.1f318ff0f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.1f318ff0f.0_1612569838328_0.6865786111740408","host":"s3://npm-registry-packages"}},"11.0.0-canary.ab12cf7a3.0":{"name":"@material/auto-init","version":"11.0.0-canary.ab12cf7a3.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.ab12cf7a3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4842215f0f790b3b3a6ff426d1d34db11a865ad3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.ab12cf7a3.0.tgz","fileCount":14,"integrity":"sha512-lKjQvhoTUCx391LPINI7rvK0qpOfncFGZR6X9fDw0QRuTQZS9n40v4JP8I4BXH2p8uLZi4/oe3/4ed7eZoTU5g==","signatures":[{"sig":"MEYCIQCwlAsPiA6s0VLCPEWSz9s6MTnHcK+cyGjq8cPGLaYXxgIhAP3u2BMpCS9wP70MryxnYl/hCYHuT25n3KhQR2swdxfY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIVJuCRA9TVsSAnZWagAAFEsP/3f/eUgVPjg6J3j7YcIt\nF9gL8sXQZKeIfc6OKEuSoO+eFQGYDrqoVtVYvqecwgaQNp+BANu4xfnkBIom\n7q8W4sV1ZuBrhz/Kj97IXYVY31RmprADqk5Q/XnLiZFaWDu1JxQ+nehqcjRv\nzF+bjdJ2MorA4MchhkaaUu+NcKMimcYvi+nKP0MIZBUfy3AK6Vfw0jqtB58a\nHiYJV1JzivIPdBLphzEchYHy0eSoBG24i5j45JWwI+e8rypDlnsm3zwq+hf7\nfv/Ub+9Bgo6vUqJk4yIDuVedXyU7fgdGXl3IJGTtxmxKJ4weBYrekYzd3Vys\nM49XfbovtCzoO1Vo3JflbD8S5Egv6xo1gxDwRiEwV4RknZuu1CeXNP6fUA3O\nFsXLFSz7EwmCW5KaRoI1jiioLlfpfstD++WoLjWvcxUSjJbd79UG73K6r9En\ndxG1FNN8+DsHkhwxpUh0QnFAIU/BUqmG2s9e/+6CZ8QMSCVBVbQXnRXdijtH\nQNHCZbHpvOdKjn8BBnoDEj3Z51nVlR9MM+0+lJagJ4rdqPMB5qewym5UaO/c\nG7+gmpwANtLiINEGr5535vIJ+NSfxc1yDHDrJ0wC74FLRprG71n3FttWMfpC\n8ZodiEMZ6XAkqUIBJFLZyFzK1+U2+ZXgEvz/+L2i7AjE76uM4Us4fb0MwiuI\nZGvM\r\n=OSm0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1cf52745607ed664e2dca58a230a3b3849aa273","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.ab12cf7a3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.ab12cf7a3.0_1612796525401_0.9874644051628672","host":"s3://npm-registry-packages"}},"11.0.0-canary.98db2c5ec.0":{"name":"@material/auto-init","version":"11.0.0-canary.98db2c5ec.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.98db2c5ec.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"232d91252c3155e81407c572bf3d7b5006590b8c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.98db2c5ec.0.tgz","fileCount":14,"integrity":"sha512-wwEZqnraLQjNboisr38/tKh5LoQoQlDcKp4O4nCiI5MTP+zuF8AwNxkev2Bb0z8SMFo1mI429eSdqHT3VCBrDQ==","signatures":[{"sig":"MEUCIA3r7icegGaZUtlspK92mMQj1/cnj/yG9o5NYa6814+nAiEAgNz7hbcjO2mivJFh6XGP4d9Wn0TxImIgyHceo+n65mU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIVmvCRA9TVsSAnZWagAArQQP/AgNWHKuK/KY1dz/RcVN\nozWj5NDOoW/n+Abu1y9qOO7dciJ8qP1beuvpXe55hiWuo8WEacEhxZaxk086\nzyNkOvnJZDZKiu70fyNzG1M2EOTHvuzQgPfWbUfL5M1OXRHeWM39GGAYCdJD\nAeZS4GCBcIQERyfSUi+svH35Qejj+IWTu5KJ4Q81DJk98cvX6Th6sRZUN1MW\nWOdX2BdLILH9KKleBrVRMctda5lXS7cKtc1su1pdMVSf5B4rngA5H/a3OzcM\nI0olm8/vP9V5lVejOkg/aLZfgwAnZ4Xrqm+sVMa7l9wpl0SlSrMNnY+n9GWM\nUP1khmb2GCN1AqMOH0r7DyGO5wPHYyIBVbYZMMucGLcbQY8C/g4ZWxLUbc0O\nlH10OiJxWsJr8gUPy3t1Lb/CyV4feglxQrh3GpQ86Cq21EiHMjEclL+dPCJK\nxoOav56ojTADDtD1x//5TNu3+TOT7fboLXuhrt2qAXvuTrEQeDELItTCrxvm\nSnS+gonsBxC97cd96kMFnwaITQN/Hyt1tWqilun1pwbVzqJm+ce7DbC/upg6\nnMOYN82uNHlhb83nkyqBQjIz0fqcmV0z3kyn98o3lD8B1WXd3QtgQ5XUb9kX\nDCCpTd+yfRDKdJ1xm2wWzYpy8CIELHq4HNc47o+dZvXRX0Kk3XxsQH65S20h\njVkp\r\n=bKud\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc1b9da2cd7b871fe0f5c8370793e0ad9b1a5f1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.98db2c5ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.98db2c5ec.0_1612798382950_0.20936807392791112","host":"s3://npm-registry-packages"}},"11.0.0-canary.1f86b9f6d.0":{"name":"@material/auto-init","version":"11.0.0-canary.1f86b9f6d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.1f86b9f6d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cf10f68d9e1afb991f7ba60b62bb299a2579ffc2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.1f86b9f6d.0.tgz","fileCount":14,"integrity":"sha512-K/bD1uB8C+0tYYOtClzaL/xFM7NRT8X8S5k1fxEp38Ub3bCZ7RfM6ALnWnvXarAdPYZc6eelRqnFjKoouwGOrg==","signatures":[{"sig":"MEQCICFwqOGgkVCT+ZoYMRI/CLF6fvMCLV2/TXcUewi42kpKAiBFPL9S2wqktS5T43lv4sF7IXXHY4RkWeoXAvFzgPeCLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIXHaCRA9TVsSAnZWagAAgzgQAJuctk81GDPVZ1D4NsYK\nbj598XdtI5YciTpYM9ik0JeLdexCrWFGfd7KfahaVCzpb6zvC81Ip3SLVq5t\nLrv+oa8Qee8DOS8pA7NjBgDgCq/xapBUowBzYUN+9/KvMXT4YmiL/UexSWpO\nvKN3GYcporXoIlHvwX9mqJADkIWYpL9oCNOTHW+uKe36iQLXCDmZJWD3E6MT\nvySJQPNOHul8hcTrDCAv3IMDdeXFJ5+cU4IZZpF9aTvdSw2QcuemlRsD8mjo\n3YLueOvpdR70PtIdQH8c4vm97Yg7RY1VG7ihEW8g/lw/nh0wc62GnmH/GuxD\nZfLEgebrhVbkwGPO02V2CEck860IYnfyw+a9JSC5Ijh88rGhSuv2oyvXxoUz\nDrbyLxCu654NmRKSw2/AvURNLb9d70wiWXcGseY3D53PLTDGjCZQrtKf/2tZ\n/YYT7m3+9u3+fPWg42F/Oe+OjsLEfKjSlhoXlABCtKlH4ZdKOdE+YFt/OSr9\nnZ54hK8Z1TqPVOqGwIWnw0ddw96rQiTxAihNo6AR9zqB3JdRpU2cPf5xuPuX\nIfHm93+DftSUZGdWWiu2VUK6N2JGrZS3d1+pzRRxxg0S7LVWYS71HPsRGssE\n743KWAu+7M1dJ6Qz5HR9m/2QonrMbx59SbvXjfcnc8LgF/mR2YnYkRD84FiI\nUYY0\r\n=gdBr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aff88a7d3786743558ecb0dabd92c225698d2b93","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.1f86b9f6d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.1f86b9f6d.0_1612804570326_0.8503126245897183","host":"s3://npm-registry-packages"}},"11.0.0-canary.aac8f5d9a.0":{"name":"@material/auto-init","version":"11.0.0-canary.aac8f5d9a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.aac8f5d9a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"99e4cc3209151a7c841f824c6997a88276407404","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.aac8f5d9a.0.tgz","fileCount":14,"integrity":"sha512-8JOKwB1ax09DJwQnkr+RahDf+482j6jRa9ROIBy3IC1LRCq9Bg/K/QU8Tgskhdwy6LzuNbkqxEOiyKXdfAintQ==","signatures":[{"sig":"MEQCIAYZXh3A69NwkqO6Y650s5jH/R81vX/WBSbPt+lu4yvGAiAfX0UrhVBlFruFXSU0UOS4ApVLXTs0z6xSGhJ5pbub1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIXv0CRA9TVsSAnZWagAAKvsP/j2370JNDLIFt2fNtfRw\nGWnHPUG2FYNm/UIIIwU862Uv7Xd9poljQcZWl1ISbL2e7x28VxNpGmhpf+Uu\nu9me3mZ+dlTMGWuf48V1hanb6Ra5G6URSCwC7i1dSfTITbJPQNvcW8PsN900\nR9nsxuGXiueMmG3BeWl2suFUeMSxxZaILqh6GJ8nd7gBKO7x5BddCvSAnvxg\nlROLj7z6aHrQ9BVvkLgF2XE8pqTvR87eIe2XpEyXPwEPVa6y9kO/wnPWCyPM\n9wLfJB4F+gUHpHKqgHTaLipQ57b8IwJDCgS89rD2d6Tr1DJGktQUUgFO19H9\nTElmXPQRRsi/1gTMblO2ZLNSaXAl/IzsPJzj1ouIunt4eCHCsSmNqvIwgWz6\na19VQ8zr+8IWxY3KEiCrelLqCD6AtWYgEKt76wsx3MejdETlV2h8ChP1MP9X\nZyEom//kKBoWZPibV1m5nKSdtrFv5L4+ZcCsLZYSJXc8ZjAsN/0Ib3ByKQuU\n6cUkhOwY4gHgXiROMx1EwD7h2iPDNwIbazu3nBsuMhIumLrc+RqPxhNevDWA\nYi0DBPiVL9mffrGoiPXar1c5ryJCEpPqfYlFRChX8azTQf5gm9uHNroKYqgN\n2ypI32yfOBiGVndXVkyZ2Xl12KwfGPTTfao4fJ21WK7i77azdaTVp1avKKA9\n+J/u\r\n=2ise\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5accfac22392cfbc1035dcad920093851b33cc79","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.aac8f5d9a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.aac8f5d9a.0_1612807156249_0.7284758326637899","host":"s3://npm-registry-packages"}},"11.0.0-canary.750e18fc7.0":{"name":"@material/auto-init","version":"11.0.0-canary.750e18fc7.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.750e18fc7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fb8453509d673dadae1ffbf323542ce0194c2995","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.750e18fc7.0.tgz","fileCount":14,"integrity":"sha512-ENAig+c7yaiyg26WieZewK7c59LZmu7F5IxVlf1UK8lcv5KlSvz22/Uz8+kENAwG6Vd0xN7q0HG+X/oLYv/CgA==","signatures":[{"sig":"MEYCIQC0WiOS/AzXO0x3ogGwNc/NVxN++S1Lql59QYljkr022QIhAKPbtm1ud4sCtze7ICj1dK2xILez9hIojGomhDA+KPJi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIa/ICRA9TVsSAnZWagAAmrgP/1tgBZxhVoOcWiCye+Ui\neCU7Axp94DgikH1jG47uLgqDqVn6TFhSIL2JEFDaB794kalAEY1xxTlZ3T1x\nOpRys8IBKorh+YA/FEbTiqYBFRdm/dW3EOhzRmjSdT/Blk6MdawtQh/vB8PL\nYXMKIKIx9ULky700EYMclW9L8bmrHqXqZzEZ1X+egrFJGmViMIVFT1a4/4ik\nzTpWAMstJQ5Sn35vQOd3SGetB9hoGxnjTI29tnrOasGABvt5Up76wWSm8vex\nh7PzzwLfz8kgMGF5n00jv533SJXeW1vZeqhy+/rAewCwDyK0RIvdnpYfn9k+\nJtRCHZELnb1NrhppsbpXghFgLgDPPCgSHJtXvznvCviP1BfjsK7d5RIib13v\ns7Lr2239f9V6WuI1rer0AYs7WIxC0fhZeydDA1Uq+Cycx2zArL6bqzI5iir8\nw6X7e+NZIYGsGufcfF6mKqeLOqM54qbS2Id8thobDFZxOaT2AcV+ZjQqEaso\n+2DzlbIl2qOvyqy++bxKnGiCD7MBwpd+UPJAcJ6nB7OiuQAFGOdYjmBuAEMe\n9n5jVFbRFsIVckQ8FHQ0ikON0QZ8gbGb3yP4eT3g8ckhhNfLWQtVyL8q8vQH\nCTKh32Yrr6yQemtiZWCw/Ubwg/Z8u1yqSfTvASfUETxgXySDZKJKR+F8L48m\nps8c\r\n=jibA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1bab3bfc895c50d4159c7b24b69d3ab3a7eb9e72","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.750e18fc7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.750e18fc7.0_1612820423418_0.4694998092276472","host":"s3://npm-registry-packages"}},"11.0.0-canary.b62b1266d.0":{"name":"@material/auto-init","version":"11.0.0-canary.b62b1266d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.b62b1266d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3091ffb92f898ce2c5ef434eb12980d9637963ca","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.b62b1266d.0.tgz","fileCount":14,"integrity":"sha512-2dUwqVNG/PCVvptvXaR0emzUdK5uw371VLJWNtIUJtdJzjk/y9hZsfAUzJDgb40TjjiksdL4i8fzCaj2GLRmmg==","signatures":[{"sig":"MEUCIHek7JiNoYYGrLeC384NNfR9S4U7zYIbAl2/Aea7qcnrAiEA9WhbSslSOAieOFLARaJG1Inq3/a9tTX5GcQ6002YDJE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIwPlCRA9TVsSAnZWagAA58AP/1HqNajsNz5/4Qh6ON2a\n1kwzB9aKYIkGYyMCKiGfHj9KSA7a2hkoiEef6xGeyPFWZDDR5quUD2/4o6bp\n6u4MywImYe6xTGxLDDjPAwdgMMxy33n6Q3oUxllatLytzrEWlYwfs/hMdGoO\nkLN8dg9F9j4jlS/KyjQOd+tBxkuLLkg6cByQyxFnLmm8YbapPwf4MSDbkX5Y\nfxoYmlq/QMeUkBAh79ql9XiSdqB0Br5cIiHtVizhT+Mc/xfB994M8Y2LKLFi\n1gh5uTqrLiKFtOMOWgx1CZ7qaY1yCO55FhlfrG+I5aPVXl58fKtx/8diFNzz\nzM430pmS3sE3l/HiVEsU1HnURRQmDONcA85zfmD2CyPTcCQBOMRG6Xj5zQ7V\nep9APR+Z8GwaGPGDKH7HSsNp6VQNOnEccqj517T4fnbzuWyGX9JfpOmOEF2x\nFd4AELcw3uHWQZ1KX1sWaKLQvHpn27wZxCEOKdWJwYxSk98nj2M+gNw+zWRX\nFx4qoP1PTLCvEsTj4sZBA/H9WZGqR7FIGHt+qwNuq3Yx0gCGQlkO1ShGM1nX\nlMjvCWRC9JA8TAYH4vccYCegFYmh/4/WrIGjRTbnvVdBWFL+aj5qaFFgD0bR\nCY4vnnIDSz7har6o30L63bBeJVkuLzhKvwTgzmuLhC/DbtnBZL51Z67hT3zi\nHdHe\r\n=Qmxq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2369de5a28b7ff8c15bb5f1b2ba96320e8a9126d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.b62b1266d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.b62b1266d.0_1612907492983_0.32835827215620306","host":"s3://npm-registry-packages"}},"11.0.0-canary.a6b3101fb.0":{"name":"@material/auto-init","version":"11.0.0-canary.a6b3101fb.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.a6b3101fb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a611fcbffa8273f7dace6f4cd2264283ca38a366","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.a6b3101fb.0.tgz","fileCount":14,"integrity":"sha512-W4iTvjqaW41o43dXReeY6+5surPK/nqEMQs7lpE+pr/ZrYBagoxSq8jJCLNnLlgcx0bARZFiai2BGWU5tAyNeA==","signatures":[{"sig":"MEQCIEFMuPzO43eGnBBYSEvFVdCnTodAG85m24Hnfz0dmMXJAiASB5RplENHRhmR4XcK1E3QSll9ydiwhtrW0qQQS+dXkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJbqpCRA9TVsSAnZWagAAJmEP/3sUTJu492vD8F5NG6s4\nmS3iuA1rH9aWZzKKWq2sT1KaQ8YRoV+PpEj81LkxOhvPbiP2ztVdqzwQPHT1\nCrF7cNSu4AgWTsMDZWEN0FtRl9cQsmOBuMDrfGybCLm+HHc72KEhs0QyIQKt\nhBF+PLkJs0O1NaDdMHdc3+904CvYfNN+U45OmiE/vwnu2kt/+tW05oQLauVK\ng+Dwyp21EX95NoZ7wjWnQ/KTokr2UFnh/MGOAb5IStV2Ls6i/6YV2GyxNIaB\nOvz6U5rLDagqBL8mQ1ro9gHhg3C91QjMIF55NB+3lQgwxTDd4xGOMgv7AtqJ\n7VMUkfgzchIwE5yTjtJ58wTFhzo/Rb1+xuweKG6DB6RWAdiWcXUKwZmuowrA\nH9LNG8T263w75rwPvi73galofiAM2Tvkm7VUdnBk9o4JC8D2Km5rxDJO3JzI\nbp+zyoaxc2RPER+cLB2nHaRHLe2csNxxoEpI6DX8HoEqXs1SNcXmnV3PF0fM\nSgceKSGrAxNE9lGE04IB65bgQ81TQIcJhhfZnNPbKpEHAsIzkSaLiiw4PkD8\nCk7nvY5K4FSgEH+d2F+UdMcGqWFzzdhEu8Wo0O7mmf8cKP4MHy4o0O4NByz6\nbLMsUiGGkRni2iwlu7Eaucy5OM7SfvKvMxmDv7xL8edjrgKjFJHwqIcGCsDB\nRYUt\r\n=fgoJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4e94d35f86983ae07d81d1c7893ffdfca50c2afd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.a6b3101fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.a6b3101fb.0_1613085353132_0.04870772789381639","host":"s3://npm-registry-packages"}},"11.0.0-canary.ed88df700.0":{"name":"@material/auto-init","version":"11.0.0-canary.ed88df700.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.ed88df700.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"39b3ae9fde1a2c29511d2c70984b653662cef9e4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.ed88df700.0.tgz","fileCount":14,"integrity":"sha512-79tVGtITz2fSAPMdamV+eHgmnmAYY2pAPM6rYWdisnxecFlNmceB0qjclclJdeKiPpO4CfgZUQ8JWis8UnKHJg==","signatures":[{"sig":"MEUCIG3/J1qviGBvmUTHcmUL9G00ZsRvpIYjdCYugUBYReq0AiEAwCcfvZqkVXwLiaUx2jwlzRQLGbSGboPPGniwjH2N8OY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJcZWCRA9TVsSAnZWagAAneIQAIGXXIsnRZ97Q0+xvibN\nZ7NozDGI1aFPGGAvxuLVizJ9rgn3WRMt80jPIvlSH/JVgeNmedDCTci8zTod\nLisCixU7/RLZh5fA26kHkDilwlyfsHQNhaUOV1dTr8ex5+7C7GusUHXYno7H\nIm3YsvNdq1LUfAKZ+arxRFxaDGfOohIu7PQEn0yhbe+iH4Arf5unnIz3+xT6\nHqsbujVYk5TInXLwjDulL8nPSWKLy+5DpLPcXOcad8Ll+fJ82HLRixKlLtyD\nIqFoH/cT4ssoAmfR+f3n1rX0EJHz8RmrSPer4chZC+U2LBwLsSB12eH9B23K\n1yyLMYTdqpoDFIX1b83DosVXFs6uK6kVEWYVqbKb+a2Kt9PWB7g3zESgRMmN\n4lPpd/qXbg9bHVzJ7igzS52GOBNOlwEj0nyqwMfjiNcXsT0RYPpYmA5nEGT3\n3Xs+86cBBX3ZGbuSqyPUAcY2Od/5L9tu6oMfGFiUlBrY7wgv0sPub1auYBRQ\nf/ws+ij5+F+bkjlECyKp6vw76Hwn/QDXIVo2EEOIr2kC18EqPfdmklRe1/k5\nd7QqG7nAfVNFG96lAcbStLLJMF9UVFYDkODPUxOqkL9mibmxQrvL3qwu/ucQ\n49RVD3+yIS8Y7C+NyXK1VZrgJET/4W70+o0S5REaKrYiS8sn6IJL+kbMdZiL\n7yzn\r\n=ykJM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9ee8b051c4fdfde9d63ea193e791d71e20094867","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.ed88df700.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.ed88df700.0_1613088341637_0.41798898976609467","host":"s3://npm-registry-packages"}},"11.0.0-canary.d30efe6b4.0":{"name":"@material/auto-init","version":"11.0.0-canary.d30efe6b4.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d30efe6b4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dd3eb0b5799eeb27821dded839ced3d693223391","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d30efe6b4.0.tgz","fileCount":14,"integrity":"sha512-i7vHCtNzfgnbA7fcHzEnOl3nfI9dYtziFpQSzXZqJcOj1/xpvjmO7ojsNhrEjs7lSiWCFIv4geJezZfDq1XNZQ==","signatures":[{"sig":"MEQCIAl5qdF2Wp17NvhY6entw9nJLvHNcHQpv9iWZ+Km5vvtAiAA57okyjRYcRtdN5uRAWmHurqhfc89K6mtH8hd6KMP+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJeq5CRA9TVsSAnZWagAABeAP+QDjry9go90IfyYNfIt1\nsB5C2yWhjgkY0u1xbfnBWaGL2DjOBkGIECjXt2KgrHJAI4ILwSUlzUmKeHuU\nUZZ+cNEYRd+vZQz/zx3/pHNEcSxLxKNj4XS71QCepIafbLt2NhW6t2DK9yit\ntxupzFIDLwH3XN5J5407/4M1hms0DHe7/sE667z/kfNrc5FiH/ccsHCi+7Eh\nBg8oMlB3Y7QRW0AciTj74inUnvZItNtpoH+0zz4OEWjnuRbvhny7KOOWg1ij\neoMHPkHaBQbXf4dA65HA12U0WSvaHs4UQVKtKp+geJ60njiOAhCub1sd7dX2\nQ/wEFPKnZq/PuXJLDtooKc8u9nX+i7bCYkCqmN1MGnWqJbPg5s2Jpbe0MVqV\nUAmV7Bnu9a3cs/WeYrG3lbjJoVDLROoUuHSqGaQ5heDS2Q4fJ/NPMx4MPwdf\n7wJCKdpdT/nMEIkiYu/VOPZnN4aZiy0D+g9RgObmUU7wNJbUoVBc+/cLLih2\nzRqqAhl3iXNmaCcHcIRVsb4BYV7WdccEoaFuwwHXLT7XbhX6yznO/ohHAwHz\nhEq5zSXAXt8ZQ8YzF+4w2vn1MatTN8C3R8Jsb2uebUOaRKelryxk6U0gMHxW\nI8XZn79yGRHsy9uvzaGUQV1Gyn2ZZA1Qqib1LYAkp2LvMsrQrNhrBZ4K3H2q\nFo7H\r\n=Qugx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0d2a46d4ab9ca5088511e4e0b5cf2b261e3e644f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.d30efe6b4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d30efe6b4.0_1613097656871_0.9419693694319209","host":"s3://npm-registry-packages"}},"11.0.0-canary.0393bdc4b.0":{"name":"@material/auto-init","version":"11.0.0-canary.0393bdc4b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0393bdc4b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7039310ea32c7833f4c3f7fc99e06f4007cc480a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0393bdc4b.0.tgz","fileCount":14,"integrity":"sha512-kzhatTbG2bOTLE5qKGvqeF/gSiF3Oe7sSTS6+ztN53zkoBB9plwnkRvEfb77EvX/WdLpSaO8g+y1hixSDsznkQ==","signatures":[{"sig":"MEYCIQDSeruaRTNx+NMnyOprgWJoFxtRS/8Mli+XNGF6kYPWOwIhAI7Nl4ysPpmdCXEWZWAiwbi0R99h6WoNxYUUCd9FVMLC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJgQ9CRA9TVsSAnZWagAAs6UP/RRujoB/noNtxyoEJzbe\nYnlt868THdhjJjcCiGxFdJ2QINCftsQ8+cpjJCgtg4lRIls9ZtV9fS+wTmuy\nGWAL511Dj4l7QaTH+p9e3c3Bo48EvzsLBMi0TYpL9u32nPs/w+P14A2RNniU\n2EPagpO+89xP1+AOGF1cgQJzGpXIFnbOIVMg7XnmsA+PQRT7Th2pkU1+2vXp\nnYTkGBD4XfPtAx/sSaI8n7hIcdkk3lclt4WEs/2bhVa8fnaJ2xxL5k+At+ez\nOtahckbpBHkTKb8JBmQdLR/jhqoDd4O59DVzC9jWgHnWuV9rFN10woS6xIET\njd5ax2FJ4gc4GORz12z/LV7vCXMe9Y3NSAU/Cn0PxVGF1pxT3Tcpd7qFhsYq\nJnFchpm/PrIOqk9JBnb5pq7j5G3/893OJFHxv02L+GjlXtw7stS4ueyQGOyD\nEB6UpjXYcvnLXlrzL2wl3N5x3yYdK/PIWzjNA8bHxnHSLj6fC/xEx9iq5O7d\n3xNZdfqlBAQjHKCRBqk1tKQECxjEI2hzd1+CPvlCcPH89TCVzIHq9z3sGnRJ\nYXiENdc1Hp0HgTAYlh4SJgV7dGaoRilp3yaCAs3OfP/7QKtQftY3B/TnibkT\neIxnMHEyfjgU547OhmBbIsC0WwGhcsnhRgFZnY9OqTRXlwGQujz/BdS5CuZt\nnBtP\r\n=f6ao\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f241a2f549ae5b1fefdbb0c93ddadbc1e1705a6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.0393bdc4b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0393bdc4b.0_1613104188821_0.6061679064028336","host":"s3://npm-registry-packages"}},"11.0.0-canary.7cd26af4d.0":{"name":"@material/auto-init","version":"11.0.0-canary.7cd26af4d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.7cd26af4d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3019fee373bc3a23c056ebb20dec1a25c4cc4955","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.7cd26af4d.0.tgz","fileCount":14,"integrity":"sha512-SqfAj1ZyTjm5M4iuTf3IC81ZHOCkL8ZP4A2bgOCnsQ7SSKHv8gEidUUKYSZxa81n8sZgrtubwR6Sa6SxYqYynw==","signatures":[{"sig":"MEUCIDMyaNn/5gLsiAymN3Hua27z+IDfKxZrM4f3Lq06M6y7AiEAnuNTKESLMVqpCOXxb0SL4DYTgXh2zHDdOFrlnKriy1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJqWgCRA9TVsSAnZWagAAzk8QAJNoBncYfe9ac9eQUopa\nnUv8hM52wLhUAI5Da/eCqnLN2pIiENeRpdzat7BtG/+71tNiotAIqJxaVE8g\n3vTOLvgFvNeHudkz5YLGEar7AH6N7v0XBc2jHmU3uwqWqHAjCnLY291ACjgm\n0AiYqD6t7wzRwB5VoU4vE4vqrAjVg8O1B3xquEqXI3yZRRZyTkZ1OgbvvrBr\nu/kcEiPVh8FqelzvFYWuL9mAA/Wz/yyAcUZQWc7l0+2jPCGaOG45toX1n3tV\nBzaQxmsUaFxHslBgi96G8c3JyT1UWcg26Lbnx9MG7Yb2DcnJ5W7VSV/GVnGP\nAIptFZ9J9/Uhf7+pwtRGnrrFcqhHHeIfoWgCPEKW45+koK9UO2+TdSksXmC8\n6JuXaNNmowRLQN4EeplIaCaIVy2E0FgsmCB7nKUUue74Pk2FXzT9CQO01LQ3\neJQLyRLA4Ev2A7xiswkiBXNvOI2NZ2TxPstYWxitTgNgwpzxkZXo49QT2Pd+\nnM7D/3+leLiT1Widc0ofXVO53Mv2DBVIuopGLwSlYgjH+xFG4mgAEUxSQrNf\nHziJrBeGFCG4QCEgdUPgy8tKBYOKtnx/AwFSY7vw16H/B1LUqMVPYGUhJowA\nlOGneDK/kOEMs+RFx7mTMBhY/o4vTAUZsJMcRcgsJ8wiQgaZgeAmUJpb0635\nvVKd\r\n=gYn1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"da78e237011a9e38abc623fed26601ad22a7426d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.7cd26af4d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.7cd26af4d.0_1613145504227_0.8494281785180191","host":"s3://npm-registry-packages"}},"11.0.0-canary.71fe9a067.0":{"name":"@material/auto-init","version":"11.0.0-canary.71fe9a067.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.71fe9a067.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ca23b0bf2e37f38cc3d67bcd3b9f78493c72f49","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.71fe9a067.0.tgz","fileCount":14,"integrity":"sha512-CehsJYUdcPTN9gwjMQbiOAxgZ8ehClB2d5hap517OR9PZLRXAiMxWkWxINKHmBUygXre5ZBrivOQgkLqYMOq/Q==","signatures":[{"sig":"MEUCIQDQM/NL5TIgpdeYImZ3bzTi4ogPkpwcL4fD7Q7fYp7I0wIgBU+NUguYt5VeFf1cgrVqEJYx2pGnceotZqLbv1Z8wwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJqz1CRA9TVsSAnZWagAAYjYP/0P2bo8sE5DnmBOvteEY\np1TQuRFMyrmF4ipNRRsVgUXjVv3ZWJgjT2yP8XW5S/VImx40iTPBxPhvJKNg\nLz/inisOekSDUtp2zsnszghVIcOrdjza2KyYUiPCMIqAzZFYo/pg2Ubs4ixh\nP3abbNEgmnbWWBCEysQ0GPM3FPY28sIaGSdjjsMm+xgG/eYsFCFy46Bv45cw\ndhaNmOYqz9AAq+AHWLMiRE1IVs0pWvZpkoC37E5U5Rc04FtpjaM9w61mrLT7\naPxQCJI5NyCMN1stbfbdtwdXzVFfvlNiO23A7VK49NpGSEcqbV6YGl3A9WCL\nqSQ4LufQTucLp29Lc+4jZ+EP98n3eTavLF9RQ5O3wrTXhpBSaXypjg+e8kdW\nFCoB+VQkZPudLff7frSmhsAQ6h/f/3SAwNbXPx6J+9AhAaPBYsTAzbvikmYb\nw5kkRzZMuZNqfI/RXMXGGf5LJIiokHMjvZ936lClg+s8H7TbpMsP4MSTtgex\nCaJGOO4t3TJomwvuyJ9PcTDoRawuwVKDYLtMmRR4AxYsGxWqUT3Ev/rPvD/A\n7R64QCbXY6+EoDMG6jajAcLwgDJ0wBGDXuXy+F1YHsA1KQNXs4i7rrO5xz7c\ncV4pqtnYTc7ycUfycj5iUWkabCLZjbQrSSAnsVPuTgKset8YcCyocnwKNNMj\n/V/k\r\n=i3Ps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c79890da6d0bcf08c3d7c57e31df805b50394019","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.71fe9a067.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.71fe9a067.0_1613147380875_0.9925302139298475","host":"s3://npm-registry-packages"}},"11.0.0-canary.0fd56a86b.0":{"name":"@material/auto-init","version":"11.0.0-canary.0fd56a86b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0fd56a86b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"22a0fe9f6c4cd77f3a26f4294bce2f5244c09113","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0fd56a86b.0.tgz","fileCount":14,"integrity":"sha512-/os078giio7X9m+K2gXtnIKi66O288Hguhh8ZDnaDPrNSnDPzn3cb8sS1jqCMpYGRlYdVwaC3/pVs/iLPvJYxw==","signatures":[{"sig":"MEQCIGsHEb5oQC9AqmzRJlZyA0ApLMGgCcxgu7+y8At/2uXgAiB0u0MDza8HaPTYv5wc/Zj5nHuQvueVwJwf+WdGGGr2BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJxkICRA9TVsSAnZWagAAV7wP/0PCx4RkEHHfPRJtobbV\n4WQ+WZAPzk4GyXbo3b1nTXX+4sRYGZRTpHv7ZMIkBwNDNqpMJtHY1Qa7Tgr8\nDJRhf8NmTt1zw+nlxSscl7xowlDYC3ea1i2cohf3BsD+7N7gzFmIuqJQV6A9\nvAianNgMrvpP7gc5u5nDeB92nd4/QfNyb5qLS7oicRnKCr/EvPJ7UlPKMRM1\n2yzfICYjHtSP5uYc75sHNicQHTXjZ0Fw6qsbmjj+W+mr54rGTkcGqtLBk0sl\nuplpl3iER+vOd8VhkftqBSeBLykho7I5QH2ypQCN1RJIog2qxkwfVC3/5Tcg\nphudQGf6pJQaghT7yFQn+CaUZb0b9XE5UGylPkCnHHeJ9WY/gKc8ZSU1KV+o\n+9YsMmW5OJdLJsNqtXT5C8/I/umQpmeSDuWMLHjAiFjGMGKqFCslChUpIOkS\nIXqQO6cAHQKFxlLSjSK0hzTYXnLKKOPN1Km+dvm2kJN6dDXF9+kk/a0erZ5x\nOcdzueT/1IlxcZz/8mQGtEdKJIGZ6aMKjWtLJKkcVqd+iR16ULeg4xl8JB2j\n+mYnfJqfSm2HfOO+PX2oSQipIwFVLeN4a9yjK952EA6oPwmyvciniaDu5IDj\nKH3Zvj31Xj2dVtG7MDXPJAAbdIp0pQAUUTD4cXd7T6QroZCjiRTa8opLz893\nLtRX\r\n=U3Jz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5d7e78bfa318c864343a15754f4c5ab98160ff6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.0fd56a86b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0fd56a86b.0_1613175048128_0.8448226368816207","host":"s3://npm-registry-packages"}},"11.0.0-canary.f19bbc4af.0":{"name":"@material/auto-init","version":"11.0.0-canary.f19bbc4af.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f19bbc4af.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"377975a657782909740d68a6bb4dbeca2bcb7c4c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f19bbc4af.0.tgz","fileCount":14,"integrity":"sha512-7zBMpPr4Jvgnu5nT0E0u7YFwQu3DT7zR3+Cj2BzP1z8RT7PqZrmZf3/I9jpmQdexeY0BMyuJMJGAMYl34CtAbg==","signatures":[{"sig":"MEYCIQCXasHCWsfDq9CHJGm935feRslPKDVhRGiODNi/eTJMKQIhANaCPmgyZSNdqyBynyd5WrRFQ3UNNZQ3RvsT5TGDEigr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLEPvCRA9TVsSAnZWagAA1hIP/irDYJOvwzHTEYkaYeqy\nEfwiGWzsgq47W81gEQ/0CqRxnpdyJ/NTx+MB7lKzNnaRL2lTd0emRdFgfXz1\n2SpBOotShSjxjKB1QbxT4EdvZEqRD4i/Nbzku//WqnmgpDWNNeWs34IPeK4S\nRjdn8T4lvPgPVSHJzg46ej6DplSCQpJzppqeaCaHlWUmNKAJ+kd8xyg14jpz\nhfYw61zMNGWp/Xg6n06ncKq6TvVgY/q7f7F3CC+qrsYxfzdgd7KmcCj/BHuX\nEIqYrDXTkng5inANiYBGxvtOsvv4f4FyOH5h6fFmx2EbZwJcySyXi89IYBsw\nPJhwjKeBNzx91qqw5YICliqwkb95kgzo9LtycE9AXGcKSLTSHiVlY5cY4i1w\n690/IyxOK0+lvnoWkj0ErA72L+i3k8y0hOVyfDv7HDQ3Almk9mwCFRFv7Bhp\nJLri5e66MpFJBI1JdlQrMgpfLIegqiPRz+dTfUHbpH0fmg5G8iDnv4GrGvRn\nxt6EXyGJBQXKDKFXHO5dHSfvxzrqi19W1EABplnXzVZP4Cfciue324Iazpa9\nszglPCx3HwRWngTGrFmr1FmnEDRpAeM/SReTWyjxuXK28O9eIysg9h2YbgF+\ndyVDmOQI65PGWzrpoV7AUBUQNBWaMn/KqmkI2N/uV3QLqEC8ornV0PpNuL2U\noiYf\r\n=eaJd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"842729c260f5a3be9fec8618b41657a90e725af0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f19bbc4af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f19bbc4af.0_1613513711171_0.3686322651597298","host":"s3://npm-registry-packages"}},"11.0.0-canary.f9cac96cc.0":{"name":"@material/auto-init","version":"11.0.0-canary.f9cac96cc.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f9cac96cc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ba4ca0ccf27def7802e43c3ee0628a40cdddb2c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f9cac96cc.0.tgz","fileCount":14,"integrity":"sha512-CpLkXT8iNyrNHZ3wy5z0aTg1rFcUpkxacthuT5buNB/SVmHVP3Fikz652iVC3GDV1Sf3suuSC9D/qO4m/E2IWQ==","signatures":[{"sig":"MEUCIDz1Ur019e2psIS6Fh1WmByWlUXIgYU05poX6jLOO2ngAiEA+M2/v3Ik/7iiDEe+QoWco9pDCRiA/hppHc3gZWPjAaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLT+FCRA9TVsSAnZWagAAdBMQAKBao7wqAKivaD6ZeH1r\nrAAcUFozBPc+fLqdn4/P8uDqY6JBHHjZQu2ooNPDHYUmC6yWBiwBXfSSg9gH\nzL0qwURKMZjQaM4g46whNJz2JnuOS9+ltds0s9dJF5tFowW6q5VxlufOqI1v\nU6usuJSwgrl9SUU0hYybQ3UqtQTuy91yJLwnQnTwyijbOOqPNeMe34RVk006\nO+reaRZUmMmgP2I3EoZWKdc1eAvZmIYlOWuBsW4uNVi2HSbZOMkxMwr3UzRn\n7enTBNo92rO4qFzckc61SV8Fgz4Btkd05J18POmUkbG7UlM+QfWfjAq0QCFA\n/j+CPDRpIwKtK05ufPHoM4mz8CJwY1wAzy4nxEiRN1obyVF/P78M6mqT/Yqc\nvPtNl2JzHD2FzSNcyuVanMwvIASSVwBiYjJpF53MdV3cCmZjhQMwmdVnSXQ2\nroLxje+tIGdzFtzskx1xZCSgRyYpxVCHuN4LMwjg/gGNIPFFOFabwBepbxKV\nV4ncEJTd7AFk15Xzc21Akom20/rWSih7SBQSNC04Wo9dIzaKIGWyth6M/ehX\nP4sMsrZFOiVBur0ImekTGO3cRLzuauXc3fTK/N9v5f5+hPw0shcQiXT6khSb\nu3MXlUAAUL4lE9hi++bty/FeycvCeU1aXn70dF8tmJT+XaN7QZGSeVTCbqWX\nYPW2\r\n=rG2u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"993e327235c8cd36a8c15095389eb149ada97cee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f9cac96cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f9cac96cc.0_1613578116837_0.79308353353883","host":"s3://npm-registry-packages"}},"11.0.0-canary.79ce0878b.0":{"name":"@material/auto-init","version":"11.0.0-canary.79ce0878b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.79ce0878b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4122e09435b9f8f90a7236d74de1eb9de88758f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.79ce0878b.0.tgz","fileCount":14,"integrity":"sha512-mmdo5MPzMqliLresII9F5kUu/19CwQbsly8Djdef/N5/FXaG4mRw9rvDiCkmAhR7vGMayH8Ik7uwXm9oGcmsiA==","signatures":[{"sig":"MEUCIE2YX0OPvfrV9D+19NvZ4SnugCCykSTotfB9afe/HeKqAiEA75FGl6AToVHSogYYBoHwsDH9T+GrVdgbUUDUq3mSoQI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLW1LCRA9TVsSAnZWagAAFncP/3epSbCEtwYjFF/PuKJU\n3PTk2f5w7wKN8spndat39CEo3WJ4EIaGt/wIUEcd6WhSU5wrUbHejt9G0w3O\nTHyQi89gm7ysf1GF6pmVPWjlJMUWlLYIH48EhMqLnFLXKMGtDKGp6fmTWg24\nIXRSj5iR8RHIzeZwVXY1K8WyenIAl8BDUMGhagw0XtORGT3wAxOmfXdEF7nv\nRdlWM/qefetgO+wTO9Huy1M9YS0Lgc4f0hL3jlwb2Ufk4jExeeYQnXcWvAFN\nvck7HZMQ9RQeCYZUBU+X0daugznO1zgtqXGi/fSmEWBpAyj/jZnkYhT9MbXh\nAPffv4lKSTN5OiYLy9TzLWaNBqF1UyBIVK0aW1b6IG37ZcSoUC86mgda3daN\nvD+yd6+rpc3pTFeTVpNQSPtHfcOE3+Pbx4LsPGu7ZspMZJYWni5WbYTqmC5X\nVOjtC9FTDZlBotkyeciOwuuoau6WhdLxrZ4EOHvrWmJJ+w4+MwvTeeaUspZE\nKu3CbRs08TYmpJFEMq+ft7itITpGztD6+Jb5rDab1bMaC+VtfyBtvqgRLjzj\no+kdISY4/P6oQS3q5GJxabXHcuRWuF3YQ+9uaenXWnhBeNFW793GPU0nOvnp\naMSFT3ieCqgKERk0CCPDgowXWlb17vF1WT7yRLT/GIjnbmT7/LL2bVDALtOu\nL8nU\r\n=i39k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3941c218ed650b1d1767cd6b17652d4e1b5f7ac9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.79ce0878b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.79ce0878b.0_1613589835273_0.6205825876072197","host":"s3://npm-registry-packages"}},"11.0.0-canary.d6e507b5b.0":{"name":"@material/auto-init","version":"11.0.0-canary.d6e507b5b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d6e507b5b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fde6e26bff3497ab8fc1751b680876d9ea4536cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d6e507b5b.0.tgz","fileCount":14,"integrity":"sha512-ixYcQ4U/38buTHd5a9U/735FIBrXXItY8Kx4rb0l8DbkVqOqgf1IPOPU/2RPf4woM0w6IKbabaWn5D3e4/M4dA==","signatures":[{"sig":"MEYCIQCviHJp0B0hppcC+YjM51oyosFXlytOFdrw4OAbPSh+RgIhAIODv5NHZnjiZNeJtjvnM1ExL8Pm3a/mAwlh5J+C2Bj3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLXUWCRA9TVsSAnZWagAA+dUQAJI6b4DPhZBD7/FSk4SO\nUiHx6/LVsLN+O9QrOCgOMRs/8LhE5SuAy7cca5u43pPJC9m7z3GW7rTg2fsa\nxvoZiaLqCAmTveglRPmvdxroBiXSfH8tXVzYsfn6f06WGQDVCzZ2hSATC7f/\nfu/sK/V9QF69NWKLsRT2rOgQpD39jAMvAYQYAA6u8OffynNI92SMtGUkjgs8\nTo8UDiAE5dUtRb8f6aWAwu2vrjUK7P3/CbmKox7fdS3AnN6KggD/ziEg+BOQ\nAYHVoOHpBybMDQDr2/gSMUaJsvltUvc+YvRAGI3eY4kLeYs97/vUKIrHwzgB\nH9ZxzfGhG9smF4LiR2wCN5WaJeLGoLOOBP6kfZXDTLsKvpHuLYt0q4r8qBZY\nU+sM7aROKMKT8UpY924ks7BlaGkGH1oK/E0IvxpuT60yiUnZNmcOASfXgU/S\nn5nI22iZK9LUBkjf8lOQeime3ivGi+jmDgrG4atBwviXeqhiJhHtyoP4SMZN\nlhU8Z1gMdHmPhPEj2KvcpCVRfM12VDlaV1ysZACOnbzPYwIvdWhv1UWsEdzF\nYuW0O5NuDWz7o7CjiD0DcStQSr17hUyvencFJ2KASMlCEK5Zp7pAaXdvyJa+\naQJnAafoY7pfJj7kLC4whhqx7dmtpHq1L4NRptYKueMJcVCT6NnaYuoambxm\np0nb\r\n=VSZE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b20b73a4aa16995dcd0b73e46e4dc31f7914a367","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.d6e507b5b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d6e507b5b.0_1613591830449_0.4627280684990054","host":"s3://npm-registry-packages"}},"11.0.0-canary.f2658381b.0":{"name":"@material/auto-init","version":"11.0.0-canary.f2658381b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f2658381b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cf9c4ac3de5e945cc17c04238737bdaa9cbf3970","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f2658381b.0.tgz","fileCount":14,"integrity":"sha512-ebUIziialbOV/pFjPlmyemk9GSqAhAkzsiy/5So9N/mPa+TLAQ3Q2bCK28HKtV+fS9HTgU7Rq59bzrR71ezcYw==","signatures":[{"sig":"MEYCIQD/i7dX2sOHBEv1b6rTeACfVZTyS3EHcEUk2gcCKifsDgIhAIUt1ztSoxbaUQApJNmLZep3JhJHuYpfWO8DWyCJYFM1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLZwaCRA9TVsSAnZWagAA40kP/3+FU51iwG7f6by6Y6/U\nzUzHWwTWac80XmRNh/Kl7O1qnwLfa6t8bqithLo9vseAVubbR4MVUVa5iWpq\nRmulU2LCXkqo9hB//2N/VEG3eNd1/CWy05oRy8zZjns27kExGZiLlrXWP3Q+\nZ9yCsYE3eLtbNpd6K6FF+nlBSBpsj7xdiDf7EVYFwHLu5lvRscmZBV98JLdC\nhLzsA8tzXoi+zsjjm00XMBU9dq2v+enHld6tmrCMERz+PVL7q7lVlp8Mc3X+\nZj61uWPqxnRbnIme79Pg+J79YBGu17NF/5GE8ldkY8CcKGYXrEBZlMaRrmBU\nktUwF7IgiCggwYhzXrw8Z8MkTRGMUpGpvCwcqKP2shg0+MrTXy8znQLTATsR\n2G+6WE2nZC3pKoUp60NgHvPQv9choBp1rErLt82oP7uJVOgctQX7K2qpcm4X\nf09GxXCazhBwI8TTh1UYXeDd7Un/SAx8wj0F9bejB+tRSuTe7FlbJWcolVcM\nfyWVJo10LenPd0+OyJH+oambu28FkcLu3qVaeZXPVTgkP0PAFOqc1oK81l6k\nvrUShRlwdkcl4p3HuSZDr6eQlXw5Gyty0I/13FQq80z7AZNIxFlWsks2ZAWj\nufQpNs3xTjO6dz1oXYXyL5MU/AfWjBWrEDXGLvQ09ySdJvam+utj/yo2rTES\noH2S\r\n=r6LO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bb1b60f60cf9b1a4184aa52e590bcb4003d3c09b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f2658381b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f2658381b.0_1613601818117_0.3252382309875186","host":"s3://npm-registry-packages"}},"11.0.0-canary.97c4d4035.0":{"name":"@material/auto-init","version":"11.0.0-canary.97c4d4035.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.97c4d4035.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"749069576ed18e7fce90cd4383d738762c20f20a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.97c4d4035.0.tgz","fileCount":14,"integrity":"sha512-GPCoYjUUbrCNWbBjzdyxlp8sLVJxvbYPx0p76fg+idJzWWizVQWH2yHzhcfN03Y69PgF5JAh48ThEssKYoF5kA==","signatures":[{"sig":"MEQCIAxmk+ss93KWuYr1FMB4Uh6wm+Dh735P4MFeUrAEtEWQAiBPZ7/MKzgEb9G0ORb7VsSPQosjNoISmj7FmaAMotZMjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLdIcCRA9TVsSAnZWagAAx5UP/RmJ6DLUct82ZXqFhCDL\nfTm4TgINNr9q5J8LVvFJ6Fuxcno58Oppp9wZZhOMlwlA1UmQ0uPN1XJUsuit\n9RV4qEp8D+QHE12V8geXlrzRJbfIOXdtXfa0zPDX89gB6duOUiRCZ/mux54K\n+8dzvNn0uKHrSxP/ARcC5ejSFig0adMGdvl1nvlxq7succfI0L1uA3xWqo4n\nfUOFLC+ANOnVRnMfmVjkeP1+4PTsqfdQso2qEVt8cHFxl2cCWkscQDNaYnVz\n2XDiRTAjid0CuIw4bwjnL9BBZ2Dl7sJNsJN+xh5znG/sMNd+mWkxVclOoVPv\nvjK2VjwBE13mxxtE5n4aRbh00PS67QJb3Mfx9Wv1s5mT1x5HbL58JIELWkEz\nEUICDQroqDvRJB1C8TbMBGIp7Eexf247IhygtsnsJ2T6Lvk63wdvCxHVvql1\nBt7XrT4cEB5WwZvW4dATS4Tx4SpfG+rQDmSul2WSCSKqFyVi+a3/nZ17Dmr/\n2NxfusbWcAlWlb6GGYzpaz9hKhi6b4NlRKYlVI1+SzA1Ihg8013wMdJrr03x\nUF9atL98hmftoHPKwYob/oAJ8/YRP0ZlGUrozWehhOrrrcvYQ/L1kN4CMa7Q\ntjN4HhefG+93fAmhMrk8Gr3vWVeVP74CwWc9SfG0iV4s57tdcvHSQfzgn0xd\neXYs\r\n=2KsM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d9a223ae17277dc00b76dbbc4263232d38e50c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.97c4d4035.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.97c4d4035.0_1613615644206_0.9059322086570853","host":"s3://npm-registry-packages"}},"11.0.0-canary.f5bb4648c.0":{"name":"@material/auto-init","version":"11.0.0-canary.f5bb4648c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f5bb4648c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f84d65f57c0109e907a409770c867fe81b9540dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f5bb4648c.0.tgz","fileCount":14,"integrity":"sha512-Njy0pzDb3lwXVAzMDjsdqMpu6jxaNPfx3D5xS7vohx8it+q0MNYEHJC128ixh9636jznDAXuhEwdNMExJg1QpQ==","signatures":[{"sig":"MEUCIAGDNUnUrQRjCPHHArTQuY7wid3BtcIbA09BZuC/DZ1bAiEAmhn7ccJ2eYRL+V0tO1VVdyXepeDFQHVQSqSoFyhMSWA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLo/vCRA9TVsSAnZWagAAS5gP/jEXv1Jo/EIfLdbMfByn\nsC6MDZpRndeCpl9eCzz6DG0y1hv7lk22lgzGktYCleJfsoScFO7NPDQkzMlR\nmcRdLh5+nIc0Xnm9lvpWNoQA8JWuts4KfHAA4IyRuqFf68tiK5G1MXPizNgF\nXbDT3dIvxpjV62C5+Y/cUgyEXhQ6sJy2Ybwl5UTF6whgPYTywQN0fCWyTyst\npcxWF/vRCUL+4QjjbspnuZC9x0voORbFiIpRnCCz9NdDzDIcLlfejICkaVlc\nilE6JJU1pFeFUjnrYY6vVlud+KhukZ9xjevVsqaAkfkDsYpf1o582HwzR3z8\nSRWBR78DtbO55OvKCeDlXRX+uuVx7J+pS3wFtNQtzTSReqqXAZ5OaRT5eyud\nmEy+g16+7YfGXfSUr1OSieSnpxbgbqnC8FagvjUT2M1EUWgOMWQVYZw9Omz8\nJ6jFTJsYDwOzSJsrZRu/5V//5A4V+bkzqOUmlNx7+XAQco+pTLyYyK3kJhJ0\nDJHqcoTyQ3B8uYNU0YhNrszUMPIdFkAI7mHvhLQhLRBRZxgMJ/MO3HVCfHQv\n1HZot5+vJiMDiieMhkKT/VeDcGR3uQd3f/hU8uP5G3zrnflNronR4dQoL01t\ntQ3RQasOOOwBYkiWo44C41aaqQNlFTt8+bj9GEDnzlh4p9aULFaTdReiUz1u\nDAyr\r\n=YgWr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3abc3c2f94ce48fd3a6cc689419e03b8f7769ce0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f5bb4648c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f5bb4648c.0_1613664239097_0.20935488497908272","host":"s3://npm-registry-packages"}},"11.0.0-canary.302c7a960.0":{"name":"@material/auto-init","version":"11.0.0-canary.302c7a960.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.302c7a960.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"72d730974aa68925ec41fce14c53d33749a9a649","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.302c7a960.0.tgz","fileCount":14,"integrity":"sha512-R2Vlzzi540eYK7Wk1TyoKTFQocbfAfo6ErRUcpacffZscai2dTktFHLgGpRPYuk1P7ViAjX3TkuzEynMQ7nqxg==","signatures":[{"sig":"MEUCICA6wnZqYZqBIYpDSZI/nRp5wPCx5/z8+1wIn9xZ+8GiAiEAreYKLYptKqxXfQFseu97Oxml62CVfV++OaOJ9wVtGaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLrO2CRA9TVsSAnZWagAAT6cQAIx3U9q3OsLy7hm0/E4t\nbWE1OJFdKsr+Jd+0sTLvtHxYbPtqSfW1mjkbK0gD8xis1+vWhDdTRqZlOx1o\ntN5zVY2Fr1VQCMRDDxmkPsyG4/G4ykjmQ97rS6HTaPhTTiwExt3eOvzEq9Va\ngKrxrMoXdPkiTcXBz1824KcHtlmxe+7jbINnFa4uZhyEp8DyHQ5ekKt0qGDV\njeuQi8d4MlEhaJegof0/P5OOd73PiJZ4PRc34yIPnJmKu9Fht6QzzvO1pYvk\nIX846qE64SE61BKFxkCYQHtuk3wwF7WtSnFbCdgekmhqI0F7a7RnK7Pa7vEa\nzPayTeumTuNQiRzlcA6Z1ddWHGjCEH3wIMMPKvrJfr2YEWYJbJzMxtf/a3Go\n31wHGP4dcnQt4LUgvKlqL3+dueCKTiGbwEMQfBHPsi1qQJZQthp0tNBEzyPo\nsaVBObfTrj1Avl5okeLAVki7LzYFvtM7qumbONkqga0n88HIAl5t76OHn/KY\nMCB4SLX1+kwmGIWbMQKH+tcOEs0hrxCUw5uS6G+80LhsCDF0tvFfTqxWDFmp\nnWM5pxHVTKJkVMrT2yAJD84DDNNhYRoiW7xCMh4XHiIrT04w/t2vhmwZo0EB\nI5oZ1ePHlbjix+0SW9804nj54pZ1WST60crRmfJh25YOglx3E7gAGjumbAO9\nPDPq\r\n=1+mv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b16c4cf1d0826970ff04a72b663f1838cf8c37d0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.302c7a960.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.302c7a960.0_1613673398205_0.3814005166427088","host":"s3://npm-registry-packages"}},"11.0.0-canary.aa0aaf026.0":{"name":"@material/auto-init","version":"11.0.0-canary.aa0aaf026.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.aa0aaf026.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"13244fb0498e554af2b11874766c4233262f44f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.aa0aaf026.0.tgz","fileCount":14,"integrity":"sha512-jAS1BJQbO4Cj+1CPSV3SUFvozFTKpzeLovOgpimY/zlG5gr2dukaI6L1eNzQ91fWazuhvGC5y2WK30DGdkpANg==","signatures":[{"sig":"MEUCIQDjFs7pNZNHhuhkdY0dQtw4aDF4XA1reHG02/98z9774AIgcFHmXHnr/3WThE6TzNd+/RqmgX+OKE0K13xm7xYJCuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLr5cCRA9TVsSAnZWagAAGX8P/A1RkNu4fxvWSYZsx6XM\ncRAeOPv1V1//ZSI85/X+2h5vSx0xCkSOWX/awpjAB4gRkpo0jsjZj36HsBwx\nZT3aw/6ofSqHkRSLhnckw1SdbXNH+t48wvBRiIx+Pcb59oloTdlBip4OkS4w\n2vnHHP0H+2K+qogJmwDic24JV8nKvOnpAJ5vxHj6YAfSMr797OYOnxmW+QNH\ngC6hFSqJvc+U6D8uv11OC3yckIGfBl8+rxWIkOEy0Xgvch181cnA95ld+O+C\n7KzROH/2TF+b7aPbJ/jYQdYS0N0T8fSX5XrotOQAl7Ndgf0pTJ0kSoZku60n\nI/m2dj86RJdmnIK1VKUd0pWGzhbdc1x90XTU65mAb2y68/+qeZbusgO3PMNp\nbwEULVyp3j84ALRLGxVzZRKjxACO6wuoWGgUdQq7nmujs5kVYIaMmmDQ/rMU\ne9gNfypTye5izFxWKVDbHYld1XCosSefXA8hL2T1t49Mia3zUNGa3sZ2LtfI\nZnyrcmuLX8PyBTPfl4a8WoRzgOWNrSqt93EBtxPncc62yA+eA8gW135pdaRP\ndYZtOoR3vPTeLPTcP4014wK8GhXfUln6eHHHjsbcwOeATzi8Dfv84wsZmehV\nd5CET82+ig58vs2+uKJi+OgDlW7r1V2jgtDOnbgGWLmmj6MotJYs25IwNOIB\nsN1I\r\n=0gNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"de542de1d7c4c8f5f51199fe207ef527fc1265fe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.aa0aaf026.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.aa0aaf026.0_1613676123888_0.3047570287259551","host":"s3://npm-registry-packages"}},"11.0.0-canary.07ff0c452.0":{"name":"@material/auto-init","version":"11.0.0-canary.07ff0c452.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.07ff0c452.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d8ed836c4faca8f073d6dd6a6118921c6eb2cdb7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.07ff0c452.0.tgz","fileCount":14,"integrity":"sha512-VHkEZOsxgpnb2JPbSyQZoAIWOwhIUWgXPjBUl6OidFR3KGkX2p3Mxos8JlbNwpxPojJEKuAI+nnzawomzdxTbg==","signatures":[{"sig":"MEUCIAa/QU0MWHg+gP00Yg0WH4NkBqm9cs5vOZiuF54YptiYAiEApfFUdWHhd00TQZwzQO9TY09Htjcnw39vDxLZk+yF3RQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLsLtCRA9TVsSAnZWagAARgwP/jaVsKGzNzGWDlbfVBmG\nKyTpkERYfMR66wBqEP0uWXpX6Oh3hN1ZYKCC7/asIuX8x+6Ep7EHNpgD2R0x\n41dMTwUpCjA1QcbZv5mxitrGlkqahDMOO6GJwkP9gD16PKGgI6sogdAxfM06\nd5tQd80hYaFcj1qMc6kZm8pv3yjIqlBzTWs7OCIGpvS1RSnOnm+9giaxxkAY\ngxOY6xl/lMcxfVGIrFhGljF7e9pt6YdHHlJVPsTvtkUb29eldQPaRNuyoL3R\nUzHEEdvNWylyqqaxhHN00ntlpbKX9UOPDHX3ygOsyerFqOanzI73+d50SgT1\nMKoajSEDLnscEdRzkqpNx/uOjsJJ+lmbQCWqB74TsjYGpqf+xHug0CFtsGpm\nQ/zElgepqqGmjSs/ntnFHA9bZC5ezNVohchxR6I4fELYZqJCYo9miQ73i9UF\nzSomZglYvSmIqAR7GbfnbLsZF0A3Dqga95/jF/rgxqHk/TBUGmYnDuyl81Ks\nQluoEu9K1W23ZPBLPHvSOEPMiXuv7psenYx84pSxLBDKWJoHhmLBbHxMeYhq\nzzDrL72Rjqu5AN6vf/bpHmUXuRf5NfjbvBZ1NiTwF8kSNHBkPrSN9LePZHdW\n4owwflAXp/7n8trLrapWgQO5YLfmzVELfQyHjCkic0ZUjuXfywXhj/+BhuZp\nWM3w\r\n=7Fsf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"52e3f1cc8fd4568a48ba4314f982d5613f53ef5b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.07ff0c452.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.07ff0c452.0_1613677292913_0.9454353553367878","host":"s3://npm-registry-packages"}},"11.0.0-canary.bed7ecd3e.0":{"name":"@material/auto-init","version":"11.0.0-canary.bed7ecd3e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.bed7ecd3e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3caac87dbb6fcb173649ad42e3af6b947113d9f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.bed7ecd3e.0.tgz","fileCount":14,"integrity":"sha512-X7GtNzYsx7nwM5Gjgv9fTWTgt2D+4k0bBdjtCo4hujhnJlFOKxbH4PdQ5FqZ9yn/QdRHoGEZ/fAxYXLQAbN1MA==","signatures":[{"sig":"MEQCIHHfyULV8vAlPlEsxkGVqD14pSWRBEkeDH7odQgeCyD1AiBpg9bv0A21XroVA+BKxFg6ort3nZo8mBwq+/jU3JpFHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLvesCRA9TVsSAnZWagAAWLYP/0pE2rSS1W0kBspipT8E\nIrVD0cmnG2eC8aGEJX6DqAwMWSDk044Qu54JYVOZyQrfWH6HHk0dAq8wqCmb\nYoYhMEi93gZMcYezLh9P7uo9iCs3ijodoCubZHuWWpfrHjd/aObrfjEJZg5H\n5Epb20a8YXmpNiLwhfNfZNPhiwANZJX+FvbZDTt2jZpfmEbPWHXRvjZHYjwC\nrogDCLg1WJI2c/Rov1Rwk+QBeQYLZmRqWEFZWZA/iytM996g7S0MY84YyYB1\nInhDdM8Y5z9NRaXac5Xse4em7u6t1DnaD/OaArz7yMQeYAawuu2VbQ3hDV7P\n6vGvV+4tih4WdSQt4WnmjHenxVmJMwmdVpKM/GB74caRYhXxelV41NqbsBWm\ndhYGJuUEsOWIsG9ilTGvtKmZjVnd1MTROdzEt1GUnKG+FZX0iIEJyiZ2/0IK\nlCU7OJOAPtoYGNnluKSr3mVvTVKybwhSVSz8/dLgyIi96wcVteiHGN2Q1mue\nrzTgrdRCwqI0nKKlwSs7q/7eNnHjbSbU6CqZx2TYwCyDyefKeSP5vSycb+r8\nvxT16gUJVzb89YRsg51Nwng/sbFr8GxpRoDJjgpOxCdEo0gCSOQ+jhAl5ky9\nPF+7rQWyEB4AG5V47t0dSIh3KSNJodSm3ASxu0iQK6a6s1ZoGH9Ry34dbPBO\n8P4r\r\n=A+H7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c23b9ab547a5ebb36a108742217a017fed1886a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.bed7ecd3e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.bed7ecd3e.0_1613690796481_0.21872506464200225","host":"s3://npm-registry-packages"}},"11.0.0-canary.06dead2d6.0":{"name":"@material/auto-init","version":"11.0.0-canary.06dead2d6.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.06dead2d6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4c819d9efad76f43a187e79e5bea5bf0baed3429","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.06dead2d6.0.tgz","fileCount":14,"integrity":"sha512-iwahg3sUeER05aAnhdT2d8JRICBY3JZPD96s2nnPE4vlavAGafS5k8DlVhTPr1ZhmynOKnGo/4zcw8B4/d8I5g==","signatures":[{"sig":"MEQCIF/xAOEN1Syz+bF7O7GzfEIY0qQ15JcXsZ5+VOFIKjREAiBQcXmtVh05/NS1h+MNEw781tP5A59nKCMQvNbkC7iG3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLwfuCRA9TVsSAnZWagAARh8QAJvpPN3MLmzH4+6e1pjW\noCTSEur/ghvv9GekiQrw8YmglRXN1MoS8sPTthn3qUFYf5RKtx1ZiX0WBpYD\nxHZa/aE/Z5VzE3qdJmGOdPVE5VmDUAJaVfDaSH488r92Pozvlyf7A5ni6jOR\nhDZ+86yjv+hZeJjtvVBYB2S8roSZeGp6uwLoFy9uihl2MSoaWC6TIPkD1n9n\nkA1OfrXwEpX1bY+lPXLzKzO8ZNDMv1Bs2Qc2SijMuobpOcVDTvf9NoqJgxak\nJjdPVoFcFv9qC4hXHwvQjeWaw4rtplGzzeN1Xa/OB/XMTiONAWWPhgqFGnas\nwxhu4iBaMkIrmnj0UYdrI1IM44fRs65WpJL6aCGa6VhnUr0KcJDCrE1iwtMM\nkE7CFiKX7DPLLg5AhhcjUJBfkXaKo+eF/PsP7GgC6eCdXBlbxXtBhEYpqnEr\nTv54DuRnvUkmiBMdZbQrzQaBydfNrKukLuc4dvI2hF+g63Ls+2Klmu7rkB0Y\nw4gyTC/5TGyLTcoRhsMzWuvvUrKtk1Bl90VoxAXHVS3rSL2a557e0+FQakFn\nnljoMu/aVrJiN7P0cfLHd+lgBiWJFivq5w6er1CLzwTmq5YzZJBydyQQ1H4S\nCe/qVOkE20Z2k5llrGdib/fpi4GsvEAjsI85xhmWziQawgLT/I0hp83heexn\nKe0i\r\n=EhpV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7458ca9f14be94c1a279bd594f262289d278bd39","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.06dead2d6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.06dead2d6.0_1613694957618_0.317666414917563","host":"s3://npm-registry-packages"}},"11.0.0-canary.cddb03553.0":{"name":"@material/auto-init","version":"11.0.0-canary.cddb03553.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.cddb03553.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b74a298ddde0e53ea01a8b22d6314d9c07965f12","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.cddb03553.0.tgz","fileCount":14,"integrity":"sha512-fXB7ccxX4gfIeN0HQc7j1zB8wOLK2DSnVmCdT0704YE3ldZ7f5/ZWKABd67SVeooncpa3qPCaLOoRYssGLKq9Q==","signatures":[{"sig":"MEYCIQCmr9r/CJJjCrW6eCZlHFTmkzZCkjl8k2ko/mbhbOTlQwIhAK69Ms4KcNwh2lVkSKNH7Fe2JG5epEjO9fN8dWokOudw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLyyNCRA9TVsSAnZWagAAtGQP/3UjNwH2pzlRkfTa5yCb\nWiN8hrfGmxUMLApLQD1wQIje6nAIlLau/vSlNzV24GyhWEDFSSSJSDMRfdWA\ns/820hElkkXvLlOrVRCzMN4mLvgSFlPe8/HH1IeXjtB+z7Bn56V91oyMncap\nOGBppITYimhjYpafgckyfGyGr9oKFZFJVm/Uv9LOhH6cWVUyyzcvrFdG8MzG\nvQqgpC+i5kUpqyAIKJptNsVvcCcOkkw/sVf9BtWnLcMDJhQM4OguAhuwpdYI\nrL8XH7+sCUEnMZNHV7yx+iuR3J/WzxCFOE19AwjFFnvUONHkzOYE1Cn7YoUB\nNU3Y17bg6Sc//fP2fGp69buTS+W1aAIaStsuiqG3esN7st90bA389ULvOdhz\nHKZt4SPXbkl8T+mY6Ehlx37NfPdb5r18bZit2PLB0hiqHeH69SOL0VxV2+Jd\n2ILO9kVnccz/37Np6xbhz3bfzUUjs+0LeYAzsWOX87RCvFM8pxA69pOSjUnH\nMM6n3AmqtMNl/4AkJOCldfZs5f6VuXmirb7fNPk8NNFlR+vI1K1QfBMNJ7My\nZCEvpiduAqrIJEwAtJvlZXqZztk9oZynjvAKOkr3h9R6psKyA3bvKgYLP8md\n7rZoY3afqvI0AsAD3LPr6uahAriOhgBaro3FfKBOV3lrWjiBlObRIc9bLzqb\nd76+\r\n=Xxnz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a8deff13e5978e42ae51f60c844f7ca0abf64b45","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.cddb03553.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.cddb03553.0_1613704332699_0.9395653691778374","host":"s3://npm-registry-packages"}},"11.0.0-canary.d6d8d0476.0":{"name":"@material/auto-init","version":"11.0.0-canary.d6d8d0476.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d6d8d0476.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3a707245636eb4a1770fbbb04fab8c97e6e132dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d6d8d0476.0.tgz","fileCount":14,"integrity":"sha512-yZ60ZfS8JpwURFBmuMSVE7C4Uzake+st5NmNDllW7owXebsnpMrDTcRc+yhpe4ipb6ZQL19kdIZauxBKa/AFuw==","signatures":[{"sig":"MEUCIQD2kZ0r/4bdZYrW0YzuHs2VIbXDfFkj9Jls/56UKP87PwIgG3BmzJPA6CGQ9FBg1Y1VUY6Kv/RPJQaPCwJiZrgWrUY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL04iCRA9TVsSAnZWagAABqgQAIBSAL+2UWL339xfKxfW\neHp7Ky5qg4Vcas0loGx155+2FfuXH475YfsneHS7U04tYQybPl2oYKTkuKMH\niG6Z9bd919V6IK9gEH4Y91cB44h8BKzM9nxU3soHYfWpRen0Bj1zihpFZTDE\n2en4Bbd/b7shsHFqnc//DgSnu0zEmeP2J+sASlKOByP0lH4DyD4PBTOJuJ7/\nuE1UG4owxfjxcaWc+jFAsag4I04W7fVR4orpqluXjso24lpIMJLYf94Vpb+S\nyZGkcEmpU6zSwbybVkYcwY75rcD+C4kLm/P7FzbPgYrpKkFe3WhUWkbccsxS\nlLaoX79vrEXcZraElgBd8dVQbUfdj9N6Z/LDACF6tYiAJ8ysPT8RWLsuJbne\nZ0LSCGhMYrS9+NvUaEhEN7GJw4QRsZUBk/3K2otF6/TSHH1GxLHTRkzi4tYS\nwWNCcKs6ubU/AyrJfAtetCcgykvXCSa9MpUJbAm5fT+SGEo6LjgTvbwIhd9c\nVP7mnUmG4APga23KOTyV3b1oAkWqS6cDjMK1eK9JoVwl3uoUKUjgXn+cf/Mp\njVSdvwqK+Tt7DqRJjPFHrYh4bL3NXxXtCW8Q/s/wFuvDcSBHof8T2NKZxq4E\ndJ9M6ARNgiGU/jlk1hYPQjkGeE79OlybLoOgoNsA1cQlwS7vx/yu6L1xoUj8\ngCus\r\n=JfCG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"17aa6317e2c1a8109a8bae34e962d438f170f811","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.d6d8d0476.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d6d8d0476.0_1613712929728_0.5601929171869071","host":"s3://npm-registry-packages"}},"11.0.0-canary.0b4a4b2eb.0":{"name":"@material/auto-init","version":"11.0.0-canary.0b4a4b2eb.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0b4a4b2eb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"26d2d9a4cf442ec84df89737db70a37eea026875","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0b4a4b2eb.0.tgz","fileCount":14,"integrity":"sha512-DnnPeonpZKALZc3FufEM7+4P6PLtYBdOlzvFsGroG+wy31Z7Jz2hS6vWofI0frBE8EVNccZMvsiPqe6TwLq4ng==","signatures":[{"sig":"MEUCIECGNEvvaIyNdwt+zQAtkXOiSW4ERNmaCp/b1v+ZFKfvAiEA5FB6wOGSkmrHs5d2O4P1LhrRX25VLgryWw5/cwNDBJ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL9znCRA9TVsSAnZWagAAJj8QAKSaKl69oY0ehULRXOIa\nG5bgDWm2WFnESjX5y8mM0CD/ohnHGdGlsbAbYCn9R0/i679WVnZ+Y7eJOlzp\ntPwfh235eR+7JKvxAuAMiqVjAMwM1079H3BeqSpwm3tEv12Ld+NaEGtkvyk0\n14ErmbVx0aAhz40j2bByYU57clyV1unSehTDmbWjVAOiwHaJ52UlLYl1A4LP\nMvqI9NaiWlcAQf3but/gxkLK2BtxKejsbwYv2GJ+qExyiHQmTVbMzWh6WPqX\nr2sffKOVf36hP8H4awBpFZNz5jj+8kAGGWljyaKWEsuEjn6kiZCp8k9/mcxd\n3dAOjCe8Trqi/KpeKZP0zHzl75wYYV+5r7AFqBQD/w/K7WjCmMob1bWxNVgO\nhWTJUwqPV1Cnd+ZKG+4yWT7tQ5/PdUqY+nPDhuUtT3mwi8ltuevDY6/Ok++h\nxr8NpeBl8fVtLuFbk5Vc0k1F53N6rt4w1K3RgW8WBtEEUM4nWeISeei0h+2i\n7clrzlxdHNk/8KSTkEeUsM07UIeN++Y7UFiUjINAGwMH9hmRw8JUp1PB7O9G\nBVWMxBzRo8ZRfP6puj9rTQRIviySMMdeZBNfF6wQKvr3sBYyQFkR5Zjbt/3R\nGt1cOISit4UxuZh0KovdGB9jCYsUQviaOl/qhhuUCtDZS+u4OLiD7tKA5rQA\n3pcI\r\n=ol+M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d96f438a60c2d44b9a3f9ec055d1dad78d316e6c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.0b4a4b2eb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0b4a4b2eb.0_1613749479216_0.37550352188535774","host":"s3://npm-registry-packages"}},"11.0.0-canary.3201cae47.0":{"name":"@material/auto-init","version":"11.0.0-canary.3201cae47.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.3201cae47.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f77d5c1f8a9b66b4ea023f4b51e7a716bcbb1af2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.3201cae47.0.tgz","fileCount":14,"integrity":"sha512-h29N1gkMwRhWHkd+4erIYbYSDfvo7VlgGb2CcmjGWsxNAxjiik2Wpny6K7PGHuJKE/LWSPkVY6LQHvQ3TEWyVw==","signatures":[{"sig":"MEUCIQC8oGhs116y1CEoRUNEMm6VviSt8gcKwYCuTXg6BKbspgIgc56DiOsfHH5XLHRNzPTmW78hkqBlWFiTnlg8ahAEXKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMELYCRA9TVsSAnZWagAAKjIP/RWIrqNp/JlFFlT3R3j+\nilAVaCs4B1d0Sxc/0wXpKKfraqK6vVnoDZE+gyP4i1IT6gAiSuwo52+DQZp4\naq2FALtIoEPdjfQyR4Y/siGebey5v1IpHYqMjQtltM4dEOTcgOx6Xzlg5qT3\nYTMvfJsJg7bUU0epaAREIfeiX8WRDuh+6jDDwvwwz6ri7DwA4YY0PsD5Bd8o\n/UTHGZBymrj5wf2+1qiMMZkEXISAdtu57OzvrfVExzNghgyHZjKb2hcgsoHL\n9eN69Z+wN+UVSDTVj9eEn2BJp3RMChp71z1zer/FfUh4Qg1GOilRu1gSOGgN\n4JwL8o9+6i/oONaRumiCXAMki1Vq0p+9LpE6apP1D0t4DCehILpeBdI1ckcB\n3NrzZg9XZBsIpiZA24W1QG/6saPIL8oWGEhexC6zJEVUSuOIGppnoyLnSvFo\n9OMe73mepAPb5pTzenN4ALykkBCH7iurLzwIloFANo+1sHYvEitIx7mIYsi2\nNA/A0lfwpen3CbMRUZM3Z0Q2TKOSSTTn6FCaeykTY4iQiVNrR5mfzpXyXQfi\nNE3j4iOyeSOxFOo/KwCjM5LxhHKtX1dVWG6O3SBUA/xO5YcRh/FiDdgsdrxo\nsmLq9CIHkd9CWQftbKdMcYe9Glsci8llGe8wgf7QqUJCuKRuCPLDrBGu901X\noO8/\r\n=fX4h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"274d3ca7227bee74ffff3d46ddf3ae266226bca7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.3201cae47.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.3201cae47.0_1613775575706_0.6880550384859403","host":"s3://npm-registry-packages"}},"11.0.0-canary.f1b1fd5d3.0":{"name":"@material/auto-init","version":"11.0.0-canary.f1b1fd5d3.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f1b1fd5d3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1d9d7c782be2b4d56071a26f7603888f06950b9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f1b1fd5d3.0.tgz","fileCount":14,"integrity":"sha512-dEx82XBjoDoju1DdA4pw98azFivGiPH+LINccYeG5tPlBsxHDsUMRJaqmQ8jw+HalJu55Gln7w1fmcQoQvgBXg==","signatures":[{"sig":"MEUCIQCK56u1ta+gdLZHHRTgHQ7kVHqzSE1nMZnNMsCmRVtk0AIgIp/s4plYymhq6nhB45RKYP2sbDnijqtRtK+VX0nndXo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNAqHCRA9TVsSAnZWagAAfWcP/2klVwWlAuOLdy2yeBtq\njOHg0lEnEt4uAwAuvXxliuhZVv63Hjbs1O+tgzaeWbSTabf1+9HW+dVbQywB\n4KI4knJUsomIN5dxrWWKSJbZj7ZBl3cWrbu9HnXtztk22oQ9EgqMJiSobEE5\n13Lcg2bwrBmi32830/Dv03zGN8nnWNIn3FSI7u+dIy4L70IoiKRwxPTqFVbL\nsa4d0JB+qWlJtRrxMHyVjq0fHzPpGu0qMLnidQpqX1Nlhx77j0B6oyH+m1gC\nfeunjX0ZrPKl9AJ+eMre++J7WA+P7ITIqNfU5jyaxJ6hjBCMfiicCD52NCct\nClXTsV3etBkMo5ry8N7GSgcJSvulAwP1zj3gO9HUzf1OjV3AWdnrd0X33oah\n7aI3BKBPiogsjUZu79/ercovX/TajFOL+Bm5gH3xsiFUOsUAnb+D7J1yCtPs\n8qxGho7xZYvjAAl1zcVPyEcw/5nW00St8YN3qTl2zRyqBrV8rznvXq5p+JYo\nrCbSPG+E9oxiJJbgn7XWlkLa01eCentn4E9JoCjN5XSz9VogxM+a58/AvrPG\ngmDtmQsExYEOluTGca6SWoTIbgXdQoR5MfXOZnn1cqppC6R3B7KbzC9pFzMv\nR36X9c7o8hbEFm7yYL9nr77DcstH/Gw2dj8TiXiRAnoSyQKP7ZnY1QKwiRzz\nOdw1\r\n=kPPf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b73a5cc3b15b450664de92ee70312cc1e8b17304","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f1b1fd5d3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f1b1fd5d3.0_1614023302907_0.030930347216623355","host":"s3://npm-registry-packages"}},"11.0.0-canary.7899e0fe0.0":{"name":"@material/auto-init","version":"11.0.0-canary.7899e0fe0.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.7899e0fe0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d6ceace68607dc4993c8a621cfc1caf35b1df2c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.7899e0fe0.0.tgz","fileCount":14,"integrity":"sha512-77Dru4FU2DR0+kRlhPg8vJ4fkmM+abNX5d1ZMSCrE74odfkkpvZDpl7mU7rh8YHE3LFQEnMcGh6NNFWbMDFIrw==","signatures":[{"sig":"MEUCIBa2gQA3dimITIOYQngosUIRD7AT8MzQCE9TDcB3+TEQAiEAv51oManPvHo0nPpGt3rurzSRRSLZYAATFbCb4w9b69E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNDPiCRA9TVsSAnZWagAAJOcP/2436hH9MuVA8S2WytrO\niTgHhkAuyM8zUA2efGu/MDWVeMeraa4QBNUtLw5cYOeHZ60CrbplCrZXdf8e\naOeXyPNskHf/DVFIeKiK7/UQ1mbbUo4+xw6P/qpReuLh4KpvMs8Fbu0fvxp2\nDhg3L9CEeo04OnpqRlDFtwJ033Yu6biLzXEgd+8NRTE1o3+1SLiPOw+3plOt\n146B10Dyc8F38L4sJpyJyXmDB3NCK5fTtbMQO+HDiq86KWf4P87TNIAJ4vdv\n/01dN7xs0fN1dzhpp4PxIDY4TOXMblXNnuK9DdUpkQX0beLNQ5bSBo5xQ7/Y\nAPLts3+GNk/hHMfhkG2RKW36iFYFPbDgDLlBHRmbLOi4Fagltcr3F/8MD1NX\nwCaGuZxsnFax6nr9L89bO7V0v6Dgf8h5cZRtdlnBAQu6u+u1aC/ylrrj6lAJ\nyGQEHTIqyzdN2J1boJu4688s/duUkegGLDKLOBKVuwnPU1BI4WORsarYt+Y6\nQQuHyzIZmDJb+IDsUKT0Us2vpDSlrYS4nnqgAV2pScLxM1Vqw7jNDQuO71K6\nfkmyieT0oYhMoOL94pacu0W8SnMGgl4SQlETBOphnq4VcUWAvz+wA3Bu0hTm\nRRcjvdTuySe7PmPBR5yXWn7srXqFjvI1W9eMON8061F3GHkfojQ5LF8lPtCX\nsWM3\r\n=PX0O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"73b260d2233a31311cff76e4c10438913b91c2ea","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.7899e0fe0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.7899e0fe0.0_1614033889902_0.7623211864716881","host":"s3://npm-registry-packages"}},"11.0.0-canary.f19c86d13.0":{"name":"@material/auto-init","version":"11.0.0-canary.f19c86d13.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f19c86d13.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8412f47e9d9d966c81068dddec7ad82b1f532d65","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f19c86d13.0.tgz","fileCount":14,"integrity":"sha512-Ksv9vwWIePRaofYsw10tnUgnausUfvbvdE9Ipe1qpmDCfxlhiMSWmQE708jpEje403gS/iud4NKkvcYrR1KbyA==","signatures":[{"sig":"MEUCIQCWGRSkuWPh/cKpWb4CWg9leOx486a9Vacvg4LIPE777QIgRZEI79D7XVITe0jDit7kTJFsVheP++Nu1SmWWSbqGZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgND5gCRA9TVsSAnZWagAA2DoP/A6fgnywY24S5CY2dM5j\nNG29TTbBbD9+ssPXWFhzwcJtl6EuKwxss1XbXnxTsdpc/RRXjP4O/bfKQl1R\nZv3f3uVzRjAV2b1IVUVJzuIW96yQnUiBffS/eUsM+jFw/l3GG8hAjJ8bXnMv\nh3Ihv0/VIG0zBjiWqYJC0vCuE/BSe3rFo1RHpP8X8/XciFwUuyG6jJv7K+Co\nFxYduggytD+bfpSxZ1Umk35ZAKbLRHIhospWd7EbkHL9lIr2HH2uF4A4x1Uu\nplRTIPNJ3ngDII8nSuUkNIh6ITRDzsoRz/nNrTwyOB5192g1gZ2Xa70hHzZ2\n9rtz3ZqPMG3i1hlWl42aTfBqclL7dCUeaoutBtcK3ULjyMlboAOJk7Zf6uOq\njEAF/oHl5JnmQMnnFaDFHfiO2HHgM9FHREQOI6XAYkdrRhX6kjxp8ezahgnX\n9gevRQ+vzp/1TUYtD6hgVlMZ59DmeHVGyl1nNIpV2XGIuFStoNW2oMU/y8/P\nwigRuOnJWxdwQnVxISzTz+2zbwQZtQA8zd2Iwcct/gt7CUzNbZDdPRuc/eS8\n74FxFBIVI6wPoNXSKrW3AlMdBgwExsh4TQCEq9yIY/Dz5/8oNFHX1aweV6n2\n4DqZfg5dlmm1/Az3eV28t+lkhwWQb5X1LrNBvDm9cph1Z+KkkMQ1d0scRVuv\naagk\r\n=zGNN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4b2b851fa6f3895a9e915d4bdc5b6b6715a4260","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f19c86d13.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f19c86d13.0_1614036576301_0.8542465382091238","host":"s3://npm-registry-packages"}},"11.0.0-canary.60e892d79.0":{"name":"@material/auto-init","version":"11.0.0-canary.60e892d79.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.60e892d79.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5aaf66fe02d736726acf4cbce00571c2afc63807","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.60e892d79.0.tgz","fileCount":14,"integrity":"sha512-YG/TWws1xSefEQMj8+e4Lhrhmh5l3xT4CxPKpx/Y8T4RVx1pTEHl2n2ZGAG4Yfk5kQrM14ssiYD5CBkWubVoJA==","signatures":[{"sig":"MEYCIQDCRcEawY0e2rboaiUqil2CCOpu5cW9BD7MwgUyT8nOwQIhAKVX0A71mRIjUZDqAOCUJXCwVkVsEfc5m0mzOndf/m+A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNFaDCRA9TVsSAnZWagAAqowP/jaqgNHBKs7wh5Hp3U0L\nzPp4rTutw58cnlwKeAg5gH0LrzsbglQDZA7YojvH1ApWNFJDepm5Ax6yLMq4\nELNt2zxEfocfra2hyHM5SAgx+zcFS4wh8zi113Ebm+wojzMTBe2eJgigCSdA\nvebixNXlVvDw85mNy08dUrAQdn3NcTempASe3RA9zEh/Fi7VEjZ1k6TQf/u6\njvw1KGaaUMuYtFmVhkGUnIx1vkIykU3q5cu/evID+d59PZQjWvHsNK2Iil8W\n/VL1RuHSIGhpq3eUyhvMxHXeV68GEfifcPJ1P5qST3d9eN5NmgWB80pC+4uC\nws0yjI8HWI1+h5wtzy3iL8InGWroRFgrCRZq79SxqZ/gbc/gTsnSNGNIvgpq\nqQDRsmov2HSX3anfOKn8hPB7Cd8Y8ud5wBhmjy+gYv953k5fPzLs12uw7+6f\niY9R0O81p1wbuSynfLm2iDYPvrSYkDtCl7iN5ZBldPUXK9QWXG8rF3M1oBk4\nR5QdthKA957ZwHj+bnYM9VmdxGk5mUAU8kkxtkDiiVGbdnGNHNb2Bx5XOSoI\nco4InZsuB5NsHYSqEC3NhC/toftFKjCqwRmKy8uqYEcm2cC4FJgu5RDFMbM5\nYLE9DgE9Pl4hOAK0kmplMySpUr3o7w+e8hWJd3QQxqTj7vhnfqIdop5UxAle\nYt1U\r\n=Jjxl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c94f9f392484897a962a9b7101ddc6d70e5df67e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.60e892d79.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.60e892d79.0_1614042754444_0.5142387161670019","host":"s3://npm-registry-packages"}},"11.0.0-canary.c96bfa495.0":{"name":"@material/auto-init","version":"11.0.0-canary.c96bfa495.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.c96bfa495.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"037d9b4d9a94747c1f3b4e7301883ffb864b99e4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.c96bfa495.0.tgz","fileCount":14,"integrity":"sha512-ma20yANltmyR8slIH57Y3h3AMt5TqWi24RIdLrGtwH5Fe/R8v2JjRfamShK7OOZ7tP88mahg70V3KBtbmxOtEw==","signatures":[{"sig":"MEYCIQD0GYuz7iV7wlOw/gKSoTH7q1naZFx7XHPspgbr/Q/sCAIhAOyHiTrkAAK0grzzjMbM6ihdqGLzdcZtCruIOQW2VlIB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNVgiCRA9TVsSAnZWagAA0OIP/jUabLbN0tSjsDkkJRuL\nAcJJcswURy5xdLzPnPJUbWbfQS2VC2i/stheK1eAREONWIjvXdfy/pWuhFVM\nvzuuz+hxdrFE23E1oTboL3zlV3CoJWXfOShBOAlJx6RKr72H/XICkvvGqpHY\n0JrrI3AEMQ3ed723dslS2jpRDKsqwVuT+MKGJkAJJgrb4mKD5rSIKY+0kc+Q\nCRkw4OMT3qDRC49bbnf4XdDZfBQjCVRtqGoTP4GsLirNtt4JXVuPgmnnJZFR\npTe7wroMQTCrLk16h25lnKlqoEyESKsnROCQYTFl3vqK33AUHCPfexWvqRSP\n48VE2KJytObTx1dh+a8U0I/6rA+oJgQCh07r2BPUZEdKBHsI3jcieXSldEmi\nst+g5bGkomb8Np1Rj7yD8fQopIvo7tFXCYrQ2f3oBZbdIf2YknEozTQwCv2r\nHebAOqq9ovtTEqBM1aztq52U36pTkVXwXiC0JZekds3O4LEBRues1npNqJdi\nj9ou8iPhMNl/B3wWjSZCc60C38LB7HHN259Wuse/mkR6beL3DlHwqyRmgBsT\n8x+GgEYMkhpK1A1ST6ppuXXIFfQAmeu7SbyYzXwsA7jBdFAY4zM6Z5rCCW/3\n0HPsQbc5UwXwotrZPspHiABK/KieDqGe9F8TpFVV2TLiKyi0SMCSn+Ly8XDV\n4Tze\r\n=paRt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1fd35f98370bc606c6677b7045a8acf16c0ea7a1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.c96bfa495.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.c96bfa495.0_1614108706064_0.9602538110731029","host":"s3://npm-registry-packages"}},"11.0.0-canary.fa9b59f67.0":{"name":"@material/auto-init","version":"11.0.0-canary.fa9b59f67.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.fa9b59f67.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0a3350921cff702e7b31cdbbcffe492c19d9996","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.fa9b59f67.0.tgz","fileCount":14,"integrity":"sha512-yYI88sSCCHtaV16JASPSG9HdK0DX58O3EXtSdqSegC8DrWNloIaj9OtJ98dRIQ3iHpu3CV8sPiDHmSJdx6KYoQ==","signatures":[{"sig":"MEYCIQDeueXDQWS4kkmnzkOFI2NWMoOMIglFade8TEJFQGIExAIhAJGLdRIzoroXqy70qhh9oTFIq/eeZ+IhgeqPHcx8E2Jm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNVhrCRA9TVsSAnZWagAAxM4P/RLwh+HjYSLIEV93tYfY\nCfxa6J+bUiTidk3m5/dCdpn+1TF5VIoKlfAWhArIY69XpWT7ZODlqd0Db9og\ndZDepj4s+ZRd1QMpn8QbXyj5cklWVaBdWXx7t2WBvVLdryZOpXxfLBS3CtDy\nvm4hl6eiY63ZKsBkbJvA0z8IuJjvZJPqB455H2xDMCoUqmXBP3KMjIQCt8QD\nakUGdk3OltMvankUqzn2IdZNEQZrHp4fqraG0lTeAl2VxWGm/v3ebCiuj+Mi\ni+rInz4AesMG0B6HGxG8uBgLrzULIFxhE5BWai8pmYzvIFFfA/Sjr1KKvZ6F\nQ3vd9KzVgHfA8Vs/ilugwo430UZ5ben+BgtWBuEZvLUO8bEkL9uSGTjc+jWT\nqrPxVr9Jp4ipzDRhl5wZs2JBPUy2IgXXLWXT5KxS2xbaoWjmNf1L2Dz+D/+z\nkpm28DikcNawNqZvZgLD2LW1K11pifqhdNJcCQNYED0DzCiAG3o9ajjEhbPu\nrkkxzqIVvdpTj/4czhf5hp/RWt2SZX69x72ikT2V+y08x97iwqoDlpS6drKh\nb9nATTjBOqI3z60sz/xTC9jf5b80p2puxqyoXcyibNZJ+ITcxed4Uf7L3IFw\nWfg1os24G0bnlxPcGfq4/hQiIJiYTTBfHyQ3MDRIVlua3Y4S+2gsuPufgySv\nea5+\r\n=Pmxd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5fd97ca8b5906f3b3097bd333237976e3e93d192","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.fa9b59f67.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.fa9b59f67.0_1614108779415_0.1994315589482638","host":"s3://npm-registry-packages"}},"11.0.0-canary.869e3497c.0":{"name":"@material/auto-init","version":"11.0.0-canary.869e3497c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.869e3497c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f7c766555b8b7e6ab4026c7dc95e4fb33f863b33","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.869e3497c.0.tgz","fileCount":14,"integrity":"sha512-BwWklb+ptj/Lm4IdfIXSDYSRCmbfWv0xkrI1C5ZZadwlrMXEc+tno9MSNeP10cPMphf5ZSki0KxWFzPxzV9ksw==","signatures":[{"sig":"MEUCIQD8z972OGDamihfXPafJNOXgh74EM5nWIfrGAL8v6heIQIgGhiw6P6hrydQWlYpCwvFB+fItZ9wRAKTEdyap4vDAS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNViSCRA9TVsSAnZWagAAVQ4QAJV8tV+rlScpOJxdVFi2\njMaxJ6IaRo+2hkIZZMZ5mrEhK77MKeg23tFxwJr4RH8L+qAH0XZsxEXyKX7d\n6QohaKrW5zxJCvejgI+YWOns+NEUHy+TrX7LQvLDVR1eI+DVTfGTA1Uht73I\nM0t71YBtpLyYFaxoB3gBpVKgpYYIDvZGRK5gUc0tT9RLOIuHfgvqzGVZYHgW\n0qtigEjX/+knsOCtbIRnZwnNZK4mZyxAl/O0VAs1xwjcRO5FKA27S3hqJyu2\ngIK7sXCXRvJhoZeNmPnEbX6lzj4+ZJ6Dnj1+CcjV3/9a+5d2IJwIGxrBTdv3\nxSeIQ0oZHlDWGwX1mKafItsmeHar+uIsKQMr3Y7rHJr1tWnl3FHzMNh64RWO\nXYINULLLbuXbDXx0EtRaI9Pe4nMJ6g/28Gz7JrVecHlZ9gwtMrpJewgSQfj7\nMFEnZU/81yAxeNu+z1JKTrojHQilgfLZ1LCyF4cIGQ9c+l0/vkWq7+RLeZKp\nRCbUIvcWC07Mk865zCWevZQfZkAXF31eJvQ3tjoZjcs6fvC8dgR51NRn7N2E\niyJgpf+5UOG6FLvlgCmRdBKx+pNbPW9c+DbxjKl17muSebzp/n5DLZ7T8Svk\nZ5SpK7BUsdV5t9/dmMbeJoMHEB55DAdKC9M5O6jSNX9Cfm28L5Cjf0IrBH7n\nBgPX\r\n=kGcG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e1e116734dbd0e962ee4e11a9952ba9ee6684da","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.869e3497c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.869e3497c.0_1614108817372_0.48034921494692173","host":"s3://npm-registry-packages"}},"11.0.0-canary.8ecd7c9a9.0":{"name":"@material/auto-init","version":"11.0.0-canary.8ecd7c9a9.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.8ecd7c9a9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8cbf41e17f5f8519fc2e8e71d2c0a6497b977163","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.8ecd7c9a9.0.tgz","fileCount":14,"integrity":"sha512-OPVAaym1Jjz9P0aIqdKrSHQJf+8u+w4QKt4BRAzjyFYZ3g2F9XDTN7NknvsQuOOj85AtzKQCg+K3hQJ9ID4Lcw==","signatures":[{"sig":"MEUCIQCSzeBmAHqhqXTlDLnKzLBe3fyq0X5/n2XaB5+VT985JwIgBdWNkNdAGQY4eBmQ40e9hEWeh1qke4EL/q9pxaXUfBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNVxQCRA9TVsSAnZWagAAM5IP/iFSJjRsoMzXll2PwS+l\njBro1dOIh92Aji46L6ptezF1j+vpikXKqTYk1gMT+wVU0lJnl/vLnW/omV39\nVgZhPoSc71EqBzWqUjH6z9j1YbOrLVMQc7Wjnm8EV5iAPiw3DoRgc2sdk983\nE2NIQKQA5r7uSoqAHEtSEF/73vhMVkp9IaqhkZKu/PuLJ2Bt5ggOgJM0B9VG\nz4rV1+S6hSjbO905SOoIXumshDaI76wgHg7jXFFolER9h+pjMOMu9gOUocHX\ngwRRU0+hJmQCrNmfLCg4kijV18o9zqjxrmegjlAT0q8rYo3MC1pFr4JgpeX3\nm34kRfsHdCnUL/8dQ8pgXqjQOuSaDF6CwZanx7nRWAaqJgCxzE7asF8+v+nZ\nd9cXGxTDvxMZRKxruP02KJ6hxJsIY6NtlmbCu5QqMsKdAYaBaZnhONLGysIu\nbESIKV5ibQux67C/G7kUKD712oIIqAv8bjp3asY19NOodW6dZA8wL1BNljXY\nh+VwmYoMTcQdgoA8lXQZ3C8q1wWeJUbYlb7jh+qhUXwiFy7r1v2QRc3yTI2g\nk/AIvTaGA0019mgLuP7nkubwXsSD6cXBMA08WJWgPOkQ7yNggZBSuacVYGyq\nOnY/6MDVbmthcd/rQlEpKSxBRF45b4Z6aaXpgYbc4+zmGeAJJusphSu9WTBf\nqSin\r\n=iP+p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ec70d22f543f79f769bc5b509c9dc06cb8114af1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.8ecd7c9a9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.8ecd7c9a9.0_1614109776391_0.28720729321069993","host":"s3://npm-registry-packages"}},"11.0.0-canary.9c85d505b.0":{"name":"@material/auto-init","version":"11.0.0-canary.9c85d505b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.9c85d505b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ffb18ce137ead5206b443af199e622730e467660","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.9c85d505b.0.tgz","fileCount":14,"integrity":"sha512-155ygFPOhLpDd5onnQJUv3Y/Y5iavKHof3XJQds0wAMnRFMYEU4vxjoipftaZdACRCyPb5FzzSPpg33sXjkKfA==","signatures":[{"sig":"MEUCIQCvH7MDBAiO0hhustNTRO+kEqzgici9JsW2VJ4ybXosAAIgGYrYZR/HvqPhxfdnXP5na6oZahot5aITPF7PN8/sMKQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNX5GCRA9TVsSAnZWagAAU4MP/3U9iEkuSH5YUdIm0F4l\n5BmPIKxhpPH3Y8IlpJeMMhSj+GrCNBHabe6G8P8iVJ3QvAgnnW0oFsMnZ46a\ngP9nK9iZrEfcCesuRNpPus1TEQ1jJJIYXzVNGHtyxf9N+fwtCueiMf3YvcKc\n24oAhqGuo9zPOBl5BaiOGGR6uelA93u1GiOkVWaxG2PO4vybIXIsnK3qanQK\nj5OP8rbFW5qYAth6xYk52OFHSHO16uLVPSBExHmcOLfZrWBIMLqm7Plxppm6\nyqbYjenfbtYJVYhCQDtftbubbFJ2cvP1R2eUbeLRBejQ9SH/WzxQwYKigO6G\nxBAVb30C6g7isG/+gXPocWBFYPiLieQAOmTpgKemnJZF66WwWWoUmZ8NqeQ6\nnQ0UeVZ1oumbK6ScT219/++kWxLjd3NanpriknhFq4uyjH0ADY/936XC3V5l\nfTa3EunX/L+gFpnFPBycaEEO9r3bl+u7MpmQKSEO/8PcuWmNEaIaadiLF5CT\nzeDfwpHurNnzWq9X1DthXyhWHjJFKFb4AdxeGCM4XkD35RDJ1hkS5iL9CeXh\nDZ0WCo/JOc6euxG+t9um6FY8SJIHsVOJ7PtyhLi2LPNBBtomeQftHS7o8ehe\nvOHpBNRIAQtlToe6J2l/d41Pxi9z0J+Wb1hAkekAvPqs/a2dJp/ztPcNg0SX\nwarl\r\n=pudQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"374562c85250daef48b37a0e27a506a7e81c56d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.9c85d505b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.9c85d505b.0_1614118469733_0.8363776993616976","host":"s3://npm-registry-packages"}},"11.0.0-canary.9f2e85fb8.0":{"name":"@material/auto-init","version":"11.0.0-canary.9f2e85fb8.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.9f2e85fb8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6761de54e49ac362391c41624c9dde42198cd473","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.9f2e85fb8.0.tgz","fileCount":14,"integrity":"sha512-pKAtWCS6J34aYRZPAIz1l7Lhctidiskg9b+QMgTQlTuQzzxrgtKUMs1PoiAqMAyBmtjBdwZfp6vTGJR+lMdDEQ==","signatures":[{"sig":"MEQCIBaiaGlYn+LMwYZ4G3i2DZI5rtnsWVRzuK+XXU8qesZ1AiB1BmHtb0r7vGV+2ucnsm8MFUWIThY/9SX8NiS24nl18g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNa/9CRA9TVsSAnZWagAAPM8P/iyDwahShrcynEnVzXyJ\n8tC2/6v4hQzydV0BlG8LMQojtCsrtJ+5xoj+eX1rvTVHi2B9prSb0wHvX0lE\nH7UZSOUr39kaUq6vRkSijxpGTW69pNvgCpX2z44C3nQZSGzXfTkefOpVysPJ\nGXIDvVObpW45u8ujccVgBhVdvLhYgties5eBxxlFVebNNY3ZwMn5U5U3M4Oh\nmE82aLmigfL/btoX3h97cGFHnTidqFjz+vbk1gkormELMS7AzWmBI9NFS9mV\n0gKt+E1lEQ+SmFb2hiR347V+r+myg9mgpXcQscviyHi8VMDyuXdbzdXqIvv8\nFLXxIi2HlbUKfQHawVSCnEAPXa6oNBB5FLJrI2mCeT+B3gYzXMiCcJ4ZlZSl\nq9W8aFuddte4MCjL9dhhtNby76rme5jWDrGJ9e7w1dZtBbXdjPVKxCpu2E86\n9esFmfOTpFATyufODKltwiruoYTktESWbPfqnqlJzktRtpuoAL9XpyRmI3Cv\n+0VCOYsr8yf82dOE/gNbwJCGhllDVvFl/mo15xP3nyYBxigWA695sv/Zl5uu\nEVydbHwLaJpTuaVmVQ0hKos4stZQCdxGDHy+rbHRxki6TOsLCiH0FHpFN2aF\nnbI88AjpFNBMEt3+jES3mkaMZXyVfR51GnklRlnBcfuHHCGUaJO7OWOAguE/\nsGRy\r\n=10yq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4dfe4e49ca9339b2914b3dfd9e5c12642a0fd60e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.9f2e85fb8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.9f2e85fb8.0_1614131197195_0.9452904006035596","host":"s3://npm-registry-packages"}},"11.0.0-canary.19c4f29ef.0":{"name":"@material/auto-init","version":"11.0.0-canary.19c4f29ef.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.19c4f29ef.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba3950e2d396b7e184a4084a1be7c0de64ee5769","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.19c4f29ef.0.tgz","fileCount":14,"integrity":"sha512-3WIjR3Ei7wJQhO12+Nsyjcg1TqADJfzW+Q9Ckzry0bIznnmr6eI1f08XZGqVKRW0NUyQSwXqWVw5dIN3IrEMnA==","signatures":[{"sig":"MEQCIFSHAVV6uTWZReUer+FrRhO8oNOhe/9bjahcrtyyniEyAiBp1Hhk5eHCf2FDDNk8nlv9V9bepeak93aW9zXtfgnqtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN/ivCRA9TVsSAnZWagAA5FwP/1YrEZBMiWHuabW9DMDl\nPCLds0RY6T27Ntevx6uA1pVxqFNGSjF5C3OvRcx4DtR04aqaxpcXXH498Nc+\n3mm/0x+dcFALKbq+8ss4OBuc8tmXM/EYNpITLJKmjGMTMdcyi1JAlWgDr0N/\nbmBi2yUfWZUUhjbl4zFjeEIWTD6qVNaSgwshTJhg4hmetL6zp21tupQhCvSE\nPKeML1Rsiofjhj2tqqeiiyJN3zye33lO4OOLjMl4K9H9p+Bx+a9jPy9V1ABK\nTitCuh52t7hB2mFZboR1pN0HBr1v+A0nCZSpBcyONhb/g1q/14RHLRvUh9kY\nBBdTJC/zqru1rCoPHskss+yC4VC//fEnIiWBG8kkBwJutsbTTiCpUkXUGA/U\ne4KrFNdN3KjbpeJKHDzjPYCJGH3kwPUjSCJH8LWrysvo1K1kHiuUoj989wKv\nFH2coi3Uum7r/lrn+I4XFLToQM5tMIh2XNVL4Q9Tr6Q3VpCywo9XPhjlUYVV\nWRZ4oMV8DBEICj1PGHoNG+h2RM9JtFfeWr1L4LanIuXc034sxk3KBI706nVI\nDFLuI30/MdXLHiED58YRBO5SvglxdaNNmEO5AFPqaToDkBCRWVXTDxdSzXEg\nDExkj92ztAiVovTvhJUQfRlYuKTKQS3Sdax+60PXCzMKyCHu3e8ARfHDtEmM\n/lzL\r\n=uTnW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cf61b54810b37e81ab57d447f7d050104a2f6f46","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.19c4f29ef.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.19c4f29ef.0_1614280879160_0.7632092515010096","host":"s3://npm-registry-packages"}},"11.0.0-canary.63df6e9bf.0":{"name":"@material/auto-init","version":"11.0.0-canary.63df6e9bf.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.63df6e9bf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"01b7b8a26570c1a7626a10bfefca2e21277b36d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.63df6e9bf.0.tgz","fileCount":14,"integrity":"sha512-lEdoky+MWxXH3UMbfcgEn435+GS3ygtrjelKRzx6B3cNG2AZsquaL8Czbx6iTRCZ68hg+ZsNDwNMBt+IrRg1uA==","signatures":[{"sig":"MEUCIQDbhLhQeK00usOXJaBd9phyBwtwIsycQyhmWt0rVof4LAIgIhrgdvPjtYBOZEp8+wUzYQTDFHTWAJwh9uHd/ON9+vM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN/wrCRA9TVsSAnZWagAA+/oQAICro7/6P4ciGd3LyjGC\nehSeV6N+Q5PwqnBAqPcLz85rtAcApNA4uWxYyWZjSD2FdIlRUW/CCA4o/z0i\nAWwuLV/8kRC7JeHsz22P7n8ueaS5MHP09Xmfr0RPEff/TwHURjTBCdrqC93o\n+kfn+qzS8LzjMgrwRDJyar//T+h41nEaZaOoFt21hLwinaVrty+CuYim6P35\n8Z0Im9bXaxZ7FF+kCZ/vyHjkyqqYXu1f2hbbQWlSfmrKvWexl1BRXKymR12A\n3POY+OkLti7FN5kIff15GZAvayaauGjMwSk04mJPCTV0YPTp036/HSMTEst0\nQIu25qdYFacIJe2MhNDhAdcvwvRvLa+6+0y0RI8353VnrdYac5TGn4Mkx+dM\nykiReEXhZub9N41qr8fUrThzSS7yDID72/QOC84pGyi7eA+UsCZNEoLUYEH+\n9saVm3DXWQQh2L5JUDKLRK4NcUPU3FIahqNGLtzOxhLF8vZLHGCErC9Vrjbn\nmh31dJOCh+KYA49ro8B0cpcNKyy7PsZgT3R3Gct2z5QxOyTGb1pliDdERRzx\n1YoOd+nx9gdsz34qw74IQyCO3nrr5pcJCUoShwuLmQ28rTJ1Wk9qcrfTxeSX\nXZyLCROhxvoM3mMaTvhpCXDEw9ONRgwPksyZsIvJmYEPE2nOxWM+bus+dnrN\nOkO1\r\n=evMY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6d11b414d4ea43b5c780988e2437ee30c9f1c0b3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.63df6e9bf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.63df6e9bf.0_1614281770593_0.8561640599152354","host":"s3://npm-registry-packages"}},"11.0.0-canary.981ad970a.0":{"name":"@material/auto-init","version":"11.0.0-canary.981ad970a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.981ad970a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"131f977b54edbb0e515eaf00e89ab34fd75ac3ee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.981ad970a.0.tgz","fileCount":14,"integrity":"sha512-rHaedNUxWie0pWBzugUeHK8x2xS7M8j4W2dyGkATju3IOLjnZme5A0iLSxD/ROdscQogkMnYhRLxGriKyhzc0w==","signatures":[{"sig":"MEUCICKHkLF5Brepr5AOivNhk1Hyg2n05THGlAlob6xPKuthAiEAtPN4yhy0l0DJg7ozssQdATm7Twx15rbHDO+wX8/bBi8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgODt6CRA9TVsSAnZWagAAFDwQAIVgOc4gFbnXYiAPZpeQ\nNWYOSKB/5NoKnOwq2Z7EEVlCwXdZyLfnhF53xFgOcOXPmg5A2unVlBdraVVO\nU7EL+OV4rupi2VJa84EmJygn+sVI0JiHt1GPSrfhQMOcczT7/Dy3gDPQF9as\nlOBl1vohrwP8AekjvHIdzirR3Yme2f0oW1MECoUxFi6l+tezc8q9nYXQIGRj\ncrKweyMmFIIGusSIMJoIo/cZtkavzwzydIUHNqb1xx7mtCcMw7tW0wHVxTaE\nsAhYDQmfV9iXXbTOxNcqe/H9Bs80jAmDTf0/nrfzY3r7wiXAqHkqu0Uajana\nZgiUmA+HFVNysuIBn/KTbmRSWqQjAWqNa+w1YazX5ZKM0TKjllHCzofPUUlN\newXcoO1zk+udnKGc6vWzNZG9mKe4xpqwgIkYHV5Qx10VJGusD+D6X7fcF4zm\nwP/hXfPl6k20S0YshwofXgK2ohRQjyO/SsY81HrXXvdOR57GLWhC6TDBbUGP\nXuoMi6jVbKbgsvLWJ7b5bdoj0MqGuKjfAj0UA/JQI77bf+CWTZHr0INb9uN0\ne1X0hJ6JHFEVvs8QDBagseZjd17DSRLhKRchpl5aVlol/Dy8aEM5nOhRVfup\nY+VJOj0lY5obMuXRPL8kKoM4HAA2uA3mhFBhmWTYFZ6zBXgYqwrU7t3/U/AI\nuhLP\r\n=Ea+i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0faf6e6b78f0c9b2c63f416ae85331d13aea198e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.981ad970a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.981ad970a.0_1614297976827_0.989118616644848","host":"s3://npm-registry-packages"}},"11.0.0-canary.f9c9e39d6.0":{"name":"@material/auto-init","version":"11.0.0-canary.f9c9e39d6.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f9c9e39d6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9471e928d8a586a2e230e04140864044d1c241ee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f9c9e39d6.0.tgz","fileCount":14,"integrity":"sha512-wm0Am3b7Zr53+M/0rRdG7kXUf4FQquW8VAGgh+jOo7UF7DMDiXUxzzNp83wozOXYc/TKNjNTz6wrU+YM2ED8TA==","signatures":[{"sig":"MEUCICsx0UqJfBaz0t3wV49tkEh/rYvdau0ta185fYDLqBAYAiEAmToVTI4iim/AitB7AsNx81THmDVaP1COH4OPh/FNdGM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOT/9CRA9TVsSAnZWagAAvygP/jzA9yCgq5QNPeZ3qKAA\nIzMd3+DS3qX10JS6Y4GO6XmvSWPQFcQApLlBNbSIqm92yhsRTLROkmJd851S\n+gOiSPx1RXXt8PevQjDL5qswUW9+kmIsTabINF5QAxfylUWBqZdfVOvOvi4K\ngknX+o6OtvdMFrvdQ7EjTrxKIxDLiHjG7OwmwiWrg2ydg8FICKT7vCvg2wPG\nQ7davMwxgkF14AcxaFE6mR/QjjRH3Bz1MapTHsLlrTvJ41oByelY4pODT13W\nZcyd4UfxBQ/LBaI90YboabmUu2sUpFFJXftHISbqG6Gx66Lc1+ot1oOVKaJq\nIXkNhAfDILpK6ALNch/gJWw0IlV/MuK1ptyuj4H5aeJNf/BvS3u7TPcPA6g8\nUwtfVzJZFt3F9eBXP+cI1nyuZVj/KObR/sUoSNO9ahY7QBri0sceSxTYT6s4\n5UwfoofLIKdeNxxUX4A6VFyupdGb4xKnQzHDefiJUVe95TyTWXoUJ3wxPh4Z\n4q4Rkd1SyfFzmFPRkYOwa2dRa78rGMDC43XXSbvzRFBaeyaVaGmlL68aAo0t\nI6W+NlXJEEJ9x80MiJSLhedQum68PW1mSc4Z5jLoGVickfQzqqTzod+KoIw8\nefRcrSMbOeEQmHcT0DOafGkYzH/X4PGUQ/GhFBQF8hyr1EIQps9nK2iRhm8r\naqGu\r\n=oJA7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"81d489ae3f1defd63ee64de05a2a330040ae6406","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.f9c9e39d6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f9c9e39d6.0_1614364669428_0.4737480815369335","host":"s3://npm-registry-packages"}},"11.0.0-canary.c97d7d881.0":{"name":"@material/auto-init","version":"11.0.0-canary.c97d7d881.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.c97d7d881.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8376e35592853677d0982250e947b9e576c6a580","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.c97d7d881.0.tgz","fileCount":14,"integrity":"sha512-c28NOvHxNtze9lsbSqzo5StBRcIq+5eG1S5MQIde0HH18IwocmPg0ZCb9DvPkq2ZqdlpVj0xXNl98C4K8+CHiQ==","signatures":[{"sig":"MEQCIBFD8Qs4tPhoJSq876PROvdziv2QAqd1L7JZrya2qn3dAiB1ygJ0ALiouUY59DJW1qn0h9xIYLv8LAcbgyAC+vwJpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPVP5CRA9TVsSAnZWagAA2yEP/1AWcgsUFRT2vi0JvMfy\nOoh0QN2VeTf/j2ScjIQTpOVT6yULbsv0PVZAT1MhFY4defXWYZapmUCH3eoX\n1x94HMPgBPPcuWruayV19h+Xs3DyWHgeIGPhQc1F3h04muuGVVc1ft5/2LK6\na+KK2/3j6bQyRnMVY7hxr0jMuimv9c2el6eFgW+UnMl3Y7jyaQfW9HNinPlo\nDKyNpp2NH7aQS1DgZnm7S8Aw4F6UO4ykC2oyGTGeuUJ67aeQ09C1js08YqLY\nhOKSJNaOqlBlXGEvtvaqYKnz5k9S4SZhMASKGhGk1zUeMsc4xXfi/u0A7KD9\nRIuFTD8HsgnsfJUhTTKfjECeFdslZNOypJM82lKiiPaWQ9wtMNIZhA5Ci37p\nEZ8A8WB2zcIbwDYo8WPxStI5ePKqaY84SiaOPQKJVE7lKyzfDtKXOTEfVSly\nBq6odIKmooDxIhOk2GUh5FIjFeyKDZFus26QDAZ3Td6sdmQBPJPYTw3H9tfp\n5Pq2yXwu+ilysKu6CKsecue3ZAIHN0VdrLrCkiwEwCkR6uKeaqQi+DokmSg7\nREBd3dsJd/50xPwOC+nLRSc1JfSija9MLPWlUd3nOmuHBwB79tTN0BO0aDxN\njqN50ho65wueiluI5i8CER/GfKSc64eDYaWddmSRe6uoCsT7rxvtBPQe0aHN\no0OU\r\n=8zD4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"27a49055320511cea9f431f9c62d44a6490bb64a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.c97d7d881.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.c97d7d881.0_1614631929472_0.6924174574639264","host":"s3://npm-registry-packages"}},"11.0.0-canary.bf670dad7.0":{"name":"@material/auto-init","version":"11.0.0-canary.bf670dad7.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.bf670dad7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3158a6c4bf05f2e1e1b47e5d2f6ecd6d5864e67f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.bf670dad7.0.tgz","fileCount":14,"integrity":"sha512-UvW1+F5NCU/ZOII4+y9VrRoM7zXMtBQ/r6z7U7u0ofr/10zIjhg07kvgMRUAB9bsJc+/+BfA0nB/wTb4UcTlxQ==","signatures":[{"sig":"MEUCIF3laM+dNUlsdhmOjp3rbY797RH7moWWmJFKL9cw0bi7AiEA3Din3h9e3+3vc6PKLUi5Qk5c/I/9d/cIdXyGhr0uDBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPtYnCRA9TVsSAnZWagAAh20P+wQfpsfHwL+fvSNvFUT8\nFiIGYAb8wbckNTt6o2c/yk3Vf27pD+ZNbw20qyft6hAAdYcd/tdHNa6lxk1K\nYcdcj6l2SgrVoX7Fxc5r2z5Yky+szeFR3dxruAWgrfAcK3JbZy6S0+MyATrU\nZQQsVHcDpdbMPIeL5hR47pbhAiVCF9HfXAUjCxW+y/uddK7nkEAdBRsfhTEc\n1JUEK9rsg2AVGYTP0nfKp+UxdHN7dkloqQKjdjppl3bQeudAQq4x1eE1gXHy\n+uoRzfg+A7+DUGx1aXMI7cs74cye+o28QMB2+M9QhhkBg+ZhlVSLY3xF2Dvi\nGoAbKWPzQZl7dL+QjAu+/09pOcJAjZeTbwZdEwOW07Q5PpR/sJSuQAoQlBBc\nMKZQpdSscgskOLiPd/B1YsUUOzkAE2rBsuO690H3o3MEjqHAkmwZj//lqOdM\nah/lPINCE4DEjmbOFAxdaZmWR0EWxKLm0ZuuVeMVlSUlEvw1kbKrV/sykNzj\nixye3mL30C317XdWBwzLEA5RTAmOCD4oFhJBXm23p3mTjLFu95Yu/H5nEMls\naSxH+9hMvVvDQPhbu5x9vbpHyc7SaJmVrNVgAHYETOn1JmfF6u3OUPtSTuV+\nnzvNLqhNKxjzXEPL5sobl0Q03hCwxRmfa18V7grsR9Qje2znZLk1/9qbA/ru\nMtpF\r\n=vWzq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61b03e5331bd5c886de5c4a57a4edc1b53878e47","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.bf670dad7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.bf670dad7.0_1614730791067_0.7948175636269112","host":"s3://npm-registry-packages"}},"11.0.0-canary.c7d98fcde.0":{"name":"@material/auto-init","version":"11.0.0-canary.c7d98fcde.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.c7d98fcde.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"58cf4bc1249144fa97f9d23460cb8aeed71eee1d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.c7d98fcde.0.tgz","fileCount":14,"integrity":"sha512-vpqwSzA8fdoqMRCcIScKNWpyAzUbdDbzt1KQdhYPnh82wFiBqiikWnEl1ZD5XR4N0OSgRa+TRhMRtD7vTxAzWA==","signatures":[{"sig":"MEYCIQDDVbxAG338BWxBibzSvcJyov87H2Puob2TcbC7jkxGJgIhAJAOpDXgGLbZm/NWAjY7uxRTw/o7uGS1iRX8C8tB+RxN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP/HuCRA9TVsSAnZWagAAV7EP/0Tn1je3dCOiulJKijZI\nKSu2XfwNPv1UX4S64BjM5uGrzDrDzlnPVSWnyYCJpRdJMjJsH0sr1IrHNiJu\n5ArZicph/oI3GAKc4zmMDySExBaRx04735yWn3IGorPayCv74e/K3EOMtUph\n03sU8yv3qcjTlt8B27pcZhLLRgRXfwByrpc8y7zztRghJ/Z33XB2u11xZeCO\ndAjy0EuzytNzxA1HGOu8tCmg8Ln9J8qFFeLKszpcM8DSS2Zw5LcSJp0jOKb8\nGNJFbNjqauwBH9EX1zH7AZoUZFf9zizpmiYlzGxTkDsNkCIS6lub4crkQREa\ngXDFotoLveSvzW9YtjijlIVSEBOvph0M8aybXeEPEBo5/kNYfr1Nvg4O0d1t\nA2Bca2BI8gNxmI3CJpnlkpfya4P99viqoV/Rg7pFwBF7F5ElL+2qnhQ9pzvC\nj0M1qfTU8TgVEjaWMI1WLSCL8Oith9LHJnl6ybtU8o0b+gSski8W/h8A+xh3\n4Qz9RHJ1KWxV/62ejH6IRFcAmzUJ563f/YF9dw1RIBUDkFYtvu7GC8EcD9Jp\n1LHlkVnLD4JhIjqx3L9Q9z9F8wckh0kToKIY83SZEIge9RaZjy0q1rUtGzxZ\nIuALxLT85Ph9B2OuCe8nSj09B5za9qtRAPeD30F5NvUxd5zhpJbYtFnYaqkc\nvL4t\r\n=CIE5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c5c4c5b417df34d141edcb1fd743d83d7a2b49cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^1.9.3","@material/base":"11.0.0-canary.c7d98fcde.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.c7d98fcde.0_1614803437576_0.6293398918476507","host":"s3://npm-registry-packages"}},"11.0.0-canary.4fef8bc1e.0":{"name":"@material/auto-init","version":"11.0.0-canary.4fef8bc1e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.4fef8bc1e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba52f7d9ed04494166921805e42f42e9073a242b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.4fef8bc1e.0.tgz","fileCount":14,"integrity":"sha512-a7bX7UCCVOfjUk48PfIN6LZ31Yd7g+oWwtWCwiQ+Ua9cNQp34Ob9sxCy81BW59KGDVsJDNOUthSR52n4fborXg==","signatures":[{"sig":"MEUCIQDp6p6sApX6DAAfj1QWrxrmJhvdcANR3/7veufcOHPXOQIgNa+p3hhwmUIKZOyUQBdEzrlPH2fKpqglDZG0JTkgP4c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQBpdCRA9TVsSAnZWagAA9U8P/i7AU2b/IucxkF1BK2k/\n3PWyw7oNiedZzpwfB0YnbnqYpUdEhiWe9Sd3iSBf6IF0k2FP+F1eHhdAjTo/\ntocmAgz8zeq7ose6kGZB3wOyJiMqOtOVxkd3+zuho6J3oUDFq5zdCT2Avi7q\nbFXgYeN7Dwm0+vj3UNlJ8VMzGdOnp8UVAru2Y7tVR9uKeMi6WJwsAqVPzZqp\nvZKbokbTi+IaBRy1HI0EpWNc2IX6VtEgKpgVObI3qi2X9G8KyKoXF9gO9Ppk\nbgJq1CVC1uOPSlrHy8No/e+Qxe0atVeRI+6fM8SjG8TYgCiBew47CQW5cj6C\nYNXtBBjQogkbXzUZrqEkVewpLboZodVQurn3bQRDbcU9wIHLtLiMZ6TtMhdQ\n1nEYrMSwWIStuOgmW6vkLCainrZ8jUAkM08d4BClaiOYCAHVs5oQQ4ysrb6C\n4DYluAXXkTqxFr6ETl5MBMoWWXLSBNkbR9W/LiLuIZOTAgw7N8XZd3DLH4hR\nrzgyRGMlmDG1eMM8gYN8tp9PeoznfyJlPAY4DiptNh8PAejkPY39+MDbuyec\nZGGbGh6uF9kMwByel24SjRV89UxLTTXXReD16BV8dZDuG/bhQHnZhdOA2FXf\nDCpbc7s6E5nE6D4RMxzZDT1GVfS9M6QIK8t2dd9PqkaIc3mPfL0kY8jCtdkO\nHXoc\r\n=fFhs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"933905005f9c16276caed5327bc6ca581afabb6f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.4fef8bc1e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.4fef8bc1e.0_1614813788604_0.7951024977284427","host":"s3://npm-registry-packages"}},"11.0.0-canary.afae3a3ec.0":{"name":"@material/auto-init","version":"11.0.0-canary.afae3a3ec.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.afae3a3ec.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8f47c018d131213c85fffe2bd142bfb2c63481a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.afae3a3ec.0.tgz","fileCount":14,"integrity":"sha512-XqU+Q5mgiFp34M45LPAkl9HfxSXOQoEt8WeDodZckHzXVOzxHQFhlGqMjA7hWSeLCKtT7n7S1EgWwnGZBLdTrQ==","signatures":[{"sig":"MEUCIG7Ad9urYD8SQUTxJPnikKDiUBiSpWRScmboPRP2hkv0AiEA6nn2vOtOjPQRWG69oPtYSFgI+tmjuwyPZzCkUaz+JfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQB6fCRA9TVsSAnZWagAA2y0P/3XmsOwneOWGo3+7mEQr\nvjfm4/c7VSYJu1LRhj2qZJvJ2F2EjNXbXjSuAzp2KpOQ27f8JaBnZYuKF8B7\nwGStPy18ELSDP61LvtSN3octwIlcAV8HR1x9v7uiDtyS72fKhzQagzIJoSPA\nYr/BwURO7u7yIG+EDw8XXGT1F0/ac8rNAXqF/S9nVuetTaJ8vycEHd6lPCbT\ndQcq4fAEtkrq6GmlNlKVubGix7/ztN1n5GE4wt6dWrbUl32LRmEvaQSXHFpv\nNK7x+gCfPbImOMNx4nuHM6V4jUMhhCKpd4aYYlkGP6Rb5T1iygYcRqDC+LC+\nOecl22owLXW375b+4/uq8VjVyH5CoWqy2H7KLwk/raRoydEfL2dgMFagNq+5\nmEn+UQ0FbPalq87Cdxw5YRuwOSbe3AzabLlM/ZesMqtSzOkMuuzajk++wJyg\n5MEZPXoo8A0E4tXAVkIMaV1DmLzcLUWaGyCuJSCmUx4uTivD2WMp+Fy+l66i\nksa6+quL8tZTiQV51r1g1LV1fgUesmzTgmx/69hsb8bNmatjAI3/wZweehLg\nM7sB/tEBoRVYtaCdtz5inLNKBPapPsecTXNJPoBrwMY3wzk9bPqoTh5QOU8t\npzYN0pMZryZEvx+qMv4ZDAuwpqGxF6nQxYU+lL3t8hYLUIBbx/DLQkK1+kRU\nobIb\r\n=SNk3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"054b07cc588568c82346f2cab8aa8948b77a80d9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.afae3a3ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.afae3a3ec.0_1614814879482_0.1213519485109078","host":"s3://npm-registry-packages"}},"11.0.0-canary.0a0b10f22.0":{"name":"@material/auto-init","version":"11.0.0-canary.0a0b10f22.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0a0b10f22.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05d41fd1a148728ce75111fb97da86a23358e1bb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0a0b10f22.0.tgz","fileCount":14,"integrity":"sha512-mcttlohdnyesLYqMuK9wjyacczRgV/H65BASnJetwd/t4D5FqjkkHvWkPePkvzkRunWJE7lYUIox/MiWWXN5pQ==","signatures":[{"sig":"MEYCIQCDYlQKbHT1joDmwkK9JuFaivmlH7/i0HhhdHxYuFa4/AIhAL9xOpl5lViVodFcOgmpinuvoc7l64ZLurqbbUVQSKTK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQCLrCRA9TVsSAnZWagAARsoQAJod4lThibpdQWiNBStb\nsEqBejSMMsoS835a216CLJY9RrhUI/6yyX5/UNnWNiQMsJnVSuOVw6x3Bl5o\ndguJaE1ECiTmQ/J3ImxYlRHk09kIKJ/AHcI9HYxVti3txjtpnNgfUBcXgO/j\nz78r3Jgl5jmp1S07xQwGkXsuG7PM0TrBdNkqjcfaZK/MIYjIv03c5Kg0w97H\n/1S9VW8ND16GF1uiAcwgDr20d/KXugewBRkK6VqgsAKdchxbEibwEt7QCQlG\nEJtMr1at6xg35Qj1N14zU2UWHds2pqgsHVRvFGUcNyybgppmhvD3QIsPQkNf\nxf3kMmHsQglmqalISdBjtpae5ecZzgLc8XhQOuXu0E0mH9ATk44RdUaw6Pka\n5pwbHZt5v85ZjvdAHSYcsAOEvzdklAwnH01NPQ4YR/JLYv4sKWWM8/MGFwKZ\n55skTZzEPjrl4R7nUrEXppNkJTX8l9+00eYPJ0rRCP5EczCDVlz0nLcT2aFB\nD6jG3ZTmqq+CLbFN2h5HNCPWXTEE/W2OubyRZiMQpwfiX3rKZNOh2KLopkHG\nkRoRp37HCj2v2MuOQJSm/cs0dX/W4tOpKrScgu74pIoaiXdLv6Fwy55ItoNb\noUGASubMnzoyVcKaV+hKLgjh9xUW49lPD6jsQZWa68DXAuoYxVN3NlQm0e8g\nWgNU\r\n=Uayu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5b560f4bc4c4b50a124c9432e81b3287bd348abe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.23.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.0a0b10f22.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0a0b10f22.0_1614815979047_0.5797460517911424","host":"s3://npm-registry-packages"}},"11.0.0-canary.6f678a91a.0":{"name":"@material/auto-init","version":"11.0.0-canary.6f678a91a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.6f678a91a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b9e1365d25987ba8d90c34eb5fc0627a512e941","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.6f678a91a.0.tgz","fileCount":14,"integrity":"sha512-hYu+q1+KiPTkmsXG8J/8TS5SW54/MnaL3lP7N3p7mX7eeof2QN7WqjLZY7btfWvld0Ui4ynN4AJMWT8gJ6t13A==","signatures":[{"sig":"MEYCIQD5O8wAAcNLsj202ewwtkab0Zfo47+oKJ0fBSRTw0kBIQIhAOVWYqR+TYypoEa4nYvpwQPl2c4UM5ivkNZNx8lYJ/qW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQSlDCRA9TVsSAnZWagAA0z8P/Awpqf2gWleawdpzjNQH\nJ9MOsnIVs6/T8AssusMg4Nqg2bihQcQua1aZcQVdNqd+MUlg5MZqmetJ6Nkh\nX4LyRFBRH7NDCKe0VG01NT/2/y+qY7H/MXQnoC7CXj9+9sPVyEv3cF8Fq07V\nvylFI8nH4AZ52JvOWZhOpOIK6Lz1r4jr93F04zbjfOkrhr1nW+zYU2pEokoa\nh1BcEwQq1MP2nECy/1puTOuqd/9nAoJ0ShzzcKPQ3FiEY1axrY7gWQIFeD49\n36S24HQJY+6or/cIumi64DpRX8aEwfsEGQTWvReXI2rR15f5FuICyTgbGZ1k\n5BtQ0NjS/JU7NdaSUESofotFCAK9w0hlxM9UPVBnz7XbWGhbviSgtC8NTBqA\nQ+/vkxLoTC4L304Soe6wHYzHafq43FxrG1hDGLtxvDVFSHe7MmNhZDzp8io2\nS/se8xZVr6rELf3tW5pBhOj8Sd4WhpzEKbrqrWZSE2+xVK83b32AELfHQSwf\nQB5a3uTI1zUp2/5pfdPX7nYM+XG6Jib2FL/pnTjSRxb2KkQJVMLeE31Mes1M\nR7TtQ7dBLXek6kjH9a5cmaPWGFpFAEN248HsNVsJxlTvhmreLgr6MdxeMytR\nVjAndyvUaTiXWZrGBByZKKtW6q/VNTNvx5HPN4NuElJ2IdXnQVorCeMdvYRW\nErwR\r\n=P8ur\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"863e8a04081286602f8b0c9bf446655b9399e8c6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.6f678a91a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.6f678a91a.0_1614883138836_0.16061665219564736","host":"s3://npm-registry-packages"}},"11.0.0-canary.f5f1b613c.0":{"name":"@material/auto-init","version":"11.0.0-canary.f5f1b613c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f5f1b613c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9a2d1ce327bb816152320cde1ee3c5fd809dd002","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f5f1b613c.0.tgz","fileCount":14,"integrity":"sha512-ZeNdRZ+ktaFkRJxOKPGZ1FijVVeeyTpyrm5Nt343lcKf9kTAoWwAdLB+EoX2jYvtq+xcg/YtFCNyL0SZlez8jw==","signatures":[{"sig":"MEUCIFFHvoc9aoDHMVohBg0RHkYiAfEzcsM8g9srjHuzlhP8AiEAoWfOVxD1IKMNHhJkdNfRMjEDa3gnhojkCQL+DDJWRME=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQUeUCRA9TVsSAnZWagAAJF0P/3/PcVQlPIGccdptUsIW\nRjg4z1P10sHPlD9oj53zCIAP/bdjKO/LF6kNX5iUUIK+oSSh+FegKxoEzKIb\nOukrxKlStJSS+fXBBRYcwSTvktMwydtAQxtRRb5xSzybe2he1lM7ptT0DeqM\nNqoL/nIsUz5yl+OdARXLeziqeTPiDkiSog3W/RW5dRdE3oXkEJRE4QhDUXSo\n7PN9QENdY0BjW2xGb+G1bhnPR/AhuoBGVUyg/cFOLkuGp/KhogPk0PJpcF7a\nKtK40ynGTApsX1Xvix9NatTW1jz0j4Md1xHNWF5z4kWY5l7+EmPBBvRS6Mut\nANMi3M10SVdTVaAOEVI3Rk46l5l+eHKygwHP2+z1Si/w69B7nI01FeONooEV\nNoiVQ+MEZip9smTICvZw7T2TYpEAvjhQhuGMtzJO844bpARqxcOfh/tiTuCU\nPsi2rT//2fAuU991cfytkqasukacwf4/qNvpyo1j6j1D9ltfJ28EZRvQSyFe\nfTmoH+JETnipBcYHd4CumIypOVNnUg1DZ8AJPzBsyfKILh4skU0jjM+/5C9Z\nSIZtGiXHAov+ApVGqYy2IhM5i0+cuLB2e/cmpFQfM/z8zkWVGlvVAB4OVELk\ndG/rzAZo856+pKeJ1aB0ih4o/jX//i4G1+f3WjZj+aa/6YhDv53iO4rVrlfL\ndlWJ\r\n=w/xA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20e2000d9ec732c7cdd0b5c15381f0a55f778036","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f5f1b613c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f5f1b613c.0_1614890900150_0.11750499678507365","host":"s3://npm-registry-packages"}},"11.0.0-canary.606e767ef.0":{"name":"@material/auto-init","version":"11.0.0-canary.606e767ef.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.606e767ef.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05e2036ecf4add689fd10c68311af92b4e4c8b32","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.606e767ef.0.tgz","fileCount":14,"integrity":"sha512-p30uFG3/NF3bTpeXsjPCuqF7lAZKlmETP3zRCGq8ZNiD+fn0WKTBGS2l22PAekIwMllOPtQ3e/3z5lrmr0cLWA==","signatures":[{"sig":"MEUCIAI4r5HDKd6ZTz42ZaVX5ONOWXNVB6l8sZKIsROtZ0PNAiEAgpy3CW9akDScA6lG/ehi1+YWI93OzCtWjWoGrCwJhBk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQVSvCRA9TVsSAnZWagAAsf4P/iUc6qGWFAGZamuODMN3\nqEPOLpISLJn2ZKxgo0gOy7cP5OhWQxW53uYiFE6g58DW2ej3IjxFytJK/FMx\nxg4obnf/+R3D/Y5um/5cCPufccd829dyu2O1XwpgBiCRAQYwKKvsd9OVsCZq\ndWTN5jiaQRFYiMybvT/Sgz2g5t3GtHJVQKG/lR+yYV2K//rxVhh3RQfT60pp\nzcSU789ASO/ApEQHhs+6CP8paAjGRo+5hEKW6rre0DMn9p0AbocqHklTutxR\nzZsSRQnx6Z8cGOKoVI52uM2ugN0Usw/fbuX0AbsV+AR3n3BZrHgaAE2IEcFo\nsea9Hc3ivJ/jxBk5E4OT3BDSsDVSNTYebEd1GgcRbXNAVaOWbd8iUPC6GDfI\noCmhChp+hxJiMAvNZn1OiTxQlFBcGT5rSq66Y7tiWX716ExwJKOkJQqx41ex\ndFohuiGKx2LpjDJYOpAux14Y85BXUdz9u3bdTnbiipsqohe6fQIxCTQyctcN\nDb2jvFBny+52YSkrI7QADfoj9ZiTR6pMexDQlrvSY7paJLUvNLRdvQGl1Hk6\nubsTshdO/Bf8RJHopzUC/sC9skMMiNi+UUW52+M9C9zCV1fjZGtqEGMo3qAb\nSYMWP9GSq4DgdPZEDSGGLLJ7s79dIiJ2dYDLt+w8wNanN+v0/9+ejTI+Xz2d\nPPq/\r\n=m8fU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34c41b3553e1ca4ee49c0c36a1685f3f462d33ce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.606e767ef.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.606e767ef.0_1614894254970_0.2742554138832316","host":"s3://npm-registry-packages"}},"11.0.0-canary.f77a4dd1a.0":{"name":"@material/auto-init","version":"11.0.0-canary.f77a4dd1a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f77a4dd1a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdfe7eab764058050c4fa1746555d24d6e717c46","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f77a4dd1a.0.tgz","fileCount":14,"integrity":"sha512-RSWbiC7MV5BXrJpOB/e99AyL+T7oBJgR8yAQjKdx8XEGvEHqlqgzJWHTTnMw9UxggohJr/SIcn4e5ipAwbJP1g==","signatures":[{"sig":"MEUCICjMJwBUjH6LQdJCUvWU1HMQBt0Kawy0OL/9hkY6VTKIAiEAn8rDiD4NPUKj43WNJN9ntt2Nzn4ceQ0spodzbOpuZ5I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQwdXCRA9TVsSAnZWagAAKasP/1aTpQ2f91EjfhpzbEGw\nmet/bp8uIB5BKTNgzsHeU0EAOXX+g8ge0C2TCunO3RALTJrgYx9dVxEnTPBl\nk+h0pkIsK/XaCPQ9p5cvzKQGuYFpTCXOIFBQs/Slu3DrbjIrDqqjlYnspvSw\naWFPMs8mWGk3MnIeDbcydDSwtnSw71SVVGP9QVrBNxxu/ksec7OhGSor6PE0\npXlwB41CHz7lxkHdUL8CTd7MRzDDUfLuUgp5T59y8ltC3VA5+Jg2crLqo8OY\nVg+AtfahBTTj70De5Uy9A2hnnWusJTJneDFJc48Rmfx3BLN8JJ53gZK4Cb3C\nVv6Ze+iNl6CYQGyOSjFnXXJTt3RdlvPAGq3+q4YAu29E7FcbPsQ8C/UupbvI\nzmE6+FDgkFgCMlDMCvEGr8lHpBmQSwJFwiwp/Aiy3HPJ53nMJib79nOfhvKB\nKei14ctsHXSoJ80RT6SFBxjtCnYjHxKWZHy6NbspOtVtxAh8icsHgI7yuH++\nKC0nCo1FVd3aCjkmhFYJHcPC3KhIKw6KWoSRI8WHyBYepmcyFIdrL9A1X1xn\n0/QK+qEhHomJ7Eo0f01I/PADbzvxtIkvoXIXPNK5h7rKKpZGh3+TKCjXCimu\nycFbxv81Tt2DF87gFtKhNOhpeKtHPZI3KYlUA+/JKitt3X5IVRtoa49tb2TL\ncaBo\r\n=MRoM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9a729bc3e368dfd8685190e8460ffef16eac8947","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f77a4dd1a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f77a4dd1a.0_1615005527212_0.7756890533599188","host":"s3://npm-registry-packages"}},"11.0.0-canary.2d6ba2c23.0":{"name":"@material/auto-init","version":"11.0.0-canary.2d6ba2c23.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.2d6ba2c23.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08c5e5ebb700a7b9591c4c7e7e76b53d628b8cb0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.2d6ba2c23.0.tgz","fileCount":14,"integrity":"sha512-HHXJZX8/KcRUOzCneMQnZw82rRqHUz17sS+0Zvtw9OWvaSIw76AaOos9DJOoF+qTnhdX3bc4QtvVrm3LsibqOw==","signatures":[{"sig":"MEUCIQCMiRpOUkVwROix4YXr310jPURSIwGaFw81QiaZtLPplwIgObSyKs78VRqG2KXD/g1s55BMkBE//fLM+agpJWorZCk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRqh+CRA9TVsSAnZWagAAa9sP/30QLIn0SrVk6zUqqmbi\n/VpE7rHWUq3HXdipY95SvJVKdmZYcusArXS4FvxOzMc4FF6VaHvNnRX8tIkO\nv6JJtAOl1UFkvZh7Db01XMGcgB1HodjN5goq293Ba23i2a45DhaaxqSslhfV\n3GBy36IW4Dr31SHKNCZSmvHovFXvfHkMtVKzjP4ns87U3zCX6nrkNYQvS+Ea\nzWMyr8CNSG5xOcV/rQKdXlIFpPJdQFcBNW4qCGgEqLBBPABJP79MUx9bHM25\nxqxTBxQ5FiBexFr8jZhYC2ZK5YZ+dy7OGBEMdaKGHKN+HAVl7nZwOl2XkStN\npRom9TiOTL2UnmhsHvFT/poH/n+sBoYYJjpQipCoo9PofvqIwPqilL/afopP\n1Uw6YrLk7Ilwjx7GCKG/uXjmb8UQPVmQ0g14jDis0Ye7m9gqGxKHbJ73e/Go\nD+ViMz1PCq4qcmwYl+bLWty7NXnUv/ZI2wLUxPREmMUr3o1E8i5/0PcdtXi8\nyBCrPSLTWYthdTpzEQKu8wlJrhWeTVKeQU9vW2IJDAqA4zia+LhUeJ84fZQj\nu3eLbfl0gvopdy2TaVJ0tZM3eEVr25MAfwLv6AycmilrKCGX7fAjgCfnJu2N\nHAEWZFjBdlhxixHFSPeuDQ/ZpoU5rFTZ0Ay1wdXRi73NRJqpOzgx3lIpJOSU\nmT1w\r\n=H8uA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a0b889753d981e10bf70b9bcaead70c1549cf865","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.2d6ba2c23.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.2d6ba2c23.0_1615243389658_0.5706951853745221","host":"s3://npm-registry-packages"}},"11.0.0-canary.7522dcaca.0":{"name":"@material/auto-init","version":"11.0.0-canary.7522dcaca.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.7522dcaca.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"45e5e8154cc7a12682d39dbcc7af0a28168c4dca","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.7522dcaca.0.tgz","fileCount":14,"integrity":"sha512-fh0cS0bhoV8fO8xTWn+Ax3gJ8/570vgzlX9qjqRocnGli6Kh+dZ1qegXDgYUu/8kpibYfTGldhQc21je3iIpFw==","signatures":[{"sig":"MEUCIQD6kpJ5qzyZh4MMfLXJdDhbwZE3mEedL4Yx1sOeoLMvEAIgAtSkLIxbDx+hjWGOrXHHUjFYMmmRVcd4WPSocd8TtdM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRsCzCRA9TVsSAnZWagAA1FMP/17EsBVbzdzc5JJUaVP4\nzJwx4mQMrNVq4Mpb1B17YkK9++WCYSCTiNVa9ejYYo9cnF/8+0KTYDQ+3iL/\nxjHKXtQaXcsQmh8xV7zSr4+PsmZEAroEYxJJb43k5hwoqrjNpChQ3T+nIeCR\nKAy/KGjqOUr8CrMmKJkat+yom7Iqm1xLutVQHttv0ZRarGcsV0smxtola9MW\nb3lFi/ciYXQmAm4F4CC3bt1/S8KnmG+mzN5aApd8+j5vE8Owaph3oznIKl3f\n8AtSz3wnEP+Jnd56/6JGuPHLsOW7KCMecd7q9sSNCyGgt2aL72ZHxX6L3tl0\nsUbkXoBa1wWFrDU0uZXqiK8gfDMYEi2QhHqoMNx7D7mvd3R281qZgIIwqWS6\nQuIJHXvkJyrrJGQnCeeMWAoXJVaVr23u1esvhBpx6fNMlRoTug4Xe0IBDeSv\nKiozBt/2mgfcNY6RMauHjJnJD19outeT+j7PRmIH8tEC24XlFT89fYfF6b/7\nXUGVG4ssGpbaAdFMMaOStCqpDjZnMqje7WHHxAtX27twlsL7xE65MY22XIQD\n4QbwpuzVI7GsOb9whogjkBUI6eRjRHJHkaj5BMKSAdP8gp6BWQ+2AvdsLQku\n5Uq8xdC0eSYxksiliHp8gBR4zJGjGjK23ICFIjPv+49w+nu6FpwEJfpgjK75\neKgO\r\n=s3xT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6e73ae404aecb0602a5da37f40b650181ac48062","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.7522dcaca.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.7522dcaca.0_1615249586988_0.6517178054256019","host":"s3://npm-registry-packages"}},"11.0.0-canary.5c0ab7401.0":{"name":"@material/auto-init","version":"11.0.0-canary.5c0ab7401.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.5c0ab7401.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"54a86ed11a246267e0866800afad94e6fb69a43b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.5c0ab7401.0.tgz","fileCount":14,"integrity":"sha512-qi2pGfsWZfk599D/2RPyBRxfs9dDblnh1f5JB1VPrIXGS+16UU54uszPKKNuiAb7l6pDYW5s20abwGsPuIw1NQ==","signatures":[{"sig":"MEUCIDZB8+Cq1+0vPCbJ2u8f0LXNy8sSTpKJs5EwwpWJCBIwAiEAtJTkBhuHNcNwIxKFNnVy+KP5k0tEUM1pSbI6IwNo0pI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR/vqCRA9TVsSAnZWagAAxSsP/irffC+6+mN1nVc3tIZH\nBCdNxf309CbMqAZqtLC7Aep6xOljHNUVoXZhk4/nGFItt7mJTzs0f2Syrlm5\njqdTFcTj+AoeUGsZ7hB03ABX5rYVHyWERIfyh/5hwbHvybqCw1VbQ6VeLh0e\n+oouiZXhySWMISLQQWLSchyB3dXolDtLg17V271Almp7fyTCjrhQPc1zs0Q9\neDAnFOy9W7dVOhJN+NW7j4QmJAWxYPpA9wGQA84Fpl/uPyS0iWsM6coOd/s4\nZT3woBVtCxNHJUqtq5+41I5sAU/WmW7ecUb971LD0TN4iYoC5GJpPahBybk5\nveSrf5ecuMerxkg2hXp3QVMeijrGriHkVtwtcc+1o502E0FNN9u82GOen8Ft\n0sXzKaZ2lbtg9e0mMwVHu3kGt3SFSQUimbHh2TqXSZTIokzJQ4FfFWhPedsy\n10FvZ8mRf/agO4rXwx9KLF30TwYBv3fSzFAYm0us8G34uTZgadpwvLjCTjN/\nNef8oGySP9d+CN6YfqikINYiYDZTY1V8lVlflRB7EAxj1E8YeDPOHYd9L+r6\nsApE2oa8GzkEGnJ7VOGi4fwmtL6Buo17DFxK0Be0buhAmesQ90htGNdpAtcs\n7afm4ztjOsUat9fN/1EMYkwZvfQ4DsyHnPmxFl1A7WVq5ELbL0GKYqdDaLyR\nj+DA\r\n=n3YB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"95ff5a1121ca15128776896b8e4759594ec51246","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.5c0ab7401.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.5c0ab7401.0_1615330281861_0.12545546840266586","host":"s3://npm-registry-packages"}},"11.0.0-canary.59010b6dc.0":{"name":"@material/auto-init","version":"11.0.0-canary.59010b6dc.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.59010b6dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb7fd9b281bb0e1721a800a38e0a1fb673cfdcaa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.59010b6dc.0.tgz","fileCount":14,"integrity":"sha512-MtCkLA5LMdGaRUVuT4LhSjdGTZImcMOqAVB4x7f4SnMC4ngVSEt98C6ywCgXgTE/r1rEryRyKdPRo7tfTTHfHA==","signatures":[{"sig":"MEUCIFNLhCzltIUzDJCxiXUmD16RNL4G0+KM+wyIMmsfTfJrAiEAh4/3sQUrmxzuxMokuk1SWgF5z0FVx4/ALTh+pXXSiDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSPoZCRA9TVsSAnZWagAACSoP/0dIzcjLqYr7Rx3S12L3\n4ydifj89Z4n4v6fXjiL/hEM8RRv8rwD/hUdM3c23gI9xmovys5auwClUCiLm\nUJJc03g1oTKH9TCRQmcnFTvIk7br2RZEvugsn8qJE90DmkuhG0ryb85rWwFs\niffmtOd5RXyu9ST7kZhZ59VCFKnBWVkLn3j31fclFh35BgMz0iqEoCmYT4K2\nUdzuzC1N5f21gLbpDU//B9nyc9C5xO16m+w2/5n8icXvG6aY7IMDu2lejEaF\npDf1PT+0cKOA3P77w3UiWUwCSrHLY6T2s8uwnqrsPdF1LL5Ph46VoD1rcyI0\n9/gv4mpSDECuZ757IMOHdsMTdqzUxvkFyM/qzdzQQFCXd6JuZNJ14nUExDOb\nULPEcOy1kFGQuGny8RthqBBridg9fl8/jOFzA5h3RMqfycK37kGWvhoa9QBh\nHgfBkGxlo5cWc3+s51PC/HTUKfduzm8H/7J4kdhuaBs+jporoX0icSPcyNRW\njYV5lxANlYPE9hQwIY6gkaOhC5U5HqPeW4r1aSsqwTI4th5wxnI06hcDtjv+\n2HWu2j2KwZdAatZ8f0neC0EWWSbsjwD3Frxxia7PR9tckY+HLTVJnNx0EegF\nTID0ZEKQcVgdGoTv+tXxdfSX7mbZEAxnEd/+diWYvDv5oEIsg8MoZXw0g8ta\nU36o\r\n=qEFE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e697574285a5102f4c1e5002a85ae33a3bf2210b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.59010b6dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.59010b6dc.0_1615395353008_0.4958283177640339","host":"s3://npm-registry-packages"}},"11.0.0-canary.9e52f5544.0":{"name":"@material/auto-init","version":"11.0.0-canary.9e52f5544.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.9e52f5544.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c349136228d2437aebf0aa38651b153e3acd761f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.9e52f5544.0.tgz","fileCount":14,"integrity":"sha512-rnuLRIoSGh/potaey2hjrW2enhGBGWMt73SRgyVQ8QL0E6ocMX2F6cE36hMRbpmi0ozc8DRPa4a6t3+q+n6eEg==","signatures":[{"sig":"MEUCIQCs9qVQ9xVwxMogtd5pprbVmPXKJX1Acj6f67rYxopmDAIgb3QE7BeNMKBaf+9oRQfeoGxAJry8PCDkOC7s1Fqdi7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSVUPCRA9TVsSAnZWagAAdZkP+QEbV0yI0xvskzco1i+v\n22jmZSCGz8uOheufFP714x0vO5CL6ivbZ/YIgjWP878/gfCS1iNh9TPIinx5\nuDW4xjsH8eN+vMzv76PG9BQQmpXOu9tIdyBFSyBo2a87GIGYJdYUtP6ogzBm\nui4UCvbnJDWVBEm7BfllMT7n1ncB9xPNlHOhqydKEV67Eb84OmjFJ+FkpA8r\nl2qrQrKJsNC1DeWBMdiAwWeuPFq7CN4OnhUK7C8zuyEcaLxwUohTUInVaQ4S\n2rZssOEUrwvRJu1j/SwUw/+8/poQCLpCaRwXZuYZNVQtamxLEkNntcSgMwbf\nNxNJDZfkyzIhFGtV0oIe0rNPHV3sP3RXhJghPxOCQzfhQa50PnE0ipEgc5Z4\nHECJ7uhUDif/bPcIISaqe5AzWhuTNQC6otHQzwhxo6Qp4pTx7MNEMGvvhK8w\ndjBOF3c5U+zY5rmMnDvncnu1Cl08SYms3MLoohSe/pdKcPeGLFWnqm2ynVg1\nOx+s0lEQVBD2tv7PA67v+F3fTuSHSsjUgqUMl716L/9rsF/8Edgy1C4Q6TWf\nQzjJHAQSn8H0oVSUROTyIUSJtGAX5F1UgQ3g8kWP91DMsFu8Lzswk3EVwGmt\n0dgFYB8TH+NAmNAiB1t1RTPwzPnuc3JYf5NdozYx1SynoCS2eIovMsuX+yce\nqBny\r\n=R6Be\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4763f125770ec8e3a6ea4d8f1f5f607371847e45","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.9e52f5544.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.9e52f5544.0_1615418638778_0.7383786142678932","host":"s3://npm-registry-packages"}},"11.0.0-canary.a678806f5.0":{"name":"@material/auto-init","version":"11.0.0-canary.a678806f5.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.a678806f5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eed21c2172e85a3f90fa6fe35372898a12e18f53","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.a678806f5.0.tgz","fileCount":14,"integrity":"sha512-fEH+lex8IHnyD6SQPtOHhbgTTS5jVieuJfMtuZgt0xDGF2T5YG9yt9gyQFxto/FUwCVNHjZ/xIwVJ2gjopfgSQ==","signatures":[{"sig":"MEYCIQDNxIKiXFG6O7sBQA17zSTTCZK8gBD7IJT+LHEDlyLVdAIhAI8f3Lj5Nvlc2JV/wEoxcmvtV21DzPVmip59S9hq2CkX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSXcCCRA9TVsSAnZWagAA4JgQAId5DiQjheDSn/6CYZ1n\ncgvtULs6LJWQ5O+lA2FvT0CKx8no5kwgNLXibehbdFomZI5aHW2Nofftp/yy\niXJnF9p0uQu94O7o8TmMULchMKFold96rSYZT14KSKLWtbRlUiW9y+jk/y35\nusHl9yo7lJtzmPZI0zM3eBRVewcI+T490yJk/45v7nPyawRrDvqY9xyQzGvz\nNa6R7ZkL5/5dYkBSpDVUrxLUOmIrHmq3bF88doesVmlAaa1X9k+DxYFCo90c\nh//NwdxpB3oYtNgEgCcRKpGDTTKYF2Iy83g49kPO/GR7Cn/eDLO8IEovg+yE\nrpHiShUUwwzB3UDcOp+ooPkAvFTOsskEjZeFs3YcrSmEP8UJCM+ENC7AS7u1\nhvIN9Gf/qPOMEaYFIB2hhiVgPnMfAimZgR5gQRKkG3UHXmLC5wSs9txvWccW\nPJ8BGycDeY/bSm6DKfU5kN2tOCnCYdg/u/qeQPDG9W99rescEbbGbF+rP0m9\nPr5lsbpi/Ds1EPeZwG/WxOtmWRECegY7qu0n05szkA1dGbUlrOG7XaaHBcAw\niwomOkndNyVRCnErZ9XF9YvQTQfQhzUTMW7pJiZT5un4Q2ikHCU4prjCi5hj\nMhml/5Ry6VXV6Di24WNjIiKWS1+PgMsDwXZPE+BiZyab+HDXP+IS+OvdqSgi\nw4Do\r\n=C6Hm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a724ed1e64d54989ee4c27c71935f90fd5614f3e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.a678806f5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.a678806f5.0_1615427329594_0.8864792636935059","host":"s3://npm-registry-packages"}},"11.0.0-canary.b2d22df5b.0":{"name":"@material/auto-init","version":"11.0.0-canary.b2d22df5b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.b2d22df5b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e88093d4b77a21af6116b78922843f73eceb7c3f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.b2d22df5b.0.tgz","fileCount":14,"integrity":"sha512-RGksIf1NE7V4FAvdx59Ns0ZBLoUUT8zaFsi2FgaNzKa9uei1TSft8X4VyK5Q++cOnfc3WXHhhCglIi+KhGqBZw==","signatures":[{"sig":"MEUCIQDNYRlg5s53Nl267Q7lxBxwETau681lGuKas/RQ58RnCgIgSJKH1Resop6CAC4HcUYhV6y+55bunAnla70iyCYs4Pk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSkzuCRA9TVsSAnZWagAAn1sP/2oxMto1RgaKdlaicQ8O\nUnoz6Za4aduhXWZtzw9bCXLvt4EZUa2vyG6wRFJ3qeySgzmxp4Pg2TibJoO5\njw66KNQj5JUrO3dlbWhs3MXgIs4vtgp/qUYTVR3xQzSJP4fQcYc+d5eHuAxS\n6761QUW6hHDzBDjK51KK6xSM6t4a1YyGLLlryWgz+anxlakSu+IGW+Z16Oa1\nDe2XKv7bpiV0CJPw1cNJDPDo56ZU6rsrFvuONxTmCbrgC6sG+kHd5syoPydJ\nKn6jd57GBJN5Z9SrqIqbx6q46sjvig7yvgdE8aKFosUBetNAaHJmIOnCjjYG\nCbntUlcdfKxZBTCLnBpcx2cXhNRrAmAyOQ3MAuFtpmO3zScy55QWNWVhshqD\nkAC+/jAUyTSiVQaIkef0iPCN1T8/zhmcU4ezcdN5D1B+Y8RlB0pRgbZ0mHrU\nPTf+y2+VG4QD5vGetn42kavDdk9ynfBmbkWU3mMvKvgpz+twOM/yzpy4Vnjd\novah7EqDa9U2N4cOaPqx158WloNkTB4zR1IypS9QHUFlQdJwxYPd45RlNrrK\nNk2+IrfLJxU9y70jHhMq6IZzK1fw3NuAmkYlVgbkwZdGgkTGfhx2i561O/6q\nGFZtwE0tYZIjbR33b874ecrGsfD/PhS8yZW/Ymm8Jd7V2Otdm61s9d/5x0gA\nVlxy\r\n=cZXF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5c38fa8d841f5b293e55e4a22202bc6ea8220874","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.b2d22df5b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.b2d22df5b.0_1615482093854_0.19503294193947807","host":"s3://npm-registry-packages"}},"11.0.0-canary.81911b707.0":{"name":"@material/auto-init","version":"11.0.0-canary.81911b707.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.81911b707.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5b6f7d199bc4cffd488bfa709aaaecd14ea903c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.81911b707.0.tgz","fileCount":14,"integrity":"sha512-LaoYEkYAq1VXiz6xEX6u89q+PD2/971XMAPZvFdJ78xC5UW/mH8kWiCDQLlPBZzju0SJ/9O0nirpkyJizAlqHg==","signatures":[{"sig":"MEQCICNnM1IVvSHVZu4PJpxBpKV6SJWxQLl3AL8bQEnVpvU/AiB6gq/jcq7JxaJLjDZplbRDvZc5/B0nnbiajD5ybygjxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSl/MCRA9TVsSAnZWagAARsYQAIwrw+w/FXapaXC9BFdJ\n5mGmLXqIWFYqH1nU+SItz8Jyav087TuT9a7iS00mgBcpX5vfLiZupk18tyGN\nx/hYc7W9CEAIchfK+q1IZpV4pJkzzl3XWOD9/wSGY3EOWT6WhC54fLu0hRpb\nkYhm9s2jgGNwc32eBdDVg9FcU/9GrtdSz89pJAVlmKRWu5UjjRrGjYZfzYcH\n5TbNeI+ZZ6lhIs0vzT8fHsO23vpzmCFI50ywcvQ/o4BpeO8QGUeIZBCKnDDA\nH6AJt+iNiJO6Q2PHYpEGd52tCfm77LEcWDCGNcBRA7j5CelSF+eewCz5V9o7\nSBgFQp3p/g6u8Aa8qLCrSiTIiwMXbCTHtYhEGQVP6Z9N1EeFYNt79+G7fVhR\nZkJ+iBrTGiZSkTun8nbMRnPnxhyArsccDOzaOAq4HVxJyXPiQY5CH1HddkHi\n2Cv/6v6M0xBiMs3qbSKMlUQAZkGBoDn8BlP8Aivj3cw2XoSfJ/wc8MXNBbb7\nY4uJZIeetFMmjZDs0SLoYJUudNMC5Mq8dX0DgWLlkqAF9YsjYWG1tAsgK2TI\nKNcll1uWABQGZGgGSYjFRa/pYS5c51GovUz+q4gnZr1uaFSKf1XMz+Etne+2\no80EE+bL51OiK3gXgdXrAzsMRGPpoI4cshlMYaUjhC5OybIs70/EtuUV2Jy8\nKigs\r\n=RBz2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3c1bd5b1d6d6453c4f616633e1d16b1fe0812814","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.81911b707.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.81911b707.0_1615486924534_0.07230496432051647","host":"s3://npm-registry-packages"}},"11.0.0-canary.9eeb35c38.0":{"name":"@material/auto-init","version":"11.0.0-canary.9eeb35c38.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.9eeb35c38.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a2c22daddb5afa0280ae2a758b56d51e90d044e5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.9eeb35c38.0.tgz","fileCount":14,"integrity":"sha512-o/9C9r/qp+inTIY+s14gXz0kDQktNCljSmmCOXYomHyaW5XMiSb55Bissy9IAyBU02sapYj0EMbRwFKHR/1I7w==","signatures":[{"sig":"MEUCIDaBi8O/YUcjdCJJ0Fgn2O1ZssEh2eVrqzqnwsN/qVnTAiEAsauh8KvkgZamb6TrPGhdJav/IJPtTGwSQUun81x4UY8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSnEKCRA9TVsSAnZWagAAwSMP/RcfBPjyMqbn0F9l/lkL\n/RWINrqLy+VhQ0IDiHHcG1bjwhywrtm2/By15L93rvNm3Mw2DiggLfAIu+1J\n2TC+91tZmI2ehkyq+/TYltpfdOsn6JZ0xEvrxwJ8uZzom5OEyepvKpzQACCR\n9kVhxBIa9K3gZAsYFpP6vx0SZfCHkCKNpUXM2QKXATdUU8oe33RL8wl700h4\nYAF86zuuBQxjrFJ9rYrnjF/hFlwRhaKtkUjbN5KuJmEYrymVvq8K6GqaqGmo\nVUNvVigHtbtvudJnT2CN5ZEQF4wkFZeeuWb5zJKCMDK7qG2lmIKr0EQQN40n\nGPjOclNdUfEani0LG8kRm14f5CtTgu/Vjzvk8WxV+dF/x4jP4bfI2aXmA9pZ\n5VAfELejJD4mcG8zVKI6GNrDCfqgaDHpQPYLV+dZOt+/H2SFLZcL7j9UcuVD\ng6gjE5iITQBjDDqwaB/PH5RNuXElOCR90zV2tkmnqa4ayCBYqN2bWcbiGgY6\n6z77zj988j8YE0J/bqTBsncP1Xk2hvPWPAreXIwO+j+Y0Fth3fpoFc7uCVmm\n837raVyzw66NVD3156PX31z+9Xgcc4yit+ro+gmbzXl4kTvEPZEogB85yDQV\nrHtCb8RXQt9zmSoqXgCO/kn+xEtXEUrP1IErVGjsMGWlppja2c2BvdomgIot\nbL+Q\r\n=eECq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"147a2a556e5155bedce0b0f267f64c26cf87d0bd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.9eeb35c38.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.9eeb35c38.0_1615491337792_0.08009099937604347","host":"s3://npm-registry-packages"}},"11.0.0-canary.12be3e95a.0":{"name":"@material/auto-init","version":"11.0.0-canary.12be3e95a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.12be3e95a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4a4fbddc91b7c9a5b740a8d1755c1c596c4d596b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.12be3e95a.0.tgz","fileCount":14,"integrity":"sha512-x3Qo5BTpG0JzMdLYXowgNLi0cuJG1yRBwFOjLSduufZSxMDTZlkAhHauzw5uam5K/lQTCVdi8rwD+04nm45oIQ==","signatures":[{"sig":"MEUCIQDUrhPeGmiYL/A0gYGDHwVlmGE525inEvSl+HLCJn0t3gIgKhCHBWXHXFgWy0bCVg7jiu7nRQjq8yQjX33LrySv+M0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSnbVCRA9TVsSAnZWagAA5LIP/j9WcdcMu0FTVhbAThIE\nd5jkWoUnsL6pXcj0rS6wmLjk+HQuAYmLi3CJ0uql7oWzVW7Hpm++gysEKT8m\nsZINGS+xjYWjbsn6xu226IhaLNrIiZj7GmWSV99zNiF1CLM6FB+iXJRkm36J\n94aw8cW5abvkZ+rP0bDFYqTpmnMO0PUDYJ7bfiqIQf7xnqT1XzSAzluyGUoj\nFfczFYN7u6VSvDcyVPa6zArkfHoTUg44EGS+cwH85v+C5eUN5TdDxR6SgKDJ\nuITctf3zRYPFZRA0HyjnL8JXG9oSCeQemv0pJrt+6WgyN3zQyl9rc+ufikJJ\nXY1cKsuyi6zT7RiT/OXPMG6A2rem628P0wpkBfA8v7Q7MgHRr5xjpMwjLuXI\nqQwL4TWbsjl31bhaxmUw4dgaMBaBBdmiVEhS9QQ8IMtX6WktRiXmyu82My9d\nbYZx3c7co68SSvaJz46h2rsiAm2fvDdLZUX+RYecpJHjGhsLlD9Ga5FeuDBb\nI2bIDqmBPosi4gLTLc0g3XUwpvsloj3wUD/0BYSE+MvoqeTGtTRW7CGGEYkZ\nfRyNkpzNxlXnQs+VEHjReU92QhC2td4T6op8XicVY4ouQC/eFn7kcZ2+Cq9j\nY5L0P1hJ5/I11fpF15IwixgksXDAKyaDudQG5gqj2vRFxdcXxAlFXy87HPdu\nTFmB\r\n=gKlB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"883077446617b632d698e09818dc9d5903a7586e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.12be3e95a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.12be3e95a.0_1615492820496_0.7671088855810975","host":"s3://npm-registry-packages"}},"11.0.0-canary.e683bdf4a.0":{"name":"@material/auto-init","version":"11.0.0-canary.e683bdf4a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.e683bdf4a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ecb3f947ec6fc3750233169cc94ca826e5d9389b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.e683bdf4a.0.tgz","fileCount":14,"integrity":"sha512-uJ4vh7MSadt2saxe4CpKkj3gUVpkjNvCH3YCkMtt2lewmdh5aHcSQ6WtkQYrqLr+o5wTqpVbmfy1pfq2CDhDPw==","signatures":[{"sig":"MEUCIGUx+MsjccUN/TDl5+HHfAilvKwr0NEK/5H8RWOfUmNCAiEAhJS7zy0IvpWWTVxFpSSfdv+BEPr45BFgpg9w2YbsGrY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSniECRA9TVsSAnZWagAATFAP/RGdxdHaMvJogwn2iOQF\n1sqm6smnmxagG6Agkh/67ej5qdgZmaip3Qzbqr1/Sc+bfQPyUoQgXoFw6JAg\nysp7JOkVq/+duC2VH1/7c5KFVMoivjEee20vg6aeZkr2yyhnraVCofQXq4FZ\n6yR6weKFbqzzv0Pidj3lJY4gvndmEXvdKRqk9cI6m3H+K/MxUUv6O0woa36j\n6PYYngH9o5PRAzs9Bs8OyZk0P6jfqYhcNrtLQWlOk8eaC/+L5+RkuSdLLCKP\nfnkpFseJsmmWeBrIHoVHvHsjNL3MllKZWCCFbbLcnYWPZQK5XmB3KLsbQ1W4\nA55fi5FlMkA4QhDdybCEBwJ1qEMph+cXVtUu5JkF28asHO7CqJUUGgwis4P3\nOT/UIf8POjYYQ3b+vpxZ7yc6p+Bv4VbKScyfr/AwAwcbL82h9P0Spfc/X+ki\n+hy+Oyqvyzqg024wdjSD9EmJUVoOirRK8BKjqoX+u4+ARyxlSAeRypQ4/IyH\nI389BwRtS8ijkyN6Z91Tuduty9FCvnLlDVBhnwMGftqdWJkxPH0sCT093rNm\nyXyRyi12lQrJtWUnSy6nBzOdrNJxd60jzQvakgdkM+uSqt7FsMo50l5WJUMp\nu3c3CklndqQ2yn8r0K0BekLEzSqcgQu3T4qIH8tNlXUQCGNwUP2+Rmvj4Q2C\nQXFw\r\n=2AAf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0323fd7f39f825f8717fba8542628d111777ae35","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.e683bdf4a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.e683bdf4a.0_1615493251651_0.6832533031425871","host":"s3://npm-registry-packages"}},"11.0.0-canary.a07b6d486.0":{"name":"@material/auto-init","version":"11.0.0-canary.a07b6d486.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.a07b6d486.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e039b040f3701eea97acd6dbc2c26e5dc4833b8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.a07b6d486.0.tgz","fileCount":14,"integrity":"sha512-aXWmk3ebnvAttV2CICdnS93mmCcV4C0lGhEzt2mB6SDqRCt/zQaOE/Jw+XLEi1IwGZ49SJzTgGVU+XOZdC16ag==","signatures":[{"sig":"MEUCIQCHyCiFk2gv8qZaneYEmb2UcPRW4pAc1g2TnTbolBepVgIgbUJLhpZlReDqclaG58cZmSSCl1bDFeO9fJqJTFpROyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSn42CRA9TVsSAnZWagAAvRMP/j1k9PIhYOArtJnsL250\nd9z+u2mSZRcLBM4pLkyk7KW8FdU9ygnywbEkQ3t3Zr4NlwObu7ttLNKSWE2J\nrTSADtbuBVIBdvtcxx1n0TJPDGmOvC+BJGpdwAwDKV4rQ9uNMPudP4NSt2dt\nQu4wSQG2f6NjrnErlHaigSvlSIiiBlFuZg/azwaBO+Dd7bg5hchEkseXzhck\nAniMDMn8ko2ZseEo7cn/IxsHYSFnVQj5XrbKzUZV7qtthxK0SwtwO7yvJk9m\ndyBeesT+Xu21eN80GqlpKerjNIS9m3ekHBT7ObvEEbfBoelwtXv71UE+Rehb\njdbnvWdWUlRfdhK9V9oihNOHU0Tdj7NYjpb1leCg/+OANC1DPYS7bvrc8N65\n2LwAZPj3TnClG/Nq0FZp0ibKgbfQYHjZSHovPlhZ/b0JhDmGFntSMO3R99tM\nYFj/plYov55FAYmHBZ9Gxe9aOb+VAXMe/C7No+m6wq7YLK5lAaUIA662FP4o\nqSevyAS5eVty5k94g9DLUgLpqlmHvRNdbd14COpHuDyHQO5frymrdQ/7gGeA\nee7rDoqfWgpO/TMOLJA/JjCC2nRI08I0H4rUzX0dLrGl45tu45MAHvqXqhOp\n+PsTo2HqkjWjEHoHI+BoR3V4XramzC15RciosDe64St6qjz24z+Am6ER/so4\nGBfL\r\n=67GI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"425bbecac77849f8786f0a32de18a168e1874c9b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.a07b6d486.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.a07b6d486.0_1615494710048_0.8720697256888057","host":"s3://npm-registry-packages"}},"11.0.0-canary.1e0653477.0":{"name":"@material/auto-init","version":"11.0.0-canary.1e0653477.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.1e0653477.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"32fe6c4fad44be35c12dd5306aee111805564359","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.1e0653477.0.tgz","fileCount":14,"integrity":"sha512-AvPT6/fzierG3UpCv5XeRtFhbIi9e3S04qjEtoswhrjxIvYzRb5qtjZWIgFFNgJtnySO8TyK3ItppGycIaOKBQ==","signatures":[{"sig":"MEUCIDUVsL4/4yo60VTnzYtDqF86oXcAT25e53gdojqPTjAmAiEA5CSUDwtuvFpXJpXB/MmxZ9N1oNAAYNeh6zHnxAMuCnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSn/1CRA9TVsSAnZWagAA5y4P/1Om+LAVIHSkbZpZjIhi\nyMKCs1oI1KKVqYPn44mKVzmEJ6AklBK2UJePT5tzj0tNOJJ7T6kEUjbkqWcO\nv3GznwDuel9d180NSDyNVmOlG8HbBFz1+wNw7UkppNF2pJKYU7CoCFm7ZGwn\nfgRIfh47snbssxclBZcpZ8XaoVxEyfykYt+xrdrzCFQ0LmolhnqbO+KZbD/O\nu2ECoaX3U+leg5Tx2PMQ9GgA4onEmFboFfFQXCrE/eAA0Gwez8/J3/ggUQD0\nAPUNEveNkXZEivYQSEtmQhAHtXhPlW/J0KP1T8GKcgFWMxrvz2fFpX35q0+l\n2b5PGxmd9FpF0gg1ICI/scDOHgjooXlOJfG3msfIVUkmpk5R30gvSKlC4hJ8\nwKRfNjEDqnTwPmD/orl5jm8RHF+Ab3HWyga+8FkbAHBQai5kACooNt3s1U6a\ng7d6z2tGqoJAZKd2lfYOkn6+8Th6Ab87xdk/x3PdHoST0ry8M2AwYcik7qpR\n/uu6alVdbzL299rR/y8iCJXgDkNEKbqibO66VTfY0Jrx5iKekHGdX/0VVWNw\nadiqGMrw5WxzCZuIOg/ENkeVe+B3gkaVCe9lOVZnpyq8ehBzLIRG9HAQO5BA\nBfnadkP9+qdeSp4WzTlBHB1qLrzBKwWzsq0yNpWpC31UlsCOEgWbSwqbBXRu\nP0+Y\r\n=VZTE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6130e0fb82d7c39da4ae1e02df8f0851da419fba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.1e0653477.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.1e0653477.0_1615495156939_0.7886788690973585","host":"s3://npm-registry-packages"}},"11.0.0-canary.148e8cfcc.0":{"name":"@material/auto-init","version":"11.0.0-canary.148e8cfcc.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.148e8cfcc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f04c55a66a7aeff27c5db4e36d7d89783f04a40","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.148e8cfcc.0.tgz","fileCount":14,"integrity":"sha512-CJ8l5U3s0mib1iL1mYAiz1i1HOYvIkKbL2b5a6mpepDo2dQK6Jo+YfEC2hBRIfs7ceDNt5wWsIRaTEiLCT0IoQ==","signatures":[{"sig":"MEUCIQCAp2IY6Wmj/NrYgfs3j1hakdZatyB0eY+IUeAFgpZMMwIgUxBNldq3cHY131FLQybMiTvdd8X6zg6CYzLwgdQcV54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSpz8CRA9TVsSAnZWagAAwtwP/0hovehDNKpNNksXV2Os\nUFGk2DB70edmLQhui8GBRnZdgSu9+wtdQSUswbAiCYWhxsl241CRhMa10oDE\n0+X1Y5+E15X31Cphj9m1I9M+got5GV3xibI0pl0VlURtT864/rhl7xAJuNTx\nPz5M584BY0lKP+51VJjAp39jLyfjRKwsZFS9vRNrNVfck/pjAJ39bSsrptpE\njYotWHDtEUdNPwZjwt5P8Of46Q8LgjLs01nvxZ5YJgAHnfIobkCr5efOqRgl\n0tVA1N2D0piCy8JLEqqHEaHJOPe3Cqb2IduRhasYS6MAEGb0fgqUmkCiWHJJ\nN9WYUyBjeJQ8SbYpdRYnqqZ/MPgh+Nw8fZjxUR1zcqn8UYAAaLo7WVeD1gb6\ncamcuNLL/HGerrbhhpXTURaMfG1rXBZWUt9T8uYZLD00OXcdOPJFxPDUYFPm\nzu9/74qgqABudHEPmn32KX2m6bX+ECu6M76lbpFiiRAwnsI1koI7gpauwDcu\nIfRo1oMIorxzg/60wxgC0U7kUJbOUCrOxztgqMQrQSYbUi2+RmPJXYiGYNk6\nhsZNtaGJQEObeeL8tQgX2uZre4y9TWctdzqKwd2xkQ+Vu70vqfn0727CiIlb\ngFSaB/+1LfPY2GePLYVW8qz1Wq/uf0XY1bmc2/m7QZd+ccY0TA19276hlxgC\nbGHs\r\n=XiS2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e686ac2d72b7a249bc4deb8b09742bba99ce581","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.148e8cfcc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.148e8cfcc.0_1615502588277_0.5406105019086391","host":"s3://npm-registry-packages"}},"11.0.0-canary.73a227194.0":{"name":"@material/auto-init","version":"11.0.0-canary.73a227194.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.73a227194.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6a6298221f8d92883158d604bec0822db933bafa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.73a227194.0.tgz","fileCount":14,"integrity":"sha512-L1/HwHythezpLhSecWX5WuzdhAuApNOb11f3zMGDC7Bqdgbgyi2YRwOVj5gi0inhaFPHIW0jFavc0nhH8Mt2Cg==","signatures":[{"sig":"MEQCIFhxlIAREpUSphZZWduGSOyBfrzQxLnjOxX8oZF1kyESAiATY8uS9D2RpmHM5Bot6U5jtI8dgEb1ez8j6EctJ74YXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSrRPCRA9TVsSAnZWagAArOgP/0CAPAkBbCcCR2J7gudK\nITyrc+l2/RuhplZeyyGAEA7eBhDzFN9fK+3FyauHLP6u2A0EHc6cS1BOvnME\nFOjsCzmyCtaEVEWcY4R2XdTedxrX5VPb7YCgreI0hDBgxtLxFiIi9+obBjLf\nz7o9Z2xF/XbK6j/X70JJNVsLJpMyUR+KCrEfXL49vRxo/CHs/HMHLTL7ACSe\n6MjF13ia6GdFk+/tWVitOJuSHI3vBQ30C0dPQ3j4lxCq5Y/UhXoeHtZTOUWa\nPVHIfPJ7R6OGRzs1YJAQM/Q+GNs+hB9E2j6w2h0gMx32wvEhk1Y2zzB7ZTTT\nCt+V5NKeDJWO47hBA/nFLNkpOV/bUMcW+1dkfM/ygTHhwMfQWwiDrITdgO0H\nKgbhYlqZwtYlfsnBOb8albpeEljbApRt11QHt1Z2jJ0JcPLCLtsAOA2NW30P\nGB+0mRsgcTNJYYICOhkvXIpRBkQeLkFvy76x2/nb20pLrPnJzX7zRQhp1+LR\nI4z8Te4CqMIku5JsLynrpbIy/zAlVTCDsPKHG6NygfeckitiiIPb/7sXLsrQ\nCJ7Hf9uP0nZ5KLVhR0Yij14H6Vh/ADaUCdGaB9OplKN27WiMaQhxZUsiJ1NX\nDM8wdUb9ksNW5p12IdxnfudxBYhUlYWUPouBgl1AGYGCDYgS2VWa2ExTc9ph\noBI/\r\n=NXju\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3bb5344393057d23abf5414ff61402a5091ac74b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.73a227194.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.73a227194.0_1615508558594_0.6499130613991462","host":"s3://npm-registry-packages"}},"11.0.0-canary.f8579b7ea.0":{"name":"@material/auto-init","version":"11.0.0-canary.f8579b7ea.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f8579b7ea.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9a533db93f07051c6932f6c482b54a3cc8c19251","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f8579b7ea.0.tgz","fileCount":14,"integrity":"sha512-3d8EYLkrn7Bgjb+EF8UZE7IIoEPhH1cMFw2kX8T0+pKPjSB/TQrxl3gaBzFrpYL8V818+l1YqHA2logS0K4HGA==","signatures":[{"sig":"MEYCIQCB34oZZWPndgZZnBXHus9cF4Mn4vAT4XIj+EeAJN/0hQIhAPNppuKxCGvTOMSMww2+AUs3R+yKR7mxGpTb0QJNNjK8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTBz4CRA9TVsSAnZWagAAY6YP/1kz+SLWR/SSNyYiV9Cm\nOzluMa8lIaPBr+OILDUQCLckbxEvyM8CX+GWV2HqCJ9E1VZ3x+F02O0Zp5ZI\nRTgB86hKMsT+5lpMOHdd3JYeiQIjR1Ms12LsYLsiTZz20qu9mOPqV2i2xn6D\nw/MBt/j4y1Zt9jX9qETH82v0IElEcBBomXWCF9fWJWq19Veh/8JP5wpRnZaI\nwqf0/7ZtFY36lsxAIsb+nHMa55qVjgdapzn5g+fXzsmcOdU7wKErd6T87KrW\ndxCuuuLoe2mbAhUCPlVggUtrqjAAWHkKZMNJQCS/EIGIi9fYRFUfF+myMcsS\no5xaorQZ0kDubCOolKv2Kem8PoG8GlLCBWCpAdSEOodCYqrxEuTwyMCVNQiR\nT9jLoQF4eKWyaPmOwKe/oqDeWFRdS+XWaIn3Fng37JzftZ4muEfliKACpeKN\n0wEFm+j4aV1Sjt0FbRyeISeJwSxNQ3hISn7VfxcR8cGlJ62uIxfKOpb29HBs\nV6aC4NroLBajeLdlEgs4knen+J15G4bG9V5Qd6P7wnMnTyl3L1rXmIwSOVSD\n8Hi/Wjbcmuqtbxr8Ed3WHYJH/tudQTQ98BTYHni2EDKVXqqjqboQTe8n5aCq\naXL52Zd8W1gMdtPBTumAY8Fnx4zSTVxS8u1As2wBDzxM3Ru+YNHhT/H5xEPq\nsOvj\r\n=3E2Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8b1a0816c0d3a68a851c5e6a199c4a9ff75cce07","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f8579b7ea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f8579b7ea.0_1615600886567_0.35278959055741566","host":"s3://npm-registry-packages"}},"11.0.0-canary.d2a39d300.0":{"name":"@material/auto-init","version":"11.0.0-canary.d2a39d300.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d2a39d300.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bea4b9fc275ce5c25639ef6dec99baa0b236e676","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d2a39d300.0.tgz","fileCount":14,"integrity":"sha512-LddIO9zTl5luWTEogjxkGdIfX05TYqPhAO/1ckTgVko8xZz2hxIaPCfFoPV7gOoNM6KLRmN4iR+3csdNJss7lQ==","signatures":[{"sig":"MEUCIFJ3UffayrEEwYSVa9oNoQqnyAPODrqOjittIcxuSPeVAiEA9M1FWLVtqvLeNX88cMC1oYQw9pKQ7wBpKxFL5aTcjPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT/zmCRA9TVsSAnZWagAAE7MQAJmJvbN2Z1abI/Nc6Sma\nGlw1lc6rQikr0FGVCNXpRrOz2Nyrk56yqX0LB90Ds/MZlQavMORcepAcDT1z\nbAc+Rqn21dg+/rtnwo9sItV+5AjtQ3G5ipR8BbPmdE/7IV2SeLzUfZ3Hakdl\nr1w7HLuKqqN1viIg4RAnCmBVl9FA+EvWYzPCSQMtrr7iSRbIxbjx+3TVMANO\nb3Ai+XGk7fQ1Miith+mgr6fVnomGE68nKB8SyRxtLtz12BMf9Qsruh9oqpwj\nv8CyiEPMLTGCZkHJyUnrMIQCBJtu5hU6ZGT1oaPU5zAbQF30zY0z0X/HOog/\n8DkJmjTcLAnHIz7zt/qqJHaCL1K54A0mhq1JU5P86qKJplWVO1+nSD7QcUzO\njDLuzqMBncxoOQ6oME0kHXvBptKkBTdp7YoUZmkEP1IioqSUG7dq2viUVdV3\nM/+wU6QLTVZMMQy/XgDhZVtObhni2hPcSxquvtwHqMQMo9SnB4EzB/YatZI5\nmDA/5ZaFxD1DXljyBMdojdCDHxN+RtNAZq5wGPAt2knf7JkAlC58U0JAy75V\na8WhxLbV0MTP8hZ727hnKZbzPVB8uySZaDlusB4NlyRid9+oQP/42YM3BOdj\ndUF5gl7WmvyXOAdLdf9VKGayz0C2vrXnjgfRIh3MJDFmQbYJdeTsQ2/9dUhD\nUQnh\r\n=hNa/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4e928ba6e35dc70b34314c7509f647a6fbc4be00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.d2a39d300.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d2a39d300.0_1615854822495_0.863087304896119","host":"s3://npm-registry-packages"}},"11.0.0-canary.7cf67823e.0":{"name":"@material/auto-init","version":"11.0.0-canary.7cf67823e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.7cf67823e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15c7b41c62a8bfa4299353856e8334e1d96d2b68","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.7cf67823e.0.tgz","fileCount":14,"integrity":"sha512-ZCJpLxY5xysF+/thlsvs6kYQXlZxV1yVianQd/p8U9oY36dAXwBWv/ayCiOLmXwdVVV1u9q+Bmu4zNxIw+fVXw==","signatures":[{"sig":"MEQCIAlu0qGxPQox2/a5pfGgPgJDSifGWnT7q/BVYITSJReEAiAhVLAenms1atnaLejhjyFXjjhHDR7DC/1Ui+Zd5JAoHA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUPaQCRA9TVsSAnZWagAAgcYP/Rn5dIMF8jvARPc2AOJr\nTR+JYQTkeBr1a2CLtGwUFfz0Xf4hAZZPOiN4bM3uoYa+Rv9U1DUqluXZv2yO\nelIOu4mg17EH49VWISRoqNbg/J9I6Nieyr61MmdsQaw1zqT64fdWYOO0P2a3\nL9Gd94by7OtL881Zopk4vKu5XvTw7f9qlMajGTz6gSLMfRuFL5SmbLWW+3QP\nCeapGATBKsqXA5oKJycz3O4YABVuQaQx95stWxB6wDsjczGPfJoEVZxhLr+F\nqYlUclnng5iMKOrcUwdCJCaCytYAj5XJpUcNQtLfwnFDMMXzYYD+qDQ0artZ\n2dtBMqU3xblakt00TAwGMiiubi62Ma8I+S7/QmpaSnq3OzOshaPDVN2Tab3h\nhvfCotiivQy+bWGIVPiiM42khHWuSydzKly8nrYSaaOiyOaObpSTMuOFctJ7\nWOIvEQtloNyZ4+IiD2TfwoZUE6B/gLtMyS5XWou8DHAKfQHEUjUAhF0mE146\ncTYyVKqq6bmYlRopFeXqONrjiG7Udd8sul0NpIqyaD81GmRUlEiY2NJrPrBz\n57JJoIZL9JQAWNI5K+prqG+qrgfEC3hNXX6UGwHMbf6liBK2BP/R65uBqXUS\n9bMcDTwtCPT6bgbpJg/XwN4bVkExF+x2+U/gOLwb1bI2ficba8wn2BingLlm\nYtHC\r\n=+eM/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"afabf42a48ec8775fa133ab10e023c1b5d2ab802","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.7cf67823e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.7cf67823e.0_1615918736352_0.7104418027864174","host":"s3://npm-registry-packages"}},"11.0.0-canary.67d780c79.0":{"name":"@material/auto-init","version":"11.0.0-canary.67d780c79.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.67d780c79.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c47f90ae148042fd024749282eb98b680894bf60","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.67d780c79.0.tgz","fileCount":14,"integrity":"sha512-J+zaV1/J3k//SDs8ogDMDqI4pIchulAz9kDtPRumMMmW0mz6HdmxdN2BtFXJd9j9ErB2IVLYy0fvByetzHPNtw==","signatures":[{"sig":"MEQCIFALzeRLTJjVwUxRAaYliTdSPt0nRgiPW3TOhYc+isXzAiBJAogQcJssN1uo/3iG4vAJW7wwNABdCZi0JNT16MbSnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUQsdCRA9TVsSAnZWagAActsQAJBQHADEGFQzi2m6Aja6\nvQR3micXf7l/YVk27FNWFgx43lCnbRyR1X7ZdbbvHmV5RgoTMmPE0YLGf+Oa\nyho5i704A6TumqqjuaxWQ1p+gtWoJ5C0f/L31WEBQbU41X+6cEFZzcLutW/R\nwC9cSDM1WkDQjfZ2l+n8vIYp+uePYlyjm7CkO9k0pnVUoduAhP5M/DhEmGzB\nNsJvX8KPyV9n1YSIF5yk1XSxJ5UOZ/KOACq6VAhwY7e/EKTwo5p7GrL6PtCt\nnsBpMlLUj4fiFChgPhHNzdf7tfFsabGrnUzrjIvqSqzw0mhWUiCSIRYwxkOv\nha++d6LnkDP8cn/sx21TZAPWVxDRTyDrngLPipqzQ+o5DZYZ41d17cLKmUzo\nbAxSFb9q7/cNBipx61i34S89zcZ5/UNwccXFsDrIYDE3FGHz3cIXiCCYQtVd\nOk84l4paBmF/Tbzw3FBVBioqCVZR3epr2GFg10Wy5osL6BbBi5lRKUmeKlV8\nISgfoj9/O/fm0kXqRcIPgWYWGlAarA2M/XZU+7YXMiXGfi5Md38RVRV4I3HG\n0bbplxIdTtdqWA5cYhEUtUfqmVA9EJObQFIenVJeTab/pEwwCIx9huvRXcrl\nStAAriJP3dVi4fbFcLIs2ic5/hsIWV79VCWAv3UJP0W7CMeGUwEQAleoQJjl\nnxjW\r\n=+9kd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"05a76ad8cd6b15550e685799fb6b9b5643d7e0e0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.67d780c79.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.67d780c79.0_1615923997147_0.9034463138944651","host":"s3://npm-registry-packages"}},"11.0.0-canary.0f358ddae.0":{"name":"@material/auto-init","version":"11.0.0-canary.0f358ddae.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0f358ddae.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6dc6d644ca1c383c1828cd40ab44ac3fabc61378","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0f358ddae.0.tgz","fileCount":14,"integrity":"sha512-7Ql9/eArQKiCbnFzFYq+qwsFvUJsCAEOKp0Ha+i8ZfLREe00y7Cz6NNFCJ92b4NTRVSF24sM9lAg/OnfAPBpAA==","signatures":[{"sig":"MEUCIQDTSX/pHRdVlhCU91OCC7d9xjl8BngVdn5/YmJrXks6MQIgacL9DvDPOmZifMmPP4O+kUPJ61TWIgkcjiqprGfzKCQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUSz3CRA9TVsSAnZWagAAPjMP/jX+KDGzTfT8DMwNDswN\n5lCqomrmBgVk8g27ngbIUILN5HPGwtIM53WlaXugdXW1/UArYNPIy0/mTqb6\n4tejqjlPS4YkOSMF81+XsagKhYtauO2wO/18CTdNA9k5TzxL+T7xlOCXDoxq\nrLZsxP2apW2H81fObqRCPowxDT0pC6ZkNHL5AECz5RE5CSG8exQ272Q2yXQI\nZFnvOlqd3c+W4hbkNlfwz//y9eLbhDb5enHRzJm1yTuXO34xhbEHADfydeSO\nfd+LtIS3vx8pypw64XyGrZ+FECSy//QMvNVLNxFV6MRpv8NEFnBq3oAFlhkx\npn9qHpFa7KNrCe7JiRyu1q2zlmmerfceZV5N+/XGxCeEOhDroEwnX98wB+nH\n8vLhqo6IVDZRYFPIybMQwYNz80aIgwEWWPvVsU9VlRNVdVW4JT3/BISKHkCl\nl3A8Rf+8jBxDBm0j0Oz+QpFRskcr+D6e0wgoYid88r6OP0OzEzUU2VApf1Lv\nHn7jN4ErTjWCwmcrf9z6p1y25Q9Dt2yxvcTwFNNFKDAZNJ0kJ6Y80cU8BoYn\nXrsTAtLN6zp7JVIlxfim9hfI5LnvzaSMWoVpi8uxFXqWnsihiixOip+5cet7\nPD+rTaYLZBh0Q9JMtfkQ2EZOHE7A7el44ApH/IuauHZ0vzvay8PGKQDceijN\nybpy\r\n=P8XU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6acdc7677f01b6502d0b491a9816d6600ea9cbd7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.0f358ddae.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0f358ddae.0_1615932663463_0.02995657463699719","host":"s3://npm-registry-packages"}},"11.0.0-canary.67eb0df80.0":{"name":"@material/auto-init","version":"11.0.0-canary.67eb0df80.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.67eb0df80.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a77a7589c1c4758e2d6a8e730208d98c60384d7c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.67eb0df80.0.tgz","fileCount":14,"integrity":"sha512-YowdgbQlfTKkxZKJjo6lMokB1UQmNMLq2tDtDL7plVoWT57OwyODaohrAGvppqzY2xQVNA6h4E0VT4HuQbf2+A==","signatures":[{"sig":"MEUCIQCWa0XN8fJgNP3ssjQTMaqI6A32ZoI88JUENkPXoBPU8AIgXlJRVd+JDX72nQqSPSqM+gwKhzE8wEwoUZlvw8Mn9AI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUTNdCRA9TVsSAnZWagAAUwUP+wRiaVUsyRosR/HeGbje\nvVtq1vj2efkr2XO9q7Zcg1WW0QjfhYJ0+ygxuvYTqBAzbyHdh5Tt5AZlDdwR\nP/0W90xs8HpxdxQte/7oZn0+n/XxHdFO0B/7jPilkTbDEAdyFtlFO7NurLnW\ng8de394KMLUGLfnCfeIyD1QnhZREnrBH4ZDWQNhGV1LXEQsu48SokOf6MWJx\nO5AqbkMzh2bNTUvSAFHfBcqS0237Mk3kZ/AbItk3HZWrhtqhETSPH8lno2qR\n+DeKJVbbDHpNYoVMfoDfZJSDwkD/92RLnrQXfNXoKNYcYPZOiSgKCnsr2X3R\nX4K0s4MG4MR31LARjkZb3cf0OJTN5dFOskt9yr8n68EIyqFURA3r/+hTME3U\nugCs2pEv38idsSFKZkvtc/ZiST1bNjvsZBxswEmooQ7TLNE7ilWjrN0yKN0k\nKWuAhiU6c9G5QpGNCx5uZ34V+ZNyytHe84AOsms21jTWI8Rn7HQhN7eZaiHS\nXQr3rVDtQ9QaOIHPJJdncMJuJILNaNv0IqIU/VBMdfAvfTgmrMsuy23xX4xn\n8P7nEvDc8JnN8JW+gI9V8+S9EcROEH9f+3/9hali6hXvjX+5GY0xpDgr2QhG\n0e0h0wnvxbYepe65TLi1PeT4bVsjY7oFksj0pdVGv6iCvGjZ3OO1PYJpyg9V\nHYh4\r\n=NzGw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5f5e9d259d95bf3abf565622edf7345e62993020","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.67eb0df80.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.67eb0df80.0_1615934301247_0.502914138283957","host":"s3://npm-registry-packages"}},"11.0.0-canary.941ca3b3c.0":{"name":"@material/auto-init","version":"11.0.0-canary.941ca3b3c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.941ca3b3c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a83f76c4b455b895dde8ebee6f651fdcb87d20aa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.941ca3b3c.0.tgz","fileCount":14,"integrity":"sha512-v1EmxcuJ6FdWIHkBOUncFoYo6c0sycHS2xcDiBQHT74vGGZyE9RqCJCO671u2jG0MfYseE2jkGXfMq3d45hPhw==","signatures":[{"sig":"MEQCIB5cRPuHVCiJfDNZi2ty75agjczMVPF27wp7vN3P1pEkAiBesUHEdA3+9lyKfwF3PAxRR0tgnd2Dozu7UmPyQznr/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUTPKCRA9TVsSAnZWagAA6JcP/3uO9vlyzq/j5XmiWmeP\nH/hBpEHfxz8ykEmz2YKGZsm3CXdzLkJkHQJwG1gOA5oUb6543gG6F8ZrSrMf\nm5DV0LjHNNdo48pMaGAErC1hTqef4vqP/Equ+PHRUDZDHwg2V8uDYC3//mQ9\nBpaXhnRwqtTvhwS33kGf4rzjZSUnOwQLbHYrfFm4OhN6bvQ4AeJDAmg9SQV+\nUUSSeGFOaDNa9ec5T+id3I1u7+QL5xSeIftTSUtdCjf8cbnGaqr1a2d1ibAn\nbB0LN++4tqv67JYrXXPsaGhhdxV/fDnOV5prT7v5lcaaulFZamqHjl0uTxWe\noMRudJZNRbLgiFFYqrVq79RVuuvuMN4paoHbXxUj6o7DWuRVwJm8tAzxIGlr\nkE8oPP9KIFMnMQe0qUsEKzQ9gtfEx0mV+UKn7Q25aJ524WmHhJ1kSM1BJNzW\nrd4G9vf4B9sP12peLl6pHLzA5KaueW0XoOp/edTIxJWk41l1IoxgwqfADPzI\n8OA1M4whWDyq09f1P6OhYFMsy3CsK33nMnwDZaEzYPD6O9YraUhQ6kCerU+e\nOywIxzZd6omo5pR7qz0G99Q9uUHSJzYHrW+t6p5THzkeRVIkXWBp+aGbW065\nd7ug+qHw8tusYcPqFNRJdAwYgcyk8dAF9x1bArunqCxtHyew7FdxUugzntd/\nbtys\r\n=LBsm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"27181e4c2c90af170c9149616613beb6599ff94a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.941ca3b3c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.941ca3b3c.0_1615934409437_0.7430860810898574","host":"s3://npm-registry-packages"}},"11.0.0-canary.3344d12ad.0":{"name":"@material/auto-init","version":"11.0.0-canary.3344d12ad.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.3344d12ad.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2158073a3b51fc167cd8c2d9c38ed2c192908769","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.3344d12ad.0.tgz","fileCount":14,"integrity":"sha512-DMOIE3tS7iUER60X1lwdyztj4Xqv9tpbLCIugZkcMN+rQ8a7khRQwVz5UP900wx93Kr+pes9QWSbyBuzizVPAw==","signatures":[{"sig":"MEUCIQDJLOdG1fckAsC3wQSpbvhbSGhMa7GD8l8ZTf8v3v27DAIgKTp9z8xIYmAAPlK6zt4JGF1u8DfD+G/B35qucFMToTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUdNKCRA9TVsSAnZWagAAaN0P/A5hGSDUHV1YWGFz/Vc3\nV5FxkxvrmFt4m+TH+6r3i/dScuYMHsEWhMs1vMUyo0+hclYDbll9hsMON9r4\n7ZFu94jywIiV86AsVRI2dwjjPjWTeCATlkVBPfH3vloM3c6kQd+6kgGXQw4f\nF+RO3j4ypGqztW5tsYfngjB6tUvSh7YzpDhlY+P0/wwkjHziXrVXotGkVxKq\nmYxW0GD+ctDgzGFAZn8s2MPvaoBdjDtIDjJbRcG+SWhV2BE7HObObfwR17u4\nL1HjgFpBDQXlUVjGSpm5o5F2PO0+2XjaUUz+Vl2AOfuC1ZzUG/cJkzIwZtbI\n+W8WnCNhGdfdsbmIyWovy4ksjNn4ocp6qZ+TZ8xiyFBGKsdroP+n6tZhfWdT\nvID4BAjXYmP0RsoNl6PoopsgozIMEU2ZaWvaLzpHFQFfOkXB3HEQDTeeAScM\nZx5yCTj2Ig3jcjOmf3AO9NWQLmvVxzLp3OL/CaJNldGrMI/VjlfV7t9oZLP3\nJXAWgshVp/hdwP0L1TDaa3B2uSuXPobCzg6Nl+Jy4hTK8JJr5mNOcUqj3xkZ\nDNRKRlvqUxmtQ9q5NFAaMjvYhUIfbXmDWLx/Iu1ZzuB54xv7LSqNHBgvVPch\nhmxSmtjZRiShvWwqD6OxDRqD1ggGHJIyRsY97fyzheBQ9UlogSVjOgxmmrLM\no7zK\r\n=chdu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fc17c547b4aa66b6412c0b0b56b75978332702cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.3344d12ad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.3344d12ad.0_1615975242055_0.43971580291052703","host":"s3://npm-registry-packages"}},"11.0.0-canary.6072ed604.0":{"name":"@material/auto-init","version":"11.0.0-canary.6072ed604.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.6072ed604.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c834c89d3acf87106b4d55c8bb860f7f6d6f40fd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.6072ed604.0.tgz","fileCount":14,"integrity":"sha512-NV13Y+vTOh1abvTuFYKpm8CRXKT5WXZXMwwIqhIAbU73A8HQzG7nzUcuCquIiunymDhodkCXM0WD+6Lj8cALXA==","signatures":[{"sig":"MEUCIQCT2Yb2EtDMNaIqS0mGBs1wqbmlnejOaymM49y5EcX3mwIgUF2GSxb1ad3e/wBRpgHKP390tbMGDgfXXlhXM2RxF6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUomNCRA9TVsSAnZWagAAxrIP/jwiVotXLCLV536RDpRn\n4SY1E3K+nmzHXE8quNbZe2M8FR8/HqzMVipRGXiqevzDmnHS8BCRtTH1hXzF\n7qNEUpf5rnArVkwLZWk3tkNVtMhmjq7Eog3bjhs0y+Ts90AYJcer/ngLbaOn\nPCQ5rZoWDOm2KaHMGrU80EteNaO5T6OojtZsItFhEdhXxqO62wi3T32jgL2V\n4KLeGG7JePdW6wQWmF3u941DW4/T5RhPlZXhlelXSFp5nUvom4uFojauJroU\n1JsmqF9kov5HFj40vBeRAtEtO1j9UiZ0ztSGjh0Y/xoGKwxkt0tPHX1JdAzO\nAlDIxbl8KpUF6RFMMqmCIuD9klH9iV2qsRxj00VBsCQxglxCr+/ffYepuJgR\nJP5oVbj2Abchf/b5DUbID3J96cleNaAlN/8p3IeosIBHgo8Gje6SRAJFprmO\nGf/bNt2xea61EG6+Gs79rEaODY6RfIKrAks6CbWzwG8HoWdN1LrsJGWWJBBq\n86UFQWz1/0jbcAZu1+haUicCSAVEp8dmagLQg8hZrZ833MwmNZ599jo/wE2v\nJGkbl4UIfHXvH1BUX5BOvahSPh7+mItl9LFnBI7LilkAb5QtQtcM0DMD0+lz\nHvJ1c4oULOI/2o4TWtknZ8WfOshB86qvxLxT4OMGfc5cP9pNjFmXGly7yF3r\nUw3a\r\n=IDMj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"219b085de7ee97c7b75e5f25dc757e7b5240916b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.6072ed604.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.6072ed604.0_1616021900648_0.09413803178858271","host":"s3://npm-registry-packages"}},"11.0.0-canary.d3a6862af.0":{"name":"@material/auto-init","version":"11.0.0-canary.d3a6862af.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d3a6862af.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fced5754ad0f970d130e2b04fc5930d3cd64ee9c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d3a6862af.0.tgz","fileCount":14,"integrity":"sha512-zzrz6E9uqvqU/wmACmPjQf7ljPCqfPWVl0MVvT68hukyFzlU0Ge4+oc2cFspdi1QLfNGbWlZKzGrU1Ly0TpeEw==","signatures":[{"sig":"MEYCIQDbF8/Yg8IvapvJ3C2ciy2XqZP2egDfSOAMY4KzM2UPnwIhALMoIAocJlpwdYGGxri7KSP/0KmANubqZmp9bEs03vBh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU31dCRA9TVsSAnZWagAA+LQP/0pD4XYPhQdxmSqYVcAJ\nBcYHwERjhslfHkr346YCxV9mgU5yIfvM0Ucm2gZfm8O9rxOF5F/qBHRYdyH4\nHGw1HwFJyUoS7mHCUVGRij4T613Zn1Q+FjIE32ciuYbJVv2GhJEmi1KJR3zb\nIS9p0s6JySYGqEXyUHrD0O9714ehLszgWdpL70VB/rALc9J/oUdHvszJtSJz\nGOlc4q4hfvj9YbdK3WicpkMZlK41P9GnMgSRmgFumoCaisu0rxtNlkywbzAs\no7aldZlLAGUiFK/fgJppX6JhFSWFIXQbIyDEufmhQ8QbNvjacWcfSFtYunDc\n0Xe6Y1DgniiM+TqiRw8nO5DJNGzBYWwXkXc+6LuPTDYNwvdc2+iadduWbsiy\n5gOKxm2xYdtbJDxai74qeA8vcFk5va4MO6yFeRSf/b3h5QH4oQnE5I0Mk5M2\nlAVgr17zXMRAm9xziFM3iuJAFOTuqZONyuDsEeNz3LUy760nmjH6xCdhr0ct\nB2SRmHxvCTm4hRSXrtgiTsEl2m+mu4WCGCdsDF475i0mQB6RWCt50rTPwNX7\ntKz6ggBtCnOHsBEpsKCxvDhabLTlHy83PHd6lQYjtO9pOhbUSnGlvo20RD/K\nZ4ZqcghdMSxJzdQLaor+JEOk8J4TGe1xefwLNn218cNLDaLtjFB6qyw130Ax\nXesZ\r\n=1kCf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ab10f53a050cbeb103a3ee070a9134ff428deae0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.d3a6862af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d3a6862af.0_1616084316512_0.9458297360206407","host":"s3://npm-registry-packages"}},"11.0.0-canary.40dd242d5.0":{"name":"@material/auto-init","version":"11.0.0-canary.40dd242d5.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.40dd242d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9a22e9e8e749c467ef0749d6114c58ccc5233b87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.40dd242d5.0.tgz","fileCount":14,"integrity":"sha512-s6KzuWbVz53O0BcT9Pq61IZrfVTs2qamOk8D/GYNIB5c7Ndyy/1x9tu8YemPPjO+BKd4MvucAuZ4zSxFZXfcEA==","signatures":[{"sig":"MEQCIA6EbTqGHOXP6yY8rzfn1iTe9MOK/OsEkXcHHMmFd+bkAiBK5sTG++Yoc059+QgId/ccQ2vVS3Xhnti6RyR+kSw/wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU8MQCRA9TVsSAnZWagAApSUQAIGDtHEx4GYEhm28Powb\nR02NXB3hmaMvyeG6Phj/nGMz13iSFDOUG50eErBEzNjYWKosGYdJ9FoDFAYM\ntcDKNlkiSG+am+cjSYepWKwm33h00zA/BYTlUIYrB8vaX02KpuCS9dLD+xz0\nqw8TkLSLpbAz9kH/5VsZgz/+i3NkjthDj2GK6jlJ5C5l18jzVuwXPJbAhneo\nRisMgqBKkFEi5g0V77qY5Kt1vkIqWzScApkINQrhtbzQ+B+haFDst+ZhYADj\nnbQRntudogVggdOHPPS03BSgfC7U7SEJdBo7Rxzgu4EhCZHXJhiD+Op7ZYUl\nHu0Pw/pKA7PHr/Rdkx3VXPWHWkiYrQa3XQQYtOJ70bt3W6W0IxDDpWU/vayx\nWp37otV3o2WaBju1UVTCM8khFYam8ADb1uk8zCHoxsICv9dE531qM2gfNi3w\nad1ZjSzzFi4Vzkeirm31c4l/g5WEvxChcsSewYYIax/8cOwgBZLGS+rC49eX\nWxImps2tMipjKHOFAbOwDwQVwQrD2uomagzjpu7ZCnNqVsh4iynxsgamYoeU\nBWCuOWPYVaAAHqCyxfD/RxCaHyiZwSZ+BQESI/WQZzp/8glLHOUP4IifYLe5\n1KIJKB2s/851Yrg90CjFSgghmCJMZ4CflEN1QAaE1cyqubX1jq0xJZqAPG8L\n8RvC\r\n=b8Zr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"07de383ae306cbdee42be69fa0a06884d97ec259","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.40dd242d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.40dd242d5.0_1616102160383_0.3105264631873801","host":"s3://npm-registry-packages"}},"11.0.0-canary.ec8f8465f.0":{"name":"@material/auto-init","version":"11.0.0-canary.ec8f8465f.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.ec8f8465f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c10cbd41fd341a51b0312bb6d42f50af394e23bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.ec8f8465f.0.tgz","fileCount":14,"integrity":"sha512-POPNTPHDhIg2teEJfP+PevUlkw+faRpMVM8J67bekXspPF/k7zBGOtw73s7XunEqSSWOV9xddwfb/2dgErwAuA==","signatures":[{"sig":"MEYCIQCtghCXQ7e1zIzWPUbVCLuPeDSkaWc7HXEfQZ/zqiymOgIhAJqVgpxyVpz4Etwa4GddJ3oE8d2FxVGc9H7XjlS19f37","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU8leCRA9TVsSAnZWagAAFr8P/1Qv/NO56f5U8cR8JWm6\nwCJSVAbtOLnFzdRUaEQoOCSCVkJbb4vGi9alM3l0WGWc0XcTGTlOO4WoFkAF\nQLurk+NXe1SvtCWabJfwQk4ezmPZHANHpeas4mrZX/nSwPYC/E9XS931sInb\n4JKtvNaiYGPYG/NjIy4R2gfb1lR4LQdC0eUOwGjza8YAUmxdXPelmOkh2EWa\nrdpNBCARREkLGGxJivW+jXo870juDe0jPMMBkxzBkERW5sU+mhB9zHjauWcJ\nDFeq0XzvQ3a4jFHFI2NSElAGTVf1mT58jm5LFwNm+tEu94JgYIwI1UZDTtv9\nLQhTbF2bNg06vFi95NZmU1ezZ6a0AJm04Z/2+ghaL4V3T5DRhazzJyCowXJ+\nNFNLz3mJyVpVj2bm+LXLWtHUKC02t0+c9vDLERZXthvRuolR8zjyqHF1Uobs\nKdEVPqfUFhzj5W1UD5DebzDDw8ocA+TBNkGfhdbL4loHW78UaBf8ww0s+j/N\n52n9QledBe0awNMtkmt/hLKdj4fvdIqyTWuYVpKsMfn7zSYze7dL56FNGPMH\nHwL/C8s2rqwhi9DcfwyK8aIo2fwO+vreAG65/5kqODUDAKdW8zA17Qt3R9Hb\nYGrskBwc3+EG3bT/RR5JvhwqpkSZ1jcpz2SiroZ/R3sNBAroRd+/j954tJyc\n8DZ4\r\n=jIhw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"896f8e45effbe3c44209b4542bcd3d10a7f8421b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.ec8f8465f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.ec8f8465f.0_1616103773703_0.7031492972008211","host":"s3://npm-registry-packages"}},"11.0.0-canary.da38969ec.0":{"name":"@material/auto-init","version":"11.0.0-canary.da38969ec.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.da38969ec.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"34db54d3cc120b8553c7b073042fce4a2334cd3f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.da38969ec.0.tgz","fileCount":14,"integrity":"sha512-WU5slaHdlblJRy5Gi0l0kn2PiSw5AEhJj4yG+LTosUYskSKZE1B8lMySTtVv2Xz5S+A1GmRYjHqhAn/5qBTBXw==","signatures":[{"sig":"MEUCIQCY5oQpwepCRYOkMDjBVnfERcW9rbS4iSGYtmRUPu7JlQIgZg2AB2/rGi3MFi/QON1P6jEcMQ+V686SANMfvGYudaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU9FICRA9TVsSAnZWagAAVgcQAIQ67DYwD0DzKyXzNfWH\nEI9J3X6ErWPkQMYad/Pu0frGUvjnzoH8VEN+3RzHATloFsx93q8yujXqfU4s\nqPwD0H2HYcg2n/LhVULK4J9Vx2khHiglvN/ek3W0QDn9fWDFLYJIWdBDFtXu\nO+zhjl4GgCKJpVBLKihxp7PsrLUheQR/pay76pBgSoRCGhRsr9MwI/uNB1Lx\nS8XwscB5l7mWr/n7FacfUVezeKVVw8Wx6TnBJWNi/bbRa1H1ZnEA3mFikjVm\nTKAUkzCFBcto3j9xybxEJrNNlJtrgBw78Z3VLLWf8y+vipsSB98SN6XoDYnZ\nGL1LJZZO9yNuhSl7+Q4nOkuzme+v5kXr7Y13+IVdlJbg0/fUTt5YvARDCAdW\nltDR7QDf0YJTarcHHXWws2mcdWAlGSwphHv5xuO1fkML3UqxV86YxfYl8VnU\nBXsIaUfEPmqw/y6wUn1LzJbSKlEogkaBLsyHNQHMl+I8pT2aO1EU55Jv1CGz\ntSKBy3UQZmJbi+KcFgYzycAVECwbKa+X5DZ0gSrunCvEWvdabII3smcEUOUL\nRNnRrlwMGsi9fePQOdRw6E/1QkJxyNWszTrfS1quzwJtK97GgTV9qQ7R6oQe\nbTt9sKiyOBfncyrZ0up5vW58m8SnbGI3ldTPYkq9a5gR+ZgBjK9bybbAh9dn\n5+2j\r\n=57j6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b43d112facdf74c62e02576a918d522587133fa9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.da38969ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.da38969ec.0_1616105799519_0.49757292335237047","host":"s3://npm-registry-packages"}},"11.0.0-canary.f5246264d.0":{"name":"@material/auto-init","version":"11.0.0-canary.f5246264d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f5246264d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0690344ae1c34ac9fd86e6d1a17567ff2f2227cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f5246264d.0.tgz","fileCount":14,"integrity":"sha512-uJLF4gmGwwwfZDSMT6s4MuDoZ4rUQgcUi/MIngbaHjWPVAplp0RutzmS1llt6Wm+2cQ1RD5oAZUv6mAubxelfg==","signatures":[{"sig":"MEQCIBzK+IEU7Um5PT/X36sDkIBhrXsOLtbxdNq9JPmhR1/0AiA3SoTxMvN7p8XrBdwAr7zEJ3uAHCQEPWQPSHowbyt5ZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU/IUCRA9TVsSAnZWagAAKV4P/2qyw3f+YL4/SG5t7W1P\njB87cqo8PqQanzuXwwg6w3TFTYeTKIll3z+S+X+oDnssRx4A0NZKjjc9t31z\nDT5v1gmdiyAsrRWbJywCHXShLhhiGT23PSFUannT+k88ME+Gwd5A1zaf/Dt7\nkHU1HcRXOHLyZfsVJULm2+vSAlR7L/MYhsK58HDmklkVMCGMuQ0Jw39IpaQf\ns7TERPukWtVfViI9cssQgaNfyYu02b6IbFvER4KVNAAomX89WYNCjcwC0S/b\nc3RLzyKlQ3aFdrdmK6xuCKYVnTAa6KXm2LHaqCDS42215wtLuQPhzXBh6pL5\nZcVFI64y1FuvB9XktpLNlE2Sm5ITnhuJayQVVc2IsYPGjtlWwYqrUzVzgSBa\neJKlpJLrSeaNP3l8ZeD444XVfAJ1QFgtZXX31/y8+gBgY+QQBaXbR5CXbeZN\nk+bkTSpKSfRDwVPqA5sMhx0Qi6k1I4g3zcCbqCapqGWqMogpITZv26i3BnX/\ngrXqHDtQerOm+lKzmrDvaVHDNPnWOhLBhjUqXySi8mNAuHuaJPf5TP02UTmv\ng6hQWV/lBHxGkewptCV59qz48RZ9CyPirCRgJCsl/IQWeKwR+UoqJFuqLNkz\nmz9k+K98XRjgLzO0Cyx0BFrSIHvEozDlMSTd999/GS5nY/0iMN/1RxDFB5lc\nEkiL\r\n=hQ2P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e5bc1717405750210bb9d7e3572f0cd36c9bc0cb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f5246264d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f5246264d.0_1616114195519_0.28116314358232275","host":"s3://npm-registry-packages"}},"11.0.0-canary.03d34bbad.0":{"name":"@material/auto-init","version":"11.0.0-canary.03d34bbad.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.03d34bbad.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"56948131c1c8bdc7590067e8bd0a81857929fdbe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.03d34bbad.0.tgz","fileCount":14,"integrity":"sha512-0zzTEgVYjoWLmP3YYx8NjeHuxR6OMNyMjksTScZsEGPw4aG6IzZ2I+Wi/jcLkRJe+E8u/Mi+97IDjtf7xkSErA==","signatures":[{"sig":"MEUCIAnTo6OOz9bjqahBjZUwvwkqjxgo7PT1MPy3ORWUUis4AiEAzzdaq8bvB9UuB6h0wSfS8mpqRZC0neuuI2Ohqg0/yHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU/UpCRA9TVsSAnZWagAAkeQQAJKYccnXmE8hQrC/5YQD\nx917TR0pOwT2XgopA4LA2WlEK7pzU4GcLU/4GUUCvFdlvGAYjWFyboww90Xd\ndsSLTTbBuEJSEA0aRc6YX6ELqGKJynteC+r2mynhYoPEfcgeQgyXOGe5eMui\nO32Hrxx12IvrrQaye9dYD5r51qhQLcHgr3fjdj25T7tumkuIzxJpfjz9rNVH\n5NE3t4DqqgaSsASsAJnh544TgzcziA+CBGFxUcqCrlTp0n1cq/2JlG6VtT6b\nfeAACH10vr0sB0gWW3evTI6Wr5wvk2Lm11OfX2aWhFvX/d+9/7IEzEnG5lH2\nV3cq0z/lND4ULNaaSNnnn1m+tI4/HMLL2Zs7azQAAzLMnUnZHZgsKgeO9v+C\ny1GXbzz1i/hi6gVCoRoB3FhCZeFjD1d/G0QNBzoR+EsJlptSCfmtFyd3Ye/+\nnPU9MA+Kc+xQlIZuevf/o+oGGqdicabybifMVvRPEUDTeyQgidDJVIy7lfrz\nLpmz0Ba4LTz5W3R3T7+DRNpzCI8ZdreadbyXLnylvFDITAJOkDo+R/x1VhGO\n6VeliMOlRSgII1WACwPJ1VD7dKFDs4PFUsdUkUQYlHTrT5AuZ2UGmq0VeQlQ\nHYHd0dGj4dfwucBMdHLBL3gmw/XSNchvLC+ZaNwdR25NobIwXvT1/orZjuOT\nzdEa\r\n=UyVp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"650c89999524e7131f5808d28c8ea2fa15db0c86","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.03d34bbad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.03d34bbad.0_1616114984979_0.8039635919244399","host":"s3://npm-registry-packages"}},"11.0.0-canary.cbc57c600.0":{"name":"@material/auto-init","version":"11.0.0-canary.cbc57c600.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.cbc57c600.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"da8e55f9b216f0eb450ebe2fb473678a8dc5cb6c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.cbc57c600.0.tgz","fileCount":14,"integrity":"sha512-hJoVfeTQ9ORb/IqRmXtuxNabyh3gIujJfpNn+2Kh1yr1GwyqefOnLI7dlYJqLyEeFeZdcULBM9RlAPgmaePR0A==","signatures":[{"sig":"MEQCIFrvshdJwrhuXI++peoCFfUgqHJaaWxJL5kmhRLg84CcAiB4eHrpyVD57cWJEK/dyrlFN0nlzT5J2QiCdIX29tJlqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU/c6CRA9TVsSAnZWagAACIoP/iqeYgs8GKiDGaBHIOki\n7hNa2vskhF6/b5N5n0GHkJtCzSbyIr9ImbWRpj9UHrOenbD6qF4Ite6KHg6d\nLie+VZEGRzCta+ooKhBnPerLJ2vgSrj67Lxf51BOXgITjANQbI8il7Kr47hc\nxCmE/u9KYjn9qg714WSaPyXRpuiw6IiQkSZZcmcNIbXCJxaIRE2JYjSjpJ6Y\nJSoj5wH6kA2gY+LpYCvZZ0kJVgtFmHsr3lLqcQhIlSc3r7F/ZW0h1P0WuxYK\noZJyZxJHRoPQkwVEvpahkd8WDoHeAbO6DJmvzJp3QIV98d+a975VlSejmlpF\nrs3I2BCrxoMwCFQa+zwhJW1/mKGq24s+b9yq++rKNMalWkloKj6OD9tWP87z\nkuVABzEACAA33TCQVz7rPF+dLy93D29DyfIqwTIi1xtQGB25w36LH9nBBwBK\nqo9yayQrNaFbm2BB0NP+5oJZNfa5qe9jxK60eHs64p43OBF5W9yGlaobbYp0\n1Grg7XslpU65xCSq+bVzBFmIcqBHu19m9fUThPyaHMvYe4sIAcr32Ax2aVul\niJj+BkJg/sogkkCvD3tOicJspxfrsKGUxT06e6WIXYbE8rpq41TFdTCGiJ0X\nFXcC/IU+kWGTBFWoaCPGD9ttwfI1WnGd6ZAZFxZ3s8Ojm1qYaTPo1waBMBFf\nkwgq\r\n=nlWj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c16ee9654e2ac3913ee3140dbc31e34bbc443c00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.cbc57c600.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.cbc57c600.0_1616115513879_0.5046672312248439","host":"s3://npm-registry-packages"}},"11.0.0-canary.d6c5bcf37.0":{"name":"@material/auto-init","version":"11.0.0-canary.d6c5bcf37.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.d6c5bcf37.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9ec949ccdb940b7af5477c27f89309739223274c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.d6c5bcf37.0.tgz","fileCount":14,"integrity":"sha512-AwjipP0+sc3x0B0243o2vW8soLLPAg6cdXV3H17y8if8umf3U7BiKqNkhksAga92o4ICNmdckd/98HyLwQONwQ==","signatures":[{"sig":"MEYCIQDh+hDBYjWk4bt9dURsyJJ8x02D/qLPITqIBFgt6z0VjAIhAOugD8Us+ca318gEcf+mcVm+SLSmSvqOT2nKEOfeno2W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU/oOCRA9TVsSAnZWagAAKJMQAIhP+NyNZoEG/kcHfg/c\nO69AYrHHdz4Rpa9dW9vpdFcBu7zpuTwr5W3EePlrSZMYltI+4VXldIcVoG7x\n5qAzkZ9bO3kXMgRt+I8VgAU5QHtJyXgevCyA1rmOZC2aCecKKy7othbBFP4G\nJ07rt4w5eDkdrdlYRPe4fzlnB86oftznafU+uRPzy3bn+HC6uuKbrUi3BI5e\nV22ss0QcxaqkFfyK9kNpTjUSMWUgYvwE3/iceRewcO4Vi3NAYFFPn2dyjpak\nes+VOIzkKEk8I+0JsoWH5SXqG/++1CET1an3CklKzEpwgExAcsclVj0NLtmi\ngf18+1VRHAEUQjVlzrQVoWsVvADQvZqwuqGKGBSjCyvzyzFuc8/P/WFQVYH/\nI3c47Lg649EsRLfhxoW4vOak5pE9t31gYwTY4U17MbYV05w8gNQfzHAyPdRD\nJXCqk0wBpchzQSEdOXm39ECJA866S52tvHIbsaVWHWRX3/rpQwF8mtq/1tU+\nAjrLxCfeWJ6NBo/thCdYZG16ThOvTTHYKSW2FPGqSoOD2B+GA4oldFTQJJKs\nz96qrR9Cxsgg1zea0nq3Op0TkVJXCn7kiinZF3M4LtXWzcywuv+53Qs4xWBG\nafxLcR7tjuL4xGQUWvD+HYo4hzd7aer9357fYmRI+3wBeuCXCZark2SdTle+\nwfdx\r\n=Qa4Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ed31c18c565964157fdadec7c7876ba58c6dfff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.d6c5bcf37.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.d6c5bcf37.0_1616116237632_0.32986013037324247","host":"s3://npm-registry-packages"}},"11.0.0-canary.fefc668d7.0":{"name":"@material/auto-init","version":"11.0.0-canary.fefc668d7.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.fefc668d7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57501ee4e94c67ed893c8e866440aba5de584aae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.fefc668d7.0.tgz","fileCount":14,"integrity":"sha512-ebtb1UNBDiFwNkjuGOif2oWRe/xaMjBuQgASJBkQBmLkgtu1n19Ug5sU9dgzB11sUJiJunxnfawftyucikrMSQ==","signatures":[{"sig":"MEUCIAr88jtixYj3R7JHQ7NabsdZIgCbWqWoJQMvSAD+r4S8AiEA3ZgPv618eUzGRFwoeE6al+o2/7vVEQYfKl7hIuIKQE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU/8zCRA9TVsSAnZWagAAnOAQAJKDfDSaCQFPTbbDoM5J\nbCreY72I+6VCcEPPE/v05CTx9bPGOI6nGLGFpyw1J1aJjZtRbTnrMOc0M5Kc\ngX9b3XgP2vDHrxT4ewJyqrpyFGoLwv7jDpVE2fA+pRqFpBs6FMgtqVyTij1S\nBrb13UfSMRs7cq2Ma3Vz3N1bVFVBPBdMv5SJ2hmvFc36KXkqJ/gNzZh+01+h\nyqcluUGXqnA2B1gnU9Nxg2LYKeizoogB1cFF5JMuu+7kJDEXvmuS8VopInW7\nYw6dQ4PqxCCyJJJImC+IaAuqtoys6kmh3ggmjmLQxKVGz3ffPIoinS2/HX81\n6XozG2ZLAFtB3jAj7RYSyhYhDvjdJ2bBq/I8FHOBu3kRhG8ApiWegg9C6I0q\nAtd9YxWRJ304z6yu87XVdC1UtwL8Tqt14+kouquJfK6fxI0yK08QL6WPMzGZ\nJGqfHv6OhcoqQIwJVk/aQIeSDWBWRZopYy1QegDFMRC4aeKDVnSYmpyOU4bs\nKvJpqcck7Q3G8UMbVxiogHVXgCGZjd4vp9Wts7hRYbiCZR4PmfcZYeiWNUvd\n35YOcLE4NW4h/XRGLn/DsBwlXiAnW67USj1UVoOJMoqSIMpL3qUyQcAzCQzW\ngxiIskLcRV+5s77vY1Lr3ln5niy7LcLKpEhS7CRo0EtScsIPIL1rmcZS+xQY\nE0C0\r\n=uwNG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c976c590b16e8f3a000dcf5cf2b4daf6269aa21","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.fefc668d7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.fefc668d7.0_1616117555139_0.20191484407304472","host":"s3://npm-registry-packages"}},"11.0.0-canary.faa7d3226.0":{"name":"@material/auto-init","version":"11.0.0-canary.faa7d3226.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.faa7d3226.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9273e72a4105e40cdf01c141ea3425e0b41df101","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.faa7d3226.0.tgz","fileCount":14,"integrity":"sha512-Ja8yUmVFfr7NXlv/rmpL4EEgq42r5tLhk7R7PXKK56Ah3stjYLdUq46/sfnbE7lo1Qn8qtRfWZwVRoAaSRXJ+g==","signatures":[{"sig":"MEYCIQDSaX3PwaMGNDCxnpSYsqy7+eOWk7ors+66nt+NTzvc9AIhAIfElNHkAab9A55ezaW1zFBrZ9uT/oI39Jc0Y7RTeDhg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVOKUCRA9TVsSAnZWagAAvPYQAJTfKD6GRgMWPaztbnu7\nd+jqFdPLl1jBw2oO0oSKQmkhmps9Pnv5bDXps+vDiP7m/vAEa1qSUCUavb9j\nbFtwcOh4a+iTyACus52a4a2FsUQqGDucQPFJh5NHDo/R2ty58H8KlsLXuYA+\nmvSmQVrSg6yZQsLkKzO1ViP1lIArCj6GXkvzZm6xC8ywp6EYASWMM/C3KePk\nVcMybLCkgyMECRjjJu/FNE0fR9YpyXBWJRdsjS9GstUtTM9JeF3auGO98WXj\nQhQr07QAGzOuDXI+9J9wNm/TmSgjlK9qGyhFngJU5ZxO0adbXV5ZVc+j24k4\nUz3hwk9sXadToj49atF9Mng+EzkY42FlxgoLagFIf1WkJDwjB3K3dQbq0HWJ\nueRl72gNZPA1aaH39yV3wnwJDHm5PTlIvsgiTEIxf3sMMfIsLG0Ejgv48Vtu\nzXNgqfbe6iNzbsCE/uZiNpjkHEwDHGoPdBGOyN2ZOZHCOltck48mLux5C41g\nHEi+IQ/SJGed1n7JpRSuYF7oIG5KQq+DG/QWhu0uS8Zh1mkIli/mMpypphc8\nWXvddXvFEAucqbZi0FxMzOTzMmZ+SIBJubPk8DW2ZWTFY7lZH62jgU2s0aKx\nwEEFB9hC+FTFKgo0quRYTbQb35yWmVfTSHVFNIY/Kxx05BAhNTrhuaqZJQ06\nX1Kr\r\n=C8D2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c6038c8b2af85b70f2434939a69416e1593d5a36","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.faa7d3226.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.faa7d3226.0_1616175764344_0.6167873783745885","host":"s3://npm-registry-packages"}},"11.0.0-canary.c60449bc8.0":{"name":"@material/auto-init","version":"11.0.0-canary.c60449bc8.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.c60449bc8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e35321e4b4a56a49c7e0c8283ce73f64155a99dd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.c60449bc8.0.tgz","fileCount":14,"integrity":"sha512-KywO2q/rhT6l6jskNdAVUpj6tDYSsKkflgPUtgEE2g1dzxETdAe7g8IW446CEi0xWAFM+Tq+pmTo/zkWGwebBw==","signatures":[{"sig":"MEYCIQDMWxZJNMCVV9doHjDcqtd769/gNM8FqWdtOa7wtPP5DQIhAIhK+0RHViM2Dq9MIZomq5VGZYEP8zlB72HrGM4vlY3R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVOeKCRA9TVsSAnZWagAA//0QAJavw4tHFBflS0u2bxjz\nY/LMxiggz3TMBHxn8pW2uH06v5osgm3Ho7e6a/cbTuzHrBz7LVL6FnAoGcQO\nujnN21TTmlP7WI1HStSVbMhrH+gLHHIFKXwbCmwFYQMrsC+VlFjsmdbvvoyB\nP88uVDFhywWI3NXAKZThWVfn1sNRNcTWqEfEDqIxhWMiWbw6sG1zx8mygpHf\nx3+9yGz12QfNuX74C8G/WJ7/ZZSami0afcSfxJJCKaHL9KqbZFJ4TOA1NO7g\n0ZSo053Lw/a3FfZTvMn4wG8zRSFrrIybnODXxtJ2WQezDLLrJT6G0kbIm79X\n0wlKv3ef5FWkkqkEpBkFpMgRPbfCaaDNRML8VsExsWnKaGFrZr6HpaSvPSLP\nU5cqo3OzNC+XFFH3L/2ztvk2QAEwV7mJMr3Fdx8Ox/zgG2n4j5aSsV6scAC4\nj+lk4pIiIntaZ77V9BteSf68ihbEfexI1ryJFE7qtSqUxxeXkxTfaJ/5fuJB\nhcFXptGAHRjuetwznEBMIp51EnGRX0iX31IOOwt/JzhZHQYnQW12s3HI4UAj\nYprNX0HGeNsO3QarSaLEKnk+gFEkAmSkhA1VXisY+UDduCOcMc2vmq2Xtqyg\nrPQrSIcbaNySPmw/vhObQHDwh0kglVIbx/uwLlyLEf5jedJh12oAsogi8ldP\n+g38\r\n=8w8H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"874083f8b4dbf457158a7eaf9924ce1143ef6fa0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.c60449bc8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.c60449bc8.0_1616177033870_0.5282673822217261","host":"s3://npm-registry-packages"}},"11.0.0-canary.5f0fc444a.0":{"name":"@material/auto-init","version":"11.0.0-canary.5f0fc444a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.5f0fc444a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b3ebcaea5a5060dba741f03293b5fdedc51f8440","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.5f0fc444a.0.tgz","fileCount":14,"integrity":"sha512-XvGYZkZviqmAXNdbQgHD4diw8j1llTITjw3Q6CQnsCxgPgsvtXzkjhoUfndyDYPMEG+G5/wxj6PSosNEZkotSQ==","signatures":[{"sig":"MEUCIQD2lFXsHIxZ5yFDpb18CBlMUK41GZCvKptyZmQ4+QDaCwIgHHKYY+VDOv6efMnNB+153UN0y2dBG2vmrcqmh30b7iU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVO8uCRA9TVsSAnZWagAAAOAP/2YGSl8bIrdikkW+/s3X\nUo3rBGtKqkqS5pe0XG+B3/YBwLVGXl3mP1U3BErBJN4haL5Gj5QO5swHq87Y\n41gbNG8Q/i1TH+sN2WsfauhfPwCI0n3r7G2kc5B5B3Och+ipa98f7xmNBdAZ\nGOaXoKOFd4dBkatSiqQT0tSa/bJqXXsHmKGQ/Ac5HLN/BBtbDPEzIukmOera\nIXQCwZ9NYVVmA5sUjeHN/13d3GCEuavR3cKs2wh/NUW35KcIClAY0HpovI3m\nWazlX48UU7ZXuKb+f/QuaCcXJ0OYFZizL6sKaBDFqeIXLXk8TkW2C1x85wsy\n5/NG2MusWiOGdcTx8+RE+71ncX9xZUhvGwrLm/ej/aFo1KJOxYYWOTikV/Vj\nA6bRCcUcB1WHkElT21txJCBn4vERZ16gOJcQTjojw578dXzcvtX3Y5j+CfFW\nILcoxbuxG2v0gPQXz+D72s5O9arJ2LcSHnDZXQsAOrn65IpOJLVS/0vjZJmu\nFHcIPD/5QH1VO8kP2SHDAmA2DsQujCGq0wPh9j65ngGcg4szm9tf37xQGoV+\nABJAJnQ5nKz62izEGLB6xL+dILBQRN1tU+cyXOJ3BKcPhVBvtEftEo4m0lOu\nlYdVPzExslAuARHsLle2E4wwT45YULrNW+7Abeap6hn3VIW1wmFWuDsBkGOl\nqBhP\r\n=uK6w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"122f31622300f5877c850a516d74f7c692d0718e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.5f0fc444a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.5f0fc444a.0_1616178989877_0.17109292299830847","host":"s3://npm-registry-packages"}},"11.0.0-canary.4567a750d.0":{"name":"@material/auto-init","version":"11.0.0-canary.4567a750d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.4567a750d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a0b35447f528c14acc41ac26ca1555372d7b1a1b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.4567a750d.0.tgz","fileCount":14,"integrity":"sha512-i2yZXjwm+D33cW1KY/sDR873pL2xE+tki6G6LH34TqrExTTRNzAZaUHi0CfBgWR2bmRBcTgHv+lvRITd6dgEBQ==","signatures":[{"sig":"MEYCIQCVo/gmOQ3xV2namBjG3U5QCo7Uv8nnTS9inYgJ6OD1vgIhAO0ewTS49PfxUzkocQE//e9X6/zs/5z8it74aEF+1V1/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVViiCRA9TVsSAnZWagAAOEAP+wXd0lzAthJhEORafA2x\nUz5Eqp9YvYe5kdaI+thvsmA0DgKRQeajESVARvJgJHWFuDrzQxVSqZHk6zf0\nmNxD3hwM2ZRXwDuMrMCHWRqC7iocg26si4NHRGiayJcIYNZ8UQ6K6ZqOzlIg\nMRC0Y1sYV+c6rKutBikQ1dgywBbWy9bgN4Um6SvGXTXiuhIC8/Su0nDhv5i1\nK1sXcFh7w4FP2Ih0+cIgpdVaMfm3xLf5XRwxIaintCUYopdmDfafykw36z8j\n88lgZ0SXjx52IsvVC8kdUwcaphMPZ06BSZv/d9hqqZ6wUJ/Wd65bQxBX8Yhl\nuTGLaRIgPEGP/CdCLbNiz64cs6Q7ZJsTm0wuUmdt2M1Vp9ZuN6lklqR1c/b9\nlpZyeESzP/7wW92RuJZHImsxVBYCCyKPbd4MNoNcEtVa7X58rOM9SenPGcPr\ndVHq66ftdV5XlvytGbiyWdRlMrrZBSeshDgHW6TnGKVwL2N2khMzwjwDSH+m\n7V3Ja6Tyxg0TsfeZvXtIBYuKTS9WpLJtebEZm3oemjHRvzJC1Lw7fgBsGepU\nttt+0oX5W9wKmRdLmiLSs6dSirU32mEGsQbOheU1u2u7XfYLUa+p084gsTYL\nIwI3TF/p03gP3FFzpHztQlViDd9vCiLBRdhoczYYpZOu18lzXzfhGnnfab1V\nKuMX\r\n=D9WY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e165b3e1af02e963deb71d6f39a7df6962710c30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.4567a750d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.4567a750d.0_1616205985580_0.4229653047674238","host":"s3://npm-registry-packages"}},"11.0.0-canary.0cde52f5a.0":{"name":"@material/auto-init","version":"11.0.0-canary.0cde52f5a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0cde52f5a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04268641df05f719f56e4ce379844ab638a0e95c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0cde52f5a.0.tgz","fileCount":14,"integrity":"sha512-/2pLScNEfC3xbQ7SQnSaPGjl83wlJ72wgxwb+PI+tU/YDami6NrI1JSEQL9GyiaHMZCbGMaFsWFn7ZBFPk+bag==","signatures":[{"sig":"MEQCIBjL8+7fcEalIBPN86yZlhOeg8CgiEFo5E/jFS5tR1siAiBXMM7IWr/0RPguTL5zAaT2of2MxG183mnPXWX1SHTBsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWS/kCRA9TVsSAnZWagAAYNwP/0DCNh/23eSHd1O2QYhF\n6poK4I/wRRA0Bi/hF3patDb32wvtnnXXUMQm9xpycSjlfUgAQRgvYIz/RPgp\n7oL88SzsNartMIftW9vuTK21bzlqzl7Faz5X34sEvDQUcNML0UhRx8K+roT3\ntl0MMpp02Su/dZE9kRrEXrKIaBFh29sC6DO8W0DMHwDtNGa3WqdIJHu+6EVh\nqugEhKjnfQ2xMmu8aluzWFof8OYY3ovJAjNoFEm6J07va2rWBcLVp/wx9wnJ\nRlNQTNiOj2ewOpzi9ea4hfIAG9Y+whXeRNPef/q5apvGlT4P3O+ZIbceWdF/\n0gOCJq9vzx2zaAQGYILVqV49raBzuLmSUz4hjq4O1cXv1PaEAVvnN55lGJFN\nLtymiyob3TjXvil2cGxX4nz9IdGn3TlMTPmRB6STTIPUNxwUc92UqYUMGE4r\nnuyF/ztvmaZ1Pl1FBgkKHrUh/v7KobafldzdK4SuxF8fT4R28AqxvKtOFsNj\nPkUpBqEhInig3OMkB9x/OWBr+OhGT2tj3lYyW59vCquNiW//IqN2na5LljZ7\n1nRPOOB9rrjqu1xFMmdIyjsFpN3/m27veMhvQNweka8is2eOFxwT8kgxOB3V\nTE1VLocR4cGaQnN2BtWVZOnl337/sH5lcpNFCVVxPSN6L4kh8zmi3A3UrxnB\nxoRH\r\n=lSDT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f6719c5270f569fd2ab44620e89ccd53a31f98c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.0cde52f5a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0cde52f5a.0_1616457700226_0.8493869333987478","host":"s3://npm-registry-packages"}},"11.0.0-canary.48f4b67fb.0":{"name":"@material/auto-init","version":"11.0.0-canary.48f4b67fb.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.48f4b67fb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"777bdecbbd3172003cbd1a501421b38453f9f25e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.48f4b67fb.0.tgz","fileCount":14,"integrity":"sha512-yms+cmuDrv8zCaMV7d42NYkMIlxBffLTd5FGWuDHdNnW7yIQVIKREaNqs0dR60atwz48I23JEvtH9L3vfcdoCw==","signatures":[{"sig":"MEQCIAju/aVKJAYLj1TPkBxfs2c37U2kX8quowEjoAeRbSmsAiB2x3fDMGfNh0lLhzDTUe9gm0qXsp+kX0QCUrU6f3Nm6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWkb+CRA9TVsSAnZWagAAYhoP/j3X4UDk950HUxPx+iLZ\nWEqTREcZg5xWOOgnC1luiCbwIQYxIXR3ynX/i9yTTIBMP/QUcVKc94D5FgIT\nF2rsZuoNI07bw6LNvivNHKrQXLml1v7KEXoDhXve5AgPb9T9qt/wY0FHCco6\nM2yw6gUmswZwuiCdQ4TG/t7N3gXcfC5M6gCzXiSvQBIVTjihl2aT8zIUtORh\nqeAvPdJ65/zzmHL+8Dew5etp6oPeC1tKWD1LQ20qksVu7O3NsMLq/jeBRGO+\nXmUY0gcG0qXZLvlT5HL8z3b1KndbjfvM9Rh9ZGIV+NKplEsyAXIVvHeSJr3A\n9b4Xz7LOAeeePw2RvEFkCKEAoPSsFrqu10UdTpjaPcn2Wla9Xhf67GScpGmb\n40LUdo77nbOUS1POA0AUKRcPcujYVrBaFFDA1TYgO4FIBJv8zCZgOBZHGDC+\nxGKCkboGWXMWVijSQhUewaRx4sMsoAkaDusg40xB0QyXIfUY+pT39USYUA5b\n90h4Cb698GpSvOpO6daqk6evwY5HqHEOmITDGMBMVpVd6vn35BCofPa+afqM\n+moFuwlqAamNcv18APt0ZmzOiJvpdPaS//aTSeopwwoY7mw7obqUqiHQe5As\nxp1eIzeZtiLCA9uHagjCm8AaoBRSNLma0BdPeW9Nk9C9v7ocI8hIaKgIxjyW\nuQHV\r\n=CDgy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f83669b240feaba73206d330f10c80a9aa31c1f7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.48f4b67fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.48f4b67fb.0_1616529149490_0.1888940725840227","host":"s3://npm-registry-packages"}},"11.0.0-canary.0b8cff734.0":{"name":"@material/auto-init","version":"11.0.0-canary.0b8cff734.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0b8cff734.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a186a0736ba729d1cfcbfa5a24120263099fcc8d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0b8cff734.0.tgz","fileCount":14,"integrity":"sha512-PkToRkog3w7QFz99KLqR2MV47RTIat6WlBSHPwFBGlhxMvJ/S+MKoe0nWCPPCDju+Oy+0l2kHvoUt0Bo8OZL9Q==","signatures":[{"sig":"MEYCIQCgbevwng/2oHh2Tn89kE+F8TZjt/ZRPKUpcRkdDpgSbQIhAKPN6BJ9GXcXl2vhnXFSZxYUvTgGHLLWOPlsP2z3Q2XO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWkmPCRA9TVsSAnZWagAA7uUP/jkJSJtN8urJ/K1YXkqq\nYvr8BjJdjogbfacHUn0gfMPji8zYOtjW5iS0Po6qZQBZ5SgZMiD7l/I8mwIx\n5NSRkjd99vaSEUf0qnejE8pCZZx4lnckp+3lx48DALqtsqLB8oJr6IgVXb3o\nya7XxGv9uRmM7dQt7wPyrS7bJiOGfmG38Ceq3rQ4QxXotYzxzLiikQ1rbzTb\nU4G2g/a0gTy/2t8P/rkBR64EbGqQdOaHtQ7nSHc2CBAVs8aMXTV0drJ/nKGI\nY9wb0iK06vsKjWuiYDK+/kq69stMEh62kAfz69lDghWKgf/xIw5jn+qLmLF2\nlKntis9sd4nKIKP2KCO0H0oZwamO6zTTtP6eqlhTKIh7xUnLFiiYT0FFFlE0\n/PDq64p3h1CaDzM8cuowaXE5kUYdujUXVtmoZ5+x0WUncQtPmdEXU433JXzO\nXZwA+oh2GI/PlIJplBHOfed35BfJodEWY77Dj6FySeteoNE8YHL2EMtMOINi\ngrYPKZ4y09jpoy64X2+lu3/ISODdbI08bXARVB8HcMOJpyzhe9hBWmM97eB+\nhU6bbSC01CpoGpx7oBEgDpx7TF8u4WC6I/1SlmvRxehd7+OMwf01UE57tETj\nR/eLFboUg1IW+2lk7+91GlhWCSWwwNvTXI4oKV7O5tQY3V8n79x09FZKEIGQ\n69Ce\r\n=MJSs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0371cb1671557f9e1d8a3bee3ffce11bdea058d8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.0b8cff734.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0b8cff734.0_1616529806750_0.18971114467584638","host":"s3://npm-registry-packages"}},"11.0.0-canary.8943b991f.0":{"name":"@material/auto-init","version":"11.0.0-canary.8943b991f.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.8943b991f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d2ed7b578945a7c26f07c13600b35cc5e79e67de","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.8943b991f.0.tgz","fileCount":14,"integrity":"sha512-iDLuMo/Z7Ilh2o2dWYeI8YuoMDYA+XYH5R92ZhKQ8gkL8zb3G2agjBSRFDTOf3Sys5fwIZaNxWHPqZGcgroWig==","signatures":[{"sig":"MEUCIDVK4SUBcNeYey4athLCSEvW1xbwtlGFL9CrWUF4XC4kAiEAqylUj45Of89kk+YsCsMdWPvbxhXUYSb2SannoD1M0xs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWk9mCRA9TVsSAnZWagAABfkP/A9Pj5kJvNwBQkHzY7v9\nJn/aRALqHNtXmqunl8eCitnfcsIlq8S0CSGlf6HjrC3ij5isG2SVqqsc8O9n\nQ6U3OkgcbV1MoZ5QhtSfNUZ9aSeJ0z84IjISGvSocFjsYd1kR93Dmvgq6lif\nl1WyDtYBJSytop36aezA5+qtCykpySy2zzQNUj6HAq1258aWAs2YJIehDwQM\nG/VlhAaBD33CAhtv1X0CspYOIuDPIvF6tvYuDKfwWeqK/xoTbZ3lXI8cxIee\nCUpeq7wtpepSpjLBT3zefXBDCiUSAhbn1cuFtTOkiZu/mMGeTJgEeX6CRXI/\nb4BrlYKp51lo9n49SGh2viDBB1awEoU5Qfa5w2L/nRw/AFj1G/IjnONHd9F7\n0Ema41mJ5eTXXVp/cKr00YW8q6+kKdgLyXx54VklvGYM1A0IlsLjdXTKgatd\ns765bliTz7CKo1DlACQ85g8Eh6rnAAubY9A6qEcBzFqWBkOfZu/av5iIhRR8\nzoj0p+DylolhM/ovDcZcDG5svy5+fumsk2PanpJSr4oRkxFgYJgO/d9xwF6I\njR/8Pjmcl+S/ZNAsk9E+1iKnA8pCaOHBqNQqEECAKAE7anIhEymH9ErRnYzN\nonHQpUF7Fw8eSCq+S0B8vONFclg4y3SGSZTQnQbO5Vf+a5qECmTWVfHkOqIk\nEoRr\r\n=rHhS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85cb2528143c5117974441e499367a5fc252b745","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.8943b991f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.8943b991f.0_1616531301774_0.8322509827158051","host":"s3://npm-registry-packages"}},"11.0.0-canary.3955d8d3d.0":{"name":"@material/auto-init","version":"11.0.0-canary.3955d8d3d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.3955d8d3d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2e7a60b1f058659bbdb7a33b62c62502f800b17c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.3955d8d3d.0.tgz","fileCount":14,"integrity":"sha512-/toQFHGy5DZvgKJDbihZsYFhAX0UhZ66jzeN4Gxnn9XTd7t34/FGE3+i4taMIlYZSdWSB9fXPR39gobJxPcdiQ==","signatures":[{"sig":"MEUCIDgs0Pelv33ZT8otMGa1OmDEdDns6k8sqENxmn+blYvCAiEAiAeV22POMZzz3MID79klZ1e8cZML6M0GgcpKF4N6vwY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW4+5CRA9TVsSAnZWagAAt5EQAIyrDuncha4O9UzGwxNk\nh9kug2Zb0LyvdBC4QgVawlcPO1pNl24SWdhxc86WTzFV0qg8eDKalpCeQV6T\nuPBrG4X8MY+CkUbVjEIsiPNBLEQyZVyg6gZLDLIr6oH0crtCvSk7iuZ+ccMh\nGyjJFsMrRxxHHVn8oxQay90fB9rHbF3AOYapMj8BLOax75VXtmwHCohnWh8m\nRZO3xGGSBJDsgSD4+QHqZtlGn/dlQJwVQHedVC903FkpJ5wFuzo5F0Q/CKBJ\nU6RbiE03IVySgHdc0JZtiC2x7qmcCraBxwmUWawJxUxHXXd0uCR3i5QcOuD7\nudcUP8E/4zysyUVaZG/wzxcp5YdjCv3GqX3p4z43GPcMl/oLdr5LhHAX01VX\nn5Cq4EH/U26tP0lRB47iKx6bVFE9dYjspIYeRPtosbQ6PeprFQUuXNUt2gP1\n/T+qO+NWwzRDCxqIH3NLRqFTikRd4QTvEWcC9U/3gF7CPKeVeiqQf3e1m0cX\n1opcEnZkQo2MJTjSc25WJrgQY/d49kETE4tq5GLakePHkEpcc2N9D9RkWz1N\nNrZVG4EfJVii+V2/1hG6U/ENQESEGm9gD9IH9K+SfRSfXImJHiUNFwaQ0zKk\nFtO0GfxfouPl980F20IKWtPjI7bajP/Dzd5sdqws1mt2sPDV3Ew8ReaGFbcg\nNNlJ\r\n=tAI9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2679d736975b17823079a52aad1e329d8c2a3b71","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.3955d8d3d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.3955d8d3d.0_1616613304783_0.3195847006293542","host":"s3://npm-registry-packages"}},"11.0.0-canary.23ea2d85e.0":{"name":"@material/auto-init","version":"11.0.0-canary.23ea2d85e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.23ea2d85e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"201fc076dbd02b181856eac6a31fdb9f6c7d7368","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.23ea2d85e.0.tgz","fileCount":14,"integrity":"sha512-VotMWOO8G0mvgQGoceH82yyXQn8Ud1cdS+5JFJuPX98vfN0t5mKeTc4EcZSOWnSZqSrJ8sLUUEy8R+UWcoKD5Q==","signatures":[{"sig":"MEYCIQC8uPkzFacHddOvMulPoPscOU8DmJF0AczcyXeqznXuygIhAKc5qgwP/HYL3Ec/jvW/L3Z/GSMj29r/nIbSkitxARn7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXMjdCRA9TVsSAnZWagAASTcP/18+4Ml1dIigGZbqQSjU\nTfinIEiShR1tRPnMzlOhyGi4RwsHvRVV6fRTSSbDDt6Ly92P3mM2hDGxTG1f\nxFTtD1gYDOR0rPR3NhBWMT1nxR6FRMi0uP+LiphWB+cpQZ6+MZsV7oE2GfnM\ntYURNLBkhm7tQaUSG9AGNyeJ5SAUZvq1CurWZqXCCD9JsmNuhYIy8tY/D/4j\nlVfqV1xkh+j8qa8BXAkhstpFi6Pcm12xZsmxrvX4T+Ij6Nqixq85nI2C9HOR\nkdrmwP1P5cVgavyUg0IGk+TJToOc3gHP94L2YEEeOfi+b0R6fk1b9vyDQukb\nEFf2CGxnvrrVK6j88NEgqkLsWMIIr/ZzI933OgSVAj/LNG4ovdDqngeUtYJS\nJJIWYP9e0T4mYnpWlw97E92PG01y2XSioPWHnyXgqdDEXX4eB5nQ7MMi8Sys\n0f72rD0hSEKvVE3JrTwZJqP9WsifvlW/4EGAd4p7mm9BIv4MHzD3OE2i97jk\n+hLUDV6x4tgeT50K4VsI6+ERekP64Djj8bNwxUiYuw8y7yd3eobIQA6FuZ1h\nBsc/Wic4yg8xmFYh3+x4E3XmgFEnvMrX8xaQqZHQZi7BStvvYUmdg+z+xUzH\njkMWayIv/buO85BIz2UZYxnw2kHf8nAOkBHNgs8LKAIOiZB5fKYfwhRcFPwo\nNfkf\r\n=8qBt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"705a9cbab9462d9e300da18c26d7992aec452ff4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.23ea2d85e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.23ea2d85e.0_1616693468353_0.35592286779198323","host":"s3://npm-registry-packages"}},"11.0.0-canary.e3ec22f45.0":{"name":"@material/auto-init","version":"11.0.0-canary.e3ec22f45.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.e3ec22f45.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"78328696431faa524d61d4d42ea0f3aa94c64705","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.e3ec22f45.0.tgz","fileCount":14,"integrity":"sha512-XXr8f0sTYo8dw+F/m4rt27wZpveuMnc/MT4zHO5wwzX1JqU58nrRen9H3NxlKhi08BocbHnppzGAuJTUuEZJ1g==","signatures":[{"sig":"MEYCIQDm2wolE8d1FBqsdDP4b75dO1qQzKLcshP00LIi2Q485gIhALy4COnVQBh+1qGJBwx/lhcitOvIoEWb7X3X3t7kXPa0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXM5FCRA9TVsSAnZWagAAfh4P/2Dgq+UEwmSsYC8etjhl\nZutfOSqzlf7nA02lwhGaVHmAmyq4CyiYme1HKPbgMFpHx7zW3jC06FPKJ/q2\nJ8SDjYOb02IqaShZIWxevsRxLPmx+U2wdCm/2/4j/7WXbRkNbM6aCWqIH7Lm\nxD6bPGp9ZPRErSnh/p0pJSNic03Ej9JtSo2izkoVSXSLV8R4WRj4D9PzLF+3\n9NWIJzVan74EQvo24bBP2y99eD7CmggSW0zmSrTEIfjL6bMJ8MwVppSKWjYq\nCzoh5pP5Lxr02pQcoNMKxBjMbRIy3t4/0lzvlyawWXyRlOKVGWiAm6tRt4BU\nP7/dztACuz1Z46fmzlyU+d+CtaYqDcpMKhMuNBCxXhsAhTanQ7CmmghttokC\nlj2D4w+SZG3AmKU5WsXlGkRPydpXDoOglzlm0moITQujKz9JWfATGT7/a7G6\nPFgQPYu/2s8ojlTdK+Hu5aBQS4WGwRQfpP26j7ZGCwM6EEXAU9s5/UYIx0Mc\nSfdzdrF6Kx/ifdocgHFxzLwAMakzRsX55Jrafy+O1ykNQAaduf5vTDkQYSxf\nNq2VIdm2yMx/8MhttaJAlsU8lZYYGfmFGVpxmKIB7WIb/1MVSJx3IA3Nuxxk\nnusIyhZEZjj0xOIiJnI2U5H+RHDLuFt6xodGpRRAzKxYyCky35u5ELwUIn3c\n11Jb\r\n=P9b8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2827fdf50a2ab264554f8f307d61fddbab82c5cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.e3ec22f45.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.e3ec22f45.0_1616694852708_0.22501774145219455","host":"s3://npm-registry-packages"}},"11.0.0-canary.4ceb42220.0":{"name":"@material/auto-init","version":"11.0.0-canary.4ceb42220.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.4ceb42220.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"942dd3fbcf173a90534e4fce570953dd6a7a0dcd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.4ceb42220.0.tgz","fileCount":14,"integrity":"sha512-WArG8lT7lhAUkeaXTD/9XSRJ5OX34yZRMO4NaNgB0iOGrBx2q8NE4VIYqL7Pl+xAhunnDNjoKz4CmB7YeljVXQ==","signatures":[{"sig":"MEQCIFK7x1eFWpHeRkYJWo05h2rQvMDk03nEyDRZQNDV7osAAiA9HbWJINX6UBuLQOPEmerESD0LC7VtAWOV4Qa6SIMXAA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZOaCRA9TVsSAnZWagAADvEP/1SRui0ZB/rA3pJvY4/2\nVZb/JaOXiS4cgFHJOPBhS+AOCqiXPrlCa6o0JOGSJt4V/6PbAszp+WPzIuIN\n5q2ObRmoqg9FFjwn1sxQyAsqqe4VWQT/x9/wLsettGID7RTCv3PZr5eGdgUH\napMZ268C3FKJruWtiBLZYpQHFc5Uv3exjg1IDsXGqXbbFvdtss70OoCpyCmp\noaL2A+kuil1Q+0FEjW6M0csAZLMwOF5MZZDy9PlnSRseJ1B00a1W1RZ5Iy9T\nV9iF0qxVwtaVLL7ykOXTRe0Qe6XDYmGHjaJr8LdofeTvjisqrlhwdCjwLLj2\nspA/Xe9PXLhFCwOc53dhqubrwnyJ5b92Yq8fuBMvwNYW7b5MuOZv1RRCB1Sc\nq17AJwKnt0sc083qPl6wZ2qUqulOQh1lTnN2jOIll8n0dkjlLoN+77YvUVQr\ngPd2dtn1uUEDsTAZe/jmGby5VxcZk+pfmQowZe2Pxm7zPxZ6R0MxdrhBDunp\nI88UQhWwLOaDKIkKrLV2gO1EOTCX9SDIFqbNtoBjx4l8mmnFvw+5BJEOOcG3\n+JQO0VClykcz6hH/VENszmkucUr7VxkeT3JUSFh7O322VmMRKf+/9yskJ9o9\ncGKc6I9HtzgGGUVgVo+W+RViVFpHmH5a0mb2fM/XHUXulW6DSNe0HdBNBMmm\nHeTJ\r\n=Acd3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"75fb611f33737c857d1b59245ff5a31676d7f3ee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.4ceb42220.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.4ceb42220.0_1616745370412_0.009694565649085218","host":"s3://npm-registry-packages"}},"11.0.0-canary.dc9c84023.0":{"name":"@material/auto-init","version":"11.0.0-canary.dc9c84023.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.dc9c84023.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b49127d9385332a6bad644f46be8e799339223ce","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.dc9c84023.0.tgz","fileCount":14,"integrity":"sha512-AckaI3fykM/MZdWxdDMOLFnXQ4aIq34bSULVFQOkc5MkwH787k/jI2RLGkl8XuRmLlu6oqtz/GFTBqVcNonsDw==","signatures":[{"sig":"MEYCIQCIcJ0twEo+lUulOgUld44ThAG6jVwONTsROivCkANElAIhAMneg3oiBHQNmtTGEjCMZSdsNsiWRe7TTnais2a9Dedo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY2QpCRA9TVsSAnZWagAAnSwP/jIyVzghXQb41rAB3ixE\nXw9s+d1uM0M+zOlPflxacT8zK0S8GYc5qIT/xb7l73dUiWVsfL4MbYq5Ns5f\nIPHpHko/CINkt2xEUY2k1+4XyoQEGIcPVPVxlPtYhyuPzQUGgWQ9RETqD+Pw\nezVbFGImEWFzFtDERF/0AFVa9RHsWSOLuyLDi1IF6THZ4fPiKLTsykROGVSk\ncJIrli62UPeumxlY04+ZLuEkAUPmVcEYqZTX4AYFPuSOikk9C7ILWPfgBBOk\niXsQwBA+HNkbQjsiqoOlmQpZVAHyBEt5xHkyiEntSnVG26So2PaGhSAuduNp\nAy5IxfqHSRogrHp9HgEwxbbu6peuAjXfEQIMyJJvNknkYX7unz6lj2pKOLJL\nRiB1M6O09vXP4KyEPjruQ4AKrln8n+t+icTn1iM5Z4djDra9w86KOPhjMDAK\nTuMH3T9QuFhZV7a9f8w4TqfwJhFwJc1/7M2l7/CGbXucAGzsLIG9nBgrITDV\nIMRZEUjoAAMo5B9G+ZeiZnSlogariv4BDw3UFOzJ/kn/IJqSwvwERrJ4Xmyr\nyfpJSG1ZpyFP4aMd0xLJTdeww/JENHxc+BxlWB/ixQ9+UeL9bb19K0/HWDuZ\nJ3cJkp3vOVegDxc7qyqlrWtRO4fdYO/HWLlVswQ+ADtef7cQ1X0RENgmmLC4\nCIjl\r\n=BLed\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7f7ddbc4309b6a8ce5cca3772255dcc6acdc701","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.dc9c84023.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.dc9c84023.0_1617126440541_0.7713661056073131","host":"s3://npm-registry-packages"}},"11.0.0-canary.56fc26962.0":{"name":"@material/auto-init","version":"11.0.0-canary.56fc26962.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.56fc26962.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d924397f33ab28338cbe018159f92ce745a99e3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.56fc26962.0.tgz","fileCount":14,"integrity":"sha512-09ltXq+QHszJ8VDcIEkCvpJSWAPDFod9QvT4AfJ19SRs8x9rw2eI4ompBfrEHnquFdZVloCQU/6DWNyjRtAMMg==","signatures":[{"sig":"MEUCIGWQXBUlyjtr6UnnUbagZMq5AiXG3coQQyfNU2ezc3BcAiEAuRrNNxT+fIfEuSsA+e5ia+9nG6f/GSHytOb+i/4APYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY8AnCRA9TVsSAnZWagAA4WAP/11Fq3CSGnSv/ejJCNd/\n5Tu6MrZ7/YP4hswuamUjkr8okZwE8KFt9vqlKILpT6MQsVdD1WgiTWtdACYi\ntMBiYHzAgHFKtmFnShD0Q0THrWm6UaA2ugYSEaeMjhoH4+gDIXfUFxs8hrCO\nwcLFkrKkuhRekvvgJBGegk4c5U4/yxJlt54OvPVzk5YJIVKR1cPsGTDNO/SJ\nz5sPU7lWVLwLFdH5zB7Kt3MyzQJedWGXWROV3XXEvSr9GMrv/RGVt5dV62OI\nLLfTNh7j00Ivzy1doTHfuq4UE4xdzWpzQzbW9zk1ZANxwPIa49pRQjbaC2Md\ndif0N8kXx0fOgJGGrMF8onI4p0gvghu8FBOXNwO8hfDSuuPqcEiHOXioS86e\nn+B6+W+YdQtWq/vSk0snuyeXvUBNXNgbOQA/LLb9tKksZOy6BJMu+rLlSNCP\np1rC5tUV6MfHDFf5t2uga76DFAAzxiLVfJYRhJsuB67bjDdabPsjBqhvfWeV\nNbaFCM3OYjuBi4s4k6twM3rxJhZSZTSfF1LE1JViDRNAg5YsJQdOs9Wa3UoJ\nqXrJAOe4KBvAzjWk8inyyAHZuoJc0vRCFIWaHequkyjhDhADHRtZThippQ2F\nMlgHj//0mt3YNcZAuZLPZ5IQO1uMduT9Jx2czrhSXfKyIU/pE7uRWjZd5Lmf\nQXee\r\n=C1Kt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dfdb8792d4ee8bddc61386ac6a8e7e216c1681a3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.56fc26962.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.56fc26962.0_1617149990657_0.12913278558812236","host":"s3://npm-registry-packages"}},"11.0.0-canary.bc318250e.0":{"name":"@material/auto-init","version":"11.0.0-canary.bc318250e.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.bc318250e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8a2ccc7bc258bcf5bb72080f22f74c3d9d56ded6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.bc318250e.0.tgz","fileCount":14,"integrity":"sha512-KUh7s8HtEfKHQXI/OF0/dVDEVIVsZGh5945IweA/cbJdqpPSHB7V9Y1iU8U8VYmSUdMLaLMtzHbmq67HYrcKYA==","signatures":[{"sig":"MEUCIBFyQ4kFaRrh3rJyeL7DDGrhrGGMOcQpTxOWlWqoaNRjAiEA4AdAeNGR/7cykVeOY+EkV30A9YgvWrz3BMVreU/IhBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY9EzCRA9TVsSAnZWagAAvagP/j88ejPfY6OthsSy66Cl\n7eo5jucpxXd2/z+tKQi4P1NNPjC/UZQksVn4kc+9kADzxjl19QSz2KcJr2pl\nm4OdTYs+Gji+dFmHdSZxfX3gi58AkyJYv2wmzPblq+jyC6qh6dXoWEqW1Zf9\nU31YV3/FFtSoQrVSshVmGu58UAQ0kxgsW7OlgosTxMIR08gQsEN4MhRcQeDo\nbw3K7WNmUdh5rX5jZkpVF06iD6/T18LJ4bZB85yGxNgw3laVLkCO3LYWLLki\nWyiMbf2lxSlsVTFphXkTHbweCxgKhD1n0Rb2Fx4kArhXx28oCq7qHUq74gYD\nHyB9g7lgqfqg1Rj51RhEBpHmDW49D0Lm6MeFvOeGUiNFo1H1DIk0OJF9EQWT\n9Dg5QG3I6G+VtVUofTcZkaEhjaX2NSbSJ7dJLHJCVAf0NmWv18ynBGXKBQZK\nCy/v0I7zrgF37MMN2hpGjnkkO4aY6+ZQYAOdwnHS+rIIvbT9m3cPox+u8+Yj\nfNAkrWdrM4KtyFVC4VTHwnLa25rcJ6WXU4oi9C1p26UpzAAlYohrZFaVGe2/\n02PnHssFxosI11nzcjZgdV/I8cX50xLmcWdOyqR2RjnWFVrIMVC9tJlYK6TZ\nqPikkCzpVlLtf+74OYjzK538OFZHpMljid+eNpxw2a7vPMPrQYiSev8Groo+\ng1MI\r\n=pTIZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1de1daa9e4e0ee7a779d524a027b9e7566841b56","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.bc318250e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.bc318250e.0_1617154355152_0.33499143867545755","host":"s3://npm-registry-packages"}},"11.0.0-canary.edaee19aa.0":{"name":"@material/auto-init","version":"11.0.0-canary.edaee19aa.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.edaee19aa.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3b59a1f9ac729a42131fa45435ab37be70b0c2bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.edaee19aa.0.tgz","fileCount":14,"integrity":"sha512-dyyIiPXIzV7NzdhjonVGNfCtN6zTRQ8NwCWUritlvCUkjd9CDin242zzN7bJvGBzRFCERlr1PHHgPUN9KGuncg==","signatures":[{"sig":"MEUCIQD89kJU3UuNLbwIE982+SOcDgI8V3VVOZ1MhLTf6Vh+rQIgDJfU5U0gsQow0+NKI44QECBEeAkTGIPvmXq8l/1Nktg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY9odCRA9TVsSAnZWagAADL0P/02lUInyrkYQIz7EPveb\nRhCsJ+kjr7zFv8cdO2U/JOGyFdqaNWdNdGhWdaQF7JZuFlJiaAcM4i83xmdL\n9Z2ZCeWwlXHX4aVzRA/juPBfuwd1h0NOQZCky6i98h5RJ3O+sDQqqxAtJ6mg\nBockdgfb6iNon8wbo3JIG3xzgQsYnE9omRLEks4xgp7N00XcQxJ6zEbOFXJl\nuym1kW5/kWDi8mJofTYU1ocU9XrCDRfBKe/Maa/+qzJC6x1CWVxukzNJvMyi\nG0PzereFIRwR7w1jGfftzrDpeq9NWhctqWYjtMTNY5qSRohhDNoxZfOT8CQ9\np3sJLo3opaZINI0/J0rjdMexs0+47lTRY595R+KIX2avCs0vtgV1z1bg0UNo\nhtKmrD8cJljDi0oeOU39ceHrJIJfamhoJZGKv4AVqN972tJx4ZSTU80SRJcq\n4ClPXBCrtEaONButovIjFXXO4w4/LXZgQIoe7T+Aka6VlspjH54M0cFHR1B3\nR9Kj0s/SeBjpmu9PkBEzjlUo0nN17Jsf4idWLOdRdRGwJsLFY7UGCpyIIAxM\n/qL/7R5eJoFVH+WTRfZNhVHqk9T9WkIXzrJjdHaEDE+ZNGnSNPKuNl0yAO3t\nDNF8h2NyMnnoSWgBXaUwdlNoFEM/0l1A4Y2kZAMDTg5PfmI0HeNFOnOO8USj\n5nS4\r\n=Gly5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e2249b4be4cc5bba6887f28ddb9a3b9cc8ee09de","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.edaee19aa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.edaee19aa.0_1617156636841_0.48644469591800843","host":"s3://npm-registry-packages"}},"11.0.0-canary.24609b822.0":{"name":"@material/auto-init","version":"11.0.0-canary.24609b822.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.24609b822.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fef643fded6db68c8b659c16e815061637aa31ba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.24609b822.0.tgz","fileCount":14,"integrity":"sha512-LiNWs1xYIz7d3EDy1qm/EaPSSZwYrgD2LsabdcvomncOX4jaiiK5aUxU6Y1ldLsnm3kXP2c/rs/cBRCkr28dvQ==","signatures":[{"sig":"MEQCIEAn0UaZ+Poif4030QFDJy0zIGh69picjF6DxkK0NBtNAiAeO8URkhlbAjaGyLKFPpz/GuB2PJHjx5vSwrAnhcRj/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZOHlCRA9TVsSAnZWagAAvmcP/jSrEmBVPpXxKm1Zj2AG\ne+FMEnIFilRy428+j9RiAlPg4Zu32ULEoXY5g2OhEEEI1K1S6uJJ1+yWVexS\nvh/kwHYU6848y1GR2qTEVLwBcsCeteYS30H2aw12IYclzStsdXSHwegf9RQv\nvvDGwQkRTR0vFndt22m7Vedy72o+T3ldegU/Rr3eXbxzL0MeJ31nf/OIrCn+\nIpEcX7QtprY9WciEYjs1KatTTpx6dw6AGtKOo1TeVgv8y21GBsTTYfHRalDn\npvv8N38IymL8ZP2YE693DB0fRwrZD5GqnFkkpyVDqGjnYDkblgTTD44ardIV\nkZzEydekiFTKMTRNukoFrBIIBKFRK4XioQxAUuXywxnvyg/o+AgzgJQ5ayyE\nyB+FlgHBvKW+JPTH9zhUoVkaCN7JzkzFY2zuwcAJTYgaX5bYxWBB+GgUgKMK\npaBJO4q1KtcUv8sE59oJdgkJUyIxCobe3I1MnhNwjxA2HlYQXK2xz326ettR\nB7kviAR5zCatz/BFHxzAACaDFCLI0CNXP4LZKStqiGWNLHQHzRUs2H9KTF93\nt8QdB0YXLrZ9IOmBNoCrkR7SDUn1GzFQUXsAsMpylayzBwlyf63wZU3NTH0/\n5egR/BC+MndizjZXwaGMKRvipqGK9vFHro8+nA9k0tqPtJ081c8wXjfTBqHK\nu+xR\r\n=Z9QE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50b495134dae6937c2262389aba694d7664f78c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.24609b822.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.24609b822.0_1617224165344_0.2641889364641645","host":"s3://npm-registry-packages"}},"11.0.0-canary.b6cddc2b7.0":{"name":"@material/auto-init","version":"11.0.0-canary.b6cddc2b7.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.b6cddc2b7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64d689678361d34b2d882ee5eb68a56df239e71c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.b6cddc2b7.0.tgz","fileCount":14,"integrity":"sha512-g0K4gVyPsR75JkVVlxDXuZUZlPOB9kBI7NuBtldWfrTRaHqXrZ1g+epX1nlVwy7lA4ddVx1w7a3fMDp7yKLntw==","signatures":[{"sig":"MEUCIQChkEoDyKPYxGbzNjdcg+ugytuirp5HmhsK9NvLPdUTRQIgPs83eQmPNjEl0P99cbf9reh/p2fHHuwOLwu0L9Cz5/o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZeDdCRA9TVsSAnZWagAAt6EP/0FXFXf5rIG7aDiDS9d9\nmAH+HKnLs40+xH2ixqgtpLYQ6YBEFIS1QoqjSdFpnbLwjIJeKYnHbonyd211\nbC/ZPcB7Ap3aaS2FQkk2LugHvB4H4ILn/qw9WHevSuGeeuptolgvSKXVoyYy\nJjm2khuCh367ZSxo0i+MOXgavbTQE+yNNZBytv4L7uOdNr56zFz7a2KfczWP\n+lU9O7Er3Z/IewJGbnVRmBD4A+jpuCH8vG/8MDtgqP0hw3J3C/0hXRHRlFlZ\nVloeLDowREMBVF0vl0rfSDU/IGE1qrDDfQH6HQTCGlEQxxjs8mIfmO32Nfue\nkZLecgAvTXjx4fglReUFEaSVBaf9Z3RKPNQcZwniAIZcJbz/vsj3wC2snmu/\nb2bFiPk9bW1Y/xE0kKD05ueRqUiokY04iS1Zc02Luwripck3lXcgKeSVCD/G\nNC+nR/QxuwqoHjcshEpEOVVuxDG6VWdv3mgMFuNke7YIKGrVeuSNHoroVVVg\n9iEMh4sRT3LqqOfvs8egNAsCB1PYzjsmXRyaAnM1DXR1LjtONMJ8MlH02vfr\nnBEezodU9siEUhtbwvhb7U80ZuN/zL9wG85tVJh8tDmFA7ahIWMMEt6a8ALK\nd2FBSjZ2mNHqf8km1K/xkzyakGbqrev5l6yriTnNE30tjAhrQ8EOOIelbHNE\nJpau\r\n=9ri3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dbd92fa1a28a9b31a1e4eb476b15f4cff38986b8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.b6cddc2b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.b6cddc2b7.0_1617289436551_0.3091998336540722","host":"s3://npm-registry-packages"}},"11.0.0-canary.94937c78c.0":{"name":"@material/auto-init","version":"11.0.0-canary.94937c78c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.94937c78c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f79ddf905aa8ddca8ea2fb6ffcfabd3e4a038d42","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.94937c78c.0.tgz","fileCount":14,"integrity":"sha512-aGRvKCofFDe5tae315ZO23pemtir/HSPWqNaI5Fa9YbIWRrBbzZamG5mfIW9eykt1vTyWLi3LyfN4P/jtJcvvw==","signatures":[{"sig":"MEYCIQCYDoE2qv1MtD1PgHfjpgqX60ygeIsBfUV9yqqaTijg1gIhAI0tWGXAiNOdYV3piAVoV5bI1tW2R6Ku7qm4r2jo3yYU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZjQ7CRA9TVsSAnZWagAAcq4P/2dgHA9PM5yj9RoFo1aB\nXyx58V4Q8uP4cPfm6PZSx3/Fz6QpAFo7jQWneZ9CZTeSnMpidEEVIoo6OQVe\nAho/5XMlwhopsLnoiaHtsF3n3EJKFIZTf7oh0K0NZExe8NBe+jJlWar6YmHf\nVBdQ1rB5B6onkOX5IJLyofTDn3P9ShoQpfJOeneTOAEEfYL/gr9P8MTSjSoO\n98GHBkkMcvsNKNeWS4qEdGAHhzlVueAGuS2yc9piAqZ0Nxo9yQjs7uI6KSHJ\nSrMtZ9xRlWOKuz2iOYc8c+sQ/g/O1VNsbLGToFkaG7IuWWb39/MMfInhcW6V\nElQkbOqg9rXriTvj47gx3NYOUoGRZBFwrWZXoTQBoTBC0ag/LNdwmt9dX/jG\nxQN/Ve97GtYy+OdvSzCSrSJN7Gq6Jo0G7XfdnWCYx30X/js8Chdp2asx/ekb\nT7tjwb63Ih5OX9DP+FeiTf/ZMWksw7eCf+MHt1DE4DCSeF0c1t6tOmotm3WN\nXOpXUFFGri85AHx32WmqVagVol05cdiWsIvdHroyzFoCqbZCH4NGKAxl+w8F\nH4jJMkLRw8k6hvjIiG1cUQ7UqZ6AXevr5lTTqLivqtEZHcT78BKdKxidmnO3\nOlfX5TPDqotzWIIXaLbJ51yPn0opE17EakVFfZyX5JEHn/sYbyLEBEDVdQQC\nLZRj\r\n=DaRx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ada608c773d2657680fffa3be444debd83967f00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.94937c78c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.94937c78c.0_1617310778522_0.5649339600943588","host":"s3://npm-registry-packages"}},"11.0.0-canary.e7202cb57.0":{"name":"@material/auto-init","version":"11.0.0-canary.e7202cb57.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.e7202cb57.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68d6ef0f700fae645bd7498b05fcce0a41f52693","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.e7202cb57.0.tgz","fileCount":14,"integrity":"sha512-M8W6iJBPCqEM7MkOqh6Qr/45/uLQIm61VL8kj/0YePYGEfHg06ZcMo3WhaQ3g8qejXVsMS313nte/dTG3zJGRQ==","signatures":[{"sig":"MEUCIHRQKVPXci+5wUx04n/athX2uK26KMahRubaQpL92AprAiEA4/gC+OcwRUiC1a0/dfpBOtK43XxzEkMd3RFoED/I5Fk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZk03CRA9TVsSAnZWagAAUnQP/3+Gk7FNMud9w9kcUwkz\nU9KjeLAmYn3icegeUjE1TQo3b6j+7HWmU9m1VsLId/S0pFd2hIBXk87d6mFq\nnIxxcFbtF2KKZtfYjLLSDFdAi186WnpHG9fhxnb3B4W8r9pbvwFPJB2uxror\nVO1kpDaGKRsTnUaSEd6pUoQ7v4dJcw7yo2uCKCR08hgPwi07a6tURnXn9vJ+\nEYbXmkV13/HUsd2zGPVZFxE0s/Rh1ZGqFdXmJbegaV2JEIP63LL+Z14EHJd8\nklr8N859B7Exys142tTZ8MD9u/5LMkdU7snpQa9xTUfEgOWvMr+EAaBub724\nJfIN5wU0e5y7uNUiDaCrq4Tkcbnfg4nsDf2ReslyK3Fiicbl1HZx3HsNIpZf\nAj46WQhWdTabxjHXAhxSOiQLtn58fFmHNHAyb7Tm3Nvj70qWjj14RkCw8ewB\nK4S8xbL9B7jfGuHnrjvy15CPttFLnqfA4UhK7xB2YVwUVge6oLdfl24y8M6d\neOC+SQS/Tk1cQUt2bPE2maESib0JUdDfDEFPCSEYU8cqK0a3EJP8aSRqLtZY\nZrVl+YAYJX6Q+Q84jXLROFo+6WX2zrwJPQf62kOLEmYTrOhVfyoI48QZJZFI\nwsSBtixIsSYsGu0ujpBy2NJ/iZ7L3G4OHD5G9QNkSW27QHUY27JAlvHgDLfV\nY/OT\r\n=JjMv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"113d79c2879cb1503ff12c8064eeb38ada16b472","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.e7202cb57.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.e7202cb57.0_1617317174612_0.5576844975221471","host":"s3://npm-registry-packages"}},"11.0.0-canary.1f636b205.0":{"name":"@material/auto-init","version":"11.0.0-canary.1f636b205.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.1f636b205.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"21b7767574c590be4e8df3699df43a575bd7a282","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.1f636b205.0.tgz","fileCount":14,"integrity":"sha512-yoaYAlppntUyOE5jjpcKkUQumekq/HsJtxlipurUmEv2BcgyWQsgRleV/+cXbOfX+I4R1gppVEG5GF61JJAgCQ==","signatures":[{"sig":"MEYCIQCD9eUFJPhxy3sPtQ2BkXdfCNwyJMjj4ky0g3okl6Af+wIhAMyyzMYRMrBu8ifYJNrWHswYmH4thgnJLd6Vj91Qeoar","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ5lCCRA9TVsSAnZWagAAl4cQAJRWUpz15ivbt9nyhCFB\nclEYSvtLezrhLWSqhqJlfe1g37F1704U1bS5WhtyutnHDV1JHY8aw7jeuQM5\nY4D7yRXtnT20qqCIaKhjSl3bu9ntWvfgpZHBnA80pbLSut2A+Kfc1EdUM1wM\nMqN8hMgTA6OLDJfksMMaTBQIWnntfYBP3TlEqyqMb/kyB8qW1c6OeMmS1nGX\n60SkMi58EseqogoX6n7uxGiFImB2gBlHcSLHomHAGrewlPJFUGjwOiocDbWh\nOt07gQiG/IF6EOKqQlTr+Vxa6cUMwUrfPzjGrA0bgJMiwdhoZH30BFmpWpKN\n2tgxGqsU5vlixJ5b0iUZ3FIlNWffGBhAAqM74rR8FiPzGP7g3DDvMF1NLaYj\nEa5kWScbsKAkuE1xaR4oyQxC2Z+URvU+lXcgTzOzyHMtDyjB7bUid4Qigak8\n+doBbVOjFRnzd0yEqr15olc8tSBu25g/Pn5XDANTQcO3b7VH8HpmIP6+1Vfs\nVwKulCQotomGSyhYRbm2wrIRBWVxSTYufvpqFxaX32HFkcoy7UymU7zIncTT\nNr3wTRCzl8TZxJkM/zZ2xK6HeB1X4irM+1eqpjE7felTxluHv2scKBHPlBai\nQAu7VG98HnpMrnsdiRvR4rxGG/bOBXnFjo4KcX2hli2iK9I98dMxHzHlAjO4\neCQ3\r\n=5OMp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a523c6467be13e8aeead7e4e2e5f20c418871bb2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.1f636b205.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.1f636b205.0_1617402178067_0.9568269460804721","host":"s3://npm-registry-packages"}},"11.0.0-canary.94f50b260.0":{"name":"@material/auto-init","version":"11.0.0-canary.94f50b260.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.94f50b260.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"683f825b98f538bdd16342b214ab8e88f14685c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.94f50b260.0.tgz","fileCount":14,"integrity":"sha512-sn85+P+MT3vi8hBAiMV1L5FnBGS6LtalZsfHmMdRzmg1J1+7/BgJlcgKGq35Ga2pZY/HN5w7n49x0mfeNOo1tg==","signatures":[{"sig":"MEUCIAuegufPn9r3vpXGGkCC8ggcEU64fmaJuU94QGyz+b1GAiEAvOwoqDSBl4XcPS0aGMEKRUF3EkYrg7k+CrKwhnLWgIw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaybcCRA9TVsSAnZWagAA9ggQAJkLn8FfX/vrgbYdKS8w\nOXhT2nCVzg7mJz8zuJhGD2fEhSnwKKJ4exzcg2rDuoFhqkl3M/asnJSRLRvG\nsDRWgQT082q4SOUyIWVu1hvh4NQVEGxF8YZXqxp0ARRx+6oCKWYDdgwzNAVa\n6euo6IQABokQemySM6w2RZj/0/ltd6niC/JIm4rI8yZPLLMNz/CV8RZ3QcM0\n67Nec3u9boHdtAD2Zf2B/OiFNPDwzD3i7XyIoLT61q/5XUrV2G8xVaVeNpch\nwYFi2KvdpU9FK0BWNDI0JRyZzeenqt22+8ZcBAQEM5QUWo9D4698GWZ9mr/b\njCqRHB4zW8FOwOE0G8UTWbHo9s5a6ws4p0N4grRmdhOxGAUchQGslC6BGL3g\nKfNQ7YczcmmJSXXyNqsskg6bDpNnENAPponGZ8aE2nZzfLxCvpQZWthTACz6\nFKdPFeGzN+rM7HiJ2Is0pM8u5jU5fKB9OtDkUrGm/xJCN6KQ5y7nyTIt7wpN\nDf3Z6/3kO6dK2Ha2u8qnYFRr9dtsHn21ch1XxxnA82AxsyZyr/QkN8cNqDSo\n0hqO/O3ROmXvoz7Q+T9ZWQKSiVFnoODnMRhTlJEWzh6WLOi00nnC21Ic+AVH\nT3v4BFkuIc1nzE1TZ86I8PukjwLgmEHkeEtEtLO8tHKL7p/Wwlz3nPGvmywK\nLCIE\r\n=TzJU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5f84c677cd669d6958748a69435b56ebb640bc6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.94f50b260.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.94f50b260.0_1617635036146_0.11828701023385513","host":"s3://npm-registry-packages"}},"11.0.0-canary.a4009b80a.0":{"name":"@material/auto-init","version":"11.0.0-canary.a4009b80a.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.a4009b80a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a279f88205a959fc6e5324b81ee1de13b1f62365","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.a4009b80a.0.tgz","fileCount":14,"integrity":"sha512-5T6tSi5TCOfoKxxkOi7gq73N6KL6SjgeJXNrAGJZsPh+Eksr1SdtNI872iTMp5Wt3P21nnY3CLjYtTOVy74b5Q==","signatures":[{"sig":"MEYCIQDLfunawUvCmnzDqWSzR7fNak8PaTgfYYic2/vTslmFhAIhAOzYoIngy2IBv0ZFzk+52MmGVj4LBa9Sfv8Uu6ZoOJsx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga4g8CRA9TVsSAnZWagAAQI0QAJuEHatorGZ5/55o7hbx\nbHrG+pyK4R+BgOYKQFC5dw5abwFG6xWcmW35i8jteUYovgMpRKCU+WokYoia\n0gopfYlz8zQxfkgbXrFzVoltY4bff23Dawdzb7rIEPqILjnY8nsixhTdIgLJ\njWSTWspfaFKjJdNA7FaFJ+lvYwKabtfDKuKyJP0R+Abe8agUEZF5MgIovGkB\ndLwXHRMKkWwmmqaHlLPOL70lfXXJnxFECCKVwQfyru2trhKS6RBfRDgN6ItR\nIYL54FAS0sMnl+cm2DdJ5OEgymhhXbq7HS/4mWp3wpV5F+8RQlJns1JDS//o\nu4NJruzYnHKKDUXeVsbeJ7rKk1EkBNJS7D4aiUGvlQ2nlVX23w4eD9elQHKY\nIbVONeMawGN0VAOobtOwSazBLmTdBx9a2nJcqkaJYyOy5puDg12QnVzzTEdr\ncM3F+H10oPOjgiHswc8XjyrJdKwsfPDzZsGQha48jh1IAa2XWlJ8eafT6rRu\nBm24SFXQZ6bHp1c+VD6j4gOhPWIJmmU9E+qZHxvQgkZAG5/gi8bH4JF2rgSK\npbpOxc50l2OWykD/e/HirbYV4PsBea1EnfZ1aSMG0wq7ScUbdpvMH5qXddwz\nRgLT+0+9cw1Sq9UON/97zYzp8fLiNw9Fmdxky0QwrRDRhht/UbfQdQY1iJTz\nQqwk\r\n=war/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35eef76af32a43b61b6a0fb725dbb83cfa5d3421","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.a4009b80a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.a4009b80a.0_1617659963640_0.2896978248021733","host":"s3://npm-registry-packages"}},"11.0.0-canary.15604bd0d.0":{"name":"@material/auto-init","version":"11.0.0-canary.15604bd0d.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.15604bd0d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e88ef2a7487e8ff0c53686507a2a8501f29eec4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.15604bd0d.0.tgz","fileCount":14,"integrity":"sha512-bLzOsaArzpF5xI8zERBwzclG5czsvgMoUmXZwT45+/Yn06ws2LPYkKaIPo5Ya3oLRyvJuAbQUbmjg5CmkJ8SPg==","signatures":[{"sig":"MEQCIBUs8Of97g2yEOyQnGYwg/M2mRE9Faxhnet0kCoWOpetAiAvLtopnQ6NtOc6mIC331sYOMedDCqN8Un2qJnuc123GQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga5IGCRA9TVsSAnZWagAA9hAP/23HbOtAMnXnLop4wno5\nd/71NyRdQNtmOyJ52nvl/xKS/LbHN53WCvRUWTMiHXculIOs0Oy5LsLE0MhC\n/9lk/fG+LhQz4QhNmQnRxCUtB34cEoP9nfLx62LK0eNM3cIlPnou61b225BA\n2qwfuOA33tEsYS2wxZ9qoo+Ls/RRSu415uc7iqzGk00qPbYgGoPtwXTVpCaw\nEiM74oB72cITgON5+6j19NI3HkcRkJDCC5qucAbVnFYXmjG9btwYO9PgCAgP\nogxlr0S2er1auvfJG+eHbLW03VeelT6frlM1A9tJdwfR+E6z4g04j6MAOzQC\nBZFw/5wyU6PxByFkAArAXHjKJZ0IElBWIGMn9Q6ZlNRDysW/j6WRqGq3uzOa\nTkzllfodXTwy/IzgHNTcTeZCT3YViVvVTSWAlTq76IB8vPNFFryhHBS0EGz9\npslovNgSdfJx1RmhLXJwQMcq4uk0AT3m9T/4edT345kpRMiNE/7IfG7AMtCm\nns/9JEgmMO+behcn8N2jTLemr0vEQI78DeGXdqXR2XAYSVFdKBqAjODsaacH\n1cxVdb47a9UwJfasy4JdNZAkjXu/hZKEzSQ7U12U8o94vtTWcMpc6BcLz225\ndWDo+aRDv+amI/cE8DJX/7kakrOiHa/i5Y6hNIFd6PpzFzJDZfc4Kus7SI3W\ncScM\r\n=DUxW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ea3949c02ab8da1a812a2127f1fbc7e7a3c98532","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.15604bd0d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.15604bd0d.0_1617662469500_0.6648976551268042","host":"s3://npm-registry-packages"}},"11.0.0-canary.76da7876c.0":{"name":"@material/auto-init","version":"11.0.0-canary.76da7876c.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.76da7876c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"961136322ba7b2c9124ebcb91e1c0b266239075b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.76da7876c.0.tgz","fileCount":14,"integrity":"sha512-Yl3XEgQNzEjNXYRYW1JoaXWF1cZ86U3QvuMACDVQKX6f1TVEckPE2OGiEvYTKnqAVz3xqMOX10Yx7ngwFBSy/g==","signatures":[{"sig":"MEQCICxUfhnv9ugkFm/w8XFUpywv6Wi5AgIKE5A6SS5bDTnBAiAig7e6C0p34zy7qOeLh6AfNUquXZIQ0a5KhMbDL0cw4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbQ4+CRA9TVsSAnZWagAASwYQAJfgAN+v9zPYM1KZlnzO\nvmIVZHQHBLm9ExD/BIm//RX8pbY9HzA6SvSOSEW/wBVa1a8BheUDaiX2JQIn\nxFt9kcwJqlcZHr2FoKEFGMP2ejcQWMjRBgamijG0FzkWasvusVAZkGb5fnra\nkzYBOFgHPpN8c4Gu22TfCebLyi+tHwrySAwUUYMzIdBaXF690RXbgKiy4yu7\ng/dBp8uHMY5NP3y0vbzrCGavRbs34couOW0iDWPsw+kq54rc8CQhT5tp0u0/\nMxJXTFwnECjd/wJzsUi9jB18ZfChWa+slIkuUHrzuLUvFpWadXgut13Qq3La\nh8hI04b5tzxc9ifM3++YJT38LMlVaklfn7hEhfrQ/gxKkMkOsZEf3z3Qids/\nG4AlEKEtqJnMLPsCkFUEo9YCZ/wzsNJ2jGKRBKHfW4ewxb1H3D6hDqW8+9IM\nVwx9XcHOmOuZT/FHSZDIkR88vCjws9+uqgzQ6T+Qwo5p0WGAHTlI3VnaYB4v\nYaQ8uLG/dijrrIjvoENMlMbGecmkwNSQwjTRNCg0e74ngVZAQzEJLmKrVdz5\nwKpQ+4/fFU1z7WvlPBRmWpIIIxGpQ1I1v5GTz3oIIJE4rmTeOi3xslv3RyMy\nUVxj3serHYJtPwOe1t504CDta/C/fzZK9NTToXd5qOADSlTAM0mzCyQRDaZK\nJdT3\r\n=pOKZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4bace63831a45c0c9e6f786768b2aad0d79087f1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.76da7876c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.76da7876c.0_1617759806315_0.9874178910125","host":"s3://npm-registry-packages"}},"11.0.0-canary.6bcb6cbd2.0":{"name":"@material/auto-init","version":"11.0.0-canary.6bcb6cbd2.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.6bcb6cbd2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9afcecd85914c8129b15d74779693b633bdf2f9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.6bcb6cbd2.0.tgz","fileCount":14,"integrity":"sha512-b/TzjMc4p0+1s9PpwkqwTQ9HMi9TD4sB6VA+PqFvaO6cpEX5Goj9zlxDRsTBIcH+p09TpbwmonfZArIz3JL5zQ==","signatures":[{"sig":"MEYCIQDBLhj25UDY9lbC+dPeUPAoRmwZGNQ/dLNu2p+rveZq2gIhAMHsGni3+akxnfWzTJXCUrzhI8ZeuDmuIGC4ieGytYvq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbf+CCRA9TVsSAnZWagAAC84QAJb23CWaDoMMshz6YCqf\nO8PfNN/ldYUiqStlCB+/bpR2hwbNhi42FG8+rF6CxSY+nZg80RRPOVyYBOwU\n8KAl/WuvftR0et/0NYGGTFLWSNBaSUKIt2JyTLYPG/eNiQOnseOo7Nt6FbuO\nQaB8vTsn0jzhHkdKbwL8pyJTJx2fIF125v6HDlfauSVtwdMTbsFpQKX6geW1\nHZEPQNWOUCp11MUfq49lyTHbKc37HmWg77LOBxJA6Eri8NyTOjUBQGGKKQXY\nXPZwI3Mu4Pbrjr4g+M6kM/vpJICLCxw7w223OKoRoIMyN+H0ZZMmt93Onh+1\nosqrdpsucr6CbIZm+3Hbe660jg4uivs05kLXZ+o9gnkTjDJCm89zmYfxcNId\nG6tA+AsvsUGep8bADZLabxjt7tAh1P0OSm4uGybfTt7dM40nQ/bmM5QZ6F29\n2zNad1BT60JKgIaOfQHTggRMN5fGoMUtI6MNBwbAFLWymdFr41I0E/2+56cZ\np2TAgIPpvFie3xMoUW35gy+2FBqr7TDxB7r9W7ztIBdhqyNSpw6pviWbzY7o\nBRujCfTP+X7sYdGrBzFu+Q7W8Tm+p35bjzg41d7yXDZcQgfHVYGs3jrn/dQu\nQaSA+TTq5Xq/xmrqYowW2zwxWd0xdkyMaOf3Lr8deYf6kuKAWaF+idq6dTTu\nbQkO\r\n=5PAU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f3ec57093899a7f082bd51cae05b398c31619392","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.6bcb6cbd2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.6bcb6cbd2.0_1617821570362_0.03204251362413757","host":"s3://npm-registry-packages"}},"11.0.0-canary.c91e8d141.0":{"name":"@material/auto-init","version":"11.0.0-canary.c91e8d141.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.c91e8d141.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85cdf2fb1ed1f78784afc7309378ed3ae592d6af","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.c91e8d141.0.tgz","fileCount":14,"integrity":"sha512-pHwxMsw/Hgs5q2gKVPSEjqp/J0qaWfBDp+2qfWeR1JAtouQoRZuMAgADty+UudMcfqMH5YYHH7lwhFE8BrmtAA==","signatures":[{"sig":"MEUCIQCcuIMqIOK57abVPDP7Oa/UDesBJa3wpyrSN3IPdRa3dgIgRs/5wZ5EVqaYHxnJEKIFWdTMtOzJEQq/tnd1xMCZBhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbgBvCRA9TVsSAnZWagAAPrkP/iDRwgGwxa2jB/TbTbSl\ncg9eD5KTtbsrAR4e/qM29Yvu6Tg/NgQxCLB4qpJQh5yHgsS0CwhQCp5Zer9I\nr3HdRmkfSplO27pFSyJ/V9g1JpRVh+rGHnlJFl/kRUdBG8cC1Uf6t8bYGI/1\nH5en5UNgHqNCkzaG449q5jguiBGKgS4oiAPdNx53LCuTwPBfsGKO25AvmV3N\nBIHbFfXQvZA+e//H2UbADE4AZLPIt3bLyRXH5hT/Y49WtmMKdv/JKtSYhkCY\n5+H4F+1uDaVfukby4GcGmG0XwuhcgLJBumJqSReYvCd1fZW4Qg8j3vu0xI27\nAq5zBp+c4dmQ7ba8qfC1HbUEn38zP1FXaiYZir6JkDgcJ0CPKL7P1w46hRVq\nP+F5tv1cLLvKBH35EdfLxwGa3b9YouYwH5SNdWTL9F7jrF9kClgvw7yPH3F1\n6vdJGBC4Aryr4ZrmcTh/XXS5vOcEddAJr46kMZFazPm4iZ4DSAABItMWPiWl\ne0OS3+39Qcm6btuyrd1G22qLaL1zYvgMG55Pua+7BQH4gY/SP8paIeNV5co0\nCGFeId1eN58Emd+nDBascWea3YYIBgu7sD7K9llj72oBRSycWPE4AiSAg5rd\ndjwGPVyT/jsvtmmK4EiZkyD33GVDGjdxweHgVp6iP5bNQCize6h7JzH+sAY5\naR3L\r\n=J515\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b13009a2b12843e6eefaa0c3ae66fc519af7bb29","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.c91e8d141.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.c91e8d141.0_1617821807028_0.5627259645702456","host":"s3://npm-registry-packages"}},"11.0.0-canary.f77c50860.0":{"name":"@material/auto-init","version":"11.0.0-canary.f77c50860.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f77c50860.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"79c54e6be489cb42194803fc680068ac9a250fe5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f77c50860.0.tgz","fileCount":14,"integrity":"sha512-UzcUIHcJgLORstCn+JPYT42oPiv+dstL573+0OP6E6Ev69xfN1frlKw7UrsD/LnW8jouxFTpzjoLkes4knc+HQ==","signatures":[{"sig":"MEUCIQDfjHIr6oyiT3xbRhz1ZqmRQrbCiGIG1NNqZCR3eT0RRAIgT9yXhFpzzhvbhlj8+zoAglQcX5huwAjqwt52njChW5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbyKSCRA9TVsSAnZWagAAXdoP/A+04g5djefFlTTN+fal\nTwNHtKbc1/ufAzXSQL0CyMimHw1Y5CECi3IaZOldpPOdoDdEOKAkhpDxLckZ\nAhFMy/gL/sIcn4rjsP/zdGBxRRG3UVKK7wQGdzmprgcZRLz69TGDGG6//6gC\nxRRbW0ljZ2vgyU8+YHQJ54AY7TUXCBIhJ5s9jAGzcJ+dQ2b104DTq7fylNlD\nOzdzTXoIAqhOUvo/YXmD3iJX8y+c7eVs9a2WU4XABxyqauJvrDCLDp4vQPgz\ndk0xcuelaycU3UhGh4JMQS7jVPMJFQMtcVQs2U2OqI1V8bpDBJkv+vnQroyd\nyzMxgGp6xqmoY/kLgMAXTx3q41+Ld3zijKnhtptby32ckYWe95ZcLUH4SSeg\nUnjEFyPrW7Yj91PcD1GN+MKwunh0NBpAPhff6gyxU0F7dOE+8XhZc0M5E6Sa\n1GX2jIyuJFornLTcUBNhPbvyaNNp1dtcTiFFaPeVPx/i1dGgO8mr6Ev2DqIU\ndZmmD+5gzZYwV/rQuMnSTxJLQCvpA3DCkj6FSAdnVW79IrwthYGCEzOQQEbS\n2Vn8xmBvJR5KK0mN8B/M0zSpaUuxsZqwbW8zRz5+SHJ0RPPlWXgI5H7o30wD\naKccWVHrb/U9naem4vGEEMFgt1j7ZXea/IRU/glTOkO8xg/8Q9f4o8zRwO0z\nqeuE\r\n=x32Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d35db9665d4a8a4f385b134c9c1a23bda8668fa2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f77c50860.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f77c50860.0_1617896081732_0.7449253759299554","host":"s3://npm-registry-packages"}},"11.0.0-canary.367d88bdb.0":{"name":"@material/auto-init","version":"11.0.0-canary.367d88bdb.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.367d88bdb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aec07cc624c7e1bb03a691f94bdf9a567398f34b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.367d88bdb.0.tgz","fileCount":14,"integrity":"sha512-5RGIZGJ8ZypAaoW7rYfyuzrOdzf75Et+0gQqwNqyD0cKPS6e1VkK8z7/Z6pgr85nP7KG+KF/CXBu14y/xt4pYw==","signatures":[{"sig":"MEUCIQDcHL+eiv1G7Jnt7CcMG7czXWQ4l33bbf5BaWgnKpJ22wIgIWyCnhuoZnSC3q+lFd3JWN/4kQvRadMZh/jxkBTEbOg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbzFRCRA9TVsSAnZWagAAf3AP/jxLAAAU2bu1S5LkamMf\nmvXfp6wHIv/G3MoTYbpKBGFZQDY/2WP4XnS0BtgrjXeoXpNPyAcKk7i7lGlV\n13IFfqhqSPH3bj0j+HMEvSQdk9O0y6XWt7GdLmYBJgMUNstU/dBPewRInQH5\nP7NFhFcf8L8SQRGlDG1OdKoYH/3XlxUuY87K3diHPocYUQ7vqaNOr8VMfoOu\nDhirzkpK4sc+VuRHaFV4QtIc1khccG4Kd8jThuyeIa30ujwz/nQczNYjvMXo\n8se3FMWOa+0slJeLWUnxIlJBOEouWOgZmuut06M0QsUT7YvjcDbEfNEzQdcL\nDgo8Ar5TAYC4wEZmDCrxckPmihr4wS+ImxCVOeUg5AOywW2z1o2YhUh6TjcU\n5svIVwiCqQZPX/Q9Hk3VZShkQb4Cr1/M/waVqArtihedVsTVxWYmI6C0Nbw+\noPsswdIS6nByPD1RneqVCD7X48fHJU73gE1myUVQkGWZ4j/ZV3KNjcyjVPwp\nkeJiRAk5IIGSvqHPKl9DZpK0oHdEivRSLL3d5od270ffioWxq/F7YWHQfuRi\n2/pCyei9b69OteJy+xNSo9zH7/ZR/nUMwi7Bzl5F/3mCHlenAbVikmY38kM9\nR58PLHu2e9HJKT7hSxKm8bIxfAyu8XqR1/TdwCL/74/oR0rbggIgisBn9YYP\nJSW7\r\n=EjNH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ba9cee87fe351c7e76ccb32f2572bf3ca91e88d7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.367d88bdb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.367d88bdb.0_1617899856647_0.926744641137033","host":"s3://npm-registry-packages"}},"11.0.0-canary.0ec437d3b.0":{"name":"@material/auto-init","version":"11.0.0-canary.0ec437d3b.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.0ec437d3b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6a30eceb921a05373fd794cbb023f21ab3fbfa23","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.0ec437d3b.0.tgz","fileCount":14,"integrity":"sha512-+HrKwFJkJP92obyplqizbDiL9tzbFBnDi3h9Fn88/FwfWJRv1cncYl4WkeGm1n7gqkb6oEzDWqXvgq3c3QEKSw==","signatures":[{"sig":"MEUCIQD4SSYNVZzM4MEFHhgZvHk1n1UO40rzl8Z632EuHaI20gIgGijW6LC+sY+lEGE19XY6kFSyai/aXJWFb8i90HBECzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb1rCCRA9TVsSAnZWagAAg0EP/RekxASLhPC2TDHd/zYb\n9pgg01XynWxVL8vUNfpOk6ZKG+WUUM00lp6KJXS60KAcoIYDVOGPPhbzMrwl\n4bvcA3BgTp4Qk22LS9YJ1jlBmCaWJsBumtE6K78WgD3mvC+P0kMQ8Xk+MoJJ\ndosOYrJifjtgIdIY/oZzbc+YE+F7U0mnO5EZdQsFKoIkCm11mIFlIoC6Pdfi\nitrxDaY+OHl+LwXF3PdIlvb5UXKyDzCit+3lyaWKVFUw1RuTT/as9EiySND8\nEzhn7TfV7tF/MbQWO2zykZzBHXdBuUQXtombK+TlnwBkxn14bLUa0JYw6d8N\n012q01j9WNhSpo6Rv4dJObTFXyjV22iIsSsOT4x1idFvLJUk0GpmG0CHLG2x\n/ruHOcLzbUaEAtIyUO/dgIgnjaMS4lrbWQnFYc3/3gFJ0dxddY2uV0ecB3Lx\nObIkWPNi02aPQmDeLXwZEHYVSc/mchFVZk0HIdbdLkjPtp40xgb7TbwVK+Fr\nrHYgo6lKBSZZt/JBQXvpXnlwxHIID45wRsEpctEmHnc+DWKLc3HPycU3g21B\nIqvXVdQCSC9m/siox9yLPsowHRjbmMUE8gYgTYV+b93Mo7JSZDJnKVkaAtR6\nKE+twO9fQCgrqEDASC+s7HIJK9YzphTRoIa9OKENsu0U8LhTHfRonlobjLoh\n6Kid\r\n=mZ+4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"50ed2429a570432fef9747a954d7c31d2dd11f0a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.0ec437d3b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.0ec437d3b.0_1617910466284_0.49179464814301954","host":"s3://npm-registry-packages"}},"11.0.0-canary.b2fa996a1.0":{"name":"@material/auto-init","version":"11.0.0-canary.b2fa996a1.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.b2fa996a1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0f299b9df9f1a8e42485e93cb52d89d8c206c9c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.b2fa996a1.0.tgz","fileCount":14,"integrity":"sha512-GI5xDfu0SS+osoUw6AszMCS+QF0Q/Gsp8iVMQ2gZAuzTgla5vsVhV409Bcrq9OqJUIKPHkztdjUF9mC6eNWafw==","signatures":[{"sig":"MEUCIEqQ8rMMNO5KWMMdxKr+xr0ZUHGzCtC/GnpGyakNIhHkAiEAzf3sXtPD3tM0/ZjWJ45AMX0GTz9QZHscNj/AfgrMJaQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcG5JCRA9TVsSAnZWagAA3coP/37KwlX86cwPxzmy0UoG\nQlx330ZTCG7g9tWug9TFAfWwpRWVfGuqL5uQMN8z4sa7ahd51MVCGWPlnNBl\nd3tcUaRXRQAfUwTa/aTUAlkM8sotN/PFB35nswzhzovOPsExrziiPIKvwCam\n7Rhj5hJhHN3lfGU3obkRJY4p7y/bMuRI31/akbTUJT56y8vn9T27/yjC2F3y\nPDyaCUv3QcE0vPBPFV14nGh398PgqxSxaFHwchwHsiGSveIm7gQjUUd52X99\niz6b+TbjobVUG4n6bXF4E9idxCdh48v9KFFC7w0rHLXf8kP+94moKcNW82v8\ngXn7+nN/SNCZq/ljE60l96KbQqnH5Finsp+wWcqlnMPG3P+SBrtODt3BX9wA\n+9mWoWgMotCC+GOmOt5QwaU5IcES8WVgiqGzsznH0F5/lcZkFtIBputdmkw1\nIdlT4Aw9U2eT0vcW1wPTL4k2AIOXscLGqKEIV7pdOH6z2y189TWL6NXZwwZ0\n+TmNC6BVRao5eoZ7OQUFwK6GsvindDipyBCnikOXC8dE74ZInLcXMgUVKmSD\n9tm4XuED60o73WW88yRsTig+H8WyVwSCPYO8JH6Qu8EB3T+6yV7cSR64hAbP\nj9pev7JYOyFLWBRZ9qaO5LDKxkB/P8FUZCRRFMuMSe6py69i8zaBYQ+yyOOo\nx6DV\r\n=nxa8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0b4eb5b2d30d6d9a7b20f57164a2beba3c20d65e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.b2fa996a1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.b2fa996a1.0_1617981000486_0.4763391361940559","host":"s3://npm-registry-packages"}},"11.0.0-canary.24255c408.0":{"name":"@material/auto-init","version":"11.0.0-canary.24255c408.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.24255c408.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f5e1d7b169e2653a87f36258de21d122fdb6387","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.24255c408.0.tgz","fileCount":14,"integrity":"sha512-mmVHXCsqm/KA2vLt/Fi97mHVh3Smx4PWSCtMJHp9tL/GCJw9Mbe4hmmAz4g4OC4fseZDRDRAIbmkuj5fWJWJuQ==","signatures":[{"sig":"MEYCIQDhl+KjScnO2dBTIMkw48rrpCV/GVrRHhmqUFhah0hDIgIhAMt/tO6kD+HxwkaSf1ZTZaXARuTZ4W8CPC0tOYQ9F383","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLTiCRA9TVsSAnZWagAACVIP/0HJzK6ZUhi3hulK9sX4\nPrEPVXRj/40k18VModrPxcmwnV7yLUQalZRYN1LYNAFwyeNSY47ev4TO/aOf\nZ8/LGtonesXbR2iGe4wuHND8yxWaDCj1okSuFHTUXsK/MQ2rY3DfXlGalPrZ\n6q7nDYF90GVyIISe/1F+ytrqInOYKh7f3RiXIr3YrtDzL6YFeGpGj98GtXYi\nLuK5wN7SH6uH09QbmqhChoJvyNKG/1nhFzFGJjN4tp2QQDt0IdFPQo3j1XC5\nPk/9TU8xbenL6LPYUr8GA8C/W/tUKZpjuOODzs3/96YD8n0Caug6Ey0wZyvf\nNcL/pdpxAI+/JhTPggK87g33z5OC6ejSNq2NTme/P4YM4lJd6FZXz894gNqy\n+FALZVd5pdZzEf/kg+WncnpoU6o/O5Ml8zHxocvZaK4cg2cQF2CGCMEkn5IL\nVbUYovFtsuyvwIkahJF2US6L74mkSNqVGKxK5Ipbtzg8CtEWleQfOBA7ekeT\no4eD4cwBFQruGL4U9orCgAeRGWpXz4XIsDz4gfg2sM67NAPve2t4CqP2ceJW\nbNdqykNiwuGX+Rnp4tgHIFg/4E6inMHQQ8eqvcT1j8XG3wUWc++Ufq6mGlXR\nHaUSnZObKK02+OazOY6wIjt9k1TXCto/CR4JstNKWh2FZ90Pz13BS7wS1QHR\nr/2R\r\n=s6rD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5cc224c5482fd736af03872db458f031901bb693","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.24255c408.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.24255c408.0_1617999074575_0.506032690723015","host":"s3://npm-registry-packages"}},"11.0.0-canary.7d6a4bb72.0":{"name":"@material/auto-init","version":"11.0.0-canary.7d6a4bb72.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.7d6a4bb72.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"20d9044895ff71b4d25eeccc56ee539649d3e517","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.7d6a4bb72.0.tgz","fileCount":14,"integrity":"sha512-tSPXAyFfj23dgkO9RhiU8yBoS+Jdm+9gS9kkFASQ5AEmj7KxRRh9776BQH899uyO6vS4p7EMwvKTUiGZF8iQQQ==","signatures":[{"sig":"MEUCIQDC9oS77ZmW3ZbuhvZWGESpAmhEOqORsmDVXRYoTVrOAAIgYaIaa5pvxKFa/aytLLdyYPrDkjJDGJMraUNNUD7/IH4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcNq4CRA9TVsSAnZWagAA6kgP/1QSCZbnEq+fqm1F97Bf\ned/cVpgwVlf9Fmi7yU2zHG3YlKOMaCfCwCAOs7Y7mnHXYZ/ynGMay4UJKmeB\nI1kDn4sQ5r5NXuSbfweIjdr6woqBx3PohvAyZpTBwSIz51WJmscXqbewNI02\nGjKZVhNKk5LYAfJH1otl6GG35cshR2SArw/ul+sWtvBr0guL+r5rF9KV2kSa\n/4sARSGJUbczVLjXfnDtH7JBD61V82kZC3wzXHWmejDyAs+B4xN9XejlIxKh\nXgu+pjcJ6pb4uSYWQ4/rp8MMl5VXmZwxcSFUT/XelzpmH4j7MonL7QYH2sHR\nMoFo21V6GUEpNdVlpnFnCFzzDFvVkOeT16wlcJMr+DOVs2yxLA9si8jq6m9L\nQraAULFnFT0Jd8K+q79zLOOca1VbLpUfFWUverRCL1+0sUhmmnbpaE6f2D0e\nGLV8qvNbLNgGENPTY848oD4bEUauKn/gG0oRaZcRFxvS1qmlZ4mTxJ6B6r5/\nUMlfPtJxtDq7qUyi+OLglpHlaC7so+WHgiHsLi0dqcv+ItHgK5hMjVxLBQ3l\nSpA8pYIWXk+Z8qq2ZAkqsaeIFVCBBU1Hp4War4EwdMFalT5Ta6hT260J/uik\nhEz7E2P5GNiMysrMFj9zszCQITaz7cLYweobgY8TPe/cJL4M8/rBMBmgqIaw\n0iP0\r\n=boCG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1e1f0ea898fe101863062b7a760600cfb1b095e5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.7d6a4bb72.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.7d6a4bb72.0_1618008759909_0.29174462476909957","host":"s3://npm-registry-packages"}},"11.0.0-canary.352b295c1.0":{"name":"@material/auto-init","version":"11.0.0-canary.352b295c1.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.352b295c1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6efb4ef6dd56ca4083e3c966fc8cf3eea608d8c5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.352b295c1.0.tgz","fileCount":14,"integrity":"sha512-x6SU2jIeUJzdB20WgFow6ginX43lcYwpMc0thQbKVfToDy/w6XW/TkeVDaxu+SNXhSEtdjHoJpUdJW2gDgeQhg==","signatures":[{"sig":"MEQCIFlF3ZY5ayfPg/wugmzlm1e1KfKv/nWZWyuPxvevvRE3AiAdtdw2LhWFX/X/kn9I3pIo5P2mtDzJEO7yskryVGdfIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdI4MCRA9TVsSAnZWagAAppsP/1AAyHbx2ChAVAzJTftk\n0f/T6Xusx0lSbfEq28MTgaD8EaXFG6rHNVWDrxqhvhnB6FWborbR5fR+aeEz\naPpulgotrlsTBn/tRJigBClpL43+Jtuub8za227A0VZ0zZxoZiae+FhUFFr3\n5vOrgjKbQxlt/6FbNmLNZtzjRDqK6784iyvWqyPSVFYFGmt157jJx3Tww6dV\ngEtjv2YblPQyaFG1ArcTYKjFZvhgEGjfvouUx5n3juiLXNi7rWhJF4GpTleC\nTtHToTHa/aLz96zy4/GETmYGJ3/HTCbvBkx6zHMSxU6ZpMRzkxfKnbhleMui\nxVm5NjBMui4IzIY5cfT7gts/Cso7RdwEoJGaGFAqIrMruVxzBRPBr6E3mr0l\nVyVuChZ3XnhVWtpkxJGIa7SwbHUWqT0d8sLnwxmRjFg7/745W6jgYH2+yLZE\nYul5aYqOQZ0lTSOsbac6d8kxVnfy4FJRsviP0cke1zNeDhsvE6zwchz7z18o\n4vWtKV7qzYTpO+taASvwaU+q6ciqRVX50YFmoVVrxRwvK1WcE/JORBkUGTOk\nUXXFcuuKlBq4EB4NdyzM62cCL1xHWpeXpMkl7Xgqz3w3ZrxamehPN2OePxS2\nxeKMqgEOWkhcgoBE7f7QYDq30AoQKQrcsTHtPEzNxyk5z7mFLgT8rVeI27bA\nbgxz\r\n=XyhG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"472a00ecb08e85ff1b602e3bec15d38f2a028f69","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.352b295c1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.352b295c1.0_1618251275922_0.8489768732492005","host":"s3://npm-registry-packages"}},"11.0.0-canary.ab99b8064.0":{"name":"@material/auto-init","version":"11.0.0-canary.ab99b8064.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.ab99b8064.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db9889def59b031e66a66813702279e4843932cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.ab99b8064.0.tgz","fileCount":14,"integrity":"sha512-GJSpgYfnCp7KZyJWeMAS9dQ9itZEtkqDVFjRdYhqIYbTuRYu7ExOPlyiWO0OH64C4ZS0eVsgJ1orwSKonP4KQg==","signatures":[{"sig":"MEYCIQD6DZ36s6l9WCDiz8CfmDhvPlY6wVvoHWDpyh0+W3XDPQIhAINwYl5bGwig8Efm3diWKF9skYCS3mwjB6E9ZSPqw1gp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgda3QCRA9TVsSAnZWagAA4JwP/joKLoee0owqaEqTmLqk\nTbf47gcjmuYRegzCSc68JvwoNc0SXNgbtcr3EuTl2ECBaM+YcoUG9JQIgbl+\n/8othYRRqNhsxbhpSrWARCEVX4Q2Ok/t3D0oW4iTL3g9Ja5s5CgFqVaROg62\njRlhYk9k0G2I9nGB+R3N3vWyz1UuDQjzoMiiwB54O09kiVZSG4AG6IYfJQXO\nb5+ILsZMbe1Atql0LNijvU1QmzNWdeiKFbmjfJcWxPvqOnCoiK828WPLiLz9\njYWDsTMvFt3RIvpSOoBF254MTomsZkotW3El6IeapWFl5OibIbormlTKyutC\ne7EHdIHzTqh2hFvKXWKhET+cZWnNEsPnGx2A06SRn4HMSZE7Va0DKG/Ly9uO\nmCgjO2c9lokeHvtwJ1ewMgHVFxEFyDqqVij4r923JYzdy8n17lDMKDOVy6Un\nE7HffHbHv6LoR6Asvj5W0E4GPXNg3x1PGIm8M6gjiqSmC9BTVGNWHHtDZfT7\neha3+dRzn142mTLbnv7nnWIExqdqShI26iSa4r2iEyvzKLWFqDyoD8zj6ZOq\n7EWVI8LZS2Srf/DVHUyTN5rbaXuy3wG2LVt2i2LihOqggaUqJcVc9xnrJcEw\nv/Xi0k2Qcg0j4MNFQve+Sm57Gs5sDi9s3t4AYfDvQa2CC1XvxlfvrzbXyYo+\nCGSx\r\n=R995\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a67c09690e367ad8ebdba2d551f6432c20ccccd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.ab99b8064.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.ab99b8064.0_1618324943473_0.7300406602212286","host":"s3://npm-registry-packages"}},"11.0.0-canary.8f0a11e32.0":{"name":"@material/auto-init","version":"11.0.0-canary.8f0a11e32.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.8f0a11e32.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bc8a9ff57dbecdac3026c3f74d27f34eb61f565b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.8f0a11e32.0.tgz","fileCount":14,"integrity":"sha512-J4bYdWqAq8kS/xOmhoI86K1f5u07UWn/S/7LKcUvif3wk88Jpx8yCvC6QO97zt5C6PLnDInbH5m6k+8uOHRtpA==","signatures":[{"sig":"MEQCH0Sw1l3qPLA2wIYpy4PhY5Rfd2vJVlhFdABny8aehPECIQCLW/9OkRcyvmll8V/mPpcI+XRtVnFGZtDHoEskDuKt9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd0o+CRA9TVsSAnZWagAA+eAP/AxIKFBerIOEH3sN9NYc\nYYlSdN4Yjzik5pB0xRLYil9/OaS8m0A2TKxYhf8WZfxrWxAdwS0k5iMVJau5\nTiVUCNxOF45Boz0vo0UgTsEA4NzwI2bTqxy/6WoODntMUVTD5lgzscm8QrMk\net42YSloCssKdQrAug6+FsXj56Wl4RzgqdBzENtMQkbZInADZ2WX0Y8RVsn/\nz0XPS7OZRHZFi7RLT11yMN0YBisheCj88HF7CIy/0HAd1aI/JDh6iwjIgWvJ\nQWmK74v6FWi3aCUz+TI1LsklBHPJT/C3JQC8R67M2srY9a2bjioSJcdDGn8v\nZ/hTL0npOyWdhbBe7/692VxP4GHGkZftM/fYsBeNeHkppdTRfFHX0Tq5Pv0Y\nad4vADW8jz00gKIIuChRC88MVD2bC6d0fRsYjk+QgA/bJlFS9VQoho2vE8X7\nLIMtLMpkvBJQBkHYsL8r3BNLfo2lU/zg9NmJkDT1IbNdgyp3MG0Yov6qZvk+\nMmcef9fewte5qsHEawzi5TnXPq29QOjgqG/qGxq/yeEn0I8XbpWRqkWw73zx\nIbaSKtoOKign+qlkKfv30/fvkzFjc6wC7BqsJhHFh2k05eUIDGoLc7a8I6BY\nCPjEPtfCX/m8a7vrqdjs/A02T3qZ12Filq2IBAi8SCXynJBUwBMqXAlI3RvS\n+xHp\r\n=mSuk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f09b2c0c350e2f684e84766c95eed5c92b5afb0f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.0","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.8f0a11e32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.8f0a11e32.0_1618430525664_0.8271332232765096","host":"s3://npm-registry-packages"}},"11.0.0-canary.f5c6db8fc.0":{"name":"@material/auto-init","version":"11.0.0-canary.f5c6db8fc.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.f5c6db8fc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"816a70646f744beece4c673983e2067ab7fb29dc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.f5c6db8fc.0.tgz","fileCount":14,"integrity":"sha512-04OwAn4BrgKhQBhF6tJgovpQ00kPRJw4/VVnJkiQfC4Es5HDTP9kf3NJLimcXQ/sYElasFaHfStD42vcNvhAGA==","signatures":[{"sig":"MEUCIQCWJPMxIw+lrVxOOsISpHeNpuueSO7ReOBJsqTloGzE+AIgAIDuFcvq5PuEJpHDn6ib8DgjsPy+LIu0zt/Vaawr8Go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeH/YCRA9TVsSAnZWagAAuFwP/RuA1W3of+7M+JJA1C/q\nP2/JvrJgGTe/SiZ8GDJw5e6rTd60GwhuRAj/dgZvNJwDFTNvHZyjLdnLWPE1\nZrfh9WcohxiIJLJoS6W1KZNjZhgBidQ6H6zRLerYFytrMTv9met1Z3HKor8G\nN1YjOX/PbgpFMqSRa9OicQhbpB5GhdxfvAudsz+RH6eZkZ8v5rPsWRROKgFd\n7uMtwJ94Hm8Ug9GYkXBW6f5BS+uNHEL2m9ny5khFWaToEW1EOUeJnV1Ggc7S\nSmFPAAVIifZXFmDbm/pmgW6XQdXymMDGxzKS678SbQZjdygme9i0xlHs947z\nOpKKas6yuPoy0PeoW09lGO/9fo5hUanBkmR8a0tTSx1vDOg7uz6PvaRmUILi\nONBsMe118Lka3s9h4D7Q7RZXYmxZgkIykBEsdFNviH0Z5SVgLSLc4ZMcMdnF\nphbkXzadbljDsUWuTplRjORZdW1VffoHPeSoQ9weWEjRLUIL8O/NwTr3Oj+c\nixzmj9pXqtphoUbNy+t1Zrn82k10M8W7gPLfq5J+rzI9hfu8G2T+WDn+AVbC\nLtYOmsDVHf9XHfPWEkMwkxpDZfgpvh0b0t2fHgeNedxv2B8l9LRW2sOmwW9F\nmNH7AJ/XRb/FS+ep/Rn/xPQ8aINZHyLHw584NzTu4hhCCp5t4RNN4VGVX9Ls\ndCyG\r\n=QycP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eddcbd64f4309f4bf5faecb13428405a28774f15","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.f5c6db8fc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.f5c6db8fc.0_1618509783983_0.22249690674812683","host":"s3://npm-registry-packages"}},"11.0.0-canary.3793a3143.0":{"name":"@material/auto-init","version":"11.0.0-canary.3793a3143.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.3793a3143.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"13c69dab0a87e794e3de33f435c975de78bf02a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.3793a3143.0.tgz","fileCount":14,"integrity":"sha512-J8b580i5hGcKEyhjSgIkddkZDZv5mwD5YGQD6gSgb+6DIuARSmTFjHf3emv6NB20LOXc/ptzj5CPmOj027nBVQ==","signatures":[{"sig":"MEYCIQDFwuZVcA7PY4umhSYJjmV+1KxDENSsvOdlsRpR/5mHHwIhAP3imeaIMlwV5A4bzDd8F9+kD4pvHQ8dbIJlQTMAV4w9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeIY2CRA9TVsSAnZWagAA8EUP/0D4N23qvasWrIEPMo3M\nfBHmqgec6fxmIlBUjEzeH18ouZzrAyVf6YFjisKD0dgjeWZkIQxezvSBwpUI\nRDC8HAb785pJI5wQmfQIfpmMkIRIOuEXfixGeuI4dV1kG4FZ+sOJn8HkG01W\nQiYXwl/GzGh+0ThmVD4utyua7UVOFocLBNTPIojfIq/Z13AX9sRrg43DGDtB\noBO8q4L0KGaWCps6OBFwjC5kKu+e2f32Ik2NLcg6uWgBGaQmX5qPwnrM2VmM\niEAqFXWc61/sXpCogPzt9BDHeC8VL8Xew4Ppzyn1sKxid12jlhMfECG4jQTO\nRoxSI+NixkTULTq+vsBQlditn8blROdOmA3rdoMftI439f4zu6/7Re+AlUXD\nK6Y67nmMAjldqPnmVDn+VHRpUn8VchkpYAP+W3R5RMys12NFRubEmwaFIZFK\nCdncnSGooDhspaKtaoOyynZiW0Lv68qgJPCJ+428t8WPv73ivvkAvGJ24Rkg\n4r2JDeFe+rmhwNZtH3s0dUNp/VRZSLtZbXsbqt3IpbBRTSGtl21vLtykaYW7\ngnLoh4sjBBddgGVonbIhnaYThFYxOFp91lm7tXqfSfIrKBfOO9Wr8KZZp1wR\nx/oCdjLKZpP25rq6NPzpjr/IGh6asXV2S5bFgkjWAS07WevCLd3JfhPMhkLS\nTp4V\r\n=wIL3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3cfbed34975d8f2990425af21414290a96e2240b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.3793a3143.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.3793a3143.0_1618511414141_0.9995477019203214","host":"s3://npm-registry-packages"}},"11.0.0-canary.bc104bae7.0":{"name":"@material/auto-init","version":"11.0.0-canary.bc104bae7.0","license":"MIT","_id":"@material/auto-init@11.0.0-canary.bc104bae7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e5e73e80d8b50fcb24baac30ac0eab9900717d16","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0-canary.bc104bae7.0.tgz","fileCount":14,"integrity":"sha512-sJN0xM/Eug7VSOvPtpVc6MFwhhSk6T4P7cQkBZ7+piq4O9Ftx3S3FoOIMaJw7taCl+nkbE4+FAgeVpO348s96A==","signatures":[{"sig":"MEYCIQC/Rt06mwCMFO6zVZLgVV9o0tszexzVbeLet0KPOqSvhwIhAKBwcsPtnn0gfhd7nbBhUVWoBGcxI32lrgASgIHp4uQk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeJfJCRA9TVsSAnZWagAAIE4P/2uUsezk2PfFKHgnJLie\nxsv0EeUUcUA8MzxlgppaKq2YbhRwfsHF5PqKBZ+DhfHRWQqHmQqCH+N6SNxP\nRxGW5hZaLF4Z6UcWJBD8cz2MUSi5/h9l0sTIX9GEjwnuGsuKjJ+zuB2jaWDh\njY5dddSwegew6uI5NqZRV29onZjT009Gs87EdE1I2ykUEXsfPmjBZKKIsPPQ\nYdNlJMGkvuoDdr9ik7dhlvZV+Q5k4ZNsQQfxPNJt3soNlUfCFfaD7N8zHjJE\nK20qjvlwLkSdyBElDXrUdOKLZCUSOwKWCzefrwyZ+/+uh/77EQJZIKmVV3Mv\n9X25zykW3EV3Ti4nj7CfQIylL4DDB4n2tZzO+Jg080JIVpz/x3weMiVQegSF\nnb0EGMdcckmeUNLGJtpUkAR1dGSIEROF0I57C9IuPefI6xF3Txs626+F3g7U\nhDiO9aJLkPUQA2qMquySXh3FZfzDHRmALe4F4qZnr4JgIdVAASVQ6w3X/cjG\ntrL3fEb216mIPYkBPeTEPu1o93FNY27zb9fuuQkg09o8trdHBnZ3IOngNyXg\n5Avq4ujbAQFlXOem3Hsj1fy9sojLxKK99hivYhMDRkwqesC6uIwzWgOXmVaa\nZiIj7exQ5iq8nuCEzI4CGbv/jomkvrOfiSFsukecfluuzn5ELTPsX9/iUEgw\nmAUP\r\n=uEFv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fefd0309d7bea91a430a20913f05f501364f2ece","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"11.0.0-canary.bc104bae7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0-canary.bc104bae7.0_1618515912560_0.734730573074565","host":"s3://npm-registry-packages"}},"12.0.0-canary.3f342c3f4.0":{"name":"@material/auto-init","version":"12.0.0-canary.3f342c3f4.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.3f342c3f4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f7a7c177b8a0eece1aea439d79d08ed2599e6f5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.3f342c3f4.0.tgz","fileCount":14,"integrity":"sha512-9i3bOj8/eAiebYSjhBenHj+AHqoaRNGRR10m7lr1mA1MqjIDnoeg8GrcOdVY3F0KJ/PlBLo/VxdiB45/WOuvzQ==","signatures":[{"sig":"MEUCIQCuJAy6qO3gsTECFOBAeWUDvSiAFeQJxYgRMyme44a4XgIgcCQeKOauyP/1ReCeUIbifCYyv5RTqb4a5msAQw3E98w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeMPgCRA9TVsSAnZWagAAt/0QAJvERnLW6dAqiw1zpEFN\njLOS22yPNs5pk7c8X8BRn9PmJN7VwMj7MR2poFKA826COC8BrJTi6rsxD+JC\nbAUALALKpEmHgdUy4Dv8OA2ab/StOThqPBKFDZ+vsRIP1CaGdrZhLlm5UHpV\nkyyXcWW6Ldj6XaqDOiiwOw+6Z1pNBUTHyAMmEoyeGNHDVGaYEZR2TdbZ+qmJ\noeQOFpF1sw9yBzskPTMNlhmyPKL0gac0KBnGY0mVXF0+r2BphFFLu9bZqjgI\nbgoVBJc81HVJT5mdexJD9FILC60jAI9Fh36zoDXQjgSuZ6+GMS7eoB70D6/0\n7nTdwCztpAtr/PwV9RUv1eVzkkNn5a1pUA423BA54K12NF1nQUZ6qQvOu24f\nsd5LAl7iyqGAEJ2fXJHAhMMy9QMTbOPCoGKNUQAHJ8yd63WbKhxX1h3jh+mB\ng8Idw+k2SFvs6I5iE8DrOgABDUounNbIcIO3lBoaCOpZKD0wsAHICh8XIJqP\nqSfTLS9qDhqR6k8y0zwCbcK3AA4Y5Qco5eDqA0q3xuY9EtgjjR1TMqrL9sdc\nzqmgEWHbAiv+ug2LANLSL3xXwxei3PnyfxTjA4UdKFniboYUK22d+E3TU7fl\nSGkNpWjYikZj9YSHcVmPfIBD2r+cDAv6GwG7LQg6Ht7nzekwskN/dF1O0wN5\niKXd\r\n=23T/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d82c002d3f314f99c3413389c77960016a48bfa7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.3f342c3f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.3f342c3f4.0_1618527199915_0.504630275913647","host":"s3://npm-registry-packages"}},"11.0.0":{"name":"@material/auto-init","version":"11.0.0","license":"MIT","_id":"@material/auto-init@11.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"005fc6f2892192385b3d13e7ab09136b7f4e82a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-11.0.0.tgz","fileCount":13,"integrity":"sha512-SaJqOHQgK4Eehq95eUUZCu+UvP7h76MWOlQVbDEEkdVhugEOVxa59BzybczbPnTLrSkka7b69X/BQ+ODKq6+PA==","signatures":[{"sig":"MEUCIQCDFmKsW+xidS/w8NU6Rg6Krqms1AHu+Mjgy0Jl7sO1QwIgGGcvH2RLEmh724eH+2lD9GKPEjtjAPo9ql0tJ3ZfuhI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeMTUCRA9TVsSAnZWagAAt1UP/2lyJGT3hbuoN5xHo1zX\nnvyHx3dJpcV5nZYzr0MqPKtyTcc80fKxa6R96jDRwIE0+VAgZJ4JGLGd8js+\nm9sO6dL3DfsvvAJUUGS318g7OFDIRGgb2H1AIZHp+tR3i6pZzQ2BxDyIW6GB\n2e2wOpGdQO8mbQJATL77lumNnr6AiG1HVJj6+FjTDYSXsRH4RiWb+I4AJsXH\ng8IVm76VcEKCADowOKPuCsdJuFepY+dJohFvv+eU1zPsZHvFR2Y5oWC81LAh\nOssfATBmjibIqSLmLw0wUQ1tqPFPDMLT4Mr2pH39bwnKKGzZ1pDDb3SgZcJh\n8D7ypSo3+oxnwWRVq5c4PfN4RwO9DKRhfdPKwmIJv2n42wzavnb2kvvJJFyW\nP9qG+WiEc1+PVcPFj2nW5py5HrkbW5lJWXymT2p3RAREhPLLNOvGtvZCMmhd\nTJ6wTUDJY4QZNks8WKHZsu3oBFrgs7VBOZgsp63zEzLbJn8ShgSNMs9UmLIC\n6h7i7GqnzF11wn9Jd1NKRCCEHk/Wn6Uar+7G475vbyZV23dJYlu7UQRnsjnj\n+WJTkeMYQHFOdHP3GRJcfBtSOmroWrz2XExqeCYSm5PLlPGoDK7xz8jMUX1w\nDZ/eqBlM7k9fQ71UpLc/GAHcxm+nSEetejWWjfH0eiJiRT7HXezfCi3PBo+g\ntuAl\r\n=xeGX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"3f342c3f4715fd3587f327ce4ea6b5dd314c5c55","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"^11.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_11.0.0_1618527444150_0.9321003945536559","host":"s3://npm-registry-packages"}},"12.0.0-canary.2ebfc5374.0":{"name":"@material/auto-init","version":"12.0.0-canary.2ebfc5374.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.2ebfc5374.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d1e265a925ad82f29c88f084ded6ae0e3d04eb87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.2ebfc5374.0.tgz","fileCount":14,"integrity":"sha512-fWsjNmNoHIM2Ep38SH8fI4fxUiTsmGfF9dMwOrvUpwIzuA+dT9Eg9xTBqQ4vQmanft0Ma1ZZ7gS2zkE/WUotFg==","signatures":[{"sig":"MEUCIEe2NSUSk6X8Ma8O8sz36Pp1q11S1kfaJ7B04TThQfKhAiEApGS8ihtNstrZwILY4Cq2TdEEYbtJ9kPb8F5kfBwe7iE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgefcRCRA9TVsSAnZWagAAok8P/j8YZ5WHrHzeK4lYNuTg\n58fcFv4mw9tqiY66XJedT85chrT7aZ7JhMrrc9ECQavTdopc+fGk0UEx9GKv\n7nZd5r7pkymJQ2ckWiJ6dLbKIb5dNZHYQ1inKEQK9ptJe9AHh4qvhG+caIjA\nTTG1lI1D+XpLZRLuV+p/MwbgAvGCAdAIKnneRZNRHvwvwtQW5JavQyia4p+h\nv7GBTIXq3Pp0UIhQUqUQBjUFWur/UjZ095seoVJjRqYukA44f2+2AnX61THv\nIy/F37Q3PF0i2/AbKuQh2BkVAzsn30rozZ0+Ib9vhe5IDh3JKR6KY6nc97/N\nDEy+73OpgW8Vswa/KTcRKc6wJL/xSNGFwui7cIRpDA8vjRK4BivaWP/btcm2\nfRD+G6ML7UCDI2sQuYbgwajkWetEOZWidpfy3dr3o7rpShsUgKj68l6Z7Del\nbB1n2tXx9hAa2AP+bV8M1GUHkXJ4Go1ed/mW7GX91wKN8ddEYj2B99kyxKdJ\ns5UEo56Q4wAoFcDU0Fv3v8zB4YbUAgAmA6jV7DxJPsaxP4kA+u5zABYm3ELr\nteYzxgqZg4eU3d6lQ44l6P79Gfmb4qsNRYWYuPp8C4yZJtUZQ7PIz4adQDVH\n1P8ox37sSeXcsiBTAP0NrZAp3JEf6t5xKNCz3cstoD/F56h8W0ZyHbAVV/k9\nxH1g\r\n=oTJK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"603bba9493212a7e1b6350d2f12e7488ae1d9594","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.2ebfc5374.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.2ebfc5374.0_1618605840714_0.33449879952940953","host":"s3://npm-registry-packages"}},"12.0.0-canary.5631828e1.0":{"name":"@material/auto-init","version":"12.0.0-canary.5631828e1.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5631828e1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d40a623d57e24515d9434cc77421031efdb20510","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5631828e1.0.tgz","fileCount":14,"integrity":"sha512-Ogl+20KvGKI+gy0GT+KBW95+GU+MxBS4OgW317LAEOG9gEvOwraiYhcnwyKn1ZYQe9BoypkPc5thf3bf4D7EOA==","signatures":[{"sig":"MEQCIHmLUyESyxmCKUhKtJg5V0ggfcUz1Tm/lthpS4PbNYvmAiBPRNmsr3nxQpfbK+CeUTAkMd6LZmkY0LUPuxcoOgokGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgepI1CRA9TVsSAnZWagAAUgMQAJsmhI8lzSQ9Hos2AqaX\nqST05oT/JojqZZWQ87SC9VT/gWjb2rY3LablnBM7toyZL4bN99JMx2q4DdoT\nQsLTESjkkCA0k6L0ynnX2+zYv9s1dmT/hBGnABiTLqsilT9Q04M4H0eCAtnp\n1S8B7UKECe6AY/b2jFEBJpwpaXH4Ti5X3nPAkW1YgNxtGzQnVFRpliPcBna3\nLwOe2k8TiBZEwUtF6Gd8aG7gLdipebzN46aJP6WLxc9JClT9bQ9/lWxU6TP8\nhbyFUZXKAQUDaAZ4tY7vYkn8FkYD/5va68bd8RH97FEs8tK+JJ8HEuSBYZu9\nt1Uk0dcDIAkL2Vh8iBkG+vK3RbLEb9mi2LzHztZtWCeLaHJW2hDKImtCuLoJ\nYI5D8vP5ggKgjNZQHBNAFKa8GDBPd21TQfKtEJ5/U0cR/xvnX6wgzA6lZZo6\ng2QzXuti10QfFaQMhqyYBF6XvfFS0U8MW1up23vGgqs8Bd+E4WA8lK4zVQUq\nAPu9lacWeygZwgxuKjkbZwEISSTvwqiro9VyqPHVPSKP0xfhMAhd4oBjVllo\nEiWGCD7n1mH4a/HilMKOusaO98NtzMKEpkoUAE+EhgYx6xVOpu5qO38/xEcs\nb+coHDXtGQ07S5MEimKIHXv7IW7BWuHIPquWp8Tc3CAZsG7XbDZ903Zthx7f\n8nOa\r\n=b4cm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"497e1a2527ce0368b4038766ea4893675ced3523","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5631828e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5631828e1.0_1618645557294_0.5711458745126605","host":"s3://npm-registry-packages"}},"12.0.0-canary.bd685395b.0":{"name":"@material/auto-init","version":"12.0.0-canary.bd685395b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.bd685395b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06db9a19c056327ad3ddab2e69935a2f7e936ac4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.bd685395b.0.tgz","fileCount":14,"integrity":"sha512-oifc4PUAB+xtClhL9hGABBnC5i56Hr/ZOQCA2S1DQcCDRJjNkvS/p+f92s/TKfyaI5eJRfOJuEfz0/jn7fe8ZA==","signatures":[{"sig":"MEQCIHjT95Qhyi+78bAnBISchmEoCyW60x2iFKyc4HiCzxZzAiAo3/12TpECLpKJSWt0Qa/YkjK8xrB2M33o2cWID6YQ0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfc6ZCRA9TVsSAnZWagAAnnsQAIb7yCZEVxsFWjSPiq3q\nzamI4+hXnNPsSUJUJKXej2I+xy0diWENaTyGRoG0j06IWzQvwyjOilIjYpfc\nwhh1kGo8iOV/i4aHuBikeuwZIcUnZ3yq+CHD/D2p0Z/kC1yESGZBLnFZ1X5b\nmyLA0810u19MkhvXHmZWvFvjTghqPzGW4DjUIPHleSx0AmUMMj/IVX664Z9i\nP9IFioes2MXAZVi8LRdRtE0DeIdCEABpfoSSlcKLRg5KrGxDVkNHBgdCdUkI\nW1kmvC6G1VkfowxHc7fY8HWn1W45L8zMyPioErbIF4ccOJCxH4vTWjYPhGBg\n0wuOQ4lCoK4g66L0BJqjy6NJ8pI+kJy2vmUWcTQAaTIuZsJO69U8i4Ham8n2\nSF8ZtHAr2AesB3v20AE78pkohBXhILGWenY1p7qvwcpcw7gekpUqYOmefJ0c\nN8T860KMEpeqfMQeOF8jZCD8v0wXXHReA+83IzKD7OY41/FvqA/iukAp7aBb\nHSn0kbtG3r3x2VMKmGce5ubz0rcrJK049nAsuvDLFt/o18epPYsLUh9codps\nwMRc/xfFXawlRTDEOTEEwDTlo0aKg8hoTbAEYgGVwnzvw51YvcHcHnEqZBlE\nanJ8XKcfJLXS3VRuZ36jc1Z6rCf1aJWwwEbXjH5E+fcj5/DkLQWvbIrYL5L7\nCcEl\r\n=zcca\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"69c7d9ec7c5de65144c3b2a9b283b6baf7af107a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.bd685395b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.bd685395b.0_1618857625003_0.8061310647865436","host":"s3://npm-registry-packages"}},"12.0.0-canary.b52196498.0":{"name":"@material/auto-init","version":"12.0.0-canary.b52196498.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b52196498.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c1ac1a39237bf525e06cbaae6257bad585bf7481","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b52196498.0.tgz","fileCount":14,"integrity":"sha512-zzrUsYLUbFPN05u3uN2k9ftdTUgOI6e7fJOJAdYMuLjtPRqBNHWPmIrJQKi16JpSvGYslcSedy0HjAXy+KHdZw==","signatures":[{"sig":"MEUCIQCqRjJt041AIuwkMXJYtmWGrhZVzrAjeStbl6rGCv+mHAIgbJglIY6+UNbcGpHY54Hp/DUJx9l5LxHffCFD0wJ2UsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfeCLCRA9TVsSAnZWagAA3woP/ig4dT1255xKNf0UaCs5\n9ODNuyFBthBLFugcn+Kfi7leY8fo75vQcZ30TLnMKeMiMihQao99LaJ/UJ5/\nrXlCn8dMIhPjunSI+I0IFL/aF0qteYJ66Y/smATIK+Fpl8Hf29dYdpgWw/v9\n5vENbPjNYpRxtljzHGbRr59/rO4+r/SG+sz/7CMbeGSFmboyz8EohND3m6M0\nJ7sdQp3/X8wJt/mo9PQB/vhqGSLhSubzU0UFlsK0gwbSKQaZnNX2WPxhd05Q\nrhDlc0+/cpHucqUtiLNp/+SdY92B9Eo63Dqy2ZC0lyf4pG+cIwDolzJ+pNW0\nOgFcdqLk2LzCnah5fr5sSJ5swgIwVgitDEok6DXqplthojLZQu+Q4pUkb8k1\nLFNxeHcqNufPY1aUcI14Dg4nEUOnpKwQ3j8dMLy/euSVf7GpQwen4LzD0eGY\navTz6DMmqXNZA6BL3lJRBwR3NYv5Qmpk5pIF896UjwaLvsV+7XT9ehkZ3CCc\nAMN/VSIXlQn2lEPwsXAgKkZBjyVBmC5DGOTWXNGCvrb/l2UXSOF1/c5sOabn\nKMit/8Fht4d69W/enJgI2ykUMfRG+F52apXGN912F5poJ/f6FUa2D5ZY/Nvw\nnNC517YUUbWLXokWfxlsNfVAc0dgA0qZtO/LBwmA69Yd8KCLbRZpwYcp2f3g\nm3Iy\r\n=Y/2U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"953cfdd3bde4c66a4b6b90171d4ee702958ae1c4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b52196498.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b52196498.0_1618862219422_0.5248203729989136","host":"s3://npm-registry-packages"}},"12.0.0-canary.8ba3e298c.0":{"name":"@material/auto-init","version":"12.0.0-canary.8ba3e298c.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8ba3e298c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"87fb2bfd28e0290187f7b9d5537fde9dc4d4db5b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8ba3e298c.0.tgz","fileCount":14,"integrity":"sha512-YA02krj4bdiHGMEcpf9VLJDTrg4ZiH8biROEIgQ75biLtSbSnfltp50aBilfJ4X4DxdE75h2ixBGJSlkLO9H9g==","signatures":[{"sig":"MEUCIGhKqkwVa6YQ8rBnjF7YglvTjxsipXyjMlSaxhxwocpWAiEAzN8gy99JRS6BE/lp7hitdCJWPrtoNlSUTT7TvbFr5Ig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggDGnCRA9TVsSAnZWagAARgIP/2tZh2J82xCjYLXenE5T\nNuZDJjd+vwJSc6w349PrfHmXMbbSehVzLVVQJMSD0MdXTRu5W3BGTvrABUMI\n0424bzTuZB8ZSlaZSHZoBYUooLKMTLbCTdaHIh1dkJV1m2RZQPveTs1OWlMS\nzhny8ZDrmqA/3gOBCCdHsyoSD98tNEtL62rgdLQ1n/t4yr8YtFNrSW3vGof4\n5wrkTFEfs9LDjZnUbLKuw+MFW4Ca8PypIR+gQT3FZGh+g2pQIJzM80Z7njwX\nZ2Mi2upSFUg81U/EIhX3HUpTBFA+nss6JoxetNAYuI2B54gOzQcZXrnMJRew\nNNfKaRHgPAp5/lv5HJ1sj5wDNqMwbDxINGbQlAkMhgRpQcBrrxgzGzsjvocT\nu10a5rDCorLlmUtjB72yUVLzRQAxyq4V8RwlMgncDJUKuHMRuSq9T0/Ncm/b\nsceKAa47QFJkM7KZmR2gGNHA4WBtB0Nyd7rw6RBreQ+0ANF9pEkjjMs3Mtje\nEDN8p/fS/BgDLaZh1oL00FRXmW0leRdN3AQuJgXCGQor14Lmdf/Ny1APw57Q\nWrs8+F/IzBa5X13Pymk4Q95lwN5jpTpDcCmIPYcZU2URxyVpvVTruWp0snoX\ntFcJfXOovbBzCMIYPSuBNQv3fusECFvKlpLKGg/WE7cdonAgsMbAVG1r80AE\nhlVc\r\n=Q1pu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"206fcb6cb686d5de97867cb4e4005926e2a94501","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8ba3e298c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8ba3e298c.0_1619014055228_0.06261442074122736","host":"s3://npm-registry-packages"}},"12.0.0-canary.c629eab71.0":{"name":"@material/auto-init","version":"12.0.0-canary.c629eab71.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c629eab71.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"58e88f70b54014d1f21fbefc95227df3e6cf79e2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c629eab71.0.tgz","fileCount":14,"integrity":"sha512-1c+4Yak7Q27MeT3qkOjVOfs3sfa9VbLFWcltSNE+an78y22wyUqzvGXavn4IgoTy9xg0AGMCcw0HnPxjXXjfKg==","signatures":[{"sig":"MEUCIEqITz7/97tAxkmmOGOddnXKcD6/sOi/e6HDwr6Nya+qAiEA3tdTU2fcSoSoW/w3j+wlNq/gAK7Jt6ReFwfSsGLS/bA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggINPCRA9TVsSAnZWagAA+fMQAJMRF7cZity5PWrhzbL7\n0SF/BrcOewu+13J2mRFah4uLM0oxpa/pPK6AnBx25usuPzO787jLFwHw8K8F\nTY9Tg6siLVfUoLvrtjyJuFkb8WNvAVs0OiQpsQsrgOpMgoVB4Q3fumvQiw41\nAYLr7NtUZ2FzGVD1oH41o46XWLcCZV1aqGCthJ5dJ2zs1cm+f00YKUbWoOpp\nDNH69Ev4F2MiOj7eeB8fi2igVz45B3+V0H9iwWHYeLgaZnSX+1vU0Pfsq+8s\nB52yltDFhwYBw4lBe4LMSY4Vh95Whjz1T/XY4SPEZgcqJfg1FLrxy91Xj83p\naM3xjxD8Wt8Phccg9xoA6Ky6jJ6qOeobB9GASueZ7xuWfl0Oe55qTwzoV+nc\nt6jKG9eSJ3nhWa+YT15KA9Drtas1Do9EmMyGe9Zssz71x3/9+j/OJUGXpwwF\nucw0sgv4xudsHGul9ifjG+D/TrH2T+/2pG5DunaihVoojzs1hcNJUeBT1W03\nqEG44wQZBO+CT/4y133MSdujKD7tbSVo0BMtq1ybOCG/lA2okG6yMwfYf03b\nA8SaN01R2VJjE8bex7q5EjAmFg5Ff0X8Z7rsmTsieffK7TyVaqac65inEoz8\nZfH3E+u3v5+AWtKpZWghn17nIHhjyJZ8X0b1uxxFgVqg1iqKYvWHYMFXyjUl\nAuHS\r\n=C3LZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"13ae4a821cd20abff4520de3f38c689af7cd0edc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c629eab71.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c629eab71.0_1619034959192_0.6757496731565886","host":"s3://npm-registry-packages"}},"12.0.0-canary.8ace3b810.0":{"name":"@material/auto-init","version":"12.0.0-canary.8ace3b810.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8ace3b810.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a7246428b324e2817e610aae9859de7c810f76b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8ace3b810.0.tgz","fileCount":14,"integrity":"sha512-aFD+3bj5kDdeBdqncWDGaEQLNMjZ63/MeNTvtfPfYraaHknZCEUYfrvdqYq/cmptvpuNvCxlkPPGPv/zF1ENfg==","signatures":[{"sig":"MEUCIQCFXdbwbqw7PxfJCL7peiYzyR5KwIN7B4MiwJHis8wUogIgMuzZNAIXsesPk1eFkDLepmn+s9HIuFai0hYbv3qpodo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggIznCRA9TVsSAnZWagAAhUYP/AiGEQTPZ5zgb4eFKXVF\n1KJI08pyjglPk4w/Kvg0uRRtdtvuzWZQXrwsZLebzXbWsV7Q2z2KGwgA0tBA\nf3UqgyF9zvSrRu046mcv/3q0USEsN2Qpd50CY7oUhPt8EklP//H9H8I0HBz3\n42KHiUhqST1/9gl8hEEs9Y5Sf1RCX/2gbLTBNVa9yl0BMvDmQaXq7RU3Wei2\n4MJFumGwBM9QVzJt2tPiPTnnUWjzVHkEEtOIq3VLmXuVo0/cWSG5PfjaFmQ3\nja3ivuPtQR/f7bDO9ODc/CuKSbfn2cAvelTj1Lcz+EJvOr2MXssNjeJwvj6p\nkAXHQveHQoEEm62fL4vkZnllNkhWNSC2ETD6YswRVR3AG9GjNUpJfuCJ0TVs\n35vJYy+AeyOszysS+yOyXaYMjEBHD/5awQw7zsI73/EKywxk37nvTiJvtMAz\nEVYxJs4u1YH+q0NddDRvatOFIBp6CHYUvEX94DGBcDS1DZSDxBEWuN5UCn16\npHmoakC5gIkQ6R53DnaXPL4RTUBj7PmVbkQ3mW4Pu/pBBDju5hscIF6iUpAt\ndqsf6oQJT/OOn0A8KIX8nvlmxspjaXEZF3ewrArkPU/u3ERD5qKuFbejWZ2w\nWemtrjLWUdGhA3ZS8HU7mv+Sb9UkFFYT1ZnpD98FFEvBpkcLZwZEPk7fhFsM\nOzJ4\r\n=cz8U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"622173e8e2308a6104e06bf943b6423381a17e5e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8ace3b810.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8ace3b810.0_1619037415116_0.0736261271463623","host":"s3://npm-registry-packages"}},"12.0.0-canary.70beaf42d.0":{"name":"@material/auto-init","version":"12.0.0-canary.70beaf42d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.70beaf42d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cad7a123339f314bd2535cd84e13878621461b38","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.70beaf42d.0.tgz","fileCount":14,"integrity":"sha512-XLxLKusfsOC8RTyf0w4A8GEncykZGRIYNSL8pKe/HpvhjfCWRpMBA8AEqid2Z2KFnEhFpvLCxn8uK8wItV64IQ==","signatures":[{"sig":"MEYCIQCNdzZOAKYmV5g+w331stAlwl7WgQCbkYuDTHcC6v59QgIhAPoXIMp4HAYMqPT9mQoQqgEK7CMXBi44rT6Ozdxr4L2r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggI+hCRA9TVsSAnZWagAAfLAQAKBn6CF+wKMa1LN8ntWW\nFIFV5SS5Do2tSHHgXTYVRVe5R6zKXlehdUFtmlvNS/B5Ge/qOdHBJPNM3pwn\nKvDC05WI7lHmt7NKXShbVXR0ufTqhR/GvXGvs0aDvkGhVpppp/N5D0Thqy01\nzxLf76+5RhexsnnhJ0XgrPrpi+ztL1ALeKPrsJ2N0RBtu1n9XZTnqFIUs/qz\nou3oJ/8TV/UwkJf08igWa5LWfN1tx8hqwRVnvDsjMHTmTUsv9bx/u+wf8ACI\nNE6HTNPs++ahUpNewEkT57eRa7/ipQSC5enGiORGMuhU81o9DgVT2mphHwSu\n/WVpMC4PLVAZXA45neDXG5qT7HUCG2cq7Q9xnXur6gGyljGoB03iO/cJtQnk\nm2j4UxvBzGkwcsPuBXF/7BEZgVfjp8u5YR7vZjZ9m9vOqwEW/LLivRgLaPUJ\nF6Yyi6U6tt7+Ry1AWbnGhOd1gexcH07FkdynAZLdABsvdsGWa/1eV6EXgT/g\nOkB3fHRNqkFY8UciHnmBehcAjwySKDqzZdfC0fjyx6ueb8wbiImhvLMLKDGY\ngrjsZb3Zh+3s/qxSC0R+niddxo+k5RRuMQpvVZq9gXg533fvCmtteB/t7gpI\nadWtyRpMsBGw2iwZAEBsk1CEdkwOHZIeOSuELAygueB6lHnr0JLPqWzk/60I\nC57h\r\n=8htN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c5b29092fb8fcd0102b908417d8ed3d61c3448f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.70beaf42d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.70beaf42d.0_1619038113329_0.949539555709094","host":"s3://npm-registry-packages"}},"12.0.0-canary.cad489689.0":{"name":"@material/auto-init","version":"12.0.0-canary.cad489689.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.cad489689.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"03c7e9dc2731c89427f760ec6b3468fb8305141c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.cad489689.0.tgz","fileCount":14,"integrity":"sha512-9M4J1MbtFmapDNRp3abwij95LJyYcUBpRpvyEW9s7+Pay3zmme05FWMY1XMhJLK9vRs+MMtVWEJ8zyWIiq24Ag==","signatures":[{"sig":"MEYCIQCkwLoUbcKc/SkXN3s4SbTfuRPRXcgvSt8QGQJX9k6ZjwIhALIFRuD8CUXlrSMOT2U/T5I+J0evN5X/3e3bcBUgEC/Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggajbCRA9TVsSAnZWagAAQMUP/0V9FjUBK7BrVANw1yF+\nvpch5w0tk5zKhrMeGF5m8QlOgnBVPuUsAybano9TUbnx1W9RDzu1Vr0881om\n9bGBLohkBqRaJbYqJApJslPbtbG98AX3tfkir3COqOhsrdnRbbCUVekh8vA1\nJQ11Izl0kcXXcO/H7R7x+CkCWx9bwdZiRl7D5BjHb0D7jzsmyyRm2N8yZ2jU\nPvfSa0zJ7AivWSMPdRC7eCrIk7U+OVOBgPhSTUzWw/DPB2daaLbCa/iI+9rQ\nMceFCEXWfaNxkk/IdiulGk1Zzmq5euBDTMAjcfVgZLXyLd6TUGtDi+soWw7D\nLvqHarB4BrMqaIYuEPox68PmU/tkuPPJrgP2jMY1I1rW7wT8IStvP2ehrIBB\nu21O5qgWnSa+//S2yPWA4MImOgH7YvuYeUCLoNlFf1MR5DWA2zlqNqmiZUeg\nrf6N7gvtQgOW3AHQ1F3+Rf25iwrOS1S9PFrrhI0s3IGZMjGUv4hL4FletgxN\nDgiIJyFdTTI0fhm4uwHwHGguadBAMK/Q5wAgc5IX+GdrdmMfNoF0sSjzfI11\n49YoAccOD6wYQZK5rx9RF7Ne2FTZJakERR8RYyke/PIryqe+8TDOUyfjawBv\ns3W+xZg4ak/VXpUrIpy639feL7XgBY+Tzb+QNKjHfCBFJ+sN1JFnQFVK2K9n\nRPAQ\r\n=psqq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3e5c20e059b33965b63d0073bed7e300c57d5781","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.cad489689.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.cad489689.0_1619110106741_0.9783764282730514","host":"s3://npm-registry-packages"}},"12.0.0-canary.d928692b5.0":{"name":"@material/auto-init","version":"12.0.0-canary.d928692b5.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d928692b5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b90e304738b811c3fa839a6520e84f7e121a4765","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d928692b5.0.tgz","fileCount":14,"integrity":"sha512-WR6LHZeHptYZURj3yOCpWX7JROpfHZQ374Q7Q7yU23FvSLSnnLdcLkA/qgYcSZz0d2VCBj2rs+41aw+N7M/uxQ==","signatures":[{"sig":"MEYCIQCvakaouISNBis5c0GKGKmsnkJ4Dpbh3bu5H2ZWrtUgqQIhAI7IFj3AGQI4YHkSE/Hq0KEluWydoJ7Bm74vuoG97KXk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggwTrCRA9TVsSAnZWagAAZZUP/A5HxqdEz1M/WsvCZ823\nN/vyeqppVkXQts5GK6ihIthyZgeoIRs5/vFK+AUlFjgLXhmZwO29bC8KAvVq\ndyRYd5g7mjW/op0AUy3noZRUCG3/9g7RubIXweu8y2CZFOLKZd/uPRjNukPo\nbdtPT43BFIIzU/u0b52aLOg9d/LbUSU4+0jDxTaaOh+huN2KivQpnHC9CVY1\n6tI9uvUjR7rp2wh5fYDrK+aHZQ6TZ3Ea551VRc/ALlcqP/VmJQZfxVa7Lg3A\n2gzr2Dfyf5tAIqW39qJkQbUBHITObG/vEEWht4K/cgddZXzGdnRUKoXlaDMP\nBFxBwd9izvoMrBkFguxTwCjCEwlGnzk8Jl1dx2vAFuWtRkBHae0lDxUX5IhG\nnEUlODNBmqSEOgTXlA33DqMcuOIL1DI9waToWJskLh0FGhu2GoPvZK+KoFIh\nlJMs0yiEdJxk72bO+l3cN0wnEkty/VeKOamvoP5nWzKhwLcjwDni0jjaWch5\nWDoKohmufh18iQVfAC1spKvexHDcSxaVtc4FmZf48yMmmPIBhyuJXTkPHxf+\nVYov8xjOXa4aGVPnTXFzt+rI2hjSOmjcLsk5WQSJJjrznt2R1oyp+xsCC+S7\nx/sWMiQVObULdcfKNuCNJHUXsSHUJtjsMoDpCukYpOlKZ3aEhHAFmaQoxC49\nu224\r\n=sfbb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ced6a0237d36ed84c4d277fc25a11d9453108e12","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d928692b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d928692b5.0_1619199211288_0.8305618978791955","host":"s3://npm-registry-packages"}},"12.0.0-canary.8f68de8f3.0":{"name":"@material/auto-init","version":"12.0.0-canary.8f68de8f3.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8f68de8f3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"062751302111892a39105fa916d14d60f03ae0f2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8f68de8f3.0.tgz","fileCount":14,"integrity":"sha512-Dg+faT0G7uaDbJvh9GIIrEZt+XzDrOGVh5lF2YIeXmsCWCsZUjdDHF6IY5IVizs6KnoiUQaalEf9ftwpL4dUCQ==","signatures":[{"sig":"MEUCICBoNKYMx7AuV6PzhjyQ8a6TpbDqMleLp5FiWlh83tnXAiEAprsZs+gMK8BbYMGep6r+SG5Xo5fDKmu/vu2Gxkr+auo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggw3xCRA9TVsSAnZWagAAJLkP/00r5KBdu86gSMlTrlvJ\nZ5Z3vqeuHaVprCnTZC2Fu0xvg4a+QVB/MHAaqITiYGLfVDt8HkrCcB5fa7Zj\nM7iXdLwMYA+VQnv5/DrLwn4keK9DwOwYhWQTKEbDnnLj36YbNXKPu0R2s4pU\n0wIlwT7uiG/6kc1z71mA3jSQOPB8zky+ffZ5iMKl/zwJFN/UM4ZbF5zdQ3I0\nA2jguP+q7uIZxJsyseaTJfc9UHYyIPWZAzycjBVFxRAPqetHPOd5ZErqoy0r\n5NUwOuXgivUj6T1H+M5nzzgXF/WBmoPjdnIjFG5iIpCmlDCjtPM4o8oGzhv5\nat7V+riwI0sVxgWKJWATopZeZB8wndFsVWkTr6Mey6r2bHfdTLJXf5XXUJa1\nKGD+PiysJWBy0BSeC/ze0OoT90E+gN74/w5jVNWWRUoh6MTFmC7jXDohFzsN\nEdWdHtQTd5pIwUKd7BlRBgU6ON2fGOT6APfQVgSOLQfr7hbsD6f3dUZEYETu\n0uEBoxHMKLO8DyjgldNvVN81isMIfoXyNuwP0Opa3NYpelV5+a+Eaqbe6dPO\nGf8BldDrtR9bTkHn4CaLFm6mx96be27NC6zanenXLJ5VOmZNeQxV1SvPbVJy\nr4QGPnnb/BxdOLOCl4ZEOMkgR419cm+0qp/Hnx/mW+Q414ST8HLX0GNc101w\n10pG\r\n=PcYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5bf06e910f57a544c428d7559d72d5fc2a5f30e9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8f68de8f3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8f68de8f3.0_1619201520809_0.5956601173853686","host":"s3://npm-registry-packages"}},"12.0.0-canary.05753cf77.0":{"name":"@material/auto-init","version":"12.0.0-canary.05753cf77.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.05753cf77.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fc579b442801a1146f638311677b2d3183879b27","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.05753cf77.0.tgz","fileCount":14,"integrity":"sha512-Yg21X718ITCUb677dIB3CS5LP25+uwvi/jLcAczWTafuGGZqPSSabpliRYOyz8yjLYkdX29STD9MJR0pvIO1qA==","signatures":[{"sig":"MEYCIQCSYlF/BOb8+Zjod+jAnoh6HYQRqr1eRXjIMQe2HYhy/gIhAK6WNjVBDUV2LntreS9l+b6q9qofro4c5cqAgInUmKdn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg1tXCRA9TVsSAnZWagAAolUQAJz6eTZJLCwSGNagV50m\nIPC8nd/2mElamhactMpIEHqOliVR/EbHdDgY5aTbeC5qd9oa3f42A2046AMq\nYPT9YrIbZUziTFdvGi8TepB1VemugwTJg+W9sij9l0Ft+XclVVzA9oaC2GiB\n41xzrwCvHjw3ZOFM9RCWstX5xeVt14hwxugILpwrIJwqNbno/lzROuigmMFz\nzniiI/nbkd5fL2m5X0TSqHO04DSidiEFAVHCY4Le3zuEEI7xgzkGpWF+Fqtv\nlAfL3L//Ks+YZa5/wvDXz7tdnT2/aqmPAg99cZ3i/qewNikjApdthmCdSAT8\n5QADMAPqAQLGayn6uFJF3Up+dXmRwXRVxo3oBTXiPEN+kuznLzHQai6n9p7M\ncO8gtXgUDs9GNner5S3xTySdqwA2GjKiEuRweZQruQnDPYYx2dMtTUJEihUF\ndIYB2mXQtFjlBw8vb2hCvqhmDrxSjv/pvn4Nl6ycE+uXteDCYkAn/ixavZ6y\nsCstClCkizEpKohBqD9frfCY5ep+i14bRbubRAJT24Jf2RKl1FpW0yaUPs0K\n1UmB7bbJaZ8gT+PPWZE9jrPbqpWKF1BePRlT7oTv41WwFhmU8wa5e5Q0nmqi\n81dn97muOjXQT1VKm57VV+4DtXN1tQoqlAYCmYDnSIiKw7m3dW5MxDsB3W5K\nGMnm\r\n=DX7T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3557c74d7c4f9400f0a8d2c88bc2610c1d600199","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.05753cf77.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.05753cf77.0_1619221335356_0.5893483103827057","host":"s3://npm-registry-packages"}},"12.0.0-canary.ef43e6d96.0":{"name":"@material/auto-init","version":"12.0.0-canary.ef43e6d96.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ef43e6d96.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca952eabc627e5923063a9c256c0936aa5f5baa7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ef43e6d96.0.tgz","fileCount":14,"integrity":"sha512-t+BBSHObcdhStfaY4LIv1xiivXtZfSbcdwEV15pA0IthJvt7n3rwV+fFpjQ7axqqIG6xAlvCKhUGieBi6XaU+Q==","signatures":[{"sig":"MEQCIE+XHAY7DofBkZHBpZrWqNG0gxNLuGQpJdmrxgmx+22IAiAzBCl/pe39Nm1iZqJspVRWj12IlE1a2FiYcu8oVR8s/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg1zSCRA9TVsSAnZWagAAQp0P/2Z5bWdoWG/+NXt5Kn/f\nwXgY3l3OzsqyWuXFEjrX+1ZAvER34w3td5NG1oDS24n+k+kALkL6Gy70gWzQ\n6oBS+Szc26JjQp5KZA5srC2cscOcJWu0y/yYY+4cmslMc4+CxJkFQ76UF0tS\nln/huOpbe/T+Yom3veGxeBO6PN49tVpL6ejTcZn3HJZkTv+3+0JJdDrbVSxp\norZ5ZE+zimR0p/eYZqaX+UTNpz7/KiuhCb1JJJvwmQqPQS8TKgDxdC4xMZad\nnxIooj0yLoRQxk1zprUthw90ljMnqyZYXNWFw+E5REowsilICYs/L8bP/E8v\noWZ5gldp6MyfkrW5BLNd7/QYa5+ULJZsKN/hq94o944Yn6Tax8VctiCaXjTW\nob91wQPM9wwpQdSBVCs4uGmu2DLp5hLneH8fRr471m3ahEb06QXMfxlTDFRo\nLjvQFFXaLY973ZuAukWRV0cIWYC19YHtsEYSMrNLzRlp+Z22Dpe+10L1gh0+\nkFRmBFxVP7xacLiRXlSShNR8rh5yHA4LOKVV8ABfu/+NSoWM+rgB28ZLPmmt\n6hWMGh4R1mxMbtPeGbWsz6iYVroTzc83h/rfYyK900mDV1kUsMyohlcws9Ws\nHa4ucD2vF8wq1hObDK6a6vJFw+qdb/UopVcEb2h3Vf/zrOsD+k/9ybPU6J40\nOTMR\r\n=hgCl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bf61e37f943b49cb1c3287501ad6fc31f8c88687","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ef43e6d96.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ef43e6d96.0_1619221713757_0.8593022835642845","host":"s3://npm-registry-packages"}},"12.0.0-canary.197f64fa2.0":{"name":"@material/auto-init","version":"12.0.0-canary.197f64fa2.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.197f64fa2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c854936f1710591bdbd1ff114e2400f7d626fdd2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.197f64fa2.0.tgz","fileCount":14,"integrity":"sha512-Vw2WAR326B/OHnKG0EeEcgUrtN0+n5NQyMqloSY4+hcTLmyQqFjS/oUZ/FYwpjM9MRFU9O/DPg38mzyOYlBmvA==","signatures":[{"sig":"MEUCIBLrMESvnP6yVIkmGFRYavZ7VnH/OhzliT8dnyhMjCJNAiEAjSt5YPqIfGChZQ1DyaC1pE2mwCs+Of/5rt+tRJ9GRYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghvOZCRA9TVsSAnZWagAALf8P+gPqRRbwZnLFM6BEM6LO\ncxsrESnSeVOd1iL21rj4ZqfYBSANxwQeFctUD9ua/5LoQNvQVnmCl206a+iE\nC2VEtwD+E9h68qTZ3tzECNBakTev7I6keM1YEsSJiyg6XbYpmgI0FmGD+63X\nftQMYPHdBszTiTg6L26ELtq6tFWI6J9zYyHTCr1UxEDL0TkaW6CkiBwoIbmF\n/NCkiqtKPs9VU2J57TYGHp4yC48oOv+LaVQzTTV6Ou4Q7LGqaH3EoScSTWDc\n2Q7WyWVkPR3+3j+7pmaYhyFLGnnlDP5D6Wv3PaXyZvlpGjHaivOUlt/8ERSz\n+Bm/H3BI7lCp9SrwdYCn/4wS05bOlBUXTq+U2YbG1ZnvstDhXNkx5zy6tNnC\njFsQ4HkVczzHx+icC8JlvD0QHpyDqkyR91wBZoQ7B5yllqAZXfGOwgd2/KrV\nIpgWyzGFQmtFobJyOqqB/pI3NcAYNkwqJ2drFUMRFRWBubzk6WHaIp7MKrdm\nKOFTqBnZcqwfRIwPANRh7caJ3FBiflb+0qNvSRkhUoreRXZdb6S0KUKGhzQt\nEfQpwjrvHb7jKkxj/uRFYTkCNFNsMWpdlwh+yzZwXfFosLUDRcm1MRYCWQMl\nJ42wZ5Q4CGmd0JK1Urg39NEZmFE05kprKtnlGAOcgR6plfXmvkAnsq1JBAIS\nVrgD\r\n=6yr/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ddcd6186c353b0d99439cebca29eb95eebc705d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.197f64fa2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.197f64fa2.0_1619456920654_0.1476957772599492","host":"s3://npm-registry-packages"}},"12.0.0-canary.55ad2d7d8.0":{"name":"@material/auto-init","version":"12.0.0-canary.55ad2d7d8.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.55ad2d7d8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8f82a6e1de592d8168090b8a4d7e03c45b52659","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.55ad2d7d8.0.tgz","fileCount":14,"integrity":"sha512-00RKIgY6EyclyoxIVoq0ZLnJvtUM7OJKaOz9bTrubMBiBSN0IUVtmgbTKaUCWNDXmF6MpOOqBFumTpBv0Dtu+w==","signatures":[{"sig":"MEYCIQCEP/pYnJrtq5CnhUk+pvzm2iL1g0xZaJYxwE6Tg+qHEQIhANGUBc+vrTQtfLFyc3KCOdEigjmHaZeeYSRhNDAupSUo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh2Z/CRA9TVsSAnZWagAAsHwQAJ7g3Jmv8NTHY5IVPgom\npVB6y3k0pVfOJDXOBx0Y51h2nqdcJw5uDWoGB8mMiKo7tQQpuX3TplwLoXyt\n0VNFVkpwuvfXd4ZmCKZO8nVvR5k3qMtD8tt99Ygg8kGQiF9vvHDYTlstVR7z\nCWcPjMASwuoZ6NFk9u+3m0gFdwy9mrrggTCVJhqEJsIBhOpPTFCIfj4DqmFK\nq6DqLwJ3bb4O2Kbn1SOxuAaEYHUfc35LSvg9skuawgDp2Z7jUb+u1QPVhb86\nJXzjAqJ2dC6TYfkR3ppQXUezxGk2v/4JsaLa0o3xbQVJVYOA0W/88iCa4x+x\nJZ0YlnrHKlQwRaTQRWFvprXetMB6vCWeTgPJRL5x9FC3ElxM7X3kbD3q1U4E\nSOZcOrrGQLvC7hTBV5tE8JtTWfdJpF9D6NJnPLe3E9sktMbpcALlha5a8ItE\nwgbV0vKS0szYuaAI+x/eUIjW+ANIOH9uRWqWElxU3djKrUOAcz1P3ArgsEEl\nNlUND1Yj3Tqol8rTAc6SHC/ifiaKq0Iyb3un21axIUBe3yThH0tBLf6HdDXE\nRo5KgfTNRpPaahg5hQjqpniclrDUmYIYx5ZFtxmDffPPFYsfaMtnSKeq35em\nmKzu0q7Cl7jfClp+3cPKIDfJS10vmSHIjEYMB056JfQf7B2ywA7yfeRRtu6P\nx65B\r\n=mGF4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed8a5f8b1756d56e3973815a51d6fc7e51c366ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.55ad2d7d8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.55ad2d7d8.0_1619486334949_0.5891785167292847","host":"s3://npm-registry-packages"}},"12.0.0-canary.ec4ac5234.0":{"name":"@material/auto-init","version":"12.0.0-canary.ec4ac5234.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ec4ac5234.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e99d3b7fcaca32d17e6685304c822a3d333538c0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ec4ac5234.0.tgz","fileCount":14,"integrity":"sha512-Or5ICcEeSs/VXng7+erii8/8j1OTtdWh5M6Z+hsoGA+9brrgnlX+GGOXhXenkkLOAQjwtxoDmU2iWKL4QPvESg==","signatures":[{"sig":"MEUCIGvxgE7Khqs2oNAzcZl54slZWtwXo5lGVtLJR7yzyvELAiEAoz5lTLMXk7AtKb9Fln9jRTX6MW3QQayhuLuey4YvyIw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh8P4CRA9TVsSAnZWagAAZBoP/3+HW+GdQOH8ifQu9ISS\ng1rpIWx0+U7hX579+uN6swbU+DOdp+JzwZLNed/PLDAQMtG04c3DOo+ppmuo\nOWChRzH9FakikYzt4wtrtEmTHDVBjjALYEFEuiRSz9YJKMl4xJCSMDp7ylsg\ns4oKFXVNAta0DkoKQlM+jroxbGsAisV1mv6AMFH6OGidT+XAjB8U62lJoTKS\n/Ba5yXBfGlk4L54AS/KzjC6WeM0+/R2y/lPgQgSLfEUzlMqq7o4ytNlhsjiN\nNfYct+SRc/ItfLQlM0UEgFVUecNU0tUfIaV2d7gU/Wm/E5LOcuGHlGh5j91K\nE8Ix/MmtOZDPiZY1stjkWmyALjOuwMam5FYN4ZxK8J9g8T+zKbTs4Dol5VDg\nLd+MoHaggAXNL4gA8iDVM+DxQqgSn+pb6barbG0xivO5GNIEw0BNjUrmmyxK\nsrKSzw3FDr/sh6vU1v2QUKDnkjfkM06hUxiLBhMypkEDi0kZE3sM1EVBs22N\nlr3GBdvxvbodOs7jB3jAnVPdC31f2DWN6wYQqhhuFysEP2nJZR88E/3fvZ14\nT0nZVkmPlFWDhgh833ALHcttS1x0m26q0w7+7a1D2sb2mBpPtNy8ZP9C4cLE\ntTWktiKa1uVGwAHZoTJVjCntmW4VE5g3IUtxXDOXuu+f2wMCNpa7i7I4fwKR\nZMja\r\n=2o1k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b189e0be8deb45b4e94790f21c377c3884f551b7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ec4ac5234.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ec4ac5234.0_1619510263568_0.6053139684439084","host":"s3://npm-registry-packages"}},"12.0.0-canary.b0579acdb.0":{"name":"@material/auto-init","version":"12.0.0-canary.b0579acdb.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b0579acdb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5ebe70e0358febb7cd2567c65a09cb598d392579","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b0579acdb.0.tgz","fileCount":14,"integrity":"sha512-v2ETUdx6tTPaGaubJLUhNDxSe5K72ol546rSp1mu8kPtv0xRIz+hgZa0EOQvfWKmh02eJd6Xth21vXbYqIEIMw==","signatures":[{"sig":"MEQCIDnyvHiOfv3RO+6y0FxlfHLWGGDrPbfPuwGki+fnisjoAiBPzGcBPOC5fq8Up1TNLA141tFxVQViujqYTv8vYgYW7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh8zECRA9TVsSAnZWagAAn7UP/jJzovLJvnAit+TxHb+T\nM+LK8ol1f0b+S46Y5qfWlcPSqdsVLMH+yPGXvar+P5EvjsHQ4xI9iRRThOM9\nwmUibTH70yFwC5qsMWbbFDYSbgyN2jGa2Wg1DD6/1KQ/M/ppNZ42HNxcili5\nrY1FrHS6Hkw5OH0hJIOp1YVtxwsF6JQPDU6/UaNLGy6Qpm9TRnTXxWuK9gMS\nyZh6LXBn/fyIvHtgtEIe2SVInfsYoPk6t6CeG0N5lcZOLfGsYxHXBUY2288n\nT98auSpkOa5MJ3loo+VBOBDb8+qHpv2WA93xt8HxhvDO0/rQ/2i/0a22Reyd\nxiMAi2IPq2LmZ2vISPBvKjc079cxe+ki4fqOEQI7dvcdm5fxESiTaIVjKBF3\nQhsU9HKo/8IIYzAHTaWyhMI93oicUtoD1lq2yYUrVeZJn3nT2buPN/zfkbzJ\n/QTPSv0Xs3hHvYDkk9g3eWkByRCXS/By0De4YLjlnZuTKkO1Gb7uCsf6EyCe\nnPS3k5P4Dz/M56t2mTIRPYEBG05TmhVpZ/khSF4mqUM6ozskyyqu666htDsx\nUeC0RQbjuiNxMRzq9IuCOZuRXU/hRuJrem2ETz3R4hE+gyoU7a99BxXzbzcK\noFoFwuDOSLTO9ZYVt3R1ucn6KLt/p5VrfOFiSvsvP6ncu0x4BBxc6i2c7hNZ\n+FvN\r\n=1bnp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d1f704610766e7d0c46b8a40beb1848121809a41","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b0579acdb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b0579acdb.0_1619512516407_0.3783787777720591","host":"s3://npm-registry-packages"}},"12.0.0-canary.81e2d4ff3.0":{"name":"@material/auto-init","version":"12.0.0-canary.81e2d4ff3.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.81e2d4ff3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5701ad6beb085dab1e156f03fd0ab6dc97b8f425","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.81e2d4ff3.0.tgz","fileCount":14,"integrity":"sha512-C6I1gdTRRs37C3M8KLMb+isYaOBkNW1r0jxcFEADBpRKDwQDQUt9zyY4yuZO90V4uLmYj8qfpct9P8OIY3qB1A==","signatures":[{"sig":"MEUCIQD8n4Blt/pE4QZ/THFpW518NgV9GzyLnAN/YXqxSiahcQIgA2uccLYeO5AhNMEhaSIIlMEijgCYnJ5DLG/OV1IMqIM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiHqCCRA9TVsSAnZWagAAhS0P/A5wYP2uE2Uog4jjPpQc\nYoOKKK10cJMDuppwHC8MdsziiuUw3si3HEyX7Pe9ZRc3n4Z7U/1f7ORnrnJS\nR3E+NxqgnCXnZAREq7dOZRFp5fgMvGQdw89J/WrGhkPWRaQDWsrjZqwn+keu\nD9sE8h03dSCEKeDjlngexAIHF/doDDcysltkGOdGcitNqsB78juWZpJNnJ8T\nalnN8L3t78OaXnpJ6mnGI1d5BKknkx4XYpCy6mu6FwpcMCK/HCD1R5HU1Qo5\ntd0+e+hVHzkgGrGrYu7X+CpBQfufrIGemusDS8P45D98LqrVD0vGI4wKaNPb\n2bpHwDevRH5nmYOTyKnjQCLnHDXmYOaMAQDtV7BBP6bxMFjoSlgH2YEwTCoS\nmGdf/u29rFaD7YIqi+gjMlQ9odvn27cskOB7GlLIoqO4a5Y8/sz3pZ3c+9pg\nmv9P4Medn4zluycJuN6ZGoxfZL9J3dfuKw0oQ6ncJW7VFZgp3Rnx8iM/2efi\nh62YraQ+hgHwz/fKEMlAQKT5b7pSxp6qUHYhX03fKBocAC5aTaawNsdVakSD\nCcrw8OIqb/fDfMkkmlqaYyTbZneU9gjz03Sulg34sszNRP3jIA8W4x1l1T4Y\nmub8ahWAjJ9LEFdD7VDVKbZxIFRjTrK/cv2FQSFC4mdj+HPhZ5E8dvoUQ77g\n6bmE\r\n=1X8Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f55512ab74610e3f3cd0db70822ad9b52b9cfefa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.81e2d4ff3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.81e2d4ff3.0_1619556993638_0.3539082059780403","host":"s3://npm-registry-packages"}},"12.0.0-canary.c8edee52c.0":{"name":"@material/auto-init","version":"12.0.0-canary.c8edee52c.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c8edee52c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a180c5cad0460adc0d296be385faaf5b9d8efdee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c8edee52c.0.tgz","fileCount":14,"integrity":"sha512-ptXFsYU7bXEQjwuftBrxbVoBYxNQVcpLGyE/zmuF2+UjGf5Az1NFmxMkV2+HJzzI4boX+npDOMkP9bnyYKEYTA==","signatures":[{"sig":"MEUCIAVi2J96uJXur2rhv+fOb+mIxUdQouKRQsxJXjp8L4yNAiEAkUI0fxBOShxrrTd3uuCtkuUeCilJFXv5PGCeevsLxXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiIXgCRA9TVsSAnZWagAARq0P/2Rr98LQ6SnchaX00IxW\nB3Lz+pgGIYtQC9/xCr+uOefwAGrYGVN2iEX1ZkBJM98DHCh3jipwBxMCHwCu\njJjNNMDtkBIhsY1miJajhzPybDQkSdE7zIBvNXUoXOdNsIUEA5aoLAJWv56k\n2tgqOOSjQ6jYppyJKyg7uTom216uYklgD1DY3OKHL9s3VFAY1HfkTsfHiBmE\nvg/TjxVcelXZV89P8vQ0jhh6Kw7nhglU3Dbkg4E/go4JGCmLOYhGeordTAEz\nJvB2diBssVaJV02nS1wU7BIGzSxmh1+beH6qcPw8uv/4patqdvsNA0iUbwyM\nVqVtyqWsXSdlbDPIvAuW2ZYBCtmvcrf/EmRc4g7aNJYjVuDn0W45sxBhlxuq\n8CdoAGAQ2HDcWzrJmWDvkkHbi3lMTher4SAhT++hxn1G+EGlAltQms0pp458\n1hYCyZDSDcZyotHylrwM3Q0WhwjBRriH50VH3W2cid4J/+ZOTRN9bWB8mUyP\nffngP5z1OovcaMHrODIumXWotSZKRhzb2XevbSHqB1CbgPZ7EvloXJJ0Za0h\nmJ8qTDyooSknDlEPeaPCTs7yv0sMRt+lp6vCTsrVnFC4zbiOT6izwFdst4e/\neYDvqgBdReduEOXEhJSy3sNa1GjnkFxbKes4+9CXup+/MiqG6/V7MjJXL3WJ\n2vjQ\r\n=hrXB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e8c7902721c81225e1c8b750094cbe6ac4666a0a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c8edee52c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c8edee52c.0_1619559903922_0.9729841401552048","host":"s3://npm-registry-packages"}},"12.0.0-canary.f5b6110d6.0":{"name":"@material/auto-init","version":"12.0.0-canary.f5b6110d6.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f5b6110d6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d0826d1491b892225967f066e21ddc7d58f0401a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f5b6110d6.0.tgz","fileCount":14,"integrity":"sha512-RC09xEqSbnIVcglmuf1Kp2I5qViH5qwYVsRKMjwrgUwT9agNjaFVrOZKVt3IKHZKt/5Q2pcQN3h68sSIpoeLtQ==","signatures":[{"sig":"MEQCIAKJ3Ec7oHd7LHIDo7GaUWVy51sXpeWHm/kk/s1DwrGoAiBQkwXIpt3p9gsPAvgSb+DPZz35dtzrIt4ysasN2FiZ6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiIrrCRA9TVsSAnZWagAAT8gQAIWBMEVGQuIXxRgx+v4P\nmZ1PKAiO9Tv5mfZQWTP6p5fCGVLwExaedyYvQCq1qO6024WuZmCYqpfqr89S\n/DroR0vTcTUOOA+cgMj0KnfxoKJ0lGhgByJkYfSxliLBFM95Dhyl9heZMicf\ns8LpP6Z7zn+RSp88Ho3ttkaTMP0UC6SNmy2aEXf1s5DQF7l2k64PfFWXRrPB\neXcVpeWSMvqjYDo5fSkw0raOoDExppwhGq63J8XYWfrXzftLlka7pBJ7fD+v\nBfWv3zONmFpG6OYyKd1fM/a3HwPzFQO/Zc2fID5tdot0HCBqQCwjmBkEPEFe\nXIyzd9XtS3cN9cIXAPIkcIlQit+CTlvcG1Z7Llnw6QSXK4ryTPV3MM+PFOGR\nsp41x5MDAhxIdBEwQ6wF8EyBo6cZyyp4GTFpSITWkrnwKtbI4X7Odemif7q+\n39j5KKZIsbzBlpLq/qsAne80SrrZlrDoF63W6O9AUKOVOLCQHTJNAPbN0+30\nfo6SdtBTllbakKnLGfy7xngP1Ek95Wt6rRzwQLY68m59ABDArT/bNMPxhc4z\nGTffzeK0/tyPleFuulVLEvHrWGh1dQZ14h3UcHE5gTii9sr9BibB/0cTy4JM\nDMC5YKtyFeH1GWMVMjuH57ohqZovroturaFfAzMWRwSRa3Y+MNZu2mdzl8ML\nXt/W\r\n=piP6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c7be6486c9ad6826105a70187add5afee2a6b50a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f5b6110d6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f5b6110d6.0_1619561194989_0.6443399766937241","host":"s3://npm-registry-packages"}},"12.0.0-canary.cee9b9e22.0":{"name":"@material/auto-init","version":"12.0.0-canary.cee9b9e22.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.cee9b9e22.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4e339e034379e674348d48aef7c6cc6f33ee0bee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.cee9b9e22.0.tgz","fileCount":14,"integrity":"sha512-tdlrOga/mtfRzcoFhVXYSD8ft/AqCQH3ETROyCxbDDUxzNu9Wob++UtSNdMZxYBtJW1t+U9HjuwlYF4uS5JTmg==","signatures":[{"sig":"MEUCICw/rOz3h4f7q+nCKvzm3PRLhRzW0Z/DyvA/WSMNU0QbAiEAo9/fAuIcMnDRMm5lggE6P8RDCyEWOQw1ATDP7evtC4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiKhGCRA9TVsSAnZWagAAvMUQAJO4vo/kfiCreF3KrJjz\npLoO1LxI7DY4DwMS+drA/EPDOALyQhEeNzC3mnMf1lEFd1EQhrutM36Cod//\nLKmvnCedYYRV96Nmrcb9a02fg+XH6jD6l+K/iWyPmkaeuIHV7zf/xkBFoS9x\nmf0RMhMOHZ5NAxTb9hkybakM5xTrfShaMjXSN+cesfVSsFFRwlmiE7ZLYRF7\nGSahHz3saEA3cpz9j+vSsaYjzk2BBEPHRzMmtcvM+W+iEqPLXcX2w+yE76ih\nF0vmI9b4DOpvK8HpRs4dEFtgM99Xp8pLKd9z8BFTGOjlElmsZ4AlFeu79y78\nFFq2wbaPuRxkqFMkJdtnUFC+uJd7UqlnAZKO/Qcsjaj6zmRtO0TC0PG2KO1Q\nDAeZIp4Sj6yA1JAd1eVQjcp+Iph0O/AcxUP325KH1cQBI5RWQ+aaJmmvy6uI\n50gum4RpBowgwb9XUyBgGAqGPAV2mFuoaOhrlrnHXO1AbebJUxzF5Wd0Fcht\nItvvGa3k+mTDLeHNekkyZ0RYxXDVUb5AeEuUurkvV4SErDL9/Ljso9p4UWo8\nK3GcxYNwQYg0SBIUFd8E0auFqRUVbds7VMiFlZQDD0RU59D1/Wn8bXfd+tNk\npZR50eAosPznm8uSYc+GFD06r5CagIBS81MLeevf75mEcvjQRIdNd2y7frwZ\nqmlE\r\n=hji8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b0c779970f0809be4565910c1abadeed4dab0377","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.cee9b9e22.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.cee9b9e22.0_1619568709650_0.5321765968610046","host":"s3://npm-registry-packages"}},"12.0.0-canary.96e83fca7.0":{"name":"@material/auto-init","version":"12.0.0-canary.96e83fca7.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.96e83fca7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"377a70edc597dd9c7656726300cc96452850dfda","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.96e83fca7.0.tgz","fileCount":14,"integrity":"sha512-fxUOmcd6nwsgHCONbQpACAiLUDomnGnCbIqRts8MNqaXdHfRiHiy0BGEKXFoJPIXriQi/fnosSIb92X8OJ8OGQ==","signatures":[{"sig":"MEYCIQCwVNanCCAby4Bp2h8GBMtEtQMwAhaCHzKzmlMzXGeU8wIhAP4SZDbwsCJHvg0hI6IMxdC/op37KSQ9KIy1secJXDIe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiMylCRA9TVsSAnZWagAAuMoP+wWmP3aoek0atTTTSQnd\nGluDwWlK14FXF7Z++B/2e6/nJpbVGYTdqSmskbK7FihDoLGhWO6Rf5L8jlK7\n0LCVA/hVmky5fpZt/TzRFch4v3BsOl7lMYM+H7HjqVyZt1AAi+bRf9C+HRAT\nAZWzKl1SHLFxgav32IsUkoS1GIi4s9bCm3FWdn7Wk/wcU0j0DwAz1aMI01iz\ni97NK5x/MrrEZ1chmkmzT1mU5+5jQ52sCJeZ0AM8syp4tDYUycXcsT/4+H8P\n0AvkXRorXgh7j1gkXOn1cRx+Ko+sAw1QbPUdo9HDzQscktoSbs4MVJsv1l2i\nyoNEq97aAkWzsW91mXJ7xwXzaPz/H/42V4CbDctRsixRGmfP+OkdLsPugjG0\ny6N6p809iFShCrmsiWCmYmtfOyGjVD39riZuOQmaRCLuPVTduLWnyaHClDUv\ndLthJCloWNuKOEkpC0ITIHbapjv/incBOdPLkjSL9zl7qly7cjnJgqRYAFWc\nhowtcUjtysbBJSaZRSTwzgtySPX6HjVIzTapNOe0HAgqEV+QIdCAw6XR6qQQ\nskD3hj3vZH9fJfepATve+BG6toQoPzwYzU5WVoWRGFkeHXzPQfSCE2JURtgK\nknCf9bsDwS72kEyWI/T6jGoBMKUl2S/Rka6CLh2FXJV3oGFSiQrREyG5w2X5\nKVz7\r\n=A3jg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"377f0025088676d544c1393884e5f27e96143f16","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.96e83fca7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.96e83fca7.0_1619578020516_0.007625887550719801","host":"s3://npm-registry-packages"}},"12.0.0-canary.4c497bd19.0":{"name":"@material/auto-init","version":"12.0.0-canary.4c497bd19.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4c497bd19.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5270100d89c3a181f3c36b6e9eb67f3d187ec905","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4c497bd19.0.tgz","fileCount":14,"integrity":"sha512-njuAPQbAaWehV3Oth4c7wr87BEfSrOtbeCWZpqF/3KFIQv4lfIe+gZZqctmCnBdUEHsl9nOLvO6mxk5WNfMcaw==","signatures":[{"sig":"MEUCIDDATECs8gI4esKAEEIiCPDDR+UFy39nboGLiGdTYMBTAiEAlOnNGpWkGjZvY0NouS3nHz9Hqqr96e+ZAGl2sEX9mes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiaDmCRA9TVsSAnZWagAABVsP/19hgQcTmQbrimEe5oxs\nXEmnGdYECt3bcgAsyzNDpbAawvkoDhbYlrVSsJ69RaMcKFijzb9L8BCbDSpS\nqsEAGb6AePfMmjGiTFZFooCWvIVs2m6GTAk3GJjhM3U2ZZBNCw7o1agqBF6t\n1+eY1rZCdPKzs6OTuqrc0kdfzdONksBliNypStYjQ+KR4nmEFtNhC+ce2FNv\n0eCgMtxG8Mx4MBZLW0US4wNpWWxHzdB9LG5CSvPk/paOJe9RaJFvpD9yiR7X\nlBhlxjUJsBDctLtnXEqupRCOe4v71YkugnQ5rf8VnLpv7es9zgVNt+nOXEgs\ns1RO+jQ1VbN5Po84o1WWFYdwN4eEJrM55VOyZbeNBc+f3xeK9IqVwzhGeL3G\nnxV6Ue4Gn6D+uIr0pQ0fDxvuJiFW/AaS2kLow5+omZf8q7uyAcm5ZllRwI4C\n3DYqx12VxGFzMegUxoX9afvKdrcxYGIrDsKgeR8avAVzVecJA0zCgzGI0CTp\nIAh+hTjUU/4XvPvIVP16r/z4fE/gc7RUf5s++cpgeee2umiaXdhg4CyXxxiO\nqagCNxDE63xkqOIukkht9orQc5Cwg/dmpSc8yQtw0lctFtX79lF9OElHKdI1\ncPKk63lODhw2J/VGBfx0vVUAFSZtGG5Wp97DAVSSa4DM1/i65K+LA/c8oMW3\ntQhr\r\n=tFcN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"beb4a14c8f43815a21024c26a96e3c53851a9b41","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4c497bd19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4c497bd19.0_1619632358204_0.07713033220910814","host":"s3://npm-registry-packages"}},"12.0.0-canary.105b15b96.0":{"name":"@material/auto-init","version":"12.0.0-canary.105b15b96.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.105b15b96.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9af8c70436781b071513a086f30595209713b189","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.105b15b96.0.tgz","fileCount":14,"integrity":"sha512-lkvr4mdDy/xTTxGNTpmZyNe0ZPoIMnUQJfKEMPlBELgyiR6QYmUixKmcYeoNN5kueoB7FFGLnL3Tt9lBgBRryg==","signatures":[{"sig":"MEUCIQDV8jxHbidBnqjuvMbrQyxI/1ANIhcjS7Fg2QLw4LgIQwIgKyB6IhthRpsLP/nz/LdN25q60N03FtoxUq/cZ47lsis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgidcUCRA9TVsSAnZWagAAl78P/j3uffw1XZ9l3Q0Ykjvv\nuhwOxaB3zyYn8lOmK/A5hDPeQzUkfgO893+7vEr5jSMkDwSrg7roKNICSq+L\nAlHgjovAG6opbrhoVaHk6N0vW3sr8UujMik6jECtt9p/IQPBDZzc+kdhvFf2\nnVbiNE6SQyAUwnkgcNbgrPJHE6PVW3kkQVy9xKYROIsSx/fdhIP6wM40hPYQ\nNHquDb8ZW5cS+bFIg1wSFhvbQ1VyJbKxxLf7g+yVxm3bYc8E+m2iaHjBte+p\nMeVcxA6ck49+4Lng0ujNorKuosQ/QwKo4JAbxIY0FEIdhv4X/yUGEXolJ7MJ\nWAtp2BAkUG3acTTAqm9/wBx4hvVt8OeqssEj5xSwA2OeElPpKaKLzNEwxksp\nl7HARZVjfUGTRiT+itEOEVqiq6Vi8zgwI+FWUbjQWywKqCnmhu29LsPtzkq0\nlelAOKcHzI8QYPB1Z2HlBgP9Bs59SJELQeoqQRSU/DGjruYCCxInLPd96uqf\nc7NWKIHND5XCHnMBLgmngyDd4ks/E76I4Pi+d9Txlibje4Mh21S3yEEIcZjv\n1q/5OWxhwCLbmZz7d1yhfNyD411An2vAGfyUmcx8QIzZuOeVBSfFweH08wLV\nUUJCQH7393+mU+p+P5Zs+zaxv5fCIhqBTlamhSG1G+maE01w/fR+GGEoiPNE\nMgZ1\r\n=PNiW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"762e9351a26c1968c772104d6d64f7874c81528b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.105b15b96.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.105b15b96.0_1619646227403_0.03674567244825888","host":"s3://npm-registry-packages"}},"12.0.0-canary.6e20259e3.0":{"name":"@material/auto-init","version":"12.0.0-canary.6e20259e3.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.6e20259e3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c55ee29384f4fd75978923b7cb220514596a5cf8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.6e20259e3.0.tgz","fileCount":14,"integrity":"sha512-6cZFN2oLuh8qS3YELivXngg+HyrcJcwMHCoFNqTEu8zpiFjoCt9VPQpWiykR9Sdf29QIhfaC2PwyDdBRkCbyXw==","signatures":[{"sig":"MEUCIAZT0KgqqjrjoWyATkXbnfyf3GBV5t47I7O1ckQxr63DAiEAxWK/UnCpHhxXAWpFDx3PkX4+8k0rxuFFS/zznPtN/ew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgidgmCRA9TVsSAnZWagAAu1wQAKEsYx7496nUPdKl9X09\nu7nLnKj4zh8qrkjvyH6tpWi1WoRt5UzS5eBGw/Tnu9fSkwK8TOcKqQvgRy9E\n14qC5YFL1lqRfzTRDjuZwAGj0UaoyNpCXslcZbl1ZUkd3WT2BjCcsYjPEu8F\noDXrtTaDmX2q/miRva0RWH5tGKfOj+V5qIjRP2fuCll5NwYHLWMfwrzFgWPw\nmXcFh6Dp5jgcN4fPHNKB6oy4eet7BbDCkN78wDLpU9e/MAD4GyfTjAa/Fzno\nQXamfet4zXC/tTUHbFE3FMV6UT+4Vtp7NqAPxoUprwk2UI0tSEes42wkxO9T\nS/I3r5hV9ADnDifXY4f9cPfRw5MmBmUWwqQsZW3jaV7Uy/2qfK9x/okInEKJ\nxa1nZPDspY09isz8X01PrUOW/zFx1Dimc613QSGfkeON40WIfEwteS/5/Zfn\nXbYmM7EQmhdvFWyN463t5mTYAX4i6ifv5yFN/YDm6BuxjpV9L7WJ/YvPtPpA\nPJOenhviG0/HW/4eHdUSd1CIETH2LOrNya9fubhwICPL4PR9Sevp6IU4FZHT\nQkxmg9JD/3wEUbjoSLGys7tm3D2+BzJt4jUT30fN8mOlUV8HdlueVMT7Fmo3\nBsg7Dfs+ZiXhM+tD6IGAUAkZV8X7HdX8ymEoQoDE3VqItfegn2oeC9iOB95Q\nymuk\r\n=AiLy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e07864b42f463f977fbd0f9264b8930da72711f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.6e20259e3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.6e20259e3.0_1619646502204_0.6816723452969935","host":"s3://npm-registry-packages"}},"12.0.0-canary.0f79a5d74.0":{"name":"@material/auto-init","version":"12.0.0-canary.0f79a5d74.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.0f79a5d74.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b4bd57b6341b0c6f3f6f6e3e24d423661c83d861","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.0f79a5d74.0.tgz","fileCount":14,"integrity":"sha512-iH5SN208GUXrumMVFwbWuxo+hTtoWzejl2MU+XN3B1uwC+E/T6GejDeoeu2h/hlfnw9z3q4oNMP6UgrtUeFXzg==","signatures":[{"sig":"MEQCIDaBtpYWKGQcks/pcuSPGnI68qJHTIT0OAPRwTPZiiQBAiB2/fiH+Q2v3m0HmWMq7fsukF93cQiFC3onvCZX2AS89w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgieS+CRA9TVsSAnZWagAAXOcP/3farBwJE8JDArcsyL6z\n5u75NdyaIegIeAtZ8YcDQCIW1wK12gNFAWFb2bKC3YN1nwi0uLIZeZDa5AVt\nQ+puOYb6mDZjF2N1EdaNaFpvlR8tTV/t0LJnsBqVG5uL3QUunDE1Ti6D4szk\nXvBMulP5lSi5I3A8EahUS/EFkVS6TSmdXdNohoU/fgp6Ta8iZsVa/7AhzlIT\n/gMgC6wMMC/MgqG0kjJNZddbJuO/UpnS07ieWIzcRXslQIcH/dgeIe6SPqmE\nuXNqMX9qxXvAiQb5ZyFjTYLAfpfKNb/Mbar819FmbfpspzMhUVpsOkwarplM\nuD17vhgysWVAKfs4QsMJuL7hBY79GfFbSejdsC9D96ABoCrXOmLISo/r2rfo\ndl3tzNmnNF67lAPDhafgu9pNWbNgEi2GofmVHn4P+cRHSTap6JCjdwCmX039\n8xFo07JY6943SJQAg3x2+VkUHb4uEiu7JgmfTSn4ruwh35gtAMDUrVjNIXHl\n9sM9NK4JX0ECDCOVCdbU7thgqakgRYkeCyyrkUN3pxm0hfcAmwL8IOcZDhj2\nHorH+/jqo17ca08M5yEazL2XyQz/2rFQ+99zW4IQ0BzUX0cIwM37hL8kx43p\nGMToZmYEeNklGEivRo7qgNWMXyznx7pSzLd7rJWjrypUTxdBYQ4zEIsYMdlJ\nixr/\r\n=BJ1B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2fcb990c07fcc62dc025eb258f87a8f04f08fee5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.0f79a5d74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.0f79a5d74.0_1619649725654_0.35446163504564887","host":"s3://npm-registry-packages"}},"12.0.0-canary.84f3db9ed.0":{"name":"@material/auto-init","version":"12.0.0-canary.84f3db9ed.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.84f3db9ed.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5bbac4efa3c2d1f5b8ecfc5e94a547794dbffd68","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.84f3db9ed.0.tgz","fileCount":14,"integrity":"sha512-yvR1a0QuRZFE/Ot/pi59L1ojj+Mb/6wCUQQczv4wEgygW2fAemffi4BA2Rz9mxaqzypux18Sb3bQAzADJtfaxA==","signatures":[{"sig":"MEQCIEn9b3hZBMBzzedl8J82B4UWeXu7M+P7DkB3p0E6wxAzAiA+fpbKn2QWo0vAmlg9YYbZRMCKkD9OIEGbAPhN2Py1sw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgir/RCRA9TVsSAnZWagAAECEQAIXM6TSWZJ4EP+gyw3i7\nAOWDurAISOFvjBm/9uRVvPk8aiqIGnELUKbr212BjLzIqrnA2AwUO2aV6pbB\nw7MXnkFnPpz6D/qZQ3DxNaFgasokcSKOXqMH+YTrsWhnpAHYWAXrvL5Lr+wf\n8eGbG7+xTHCPpSnljmxltnY0I81uNkkGPFd/98brG8484KIqy+zXJ++XBuaa\n0Rz6GnV7NQw2JxmE+CeY1mZV4XieGBUije63Hl3JlWnC76NMAb5D/4DO8n9K\nnG5ZD3xWP6bnmFfsTDDTdaTogQOHkaHK+bL2/GRf2hWz8HICiw2i7MW91+je\ndBSNq8w/eZ4XU8XJ1ztJZ+aQlSKvwk8FrMxMTATEeSguP80v0tvSg24L70O3\nEPLWFut1mDVa3wRlbVZVM/7nG9pBCEhBHXvr+CRlRxWcsIs221GWRyZXY0Xr\nRY90DSE/NNCcQH0qcxr96psD1z7FOMJXAZs9OvafJCxjSIamaybiIQl6NK54\nxYbTMIgmA3rLg0O90Hn2d5Xhny6ISunFcXdXA69Y8CMgxsbONeI6eTrvDAhy\nio8o7J6Oo8WCicFs2/Tn0LKJOkDmV9SfSd2ws4bvMZcG4WxCE81qoBf5SXHG\nr7icBdwYBssShS49udrOpEHR8v3iDSEcSRilFqEKzv3U2Odr4Forxu/iPu8r\n+7qz\r\n=Oxcv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c4b7e41edc7737412479194451432cfd33839b4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.84f3db9ed.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.84f3db9ed.0_1619705808828_0.6872879984643687","host":"s3://npm-registry-packages"}},"12.0.0-canary.8fc29273c.0":{"name":"@material/auto-init","version":"12.0.0-canary.8fc29273c.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8fc29273c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15d6e288a7cefbd77257bd7dd83c4f648857a454","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8fc29273c.0.tgz","fileCount":14,"integrity":"sha512-pmr2HJse/H6+5uc2Cm2Uw/I81evy6gkL+phZnoR1djaDCvaBxiFoqF8gJ1aKpYi34ZayqDSjoLak1HwzE62d/g==","signatures":[{"sig":"MEUCIQDq1HQmrRmKU5WBkYCkuyyACYEvFKgbrEK04b/6s4wYFAIgB+SKZfgeFmxs7lyyDotxnb+ZIMxA+0JC07QuLkhKKmo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiyOUCRA9TVsSAnZWagAAtzkP/i/Ri5QOhAGm1p4izF55\np/48/3MiKg52YsI4Lf/51Tmn0lZA1+z/dOPrNVzBlrWWG3e9fVMpSMzrm/9a\niCj3JdeFmpkPyUpAH0j/0tu8qJKF7SEz8JM0OqR+ub/qXRcR5GxmNAl4W12c\n+GiaitqAuYvKWPbhWQCgYXj9S88EhrWUR4Copm3L0cJt/NfKosZXmGYoWb0C\n30zSwTMqtHcxzZr5/NE4kfhRelc6U+BUCbo/3wcNoDfh3M4AJ4z9Dsi80Fsl\nZzC5ruN3sgLdwMSZdD4qVe+rooyrvP+tiaYnCwARP8K1Tl9rBxxeKPLH1ob1\nCXe4lffZ6SR67LgD1/zwuESW+/RxMj0xJ1OUTvLP2jmG3qGEjORV7+uE13pm\nPxcDjGmCX8IuNUNZZtUYQLV3qH/4Q+jtATndnLrG6Z27BD0fVgjl4yXb6b0i\n1RmaWBpOrgf3iTTZ8gTwJ6FyYfgxM6L+SbVWBNOeKCybxKJRKMLZTJkQooCm\n6jYz7dGFFjHWyPt++EXBlCW5Y1lQWSTU8SavD8VjVFpSVH0dFmrKCUtX1EQU\nObVk8Zms/fFHIAT5LhInceMywoviAeoRTKWWofFykkXsEOl37CtbSEiaYjol\nSn9SeAvAU9jZw3PA09ayIJuis6LDWCZzZvPWPd+Y9PLBTiq2qH771St/aFy8\nP9Cr\r\n=yGEj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fd877c3e50788fb95663fb8213bcd66f347cdd0e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8fc29273c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8fc29273c.0_1619731347907_0.9272268534809711","host":"s3://npm-registry-packages"}},"12.0.0-canary.c50d20bab.0":{"name":"@material/auto-init","version":"12.0.0-canary.c50d20bab.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c50d20bab.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9c1736594f089466213568d1cec2bb48dd48fc6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c50d20bab.0.tgz","fileCount":14,"integrity":"sha512-fYyOvY+9uP76E7iy/dHke1MOGAgmo7lokyEtqkVY735sl83KJkmEd5zgOyjHvcnpV2g6nnSWJsh0mQP2RBlYww==","signatures":[{"sig":"MEQCID7t010xFy+3JSi+GBmnpuhkNOCS6CG7yoYEpRmxDHRtAiBh4WT0+IJshxYiffyc6qKcTS+H9olOvFm8uwMFuRpnoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizqpCRA9TVsSAnZWagAAzaIP/1eJIEZCBoS0Pb/oSZxM\nuaJXI59pWpT9ME6dCbEZgXmiui0BL0VUozXCScYa8+KQfcLZ38yxuAFMZ5bZ\nTFksiNJ7v/rljWZQ8Yn7wT/cZKPY4/u2jTogGAOkClErlf1IGq/oABYBH7pZ\nApyhs4luS4/moUFOKek+3bAYy1s/li2MNDLcPEh6mTSrilnOwfddssmeO600\nZUEG905hSgEa3PqKI2lVZkrGsjZf9jPtz0qqm5Y3q6KX0VsmZ/kAjpxVE1QJ\nKKX1wOkRMMh7AoBMxQj64HzNsfodckLEQhszKx8CPG/PlI6VZTXUV76g6C3P\nMTIBWDG6niZ2Pc13YUhyqZoI8zbq3I44tYeIIhkV9piry1fzwU3G6HnykQ0z\nahvloqXts24WnX3FvWiZrzZ0zJ9qA/T0/XY0M4Va9KbfbumCwkKLZjumrFx2\n+61RzabeCDsdMgZmmaAEkw7AbsVljJSaVeVw8xpvrM8kzChs+uGzNCRggnfv\nvmasZhQTWPws5bAjVCztnI4gzApLTiQYF5U0hgDDI3l2koLVu+qcvFWz7nPK\nJQazOhk+76SQaXt2U7R7bXM499mqGFUyW7LPRtfIz204T0ZXQ0LiW/5zPAuu\njg+IJ/Otc1u+li9LkLzRmkgb3y4Kx1OLRiyvECAfLPvJ01GJYFmOJNHH3rs6\nRnSp\r\n=i6DD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2aee1fe5eaed5267b0e67f1610c29dd399d323c1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c50d20bab.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c50d20bab.0_1619737257185_0.13607485596937252","host":"s3://npm-registry-packages"}},"12.0.0-canary.474836ad0.0":{"name":"@material/auto-init","version":"12.0.0-canary.474836ad0.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.474836ad0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06eb080a1a219365ef0593f0376137a77f3933ce","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.474836ad0.0.tgz","fileCount":14,"integrity":"sha512-7GCPStxUVXCcxDosaW4V1o0jcinNgSyVa6ArT335ftZdas400jptmmTwL2fdumqmP7e9bzRQQ/Fbqn37HTrZrg==","signatures":[{"sig":"MEUCIGEUfbGBaE+emTugQ7I5Ap23mKW4gT7V83hVPOBKLespAiEA5/9xcZl099qIpYDHEaZfIkeUFQL+0hlfoWKKjV78itY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjMzRCRA9TVsSAnZWagAApYIP/Rla/Z0tbY3OnT2J6jPd\nksCiTZMmiOGnwwGyvMfDv5MnTmA16tvhD8EXbV5MZKlmbzRAveN5UPwClh8p\nfy/9mmiIcfQNZUc2uV57n3ZMfTdwsF8H23cZpUu7gRo0eu6GrLFP3vtdd0I/\nU7893js8w4t5rXismpJS9CpLkR0VFes83yf+1VARz5G7iRPQxkbqOsA4tWMR\nrsUaXlxCS8uzBJeqly52WgsYKNMHBYPMUSf52uYDVhfvY0hxFstFH5o4XyC3\nohbyWqZ7/YeuWuUyh56X3ZZr3H9k7Ssx94i7B0YO4tbKs2L8H6S4u1BVPoER\nr4oAfclwLnuMWwUBmmuPnIcOCf2NlaDgqx3W6Yh0hPhZQjQll06AVmtVf4X4\nbwoJpD59h8FRwUSEX1qw4pg2YFNxSc7kw93MP/WgMzQpa4EC1Mreg8ffzUla\nL8ECvzwv0aIEX+XchYuxeW+DK7xyThh0I6vJs3wcE8i8PuzYGeoemhaodcwE\nFW3sXO38K76dK/DRLvzU1lJuwq4snTOy7OI6CLgyneGqpl/usnIPq8RQv3TO\nwIyRnKMMn4/njjv8nBdiKYxjOc0AX/N/nTRG1OFQrzwAzFv/fvhzn4W1R60D\nWm9SZN+PD+IbzcCMw5JFDTz6+Z/KUpnYURpJc9pkEVeYZCEu9BDHojEj9sAr\n2D0R\r\n=Un53\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9a6db3013566afb165bda88b05607f2ee398718","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.474836ad0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.474836ad0.0_1619840207679_0.518145962449793","host":"s3://npm-registry-packages"}},"12.0.0-canary.f5ad92287.0":{"name":"@material/auto-init","version":"12.0.0-canary.f5ad92287.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f5ad92287.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"63708fa633d640e6e2600d127d3eeba00b58855a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f5ad92287.0.tgz","fileCount":14,"integrity":"sha512-kF7o0Vhagcy3icu2WnHdvJbNxcIeU8TfB7Yb5SNdWOen8wuPjpC+tPjBFeC0OrKW+vWtxoxRmMv5gFTmWNfhuA==","signatures":[{"sig":"MEYCIQDvpfEtDexHe5h9zIfLThxZWjkGP9Qj4i91F9sJPLDVVAIhAKWlRvDrsJOJMhkQXma/pha7GgEZkpZhk6tGjFPAkOSq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkD8mCRA9TVsSAnZWagAAEcgP/AodH6z1PIm3bAeUTnY1\nNc8sBzF1+qGtFDgA2w6Aiacn2LsD0G+cg09ENUaaD1DsowPMaVUnW3WgEBcw\nDEvFBTZYa8vzPbUB5VL2P66dWvV7LnVMjRsvLgnGfsuGn+vRL6g5HGa8PFJo\nxxFGa+Oj7P/ILj8quGwk9WtsuuadcuVH3mTOZymtg/QGGSjHI1PLTxkFfdOO\neSJaz/Q46mfHsIcVr6JFmCMEUimVBwjZIO8IZnpgbVE5YSpd2bjmXhIZgJjU\nX8A7vYUzkFDFZGz98NuOTO05n9Rk3oaMOdWHUTN7juJ5uyHR/hvGddNpJ5uU\nzp7pLQTp+LSr3zU8+JzMxOVL35RF3HySZBE4KnUqfW4RpCqdiiC9vk6f2kDF\nLzNz8laAhkjd0xE5RJZ6hvCM3Uu+ENu1Ws2QCMhjxVy4S4PD8Cbj8c6la6Um\nydWtzHvLsWiSZkCeiXjoN0R9ZMK8SlGWvYQrmQKHnDn3G1gVtawQBc4mQM/d\nv50F7xuLBWk1ftgUwy92futCFwKkSvRH0+l6wA3YJc/HIT6+yCV7tBLFVFGB\ndyOKksbzrcE7DUIRIBTzY9xGinRDwfD7n3i1O3BNWhH/Miv+V4ftTxzTVsqO\nTy1uob3YLAJKiUnit/zyCIY31NPVTIGFnA6PPmDG0RNy5YgqaEp4yc2M8Tx8\nq6VI\r\n=gKO3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"493c206bef4cedd10981093c61731e1c1547227e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f5ad92287.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f5ad92287.0_1620066086317_0.7569572952936781","host":"s3://npm-registry-packages"}},"12.0.0-canary.af453daf8.0":{"name":"@material/auto-init","version":"12.0.0-canary.af453daf8.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.af453daf8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ffe7d0d2a6e8cddfbbbd16f0093e010c48ef9755","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.af453daf8.0.tgz","fileCount":14,"integrity":"sha512-9kOppBcV9kOUv+q9Usxfy5Qm5+SHrQVqtWjaNe2VG8RgkF+z2wc686V0UXrj9F64gBeF3RDyAdeSLJtOZdYweA==","signatures":[{"sig":"MEUCIF7KL5rXVqJ2eKD3DuCnxL6YLKMcoVQHnKYC5rPz88WXAiEA9TUCfLsBy21xVj4+Fp14QPIvDNB3FYdxfnrIi/R6j5A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkEZvCRA9TVsSAnZWagAAB5IQAJrUVAjjQf3GjbURekQl\nAe+Ssv04beORnCzidS+XtN+JzwL6LMqCpQPCBLUWlk2QiXMDD2RpbFoz+fd7\nzxy7ai7FwD1/hNEFStgR2vFIdGmK8avhKOoJHVp+MGNTZQX5BpChntqUB7gR\n338joMqNZhZ28iu8Ry4DfcZXckwx4ngCC3c6WhA0Blxa4AJ27S/TPR+QZ0BQ\nKqpUa3jwku0v9Eg5yDjF+hqEhjogUkQrPDjatwSWNUcSdUG27LFe5y26gB16\n/nI9H9qX3Ykdlu3/T6YjK39zdEp/lMZzwqPi+0T8u+ZtVOaKy6t3yPvvIbwQ\nKhBT9JkFhToWS8jSIObGjo3PA3KeIila9H/xSFYdgOHNpEJrKkil4q4TjLXc\nCrxHAD5phY/l79XEomoBOc8ypaqic1q/CarT+PqebgeDGFtsw9F3TehqVHNq\nXTamIUxLyO5dHld0NXKI6NPK+8GHjhN7gPNTFumur4HuiUNItNrainZWwmjh\nPEyJhcD/OoAp4Moi/YpFd+PAFjIZBvfrre6GvqhY1+oK4CfFQfCRecRBzm7Z\np/jG67yz08sMUjH7HzLtizyoIM0CLRPWjnHggfWKIzrA72JxfJy9DRpEmqO+\nBUV0gKyqlBhs2vjFzq9Kj6a5fSiYvH7tLLDktrcSCThpNwMiVb1lZQPbSzog\npHFK\r\n=jOcd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d55347cda19a4d9469eff68955185d9d5e235a16","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.af453daf8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.af453daf8.0_1620067951032_0.6697315189876123","host":"s3://npm-registry-packages"}},"12.0.0-canary.1f1918c24.0":{"name":"@material/auto-init","version":"12.0.0-canary.1f1918c24.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.1f1918c24.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85a71016950c0feb575162b28ffb32cdd13369b3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.1f1918c24.0.tgz","fileCount":14,"integrity":"sha512-+R2GzAztqgZXHywAJ8kcTDIjkdijaViAB0Y/Sdzlq/6kb0ltqv1bDxP6qX5u5CfK5o8lhvqSPjsNOYTmBboDmg==","signatures":[{"sig":"MEQCIBG5ihqs3hbwHHsH7tI64FrFvsMD6nkF0M5O7M9xjb83AiBvc7rUmMshf9Fi0cQOKNqdQz3A1updfvPYmFe8r9FMfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkE1CCRA9TVsSAnZWagAAcEQP/1nlBW/+fqmuNyfZNBx0\nuYXeM185zL2vX7YNXgjvquJFlYQSmEZZPdXFfhiA0mZNxMGRRmtSGyA17iln\nabOvCpw/KbqtyXmumQmBbSB2A+t1Tpx3+5S+6TQMCdZjMN1E7uD6PgNUf5sh\nNhANJAz8W0rLC6yKsADIZQiMoKSiyREfnZnQuavYnKPTdX9nKHR/MC1JSC6i\nBlm1ONLWfrStPF7IT0EWzdgpQGKSsrJZI0qXT4iipMVjKNMPetm5nUwumGVO\nV2+G0AhXjrPeBxTeAp+112h30bVZkVZR6llYN7epPdTU4hueddBI3W2XvPTt\nnkGJZlNNEVXBS77D5haQHqdex3qmVw9W8VRjtKwlDyp7RnEUAnEFNFuU9Dra\nCkMDHCn1YMc7rspgP4N19JhQaaHpvpNMga3xY92R0YyI9ymTa4rkPYT22UUx\n+B12WYCtOv+LOFJ0VQd/SelhuINUyF+zQj1v2CDWQLrY5C10M6ZFQ4N2/V6K\nEl7solW9Djtfx3TbmP7f6iaIKB6sSEmPaZJCtj3yzZl1NTr1foio3dIu2msV\nDIFZWJFFQoz8SW6txdzjW8UkSJ6BDJRipHsfafKBxSPiZWK+hs1iomAKLfNb\nvwBgw26L3nTUnl/hQIYxcbCBeSDUXhNzb/gIFL4n4UHZb2pYOJ9TMtAiPU9u\nNjnc\r\n=8lz7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cda2e786bcb73ac46385a1c6459a8ab7bd9ef6a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.1f1918c24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.1f1918c24.0_1620069698126_0.95942970231003","host":"s3://npm-registry-packages"}},"12.0.0-canary.33148231f.0":{"name":"@material/auto-init","version":"12.0.0-canary.33148231f.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.33148231f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8e47321cad86cf643bfbe9d9f638b52bb31a714","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.33148231f.0.tgz","fileCount":14,"integrity":"sha512-qk6dG8GgHpoMXwdK6+7ecPYsdDbRpoMzCwKK+d095d2VZhXKlwdLDdKP/bHQfiY2hiH+VcT57Yf2hXhHfNuvmw==","signatures":[{"sig":"MEQCIDLucELohkQyiCpOgxCWG7YpiMexBFoFtwEyYu9m63FAAiBvMBA+qA6FEWY5YfbY2oRSoEYsxEkVZLDSkjVn4oQZgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFEUCRA9TVsSAnZWagAA5UIP/00re3/lhY1MHgOLfMIS\n1p0WvSeBO4zBMLBDTc/3bSWFS9puKjrZfXX+T3Ie4pJt+3dl660UxhY6hbFl\nv9jiAf5Fdy6FxT6aQ5fKfJLUHlWRN/5bQmdmff58QzHH9f7DUR1HTGKMVyyH\ntE/7p7DwNd71ku9by0boi5OKZ6dxotqUr/dROJ0dS6gfbTAWhtWRqI7jI7To\nHUBwf1dA9X3flMOk4cxX0FfmdyxKYdjKBRCN9E0bQApaDxJvhCfKVKPRrLKA\nzSExxatTiSHw1ypfTm2+3hC4q5rwviNwpoes6Mtnj5LBjkDcoKPOlfGxN8sV\nN8pl18/D9wesAYm8eJI1+DO4VoexuIrzw8iTJbZ/Rm1XoHCmZ/kubL7UiKWJ\nw429pjfEupJ7YIPbd+vqZDvE630siSVgiQuORLTmZz4EHpk4BhFgUzbAw6fe\nAzNV2f1PsBTfsASahuOtLZuqVwYAzsqpdmC7QQ5ayOSgeauFhjsoaTkc+2sZ\n93/G4e0VrFgt0CUuQaUUnUD7Q+G5pF3rMYPVVKSjIpCuWTvf6vn5ieHyReXU\n7X3K8S8SPm1cLAg2Wq9vaxSpPAHoYA/wLXjSqZihhmCTClAx9faq/43A1arV\nBHCprZfiHC1WH4ii6Lo7Hc1EqRm2QftoHvx3wWhHTQ6O69e8KV6KpKiYreQa\nkWVp\r\n=V+uE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bb5a14b15a74fcef265050ad96f737d0acf36987","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.33148231f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.33148231f.0_1620070676333_0.4898119836801498","host":"s3://npm-registry-packages"}},"12.0.0-canary.06b76fa74.0":{"name":"@material/auto-init","version":"12.0.0-canary.06b76fa74.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.06b76fa74.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b25d20bac4341951060b133b585f33c7a38041d2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.06b76fa74.0.tgz","fileCount":14,"integrity":"sha512-PfXXQJ68bLr6HgTDAkd+gmy0FW6CTPGJ1frRRc+T8OHxbDwzCNPKx76quc1Y9A6yZfRjp6mGMBcVb5/haLVy/Q==","signatures":[{"sig":"MEYCIQDNhXrHpdqDjGqhLwDGPEt3Gt2itUkT149JsZAHBz76kQIhALjp7UgdWTUjJwxZolANaKUqIa7bm+yR0pNcV5Ty/e8v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFK9CRA9TVsSAnZWagAAiRYP/1oaSN63G7xbANsgZbaW\nvWXHHvsBh/AGXqKfxevli168ZMQF2xJGLwB2dy3PyXl31vVsNmC4Ka//cgD4\nI56sl5a2lik02v/YtHYNqU9y560ZJtZ1TmNh7vcsHLRsqu9fvakH8L6N33Os\nqWONX9e2R0srVnKltbDKZiThZ1hb1VfVu3sQvyiy5ymQBIrOQmP5LAyBUocC\njDvBNa7suBlgIjhAEKvEw000EKEdMnRVoYrBDt4Hk8b8PvfFSv+epPIwGE9C\nenuju18oxhfLTyCnsGfwYVqyEHsbcxQMTEHB2NZZDtPHXQaW1wMXkNC9xXhZ\nH0g6YPpt3c7YLISxrlNxgMf2fLomiJd3VhYvlT22XCHBw6BqxAwviBub1BBn\ndrZe02hmoo51aI3ewm78BoxFjvuIAYvgK4zbTN7Jzy99zjvWCYNzGPn7KvhL\nZQAiuGWoyxKz/q1uzC1EENXYVlVrllZ2sg+WY/aupUOI/h76ODaMJx1xYz+V\nEWXxQkSpT+zn/93AunNFvd0MNqcsorKHuas7/l0olGvOWbekouUA21cBr0mZ\nKc17xngvha74BURGk8EmyGfHfj5ouNVlc7LhZYwYVIONSzt6HTJqz66fChuF\nOU4gvDjH/JIxnYyjMn0c6XBAklv8Avqq+1ms+ZRfhqZtG1z7N7CS8/kO/4BG\nXZeE\r\n=3pvs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6a6a73c9687e196677329640dc1ed025d13b44a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.06b76fa74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.06b76fa74.0_1620071101283_0.08341478164514848","host":"s3://npm-registry-packages"}},"12.0.0-canary.7c5000473.0":{"name":"@material/auto-init","version":"12.0.0-canary.7c5000473.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.7c5000473.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7ea99a712f4e4da85ea37276abe3740953c89bcb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.7c5000473.0.tgz","fileCount":14,"integrity":"sha512-MCUujEtP8BrsHf8sNKYElP2bMfGVgnFBWiPam8DQdX8xq35+n8nQ2gn/wbNIoqD64KgN9vwZZ+9Srvd26pY/Yw==","signatures":[{"sig":"MEUCIQDL2BvL7WIZ6MjzQn12qX6hZu+IDfGE3XOYLNSlJa/BLQIgWykjMDsI/xfn0LNp60GtdkqQUlnpYI1gOqntxsvowOY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkHvtCRA9TVsSAnZWagAAQD8P/RerVKfw8iNRl1LKu4kV\nVu8Brzj/1A7i1g0Z+VdBgi/grBqfRE4YdyEfM4QHh4Cz9kMqsWIur5IgNZai\nnP/s4ou13C2YbGBecj2eLEftJ87w6pugkVcHQsPfIFDALoL37PyRjgEXnGMy\noshKUpU0KguDGrKm2WS5M095/ULUgQVA/nZzcB5gRHNfwYh2HZ0ohQEpuBY7\n6nsQx5or2XnO60Oh53vgl4sihde6Khrek7EHELjpCToa19hsP6rn3NLqGhUq\nVKutCPjaKhiSe6OLWEpAy6xXf4nRQciHDQbnmy+aSfZYm2iVUeGFpCulNXck\nA6APV6YNUXZDQSvB8xWwq6SbzKh6JkHAoI75GnuD9oNjSPg02+Su0SQc8anf\nC3n6DOJa+rOhbuvRoe0rgBIjBukSo3D+jE2CFZq3vX2klnwb1IrsDyflozhq\naiR5mdFSXIEle2kDXFGlq0kjMujQOykqb8vw6+iZ4ptdw/3oSxsWCh5uyNL5\n2hpBDfcPj5Hcblakr8qhYQTYctvQ1QYqvRXe48n6Q5CI23aMW9FshP/1JdBs\nRFvad5bbgCYTciaVf/Nul0/LNKSTGozcF4JgXVRRfPWiMbopaKrru5f8Yy30\nDJNsq7KIJ11gbG3aYL8mKCjwfkekJWc900uEZ/hD0nl1uYkalqiemuPNIinE\n4S07\r\n=3LNE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d53e0032497f2efb6a42d541ce5cd2072711f86c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.7c5000473.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.7c5000473.0_1620081645478_0.18848809304779768","host":"s3://npm-registry-packages"}},"12.0.0-canary.de997644b.0":{"name":"@material/auto-init","version":"12.0.0-canary.de997644b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.de997644b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"30f7e8131016e44e883a536013525c66617d55a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.de997644b.0.tgz","fileCount":14,"integrity":"sha512-+g5NjCXnnOyz2m+Rkkl7UbYt5YgzkT2i7EdNACHuWMBN5s9JAXEhFW29MLdHXthSBe6eeraNWbxLDQGeQCGFJg==","signatures":[{"sig":"MEQCIAT2WVDjxKp9c81Zl40Q2zS1Lfui2kWQde9CpN971ofnAiBV7N+PT7xzaFeY4yXN9A+hWYQCzcr1jAMsZfuKnbsb2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYP5CRA9TVsSAnZWagAAp1oP/1JZzK8uewK6kUj7ELLd\nGm7wxv+mTIxQx7Jd8bm5uRCe2tyl0XaoLcgFIL96LX33qpxZhRnhNKIVzmUE\n67lAAl7ad0fV/q6hoENgTP4w3Y5jI3YIZ3kVG3zgnxZw6hl2zvDruQy9OLK2\n1V4j2g5F3vBoDtClnaK7Rv6SunnRrV31QEKMZsv22pMyTJ2YPfIXRL3gMt6I\nR+Ci8UIRo06vRFKiKlAOzks/uXG5JKxeqzCkC9kjTHMdi1tXyCnnaZBUr0B+\nMwaxSfxuaEik4vjRnp9OVycoFw0DNt0K172gB2yv/7Z4tF34eGvdsS6uIlvN\n2JEcgp2UV+0Gg22eOaayw/CtOieIEc9XV3gApPaXOMlys+1hjnsCxFI3B3zb\npuJ8FJN+5sft5zO13/XLcDEwBJJuE9n/EsZvGBDWlZkh/7+/P1ejORNRJK5x\nFK0nYtrtuWhmyR1VtSoi0sPmCoSpFPS/+V/JUUeFkrM5fsIDPD/6X/c3EH3n\nnUd9FTOK8swAkwgA9/eSl+8t+BAswgvvFKvrYmPdE9GEdGEwjnInvzsfKebd\nxWN9rX/yCx3QsQMh/qJDYypozG95UENOzgIGWkn3ITuaDMcmLA5R/ND2Egep\nN9T5YRkkkVkijsn3ZaJaCvXFGK58M4Lq0Bdrg4wMAFUIRHsmu0lnxIpz2T6X\nkeRj\r\n=7vlr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"efb97e2ef70bfc07ed9b429041e4f201bb0d3a53","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.de997644b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.de997644b.0_1620149241466_0.5974754096637946","host":"s3://npm-registry-packages"}},"12.0.0-canary.d4d7f1cc2.0":{"name":"@material/auto-init","version":"12.0.0-canary.d4d7f1cc2.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d4d7f1cc2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1dbc7f5abdabd8840475fef8ec6f923ba06040cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d4d7f1cc2.0.tgz","fileCount":14,"integrity":"sha512-MP28mnGNr7Sve7/So7JSnnMnVxixfbjrV2C9vo7a5yaHIjdIH38SsujGwvB/2L4KVQevjxoVKzhDq7YGKl0vvw==","signatures":[{"sig":"MEYCIQCRrf/k64SU+PIlC0dp03Q972mgffLH8dHIfkErhyo29AIhAIIYJjp3/1mkS3xBR2nkZ4L0zV33c60BSe7VimkRnIcF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYo7CRA9TVsSAnZWagAAxbEP/juYv7boHYXWVYBxEkqA\nZ9CEVdQwOE0FRksiIibsnL2fSQ3FJdnDsbp7IK7FrrZ4WIBtxdpeLS3ZYXFD\n3gZFbupdSRB08/WYxbdyYLCcN6RSGlIwWk8xPU5PGRuO1fB61MbOWF0oR8M2\n2gKUv5z91yjAMihQQ8Okw5buh456h0WDUqddqA76Uw2fXVvhxViskjZ7CkZU\n+vRtmOTXesW7EBYCpre/NRcqTj4wR+1RXbIOoK1OPeMosrx0orAgbWx0f9ug\nUv58CsbzTRfO4DN/C+wxpRIxJhV7w6q0b3W8SdaEjhDQT0W/Oh82Otrh+fXW\ny3wzwrj3PjJ93S4urFsv6ZiibswLBfHbUd6PkGaQBNwZxbY7gx5rVcEcnIov\nhwMCD0SC70o+XtVlz/cvgTX0uB21m025mFtoLmSva+5W4nsBi2FfiUg1/P5Y\nPal+FVDSLohFi3lf1U8/g2MJqeZbg8SWHOWEV+xWBYo2pyVbkzUFu3C1+IQf\nGVh0jft+egYPyjHd/KLfRFfa/wME8k02LKwEn7ykXHG4lpMGT4KTvw8DGQCp\nT4psUZzR9lO+AIOmqWEoRYnzoDoJm2i+XkBmUfQzboVc9sKyK0aKW/8Ai3qG\nO124YPLkBr/GXWTIAfirLCKR/Chf9F3o5fPT2hIUQe5WTxFX24qcVOzEgoxT\n5Uqa\r\n=zmH/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"473ac5e3a11b87616a0dcb004bd5a9411a271f6e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d4d7f1cc2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d4d7f1cc2.0_1620150843254_0.32378910037023356","host":"s3://npm-registry-packages"}},"12.0.0-canary.be999eb08.0":{"name":"@material/auto-init","version":"12.0.0-canary.be999eb08.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.be999eb08.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bbec0afcabeb2519b5886a85acfed734d6d3d4a2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.be999eb08.0.tgz","fileCount":14,"integrity":"sha512-hLHUpZv4bPHxGp5V6xjwMmcKnO8tRIAUHGpq8GVNVMNIdcOVqoc+B8wzGWJB2oSrJf5s5yuZJb0crRIIFkTJbQ==","signatures":[{"sig":"MEUCIQCI5QsRMvjyEIke9zHQs1nPBrdKaxYhKaDM9ypWTK4hswIgA5giLqYmrKg+yuKD/qIpoIs1WpKwU0ODLXyKa3qqI3g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYt4CRA9TVsSAnZWagAArREP/0BFvtk33yIgJrWCeahZ\nAwU+JGYz1ABRvkbJLprOMkxccOe8xdhkthRn/jAmYPpciIa1VxnBIoB4khn/\nEY7IufGTND7/X7/Zja9MFxVxxXHzf6QnrM0wuVQeC2yOeI439kSqx6Z7dq3o\nKtRGQMKWKvmUrLTyD0Ui9ooRbDNaLKkM27PvBzBD7jcpcN+shs5S7/TxFfza\nu1c9GFhoLZjrWk6cmuBkRJ83jvE3yQq2oDdSt+tAF3dvR8bASnXElZyu6tOj\ngvdm3IKBBADGCa13/4xjdSHX5peAYJ54iv3AT+uWsrvutX3sreMxYMIS0aEf\nrfiNC8RwcPU4VdskF3Hetd/fsR1TueZAhrakLMfoYJzfRnzgpDAQ3vBgyiKt\nYf0o/YaDuWzWe/KNfemd1deD5wjss974Gb3HkB3SZg1qzTbw8Lai5aAsFhAo\nCctCCe0W74KRX8ChJS1FhFw084u9JmF/mPFMYdl30y2SOqXwMyuSofjgFF35\nWaGxsPa+xvaYnXOPhjSKWQi6NmTlj9Wd/B/JgGoppPOMWWvhYMHpcNVfBva0\nLhOu9M/HbnnegxFAZEv2eFR2tecf4gBOzXTKA3tArKopsW9wu96Bj2BGNg3E\nj5M/9rhqjvsM6yvDShN0iDBuo6FFn5VbJ7wWBaiYqKEj2rjiLSlL/hIofyww\nB+Fd\r\n=6LeK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"78911f7ba4a7d68ed38f554357f8f224ec7a15fd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.be999eb08.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.be999eb08.0_1620151160280_0.1896864403897689","host":"s3://npm-registry-packages"}},"12.0.0-canary.eda1705fc.0":{"name":"@material/auto-init","version":"12.0.0-canary.eda1705fc.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.eda1705fc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"720f01a8dcd2f35fb9349c663de2c04fd9fb17e5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.eda1705fc.0.tgz","fileCount":14,"integrity":"sha512-U9MNBjDCuiN4poItN35wgKMKSO2pVDuOf3O3VpqWIH4G/ofJjFmQwygTCknuFmfWgRvEuWrTPJ1WaC/WgksfxQ==","signatures":[{"sig":"MEUCIQCY3DOjjFByrDxykymRM9KCGIgRg4mqt3+7pe+5C5qafgIgSJdwOW9Kf2IqbSbDkLVmCxVrhTb/r/E7BQ27RR9/uBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZvmCRA9TVsSAnZWagAAjEoP/030tQ2Y+VKv4x8CV17J\nCwsgkBRL+QF0UW1WFeZychhTYxb46RCP1ZJZxMJ6bk1t7U5V5a9GTHOZBD8y\nOyzd1I/4KN0mHfEQnb1O1UCh50/e2gT6pdIRxlKJ7VjAkpMUByQNXIKN0WCP\nXwgYeDvMZT4mJ1WlgYJ4EExxk2FHrwCC3VbD+JsdZBxJPzfSTi/sbmJciTJ5\nKI+A7qnNVedQwn+qgmn5xzNpyuJBkpgVA8lF0N31r8HhWogTfLNtKfrKxMfp\n3VwyRLWqzYhN7C/qgezk5c8lAqknqrmjldOygP1SZ0SyVfPOg68FfDcc78g1\nv62PgSFCr2CR6X6jbWBcaBeUCvadBUzj+Wr4AguniNOE+N6d4wHYCem61eIv\nII3Q5AzEhsxCi/M8DVO3s16Lc02Y3dQKFgBtd99uxf2dGH/PWjNV+iL+9xXB\nzUz0PYr9j9Lc7yAL/86txeYTLPt3aXvR6aIYCMXHt+SLDyVuQskJkEPl8yle\n+oDFjql2qph9bbNlZuCMOK7IK5Q7ohsv86i+R5vcMDGVQt5EyXYOvf8BSmDh\n0/taLzhgYLPGilH9ggkUfX5Dv26+LrX8lGpljDxjpwvXb0oEMqEbzVbh3BKz\nDl+YV7uFjxy9FDub2M9SXAXrRecOPm3Xt8JoyYG6/IcvJVpxwnWbpzUczTDl\nrVx1\r\n=0Uto\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4c7f355f27d26cb39ac4876510254d165a5645d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.eda1705fc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.eda1705fc.0_1620155366561_0.09362219783787418","host":"s3://npm-registry-packages"}},"12.0.0-canary.718c90178.0":{"name":"@material/auto-init","version":"12.0.0-canary.718c90178.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.718c90178.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"152e79ba17f07832abf6fec5288b359b520147af","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.718c90178.0.tgz","fileCount":14,"integrity":"sha512-MEO3MP7ONHnuFWbeEY2FXWS9AY21kRdTgwzLZ2Iu4pque6ks8q0n378GIoEBxRwKjm01qxj03ek5zYXc/AwuhQ==","signatures":[{"sig":"MEUCIQC4wwUYv9P3QObet3VZ4mpYuzNVzl3fJLTFcPTQga6VSQIgAriEim13D/7LV6nKJu88oE4CFv7jgtJhWbRx7KV58N4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZ/0CRA9TVsSAnZWagAAWZUP/0A/sp2FgDjGB51XYPcl\n6mTOx66VCDTzAIzdG/O8LGhzpySRQZYFs4SmNQpbJm6HdEjbxkAI/KGWWsU9\nMJuYp3ASnf/2dsJKCkcmsZu5xdzOlNjKA1tsE2v8bI9reyfRBgoXOzHgMTzV\ndkgvZiiPzjUemiudk6BSKh6JLCv71SMzGXeavVTSFWmnfP1p7RgnWbJkSL31\nKQmPehCY5SFxdKACOcxqTZ3vqG6t1Q5gDDTcSPp/6OqjeQj03zXiufwSnNzl\nzJc4kZdU116kLXnUEKN0w/60v7EIKvihLXf7witcprNoZTJ8xWDjTvcsE7q1\nMTXC8oafu3+7UJrl2gOnNBoRNJDRVwPB51WSkmC5M1OQccCSmYpEoA7/B8y0\nzhKpPlXWyJkpppfhffY/MHor7Er/HxvjCf5vPPRhczlCK6KQPxg1pXMZ/cfT\n0xRViDQN7J0UZGzNtq1ukZ5X4c0eJ2HidspXNijVjqPp6gMtONZz3+e8XGZ6\n6sj0xk2VYDv/lnGpPAuDpocwxUsweoB/CPXTyQReXmjrhkw2bw9TtqFhdepH\nvWQDg7S2I7lxYJTl359gjEg251/u20yS8fnLqEsDvCy7i1A/bibsPEiWTZ6k\nxoO+j+JBYyfU2Dnr+x30V2gdU/C+qyILlM8r5nHkGzrGhQhfs56BesyMo917\n6eKe\r\n=saxB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"38bd77e93e567329d390e9784d4f591d6dd41191","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.718c90178.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.718c90178.0_1620156404307_0.2641716748988181","host":"s3://npm-registry-packages"}},"12.0.0-canary.0e3917299.0":{"name":"@material/auto-init","version":"12.0.0-canary.0e3917299.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.0e3917299.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"81ee2d6edd5ae137c7c5df8172ef4f2ed3f15736","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.0e3917299.0.tgz","fileCount":14,"integrity":"sha512-S1AQ3Y9Dd4HGH44DTrxGYQCGat6jKTqre/Ul0DRkzTQk+onVHrOUWfq6l8lnWjWQplGkicHyP/PQFj7NW04cxA==","signatures":[{"sig":"MEUCIEyNgNScHoUWcnmUXDDL6Azyu6cQ3N+Oq66HLAUsaR+uAiEA5yo+YGXHWcRRmSYZtU7Ifyag8d50LrrHL9gzJ0yNtGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkaCfCRA9TVsSAnZWagAAfacP/RPe0xYu7UXm18Q8MT3Z\nY88jAXfNmxWYifJu0XRVQN6u0XAUnq7yjHFmiF8AANGz2kYwvTV3oNNA49t8\nK0lU2Hfh/FvEeRcZnZPGwwtCa9NjHWP9gCTYZqYhRDLvcGWj8gOBiYMaJG24\n10zgDPKSlPS7mu+NzbC13BjjUV3ZwDVzctBRqx5PIXOY3iP+2dacWGUT3FKi\neboy5w/5ZmlGBzXVZz9OFqTO0zBajefKl3BML79P4WQAE3jCYDe+fDGOLMSE\nrut989pWju/bl1CbIGRaTWdLkv0T9gcJ+OAYhG/P6t77utZS1IrIgYNTA+5Q\nNiMIaXyKwN94xOlsZsvySDN/bACE2MSLA+Crq2dUsZ7Y9WOOMRS4meifgHVE\nI+rrLbTmiMjguSYBwNVZ8zooKDM0U8+ki+dx5IPaCA4rYwsUawLEj+Hx+OI6\n6b4AnWaOe7zcRftoJH2s5LdMzmtuQK9boAMlck5Ays/+B/4/qzxo6S4xQa/Q\n93CB2DVsKA5mBcM9z41LAJuPywVrWUaERBbtR2YEam8582+CJ2gLTCudtjpO\nZK1Z7dErvLerj513+mBADnNIc4rwLzE2JYPFLRPSybZ/gxn2gQUk7YfNb90R\nYNCl6Y/QffCpxZ8MZJQU9xNEn6EgnK2HUlGfRxXHC4NRwJBv0J675NGaF0+Y\nNnl5\r\n=B9GY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b53d9d2ca98f518aa071c4933f2c0046916932d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.0e3917299.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.0e3917299.0_1620156574692_0.9278390648636379","host":"s3://npm-registry-packages"}},"12.0.0-canary.836b3c7db.0":{"name":"@material/auto-init","version":"12.0.0-canary.836b3c7db.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.836b3c7db.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bca4a9331adecfbf679fa41f6f40946dd7446f28","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.836b3c7db.0.tgz","fileCount":14,"integrity":"sha512-O0EpXDTJ+sT5Enku5nTtDR0nAs3s+CB/QYjxuDMz5CYgoUedwvqdlF8YqPL6OLESb9MTujzvqQA8/aJqWo7hKw==","signatures":[{"sig":"MEUCIQC87e4XzEfsFBWLDxIjPHlrfR8UzO7sncbdFtiSUDXHZAIgbGRSBsarPU+6ZMBVVAl0Le+F17+XXSX7vhdaDhjzHn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgka93CRA9TVsSAnZWagAABMMP/j4Q4SFLCCDDRFld+Rvw\najxL9+pXvgyac9XigWdytupNtOahu05EWYEOe5dEkxNkSId7Oln5uRP/uLgH\noeelsATjO4ePH4tNdrezJgRkA9u0TofTyQ5NXrDjST9K2FgW7oWlRfyuMZ+b\nQ4d5owi+DUwXVCKk4/Z1htwIU9iTi05yFNxdeRgBV5OWqKZo9NYD6OzZttnG\n59TQ4gSbaoYRPK2KRNtsGMK1YUXikkN3KhworAmH6Ne4R5FPjTEVeaAL5Rr2\nD0/yjYQtWBy3o4b+lmoafTvS1jEZG6RzI3aKaYjtQ9Fe4Zh93+YclIut/jWT\nMrtEFJZWarc7vG68UTn+j3hmKtrbAWEKvWSsiJgAouh+1ua0P/m0qDWSuc3+\nQiOy5m8b/5CQo3mpFV9wU5dDgfHRvt/ZWTcZ5a9/I9AMbxh0a/09f8L+Pqir\nduhy/5Nv+xPJfDK0cKTqddUVWoNogNLXepPH0kNiWJmq7Tgwjxk/QBvqEFP8\nzWlBIBvWlbPEA6JevL4nFnZW6fc9SfR8ZD9EJk6iKbmJ+sdcUONjiFBsTPsB\njJcvJoq5883rpTbr+w9vNV4ir/pygRdKidyLDsTw+tLAd0KzQW+GoYSfD6LK\nqJrXrZ74LdoSdbU1I11elSG0VDl0ceIcra7aZPfXeFEgSid9/yCR/fYOaz7I\n3r3H\r\n=Znqv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b39ef8f7b55792965f33ce0e4907f1811ba2b17e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.836b3c7db.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.836b3c7db.0_1620160375454_0.15018704023351237","host":"s3://npm-registry-packages"}},"12.0.0-canary.53d4e6d59.0":{"name":"@material/auto-init","version":"12.0.0-canary.53d4e6d59.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.53d4e6d59.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4250174a2aeebbbad12c104eee7d9bc51356a4d3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.53d4e6d59.0.tgz","fileCount":14,"integrity":"sha512-TRZ59gLohXDfVW/pBdcQ7uY+G7wsZton3j6BGHMmj8Ar6znVr+tdyLIEjQ9Jp3oG6eCiMh3ReUNVpvqxWiBCEg==","signatures":[{"sig":"MEUCIHPVqoV5kDehsqaRPB4EV7j+QRTftBT5ruDo7M99qsbqAiEAnQN3RzJ0DqgnY9cIN0q9K8++9/PoD2Cen7EWOEw+lrM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkbMnCRA9TVsSAnZWagAA4D4P/RduLpVjbMSk7BRm6eBd\nSr761yHoLH8bGq4WVoZ82uBuiJFQ2cgn6rCM2hfsUm/BqTO5TwONcrb9Bokl\ndeqRbJb7NF+t7c+FmxFvEmB4RYiSPtn9HA0MFKAXucbpaBrgizyLybetkTvY\nF7QZ9kemZYwGoN7tyvdFEKheGhBOf/JLk/yFNItoKuykDwtOr6nrlO8qCKng\nvk33r2+gW8MEdTALkZU1Fy+yunLYs3oERwWt82k5tKsHO19UdlMom/RT4/1Q\nwZSAQqMmBHKE6YH/D14/TcPHX5jPYLl/+c27rsrTih68Upmw5rIDzyxeexfI\nxaY0dcD6BwAM+vas8IrMl1iRXXfgpJN9lkbsSq2AcRmKnWVVpoR2hZfhMqQV\nPQVkTX/fdYD8D7dOWeCnflTW5D9uRO7C8p1pcXU3r+pPs9LWgr+wF+gGzjtM\npWH2IKBqV/fSkX+k0XCmnM3766KEgVMChwzKpN2nNNf2z+M2jO7WZuAZtu8I\n7dGLbIIhGdj2AX7qC7WrOeUBiSekIGksICPznQWF7E1wQlFfDJoUXIdXDeQw\nJ1FnVeBgFjmZrNJqgE2BdYLatQNDS3TuGkOzGMu0DJghWK87K/X3SQnUPNSP\n4fx7Ae213F9pvCHGp+CM4Phh2Yq8BFf0HIhiosDE43TlYJtncPiPIxXtNzd0\nSw8G\r\n=icNA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a89a7c81034e7bfbeb469ddc1e1e463b018f7179","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.53d4e6d59.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.53d4e6d59.0_1620161319168_0.5297622488916889","host":"s3://npm-registry-packages"}},"12.0.0-canary.18d147e27.0":{"name":"@material/auto-init","version":"12.0.0-canary.18d147e27.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.18d147e27.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"154b757cf4c4854c6ccd513f4e3d3a0533121083","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.18d147e27.0.tgz","fileCount":14,"integrity":"sha512-lzwtKON33Q4ZHO1i8nS7Kn7EIj9q2IvqKRxDVOQr+Si+UVljhQKr8smQIqemyYtEKHfgqifij86kMvkuW6rieg==","signatures":[{"sig":"MEYCIQDcSMg7bj0JIcCO9HhRMsQW08146JsTGF1weHWGno91VwIhALukPSCTLzTcqwFQgg/l3iUCMYQvyeDkNKUG073GQE91","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkbUoCRA9TVsSAnZWagAAeaQP/jkxTRBxHNu7mwgoQtbS\nkpRzx1MIUNz/zHLH4pscpw/f0M8hCJL/+OYKDC2upwO1MLGYHm1HTtl8QT35\n8z8w8Y5nTBvnB+2psSpM3r4TfPe95eVRIIvcFCr9LmeqkKdlpuR+s+smu3mp\ne3D5yGuUTp23/BXbsPLMLR4HgXd7x9vNwCV2MMFotA8jsdv1/rGcSscz7dzA\n+h9nnWyeyNrS4P97vVugtkrKdvWFW03mieLOUkzO7pvp1KSUKvZ8JyoaEjjL\nhs0YRqI+/K7Vs/1TjzMeeqRRG3WWzSRyCmrL8TQGJCjzg6L3VnaA6AFb/Vwb\nN6jOKg4KRGQOaV8ovPQH8Q1pqZkPsl1Uii6PGfTP1VrPPPhXUZo+2N+xTJVc\nGWY55jzx7HlIGjBhMpuJQm4rIT50GkWRyDSOJgBBd2yYp34RZOZ/K5HuWdfv\nP+zXohr85L+ZfK43OYDFXDiSCdEY3IoBCQNmA8TpQp7Vqfd6r9EX9Du0KHI/\n8XEnxuH9Pt0nUc2YHbadZIdK1PsWlidcCZpXjkVm6EvXSdaGO3eW6cXTpAzn\nZ1a0HZYhO5p9sPv9mVKJt6uBchcDc3MbSBt+i4qfM8vwU1ztzlCv4cRStGE0\nUdXcQak4RJNPg+DLIlyynIWpkUpsCVEgPcO4YrATJ688W/oyDVJtTD7WjnvX\n0coC\r\n=NBfP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"02e686390dabbb1590eba968246da65476db162a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.18d147e27.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.18d147e27.0_1620161832093_0.2324160317012478","host":"s3://npm-registry-packages"}},"12.0.0-canary.b9984794e.0":{"name":"@material/auto-init","version":"12.0.0-canary.b9984794e.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b9984794e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57c935fde49dd02b6c48840da0215822e66c33aa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b9984794e.0.tgz","fileCount":14,"integrity":"sha512-VWia0fCNISqxmovlyzp8yTK1kaXqxaRFB1Zy7Ml4uMC7nefgrqd4JhC+q+/Ktjlb32XWmntsdOX9j5bMx3KnCw==","signatures":[{"sig":"MEYCIQCuTf2P+Ziod0tRUd6z47vv03W4rt/TnjQKTSTbtkN+UQIhAK9TKLdkuVPNuiWr43lTUkEJO1n02T/wp6Bzjnnds7i6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkdJyCRA9TVsSAnZWagAAg58P/3tfVNMHr67dEdAPLIVU\nEhQudHVjoE891eiLqUSHkjNTX1B60DvFUf+vlrg/Ry69ivGWeN6bMUUwcN4b\n66tJ5ai+49mCZrYWgK4caLEyu0tPnxyCEGQ/IfawLwPRPSfriUkVRBA/58u/\nR5/I3lGseZH+rgfrdsIfGEp7lc7+Am7k72DF5aBKindYXbzoXOgIdtPXl0ng\nsIXxqAhNwglyNcTIbPMcmYDiR13cECk90eW07kj0GA9EoE5SwKZExIMuuiJU\nnz4pwTZQ+RYR9Lb3qOoCFDCQJqp9LuIYM3Z6j+0GegI1g3oivooTVdSflJW6\nFJPbcT63rTPnHh8hCXNlZz5PIWdOVhDe/xH+rUn+iRNMMb4f4QFVK3AAkFSk\nmcpWtBHzwF0xi+F1HQ5nolzQ2L9KxJQiwWNzSkZ8g02I9LvazFYvShBDce5A\nGjNij9+mU1B/2esbwvvWTeiDGEaIv2rbNomy+kekNfQfbsaHE3I1o1eq9ZUQ\nf7ZhbY85IoLkhzY1rjGKfUL+tToZ92h6KbTzaDYjgHVLFH5VwyC9jQi1RzCH\n/1A4+PIIw99VMcZhW4x3wugSSfEIrWQo/IjFKH+LgUz4P8B+kRJZSGTA6qTu\nr8W3QUMtsjgM+PwhR38N1fqYR3VOWASj6GcXwklGdPKQbeUyZg99HLbAAjCp\nyCBX\r\n=nIJv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9cb2c88737add4e6d3e04893ef4ca57b7848549","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b9984794e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b9984794e.0_1620169329809_0.8591705169316965","host":"s3://npm-registry-packages"}},"12.0.0-canary.b76f5fc9d.0":{"name":"@material/auto-init","version":"12.0.0-canary.b76f5fc9d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b76f5fc9d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e1bab59bebe0e15895b74b932d71c1ce3f6e33bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b76f5fc9d.0.tgz","fileCount":14,"integrity":"sha512-75R+qCHQEvJ+gVUJdqyidgffpN70gfrVlvf+cPxK6AwJyNIyZUbnG6XFwhslTW5mhkMZal3DdRQMsU4WS8PpVw==","signatures":[{"sig":"MEUCIFiMvD+sf7GFO9480cSSZ99MRIE/Og+0OthxZqb1yCP7AiEAoivt3/1kYidH5+McVO0BvoReuB5Gi8JlrxbA7QBEbjs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkdNDCRA9TVsSAnZWagAAnesP/1hzm+IovxP1AHJkW8Y0\nl62dvmh//eboo9ngkI5msFqpH4cejdDeY4Iyz3OmpK8WvWOYyzqeRIzuLKCA\nIlQQ1+5blInbSGDmGQ32xJ4edXIzEhO/vgg+TIx76WMVl4CG/WIpRIEvSKsc\n6s16XuR1xE+Wu95AjQ1596Gu0WuEv6s+De6zDrZDO5oD+lGPY0TInDhKmGIM\nhrqapmAyktwYIbLrNCEWYwPjtTR14/7KWNQuB0yzELvbzN13oqnMY9lRlAg9\n4UBav8DA3tFEub/qF3q6JqwSw37XvDDLgKkBEePu2C99QedE8D8u/Jk4ygoc\nLF/4iQ1jDh/D4UyEe9e1e5cExvsFvKNlD1RJCfn5BQqXFAtzsmEHOgluGNfL\nZL6Svt/M9bYYhGuC6+PNy9jY98IAVTdKc1kdpdj20OfdAPPSZoLxtU7kYVjl\nY+hDiGtWM6HuuzeCQnBPtmtZ9j387E7Wii2hy9DKYKtgvxwuyD8i1saOdy/0\nQTWv96ix3QX4ZN6f9KIcyBdHJPodcXZ4cAy5AzjmDnrhO/2njf6fWqd+4ZJ7\nyzeJR0D18ja5q6Cv1y1RRZpcVYB1O01RDA9EohDN8hBYCV7Br19L+CHLNsXn\n2WNdXRV8Kalu8nYogI/kQErsIs3UIw8xuu3eMyIOCZLegOA7Se0vY8qGq4fT\nu+pA\r\n=dYzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"219c30995da49f5c5f458aa1b983f09054c2d4d4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b76f5fc9d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b76f5fc9d.0_1620169539420_0.39862795043383037","host":"s3://npm-registry-packages"}},"12.0.0-canary.055d4f10a.0":{"name":"@material/auto-init","version":"12.0.0-canary.055d4f10a.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.055d4f10a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"572a4554bcb45be9d602b04bcc2f2757e2f3d2f0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.055d4f10a.0.tgz","fileCount":14,"integrity":"sha512-0YEdsVsECsnEDU05EsGVgpK5zFjylMyxLx53RBaw3CZB9kdVgR93wv78q5OTMbvAmtJD+RwmIFJ27wDMh9LALQ==","signatures":[{"sig":"MEQCIBFJwKBKEFqIRNWjRbreI6f422TQQ6JuAkv/6DjjvKcIAiBmVau7QS3NTjSv1lJ1l0tdQlLpFjq/c2OYZikYAqFw7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkdbPCRA9TVsSAnZWagAAoEQQAIhTg+/34GZATHDIW4po\nZvIHHeHYejN8TbiNlFpwQkxxRNrHq5ryhNY0Qq+chMCiuFNi01zv5XQ6GHju\nn6bKgmjjCcC3swUM0WQ3o8g4L3IpPcJUiGmthctrxl7kds34dwOrxyWLRDqX\ngrdP2Q6iLPJdMGj3TRdUBXnQsK4Ed44JcgEsnkeSjNgCjANpkaBddNe/7Tz8\nvDc6DlAcCCsWXd9VTmrqE2aP91P6uvYCQUmMFvu6rok1tnOqVc+LsrxrvGX5\ncSUqD7sSFaVT4heBXlvmfDkdaGjgRRjdhLh56Lk6jqDSynxY7n+2MbcmKB0W\nlLBB4g/84+f83mHb047uY7phVrOKJ2zdhsM2bR6njFw9A5GAtyyWmouwITO4\nMxlN0QBwkV5KjK9uC54Q7ejTOmW0E3IKRJTF8Ow1QnJfmxYByqWSbq5bXycb\nWllJiRFM2V1gX1ONc8cMa7gDVw1fnzG+eRdFi4sGrJZsbKLWrzF8BV0dMdtH\nD+mUq3mgd6RxxnBbK8qT9jHKcAHGfY31LG7sgdbH2n9Hw0yiwrgWDsyE3UU3\nHu82/RiRgz/nEVW4yU/40hJcFXQP6BNmU2j4z/UU1NOlS7ZmoN8bAR7FlWDD\nrO+x64zt9GSuB9wRbonpsAZZFWMrImTlyxi6r0cIMnGFn8lMtYhRZDfSldf0\nMvqq\r\n=Tk02\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"df8d3cdf52cca2c339c1fa1cd18129db35422c55","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.055d4f10a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.055d4f10a.0_1620170446524_0.3534134419583561","host":"s3://npm-registry-packages"}},"12.0.0-canary.5b6a46016.0":{"name":"@material/auto-init","version":"12.0.0-canary.5b6a46016.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5b6a46016.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"295a2d26c229b6756b41109b8f13e93dc3a4d3cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5b6a46016.0.tgz","fileCount":14,"integrity":"sha512-dpmEXSz6x0mJwewsftTy/62H+q7I+HYl7biKar8idyxI4/QHrjM2TsIhDlGOxHFPHK8nTtA/swmpaF3wkdut0w==","signatures":[{"sig":"MEUCIGr6MBapm34PeWVJ0AYJlIYxzFh0evFrRCSBLI/nvFbGAiEA1NBFEjXXSI4+87pDt1sRd3P7FBEeImv/JjwxUj196l8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgksSeCRA9TVsSAnZWagAARscP/1efEt/D2+gTFEKZHs5L\n3c8s95RPaJIQIhYd8IT08fo4ua3YgQCkGoKJy5wUfWEfU+Sp0ciEdbCQvHje\nsAX5NXCeDm7sI20so6Ad5F38gQ9F4uSUx3Uwb/5TGlrwbCBKoOiLXncvXY65\nrLGhWVgiZWYBwZbcYFRaCJ/8H9g2vdD/e9hZEHC63wDxU0gEywwVzHfalj59\nARaAkmelyozL1w+qvo3vYOq618sAywmIpeIBuj+d5lrw5Jj2r7D7Un6qGpkG\nNLymK6B0Jc/bM5Q1DNTdCHNh8Irou+Ct6RyAAfO4YjslikfN6SiF6W1pXpTG\nasWqfDY+b6MI5VUH5uI4k8LV+ApcFE5vKHjMJ2OqsM+qwi5C49QKy8blXcqv\nDpTryWfJU81yXyHAfAnvMBeDSLRVC+A0lmLp5KrV1mJJaKqnuwfGHOQoRyhk\nuhhqPVRGHt+9TTK613HXWJy1NR3h6ZdXSIXP9i4OMuby8vmNyRAJe8iLMp6H\nIpN2ESyQIha0udbop5F6GWEpBba5iqbdl5sCCaU1YhePf+gllgV65KoGwMLJ\nJ+Zhn7f/ookQK4B16AU5o8ITgYDE000tQQKhgR/uxJqKoNUgt1B6RucNsJMo\nIdDok0g7Mdv+TVaKwkFpiN6KHhOYDR42/W4ktpJTHUqGjPcxeNjXSu7FU/N0\nIGMW\r\n=y8k5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3d9c7e3c179062db8b5bc243e8bbfbd9d9132e50","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5b6a46016.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5b6a46016.0_1620231325718_0.17722439761930997","host":"s3://npm-registry-packages"}},"12.0.0-canary.33c9a737a.0":{"name":"@material/auto-init","version":"12.0.0-canary.33c9a737a.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.33c9a737a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7b96deac6efa6975f4c867ee07424f5dbf8d07cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.33c9a737a.0.tgz","fileCount":14,"integrity":"sha512-RBi17HVvtfKAfetGmD9ACEaEXdGy4OlCNJK9GWwUYyXoIwDKsiN31rg9lciuvyzycilH8UWR79BDyPikwh2YUA==","signatures":[{"sig":"MEUCIQDfd31rWW06rp82uEbnxYFU9yNE/tIDBta1Jvow9FwFIgIgWjrMooPh0h/0XgNDw3YfJAveYGJ24zlj95HnrLrjeAw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgktU6CRA9TVsSAnZWagAAPBQP/3DMjPqm7i2yRSNiCOt3\nxn2N45ZYARRM3XQD5bsOaQL3fPYMbKCwVKRvs7b38sZu7lNSYASATtRKZQcW\nFLWHaeQGhNSuVAVl4KMMTts4qwsgnydhTQnSX6bG1LEr3kt6D5Lk6z65oXJK\nDRcyClQHJwIFmudn72w0tfAEmSX2ewuJPf2Ns53VnPQZCzZBpyqsHk+sMcLV\npmMiG/KnHjIl+rcalGxBo8Fkzj5n2raP0fEH8i18vyRdW5Z9XZyS7M3orxb8\nmsE8kF311/g6lzxI2q10DolapMf12qngCxG+7QR+0uj4Tj0UGJy/k+Ld6sT3\nQiYo5pUO2C8Nl2V1pWCwRGjsiF1/9LICxdWKylkAp1js19xpxW5MZKd2jMRO\nT569mojp1BvFOaIkF/XgVuieel7nkqmxXCyg+XmM5HmPGMe8jNXQZyPBONAs\ny9hN463hA8dHLBuCX8UtIeSVaZltaP8FOuRrEevp9Mmuy73PJmxxHk3ZGYYn\nChcNAUVDVCzRxIcKRxndHvB355jpCXBexLr/WBGkdArtfATAFJnoE9wDBPa4\nUHZtsh45X/aB9rq/pMpYg+iFCkvXT1CKLn8qyP3eSnoaUV/ZUtwHzeV4wqpW\niP+rVdGcvdnY2O6KWNAZFp+f12cxKdyuD8H9seqeJVnHIsCZQ8QLmiwQ7o/e\nehhR\r\n=7EYe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fa5c97d28049bf03f5b138c0d97bdc267f43c363","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.33c9a737a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.33c9a737a.0_1620235578129_0.7915155651736372","host":"s3://npm-registry-packages"}},"12.0.0-canary.9bc0effaf.0":{"name":"@material/auto-init","version":"12.0.0-canary.9bc0effaf.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.9bc0effaf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"822f5a8efddbe456b67d4965938099cd55806913","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.9bc0effaf.0.tgz","fileCount":14,"integrity":"sha512-15Qrnn0f9gsPeejV8FIezmmHtIRN6ck3MU45iKmLYkjukN2vDYYfMXdEVhEu4pvtfSfadm3bpT/GgjPnRYwChQ==","signatures":[{"sig":"MEUCIQD56pwvtxHx+t/puDtgzvn2wqn32syexKck9bxhKBmkGQIgIen837B0D08K4ZQpIaOawoi70oWwnNb8fVrhK69kEcw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkwcaCRA9TVsSAnZWagAAZv4QAIacHykUQQ0LmAeioEsU\nE+w/Jma2XQPZWQYW8KicaI/flP6tlOqO9a6zTcBYfdctJcTGOXahYhnDbAU+\n3cu8VYJ2cLMqT1IDRC2L4dUroal9AVPS1+T8zC+zLN16o79V676e/e6tmwjk\n19FWzKZPOdZb5rYQ5W6e6Lx00TlhDli5i8TM9xKmRuZsbG81tLaclv8lMzB7\nCtkvgm0Vzu15kqeCNddMSvsDg1lkGFxlXxilO/NNobG2m3RHIG2Apsbasu56\nk1JHxVy106W6+X7h3hB74DIGNM55IGzkf6XTRD8bcfW1XomCpPoBo+xk90XS\nEun7oZLktYtP5+LD+cLDKgsi6FYnw7KPgLv6KEgciSrWfXLy6RApefFpn36I\nDZt++EBLAnaaNb1EcVqgRxJ7ku4gGSl+vvIo26nvr9ZQ5t6bP3tl6AdCZV+m\nwJq5p13bfuxi43wxFzJk3daSHAqbVvix4zsdod1horRsc32aSpl3uLXOM+W6\nV5ZLp7ZBIW7ggIMvjd1sB33mLi85wMe0N4o1leODPOL1jauIbRXIdayWtbgp\nQMt+FJb2XdRHbEhi+lkCEpp3AHh5k/xGs3gi7OmngdQOqT5y+xTFmroHjcIO\nUfqr9URtiEWG0BFjdUJb8acYB1wbucNIejjVHBiPqz2ds4AXuXdyavySmtNf\n+tFA\r\n=Vwyw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e671ae06efdf42f7ea0cb40bb6700fc57f6a35f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.9bc0effaf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.9bc0effaf.0_1620248345609_0.4719205511185214","host":"s3://npm-registry-packages"}},"12.0.0-canary.a1e0f2af5.0":{"name":"@material/auto-init","version":"12.0.0-canary.a1e0f2af5.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a1e0f2af5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"48227f86444b7588cf64a10a5bc3611da23f86fd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a1e0f2af5.0.tgz","fileCount":14,"integrity":"sha512-3R1qFV0IFwCYSRonqJYZtZl7eTXbWo+UWFWXtuBI06C24Ey4D4Di9HIihP3LsEmxYNmprgXH34PhzdFC9txxXg==","signatures":[{"sig":"MEUCIQCl/rb/05KnCGFcX6hsNBKOVa+PVgnjTxgz1r3bqPWbMAIgY3SGV4430EpFtj/BBSL3rZCnF10faxR9+m/02WYsAaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkxCzCRA9TVsSAnZWagAArvsQAJ6xA19rCrwcUCMPDAEB\nn00tvZwTJ2gy3eaQFOeIGkYJvIfKsz2M6euklxitffDwpdgOTg0aSj7psWCY\n8prUAPijk1ABqy01ONthhkYTsi3jjyHwlv1a6lhmVFw1HYXAV8Ex0RNJySUH\nZ8FHUE5z21ms4Qt7DGT9KgUNsxcyEtty5aKSnzuLinSN5Uigj1gii6C/jr9q\nwtu2UlNpzWAnf/FlzvVpyMgbd+sGfxsPkNIHnLb3yjkhVE3qJ7xpr/+XwHi3\ndn9zDyM1WHOeR2ZVUGd1IP4WU9LISj3+ifttfQG21bHXFPR1QrJpzOxDA13L\nj8CVpoMzRRh4GiLUs/cspJeTLI6wWdKAAKHImBzsCEbFtNIPqZuOmSErVI/b\ngO66XHKM0MegBpKl5OafVK87eeuKXysgT+a1ORvzqH2xBxijLv7tlfROOJbH\nRMV/y9oh0mRvcals2KgprIBxbVialyVRDnhh0r/8C5tFbRH8tbL93NvLc69N\n60+SpQI/Yr1K0hdVApVybtJ/QpQOrQKFoEWry0+6izb2OuVGd6pi6crRrPQr\nxkentcbVZWxHeFfXKYq+ymPQRvxDckYjUjdxnCAixSpJruvecdLa77yQr56N\n8QAj3j1jcaUGV4qfIS0QfA/BlfDl9Dc3xybmGvAQeRqTZ86dpmlRY7bUl7IQ\n3077\r\n=10zM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7e20a4b86d7cb59be9ebe12cead11b1e8c7bb63c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a1e0f2af5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a1e0f2af5.0_1620250803260_0.4195492700377079","host":"s3://npm-registry-packages"}},"12.0.0-canary.06930c96b.0":{"name":"@material/auto-init","version":"12.0.0-canary.06930c96b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.06930c96b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d563a53f50e22e91c6983d0d22fcd9b310d48240","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.06930c96b.0.tgz","fileCount":14,"integrity":"sha512-pIgFL85/ojx4fo1fGyXEej/cZcImwA0l5pePiZFRM6v8exwOITvCxCqh17dsrV92KHaBTQ3jiM7ZgL3FfrJE6w==","signatures":[{"sig":"MEUCIEq8xXcdyF6ZoC7iWoJ5/x6AlFM3Yas+57/dbt08dJicAiEA9xB9GcPQ3GD5JFXPIgPL0n0YgWMJC8eXu1Fs5RKHRh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkyxrCRA9TVsSAnZWagAAYPkP/RH8VWGHzxei/eqzQrWQ\nk8qbSWjvgZKoSPADpbnTss/9QW2XgceTIf9QnaWA/22A1lj1YnpconknGEis\neGShLEuuNLI5aR25qs4jy6J2D7+2WwwxLkM+yPtoLXB5GW7CDxLl6p9o/fEL\nDkOaWaz1qU8z3MxnPzLahWM4Fh2P5LHuItdeTKF2krk4EvL4qqNU4ogk9HMY\nxmbN49FGppJTTCYIzhHSq5mNID6FfjgzAgsuUyuLlReywwK94IfTytuk+YDP\nFHGB8BHcU8EkkUPk2zoGiA36HL/TA1Kc5OqqkMtEdSUrTAnFa+sC0ZEgcWPH\nQs0wdcCOyPtO+RY55TXaF+LG6VrTbDJLt1KVHlt6z/ISgt1shVWL4L6+By4e\nQLadGxwso0BERutj9PcSHJsxb7sMF1n4Qy1oAi+Q7aZM0+QbR8Q9iexvIAW3\nq/duVybGgfRMfk9ep83Gnd44IWJso0yUjzGbMc9WXKwvTgQfBfqpDtey8HUL\nJxqF6c+05hx/wuSSGcUlCkCcwuAMVzelDMd4kk4jNpBV+uImw4rcbqfh/hOf\nw/WmU312+zYZ5kuU8Lx42s0GgUGZNnJRt2gGSWKjb8W2JnY66SS6ZfIYRdzC\nNLA2Sdrvi8A9oFJK08TpTW60dUvkxBWl/1TtZy5UPQc+mZRWerzNRGHaVffZ\na1jo\r\n=cDok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aef50df6c5f49244a2b0e5a941794f4e3e4fd21c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.06930c96b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.06930c96b.0_1620257899066_0.4379141400538773","host":"s3://npm-registry-packages"}},"12.0.0-canary.03f525f9f.0":{"name":"@material/auto-init","version":"12.0.0-canary.03f525f9f.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.03f525f9f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4720f058b96e814a9169b5581d43ebd172f99d9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.03f525f9f.0.tgz","fileCount":14,"integrity":"sha512-1JExOEKAkr4quCt6P+/o8yyP60p/C1aqiP4K/a+6qIiEqCMd9dctqPZ/6H8VJgPrI3AMbRZQ0pK9OLtqFx6JjA==","signatures":[{"sig":"MEQCIGJqTYssRnGcaenC+m46g9F+tSlbzIA9VG7Y4+1QBz+3AiB3E0fmcI/F2BSNqoMr0OGV2w8DwsbC2mbJhjRa0+b/Iw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzhPCRA9TVsSAnZWagAAzccP/2ghOAi4ydrvPoHQiG+1\nt9pSmnf+6NqGEg3awb2QYm4F/ejIjorbBs4qvxoWgU2Xj07eBu5nomUm1BxX\nf+GvN0CP9x16rls8EOB9bGYOf418d4ddwRqWg57lS6SQu+325O/7wKNW5j6v\nYNmLy//k9a1X95DKnBjliSIf7WqE7URh48d+fHZk7GiBO16Nz90WQVfCWmYM\n79NxBuxwxlRR7PFXc2BPJ+9JukXugvKzLeHOwWcEJUoPFeldM+l6r4OEDRTL\nNAh2XzCGebyFDlBYbkZe5veAb/s9JEdmeRVYROevlJGXs/UQX3tX1XSCdE5B\nNjbaFSwi5funh5QtIxUI4AKW0Ywa5PPegdfWPUjxLhykXjlCAabPDdLKFJJ6\nQUVcmP7ANKPHoz/DhyIHLy1YENpR0D+ksOgtrIU0FOuCydXfl+xv5bu3viQn\nQk0qTrb44dJ0fRqHzTnWyfzMvwRdYUxK0DY8QiLkwLiqmB8FAr8IDtCLSbxo\nEJB8XyYOw/8NsBSDyuhvLaS/Ydgc7Io4NmL7ID5jGtvUmrgpUwkmvKfBgphj\nx5RQ0ZoVn8jOlBwzDtEhN4Fqt3M+RQlEDEFRLmww6jnW1CXi6jtIyxyXnH4i\nk3jJaydrU1CdBhY2PRiQmLIpkqKVb+fCFapQIpvFFmBA+UVOG5wrcbQBMrZB\nh/at\r\n=4qlv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9df1400e21c75e46fe6641abb76d5840dede67e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.03f525f9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.03f525f9f.0_1620260943400_0.863973271225529","host":"s3://npm-registry-packages"}},"12.0.0-canary.e82ba2a26.0":{"name":"@material/auto-init","version":"12.0.0-canary.e82ba2a26.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e82ba2a26.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"634b26fbbaf9a6d622533d1f3e1d7c5ee92f16fa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e82ba2a26.0.tgz","fileCount":14,"integrity":"sha512-TJaptns/oIHt4sUcdKjnw6kVuNPeNAWgoyV5U9bFdm7NOgDfd9CYm3FnCP6CPlheScgJrs+AmpOUZh6uexQiJw==","signatures":[{"sig":"MEQCIH2NI8MIpD5qgYW8W26FClxT4jqGWI6OkNGy00sgaHLtAiAI3lj6ABh3YLcZO/oCuRkD3s49uQ4qtxRf9zfP/oFyDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglBFoCRA9TVsSAnZWagAAE9MP/iN/sTX9EOyppb3D/CSJ\nL+Om1LPGOSfipCm0r5i9zPqWJWpi4K4Ly3QQjbQCL5izPmgut/ucrQnry7DS\nDhGFiF2cOjuCHCjptYWJVTz5ZEg0PkGTACznvvuOu3e63Rll9txZ3wEvMF4i\nEAYKCE/2jqcB2Xi3vhwXk3uJjBiFF/LUo6urf/UGLUtipDe9ObrjRtIdGD3K\nwTqlIhqPBPG+yamxH37sBkVQiu9w0U5v7VvslPfHn3hr36+OMdJLDI/JA5Rg\nVnir24o52Qnkj1SGPg32vqViA5F9/HzMkc+43V/By+cI6Vk4hG4HLxvPqWsj\n17Gq9UVfEFIaH9cFGEsaAPGzhTnREIHitMUoCC6WrlirDN4FA3W/gCxMtPIs\nWLgebZhwnIOvNohdngSqp7prZ8rdSoOoLAe2pODqowUnv6gBs+FYPr1eW98U\nrzWNV0+jjreWXuoPEb8nM0ggAWJGthJb/I/vUn538EYTZ5xhvMAHadJZCwga\nlsfoKMYGaeTXJGqtEVdzyE66fXhU+xBbaLuYejBOyR6r7gZ+5HDgUq0jbET3\nmEGq7lywEHd9m/QCGniXnKqR1huzzFHy2xeosmp3Jgjkk9sQo0cB2gK2e/pZ\n+4v1PMMGDB61vDelngX1kmmYWQ293myxRmvPomLGH5T2yrKZk5qqNRC+BSz5\nVf/l\r\n=C/QK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c3349c46dc5415cbb89b8260a8db012f44f09eec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e82ba2a26.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e82ba2a26.0_1620316519920_0.5692691036049229","host":"s3://npm-registry-packages"}},"12.0.0-canary.fc7c4e5ce.0":{"name":"@material/auto-init","version":"12.0.0-canary.fc7c4e5ce.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.fc7c4e5ce.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7503cb09027ed695ea4dc3c52fa15c909f206c68","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.fc7c4e5ce.0.tgz","fileCount":14,"integrity":"sha512-TQvy0+wx0PFkb7ux8dGN3ka6Bz1aHT+hYk887Szni2R0B/zdDb7vF8ZP+bbGftnaduZXNo7E0+MtBlhM0mLdBQ==","signatures":[{"sig":"MEUCIEGuVcMfEnQPL7lWkzEwKTV7vWFcQCazBf6JGFCV7TBTAiEAg3F5KRYeU+VPHPwH4INaUteTl9+hBJ60QljEkYPlrqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglCc4CRA9TVsSAnZWagAAIMkP/0YgHit6KOVTvHQ8Vo8I\n+whY6gee1Du7Di5WXLxav4eqaF85fObkBVbV7C9X+kPPEhE3rg1szMIQvpHb\n4DO2AwVv1Dgfl0D/bVh6sVLvbMG8aoYJedjioYdUDH1m/JQK2Dl/CPmJhgRw\nOu9kuJGP8sR+rhbvEGpN8ch6ucguPsCyS9YBe0797yJ0zM82Enf6EIHQWScz\nnSr436kR5xvvfPLBodGCssjIIamOa9L5EQm0PKpot/YdudQZrt14ja/c2llP\njEl+Zk31htXI7+ooUWr7I3/y3KKTSdCPpwIXLvIT8ANr6rlhRSFQRQIHNB9C\njofejU/YOxwp2027XPFsMUdjJAHn9Cu209sVs86BH07om0oyp5i00qUdIfAi\nLs9dFRHA3t81G8dU/SNDAUquMW3PfS7d9LpWBAjNTQP7T1ZgcSWVCLovtySc\n0/xowNdcPS74ywuYvIom98GsuuwgsuxcOZ0PsvrCzZojCN1xgpMWZnHIAmQb\nHNyGs2s+U/KDfKgJdcfUJwiMDd8MO1l4HuM48C91K16YH6wNwJ1QVAaEfgQs\nJX034CsbE2hNrnXweamnnjU4mfYD9Z2W//PJj/MV52PESIeAENVzGj16LLe9\niO90N9JEGCIfsRPNuPfd6XVs10puH0jqmV6uM2hlAGcM9k0tiHZOvRiCGim5\nx4Ge\r\n=G5fM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b549929c65e0a33cd9d427a600513c663c2dae28","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.fc7c4e5ce.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.fc7c4e5ce.0_1620322104116_0.2980033169646208","host":"s3://npm-registry-packages"}},"12.0.0-canary.65c04514d.0":{"name":"@material/auto-init","version":"12.0.0-canary.65c04514d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.65c04514d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2d5789446e36c3b0d87ec1e7ea8e7291544057e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.65c04514d.0.tgz","fileCount":14,"integrity":"sha512-soKgB7U7ZqrQpHWdtmIMnkM/qHFSFcSXfZkfF5m2BNdavLpLsb/jf38so4BWHycZBTGq3Jiy3pTFJ3BoQEmSsg==","signatures":[{"sig":"MEQCIA95mK2chkx9BvPHe/1O+3Ui8aMnd7UQtgM9//ObXm7zAiBAI1HWCHlwXaHXNAdMo49wMBB3KV99FHm29wDigVm6IA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglDiKCRA9TVsSAnZWagAAlpsP/RkLqTr9xrxOTczoEUzg\nAqD5NpeRY2Y4szs4BO8MNr5X0P0+z2kD4v9MYfHcvlhLjaNlwy/yEIR+ow1U\n634Gli9VZnMtRt/XzK5wbHMsBw4gqPuT/FPTEJb55v5k4fxqdQTu7LvzBi59\n9pMKxDOvQtKBcVd0HoD0JqHvR0utfKxCh90yxrVN7PCB962bS6B5lDzDgkc9\nW58COzNZBwyhBqgt5YIXcgwEP5v6ipJKdoFslUt/Jsb2sXSBB3tHL8zkhGA2\nCL6FFo04KPMLH/pWmb3kXS27Dd+x9tNJCx7odtwIYylRqX4iKLyOeySlZuN5\n4g0yppnGRRd+jPAEq1AKfpsJ2VCqAjgZG5PjIuY9YstP6w3z9PM3Ty9HrWUL\nUZcEnK8xk2TiBjgKODeW+J/jPPGFD/hjS9WwPU5w5z+DLNCPeIDs538J33xL\n379Q0badfKloiigX/gQ4nYI9a/piYDLnIPx6X7dLM9acCMxvhtEbgjAj/71N\nZnUeB7Mz1mnHyLKRunFG+VFCtP+OZwG4odKCg6201qIbj3OA4gNsux0cf9TD\ne6obEe77YdNkPfdv681VPAE3pAigiCvEoOlqRxSB/S1UTZYGsV1byBV0hrDF\nKsuKEAP7YLQeXZ1LIA09n17GHIHlrzHuf7Lylcr+AOHjCwCcVHrQ814gBgow\nJw5A\r\n=XKGQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"01ca5daeb81d99750f9020fc62e04bc76085858c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.65c04514d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.65c04514d.0_1620326537956_0.7349320609352596","host":"s3://npm-registry-packages"}},"12.0.0-canary.c97779ca6.0":{"name":"@material/auto-init","version":"12.0.0-canary.c97779ca6.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c97779ca6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5c6fe05c85274817ee7c3bdda277553ce0412b53","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c97779ca6.0.tgz","fileCount":14,"integrity":"sha512-OziC4rC1jSDOizJUqGyTBAZdZliLXeZIlbITOkL/Xy91Wiwt4Vo5M07HRpQLw8YzMFcfBLdh/Jw0C4A7dXeUUg==","signatures":[{"sig":"MEQCID2Fwvo69jEx4LtwEADyHDMcA/4UZ4s3VsPlIiGiI9ITAiB1ikXQOW1YBYzJesxVP0UeHO2dBtc72xyMufsQlMzvcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglGKmCRA9TVsSAnZWagAAHgYP/1Km2wmB3qsEICMG/ytb\nUVuULQsb+jS88S2Ee/YsIkvxq1tN1HM78SZ09ryDV3y4H9ICzfiQFLHalW5Y\nsKo6xHQFVaUatj6auKZHc3mPvYK7dsfJQUxjtsrjIKSK8sl53C/+j5EvxO+M\nbTbeiwKOPeNNuCSJK1YRpe9tVq0jLyRCg18NiFyooOgU8XNXKRjXxLHMyg4Y\nF2yk23VmXholXZ9HetECvtoCx8+WGHBV6OqSsPw9gAPDwTRY5EbX0Xq43q7A\nukyv27O+l0RT4MyGd9GUJQhuqaAFJ/JIEmJVTmLsfDvXaWcTuhuu4UwjxD+m\nnAXRgVD8JGldjyMk3dd19DD/MQ5Aj/vhG4DeK0kuMPnbwN9EAJ3O6uBackaU\nobLZjm8Eg91eQ9GWnSMfpGK+AKrDCe6Xe51fOYjUXjy9VaU9jqh2+aj2pVWG\nzfklJbbRoehWZI1sLM3RYai6x8sU3IoKsvSDYkbs87ppjR/bDUXPzxMuf2eg\n0UNNrQUPLgNy654DExwb++glsLfbbHvRnXTg5ZMmXrAAUpKeme9WDwYHQAog\nbqTv8hhGCvD2H3fcoKdsSZrLzr1OpMdt/ZY3lR/sm6h7cHWPXRm/+YHTY4nS\nEDIm+VSq0IGkxA1JwhFDfb6MPss7KsLS97VGaSXML1QnpQlh0pfbAZY1WwD0\ne1kk\r\n=sfFT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"046f80118629481ec1af7c937a84ce6e0fd1f635","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c97779ca6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c97779ca6.0_1620337318227_0.5807813305054732","host":"s3://npm-registry-packages"}},"12.0.0-canary.869d890d4.0":{"name":"@material/auto-init","version":"12.0.0-canary.869d890d4.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.869d890d4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f2ecbf80db039ebf5da65140a5a6e18c69100f45","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.869d890d4.0.tgz","fileCount":14,"integrity":"sha512-iC8wG0UkXJHG8vpqKMgedOQ515ULIDLYBZ23NUfhAMPSO87mMVfzKzYtLiOLcjdA7bRhYL/zdWV1E8TJ+qSFJg==","signatures":[{"sig":"MEYCIQDZEo1by7RxkpVMRGjRtCJnd2nLvDedsKUE1o86crTD6gIhAPxuDlKCVICA74xD0f+4kFGGQS+uehi4OmwQoY57GHGX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglVoYCRA9TVsSAnZWagAAJhgP/2jdKRotfu45CxPFzl2Z\n9icmhnM0kqwJHtTd2NXQtDFx+1awiJREfOsTVvqhOfoMMK/ZSfczW94Kpz8k\nV5VtyiBRiMGRzzYKLQdSNgZ8JwhhPu5eLhhlai0x9gr49hEumz3pNUMKsTaR\nETioHAbyCocfV4Ci3Tz9jqH09Xoes/1gUjLhrm2qKa7Qh19Ab+Sui/8pNMr8\n5VIMT6HQkKR21x7gbhtmCkT1gK/f9T/nKAtH3/Xgdw00PpJ3JyeT2FvBmU2N\n5NjPtCT5IxOY060KBNuhRo6wFp3hSOLgTjntwOipHhYZZafXz1zeCLjQzVYi\nasCEF/xrJWgj8GYUKNjlUokPNbTMb3Cj75Dx1U3lV7xnKSrFwQBeq1b5AioS\nS2+JMdErl+SDgIFnj0SGE2H9mTtSb+1rpRhVm2w4EQM/LmG3TLfLU6PGsX0u\nfILT5IxW8xY2Yg/CKtF4OOFrTJ9YWnavgIO9UfzlzmCY7Nyb7e0iQhrS3Xwj\nGiaR+eACH3x7LAEZsJuWQiG7y15kAN18DxJAxjlZ4DyH0Y6v6RB9PvcuZgWE\nb/A+nk+AvBSK4synRx/2WzP3oBwsX8/hqVhzwN3TSnUfy67kQMSH4Zsrof/2\n8W5+6pukQCyLEaOxgSRZSQIV4xQF8/0C/vEgXgD70553xrUw8uzsg6O79FzV\n3r5K\r\n=wlCG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cd73688a61b81573744ba9a03cd2952798eb68f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.869d890d4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.869d890d4.0_1620400664053_0.32291802027346694","host":"s3://npm-registry-packages"}},"12.0.0-canary.ec22e1da9.0":{"name":"@material/auto-init","version":"12.0.0-canary.ec22e1da9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ec22e1da9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1023f0adf0711cea0bed06ace86628733021651e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ec22e1da9.0.tgz","fileCount":14,"integrity":"sha512-7FRvDPxqpswaqFkzmxNaODFZrvlMSrRYvmVraOe2HYpZN0MpufLtv9hw2aJnp9N9GLE0lSZh8tme7DHelGRahQ==","signatures":[{"sig":"MEQCIB/ND6xN+HCub88P3l2NNWZzKpygXx/54cuG3nZE6WXrAiAfj6W9/7EK92U7Y8Ht9kfIUE5LPbf/r0L+dFzgr8yP0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmXnwCRA9TVsSAnZWagAAaoAP/3gVa9AEXCyXlDz6yyyP\n11UzTEy2IK/PFn0PgLJ0AB0dt/9cBdJCPY5u/ulfYkecDC46QSTioJzuALfX\nitXRuNv/JDk4yNw+m/KqFoa2h95WwqvcYL25FIdHx7teurqjlg7XoafWsQf4\n0+7e9tmTX9hCtRZunU7t3OMbL6QwUpe/4c8W18CwpldPVOyD4eBQBHjSf+j9\n7o4qOzVBo88Ahf87MCzikEpug8tbEeyqotAWerl0YEg1lC6E8NKezCJA14Fa\nKksHwfy8R8m51C5kGW4zni4BOukgCORH6x+FG5WeJzhvkJqJWscAn3aqvCkf\nkjfcnl5ESBvZxBTyKzdt4sc/ctxubfY1u8t8Vu9npuZwEaE9lU1lWtfrxJFQ\nrWanQrYFD5Cl6zd9e4i+gnA33uvQVmRIG4Cy8LCQc5rK0MvcASVk9HyB9Lra\nJsbx7YqETCl4edIpKcABskYEEK/awZMIQwOOz3jpN/LOONnXvNH4ThldhQZ4\nnY4Tyg6vMXWeIWCWbvAQidTUEojw8zHz+YXuAfBvflgqQ1WMYKkMPsDvsfZ8\nT4Gtp8gsJ3HmNw+UnroF2xRZAHrvgDUOS+/91B0wA7VRi3wLMTxhB+f/MfOw\nCZpY7CWjAALXIV7Kio5sDq6fW1cPzvKTLGIVZga2huHlGh88sbJHVsoGDnoJ\n2vQ7\r\n=Y2tv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"273a15f546b8d5df597771686f431c3726397778","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ec22e1da9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ec22e1da9.0_1620670960124_0.7298650476772861","host":"s3://npm-registry-packages"}},"12.0.0-nightly.7427449f0.0":{"name":"@material/auto-init","version":"12.0.0-nightly.7427449f0.0","license":"MIT","_id":"@material/auto-init@12.0.0-nightly.7427449f0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e58de246ac0a74b9a38f3dcd124637889a76abd8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-nightly.7427449f0.0.tgz","fileCount":14,"integrity":"sha512-ab3dNyR/MDV3zwJ7pb8sJkcIcB3SBdo9FnEssGH305dZ3ETpdZO08G97DltwL3itk3b2FXSPwoD0LnQSV40mXg==","signatures":[{"sig":"MEUCIQDciSp1MMMR/vZhXyEY5K2A27HzCMPUpIaYk0AnJmLg+wIgUziQkafoYzXj6NDsWmmjN6UNlLIRiBUwtiBOEg+ObtA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmX8gCRA9TVsSAnZWagAA3fwP/inDEJKT3KM7xrRKuiF7\n3uNHssM8393FUpEzUsAT1ttVU6BpFVcqogelWwhj5QRBSJSosdtW3h5vlaEJ\nUj1lzy75xYHeLG8ikCc88akyHRH9oCyB/dsMmjq9kPcDkG1YGbYsRQkPdxYY\nwmK9oaZbysDnDmPYBxWH7ebX0DShvicdMLwuh/l4wgrfIRSexV4O4NtVht89\ntocwKDzB+2R6h530FqzoPx1LpYVtTjNSaS3WOAlUQr0NtnzbKm21PKBascys\nWX4jeXN3GeN7WE3g2xzAhhrNsQU6t6RLW1Tvh3lMxI1ISE4fl9rhcim/Hxkm\npV+UTB9cHY4MoamjpmU7YEWl0i5LcgMD9zaDMS1ejGrY7nsT5RzLh4mevFrF\nb+VIlyIKa4nYVWTlA6bBLvl/Ba5UOuNA22EJ2DrTcyIkV+nW5/GdOKyBbSGt\nB69aXqwtXRFgZ5z5GGYjOAir6LyLUb8n7UYL+dcUTDeh3Lsb7XQ6UYgE2deS\nSJuu9Q1sLURbY1BavTn1nAeW1iB8FwXSOKoPyFxf/+POWPecixxiD0EbvL0V\nuQ40kMXH391ZUJ/Q4v1NxMWGIDaSN8peDkS4uvXcBO4DIJVTWJxO+X5bDHlA\ni7jmJS/WVxaigC0t79aR+Ul4FgPp8g9RbT7xaVER53jKvj8Ga4R+SJMwWrEz\nGDff\r\n=MmqA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7427449f09e9521a6deba6ba7da71038c2fc1f05","_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.17.0+x64 (darwin)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.17.0","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-nightly.7427449f0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-nightly.7427449f0.0_1620672288303_0.7349606008483425","host":"s3://npm-registry-packages"}},"12.0.0-canary.957cc3bf5.0":{"name":"@material/auto-init","version":"12.0.0-canary.957cc3bf5.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.957cc3bf5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0446447505c9b32dcfb49495366910ce76124c9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.957cc3bf5.0.tgz","fileCount":14,"integrity":"sha512-QPEXF4k107K3MWDWMX3VwaguVsrvxZYy3Y8RZCLDukQFkcZY3FZZ9fn4+sNys6CowHq+d9XRpbv7Y2Ey74fzMA==","signatures":[{"sig":"MEQCIEmpNec4KMDmEqhllCKy2WtImJ4bfaVbCVdUvRO4HwuaAiAYInLFn3f83otYP1H5G1oQqksUs3e8/L5sl91h2jUIRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmavpCRA9TVsSAnZWagAAzr0QAIzl4lrZdZ4x/3cZxVrN\nt5UUjR/vqqBUsng49Yb4oOizYCGELbsfdTzdqXC+J1knoXpZBwdmJ8J/7z0M\nsOVlOGrVI3NuUMqe4Q5DXhnklWVEUV5bAj5IzZvYmRkEBC85CmhBL6WBSiKo\n9u3X5dEohxg6T8/NIiY7gJcabZ30mBmVcAaLB+6bxfb7A5kV492wqzADf6G0\nV7jVBt89n1XqATshrahYyFCE+kQDbj0GXqptt9w1XK1ulh0p8aHgjLk0F+Nu\nZ5FBkTmfJ4NoF23u57etGItXp9+b+5EXf6MpdNYXkw1mzHgd+hpPUTbdoqgX\nAnpOXQgon5+ktZsXzed28csJVjptBqsov2HxHG+bPnbX/T7KcSuWU21ZpTn1\n5B0gnF/KYcXPR6WKsHJHiTQCa4kiJwecbTmlGXoRDX2rHCYyf1CrB4foYFgU\ntw/D7QfwQvVeP8bBzj+YnBwSe4+eH8JDefIfaPo0DpjVTFsBAQx6Nnh6FK60\nn67XHFK8xzdce7PduaY7T66v5nFhX1ismzw6wdbTISD/U+W9XGb4ZeIa2Ia9\nGyuhf4K+I3IEZkvIdPUHBBNWeWUQjfVjkdGOXH0vz+0iZjK6nsrE03b9eT3B\nTejAbDtfmr38btJTGGbGiWzcIrR5DUwzxlzCFBw5kyq37Qd+uFSqejbDAsES\nJkes\r\n=HGlt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3c29cfc65a597598e2a8e1841ef1af72450500dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.957cc3bf5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.957cc3bf5.0_1620683752806_0.372015051711428","host":"s3://npm-registry-packages"}},"12.0.0-canary.88a33cd70.0":{"name":"@material/auto-init","version":"12.0.0-canary.88a33cd70.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.88a33cd70.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dbb19ce4097f23a378fd8bbdb93421a67b75bf25","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.88a33cd70.0.tgz","fileCount":14,"integrity":"sha512-ZR6AjRVcABmHcCgWq/SRsWE1XqdB25/nMHAh2SQ3kASAdzS1HEVHiptAefuTsjCD8cVyUB0NbQNXXcAQTAIfGA==","signatures":[{"sig":"MEQCIAhlZJstvIkxVe8Eytk/J71Y3jQAL6bPofsWbv4k42cvAiBVhysurbJ33x0G69603bxq2hGxfUmwq53eDA9EP/pEug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmcrlCRA9TVsSAnZWagAAYFoP/35RmmmOSDoCJ0vkXuj7\nA14X9ZoQNHNOdCoubi0SbFHsIc9u3exic8A17fmPDZsRYkJZiMUH52NRW8Gt\npLOX+SgzxH/d3trvyHgwL9xpWUDv95db6AY4MwRQ0tlfzF18cvatxj/h84Tx\nW84ACeolM+XB7EBOTg2Zz5TW29L9Yx9T5IoyKVxAjv97p8UX1GHGZycUbdu4\nDXxhqNqbpbQBXXlOyoInY9MMG051zn8mSmC0Fsj+n8xZjYvv1AiZNDHKjP5x\nThNAg2YLL+sIe1aXirzRAI0ruSt2Skl3kSoGRRs2tn+yJGYO0KCrCtMKys8Y\nloDdGF4e42soIB1OKGR+1n4DUzkiCy+SP2kMY1ovzTyF/1/z414mbGnJy4mF\nzXMKWTg8+RPQcyF2IKVAsgkAJKvsg1olCyARQur/D9CqkJPsOgYCqdS5OAVo\njt4PD5UZIKWQtO7Ku7DX3w5drS6WBH3Xk0yNVPMa/ycC0j93RV8dkvWl+2UD\nQwI2oFAFxDQAK+PwWF4lwGw9VfWYpO9ocQWKBZP+am6WjCvdr9K9sdzBhCoC\nh1E3EuLo1E9gUrK3qrye8YlgFrUE7bkfsK4uzOOXByGVmE16440DcGwDtdwu\n0PMtguNDBX4qLmFcdHu4I6hIMq9vUltZO+8WFQCKRSFiJVbHEhmX8cVWp2F4\nFSNS\r\n=fVeh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f1d341efc173e89bd2770326eaeb1fbc581c9648","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.88a33cd70.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.88a33cd70.0_1620691684737_0.89704495855135","host":"s3://npm-registry-packages"}},"12.0.0-canary.d20dc6dba.0":{"name":"@material/auto-init","version":"12.0.0-canary.d20dc6dba.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d20dc6dba.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"42b08e69706dfc4c75bba7048f0ad4beea504e51","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d20dc6dba.0.tgz","fileCount":14,"integrity":"sha512-EYA1B9rfsXnofEdPB9SUBG2foAbiQOyC0OW00Cf+paPptq0O18W9SW3lsIfWdNywJkq2YpZSOyiv4AFRkH0xVg==","signatures":[{"sig":"MEUCIQDU9eI/HkUNgPuFld2N7sYtMtbdnV2yaMq1lMfno3K90gIgfbb42G30Lu3FIfNgP71BoYavHYuzbCMTQlHuFDHaCHg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmc6VCRA9TVsSAnZWagAA5oQQAIJ++JPxXykMSNyZeKZf\nBJcyThWPSx9DB8ETHdbHbHMgX6EiHoW/hUZbasPcISBmy7zXegFiPnXAVuLW\nOGzPTFNhdM30cR/ye+SgPGGMT3U5fs5iqbZzjp5BLVccOOzmQoEmtbvGtGSA\nXObeoG07ItNBam2flOn744jPUENaN2dXGh4Boh9vyjRwfJB1DEHSJkZ3zNGU\nj+8F61ik89zdq1Azs2NsRxNc9/WQPVD1vkS96wJJ+H64tqMLLxtD86QvSznh\nYLQ/kqrZU+WVaB9eVXkM+sk8+gLruduyTu0prxWZM/kVUREdyRyWcElCGTNy\nuvdRTIzs3Ln4mHfk7RIswiu5U1fDD8tqoFYfCw2rlmNLlk1nnVnBnhmq1KKN\ngCUYocuFL/3iNrZjdLbfIsljJmPo81qjHYCLanRnPXZjctniehyxsnKjBET8\nLPm9GLLdc7Wu6V5XHSeeZm/vguR0GCUJXRlI3ZFWBHrtVwLGgsI4/vuY1M2V\nchcYm4SPWl02ys23RGcTEIAvmbD3yyuYHUUN0PwSgrrezwlIX1Rhju6KvBIA\nTmQMkv9hmen3bv+3+CscYxjVlL/XlCTqqIqpk5Ssr1DRrKvin5y53vGhI8hh\nfNZTxhKXa0Gz/pSAs2kovXIOY7ZRD2BmIYq6mYBWy0M2qKz/tgadm+sBoFls\nRKeG\r\n=AtYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f2980d3f7fbbd8d2e3b824a765f7fb03096bf11a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d20dc6dba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d20dc6dba.0_1620692629387_0.14453538370393426","host":"s3://npm-registry-packages"}},"12.0.0-canary.0ce2fdb02.0":{"name":"@material/auto-init","version":"12.0.0-canary.0ce2fdb02.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.0ce2fdb02.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7b5f3ce39b609bfc22a5ee9b7ffbb77ca2405cfa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.0ce2fdb02.0.tgz","fileCount":14,"integrity":"sha512-OlieS6lzwxgNAKytkxwjcEuxAMJwALms98TrDUh0Dvyzqpgbig6gxxXvSRfhDOupMWa3n6kvjqiLEBFfyme0BA==","signatures":[{"sig":"MEQCICio8dMSUzC37BMf0lPsQ+ZU8yqex/9bp9DJHslOVzybAiAaeMQYi9WtI1Uv76ifuapDffN8ZthjXeclPagnKbdkag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmdaICRA9TVsSAnZWagAAZxYP/2SD4SsY9Dl0+yLiNXdN\n+LB93svVLWnmu9mXeCIR7KJcR+Wm09U+eVEREKzLq2rse0ohJfa8C3l2tiNm\nlxEbrN96/UTm56UtAM+KiGeLf5QloLpAFYXRJFWoBw3dOzl2JZdQgnqBfbwF\nM/jmItBCrsccelzlLcdYINW4ZADU5ym/DNa3o0AGer/of4L/3iZnPlb8+Yb6\nzb4yX+m2cFk2mBjtYgpN97QAxp9qLid5lFX4KWsZW+PkzuN3nz7jcsxpD2A6\njAZK5f6POvgDTQQLVJNxG+r5wp0Db1nOg7ZGmgfskN5297SDIrzURLrdwFCC\nOdugr3UL6ljjqvVVBxjYBF6JdfwWL0Kkkfwu1WlHmhDwuFvNjDokJ0ozcSos\nu4UGRSSfZ4uln8WndxCGni43K5MC/snH6k8Ki/oKZqHyBpkChl1XIRiSW8oM\nMiInFnnM7NrsteVWKDDtON0CnnAcx4QUpE+l4tM9c6uYztqTiBsEtsPCzCQi\nNbig0Ayt9pf1LmHFvGeoKXhG6MUsnOVBFV5SEtA1MYAoF3Y5iKB9NfeH/eu4\nsWucfVqEGerEEPS8GfX553cc3x2Uc/OGktjZE5Mb37OUh/tZ62SFbCkmdJUk\nfi728qobyN2RhbThhP8YHD9/N8/XldYCLyHKlqFJ5jaLQWjCI8zTheabEdXG\nnQmK\r\n=peRF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ee2139d87a1d755a50dc6bf0a6dd53a2f39548f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.0ce2fdb02.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.0ce2fdb02.0_1620694664100_0.5682562287923283","host":"s3://npm-registry-packages"}},"12.0.0-canary.cb162da37.0":{"name":"@material/auto-init","version":"12.0.0-canary.cb162da37.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.cb162da37.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68d8dd517de2429751166ee4a127b2623a48f985","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.cb162da37.0.tgz","fileCount":14,"integrity":"sha512-pfhl/j2Zntt/fIvyL9PPrEF+oFM+UnkLI1A57eXTWHZEsjNmyfdaavLjnxaqMn2Xyd4vH9sypZZcnMdW38JkDw==","signatures":[{"sig":"MEUCICZClS09Ff4/6XveiyKiVsMnDfUyb7KkBx+bw84mkFcGAiEApsfPhRw5iXEvXuWl+OY+IkzSNIry74JMIXmSqdILQ7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmeSFCRA9TVsSAnZWagAALNEP/0Oul2JdEYSC0jbYTVl3\nOSwA8f5xXsNDYARLBbE/hVm5USbctm7ck3QQ0e5Jk7FoMwttLNyRgWQK5JGG\nyjh9e3K8/kX8GlWKgrgd9+Ex5XWiIJ75nPxiZPUGmageE1lr5c03putsW3DC\nYIPuzf7qVbBzYlgTDjCYEdVf7y0IKNUHeC/FSd4OSxa9SnzuShNROxRNhxtX\nxppAl9EuXiMi4d1Z2aR//Fol5TItQqgxQM767OrhtIm2gl6eQ1GGAxhZ3diW\ngRh5AwqytpAfuwXXPDxwHXEF/BPiUlQFVxmx1V0NOVG9fjQGlZ/ndgzIyCVS\nmB0pD1c1Z1gYxUK+5+HV8kNqvm55lDZy13s3D5ufHPoBP+yjZzUvdLL8R78C\nZ1fA9faHrrVQV4KClIKGB5qSwxj6VvG10Phx13iZ8suKFNLFZuhz0wB+nwhG\nVjStZssbSM0XGtVBgguHp+tAqKZxHFCsDor8sNPsKKxHEJesdsVwXMjEslin\nric7LdCEyx33m5SMYVj2+dB48v3l+OUrfaYJLe/+eSzQLCWHuTFMFiH4Uij+\n9DiBsMyaFq8V3+YTG70o2SmsZ4QpF6mhjYBZRRbl9o4NFWQQK16bnaRFPazI\n7sYOvyX715kOnADp6a6T0a88Mdx4ZQC04fqWH/7oNGSSu40wTOgL+6Do/QTv\nre6P\r\n=Gg2t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9858adcc9ed7b1111dde19951ba96847bad0beac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.cb162da37.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.cb162da37.0_1620698245257_0.14455191858359262","host":"s3://npm-registry-packages"}},"12.0.0-canary.573dc7ffd.0":{"name":"@material/auto-init","version":"12.0.0-canary.573dc7ffd.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.573dc7ffd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c2b7000bdb10ee57e869ed2317eba6879b6e2daf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.573dc7ffd.0.tgz","fileCount":14,"integrity":"sha512-dyHlm2WotxV7hxaGRFhXUokzSwxz7iwSCWyPrhHvsH7NHZTEz4gwceLCsoVfPkmOXJR4MLifZOjvZCJ7t668jg==","signatures":[{"sig":"MEYCIQD1FILi37vdRXjvigdXDq7lZRZb9U05MpwFeszxlKN2igIhAL1dkaTlnYRCI8M8Echdyymbgf0f6k91l5KafSE7gENh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmej7CRA9TVsSAnZWagAAJMEP/jd/Zx68NMhcYuP/wfwo\nPmkZd7otA5I766ilgIjZl9nrF10YXjNnAHw+FdRp8YHyBRHkIacRErmpgnxn\n1VOLhzDemSUtQpeB78LxVI9D/pfP4MxRCxZBONOyxULA5XJqc/dFCPxiA7ly\nud688eLCHHfQ5fXp2zwvxEfjur0PdSqiA9ym1pS/WJ4BY+mcgyvvD8wif8wF\ni/NpE7vL1tMOULbk7qfjbqPn/HaNF09LnucgCuQjUGNWUPlx4lkYpBPAlA3o\ne7cRh9dpePCnYHNrgm/QxLN5e8v6eTw+ghvqCcNf6SRlQkH6VjgUf9ypoFZ1\ngiht24vHHrGa7eJl7snyeE6bh976I+RZygClg57XcSAeHuZVs2WP5aDMADYZ\nJazuo71aMs2fjZx4eWDVZJ532mdQav/K84iVWRHhReFa1qElhtnqaeLjgFbN\n8fijAC16XSHsZzQrYnQyxefWQ2j9MaS83A6T1TJ7Q20Q/ObbtEKiXeRZmKhF\n13XU58fhBGlL2KqAqDlvPf2tqUi3vc0FzLvvi9DCXsE1Gq3wIi/zfQPhogzK\nG4Umy/SFNdsVQVXbY9DUjzzr18pBGngQeOK9I4+bpbQbZIFVHIKz5bQP9NrW\nQdeS7cPzhQv/Difvoq7xfNkhdP8KIs5lgV8B8QnF+lJhNfoS4gvoTOuuL5HW\nkzKJ\r\n=obug\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"67aa299a5066425730ea2e8558f89c111a5ab156","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.573dc7ffd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.573dc7ffd.0_1620699386855_0.37923343746975546","host":"s3://npm-registry-packages"}},"12.0.0-canary.d5f6ad3fe.0":{"name":"@material/auto-init","version":"12.0.0-canary.d5f6ad3fe.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d5f6ad3fe.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"68282c461a6967e259766760345f4bbf0ae9009a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d5f6ad3fe.0.tgz","fileCount":14,"integrity":"sha512-ullGWZGZyWCVqcg1Ab3ITf63Owz/4rRjAEq1lidxoAJDus3pT4pcJVCOBwOaHe3ENrnNdlcYqpsfU1ElpYfakQ==","signatures":[{"sig":"MEUCICTV3bJGevS71EKT6F+4lSlb51HoDoXt8h4FwZZaiVKvAiEA+0pyeVWIne6cLqr7dltomPBcVauRao4CHHCyBjkexNs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmxGHCRA9TVsSAnZWagAAyJEP/jJisCfZM1ZAWNjInN82\nOnGH7M/YuMn8hOY10o+Ykhd4NcbI+s3och0f8tQKJGdy4xi3sVAsJru9LJdS\nOq8dqBnPxD9MG/MxVGzm1AOalkaoJlRnzaFyF6VGc+OpKDAf7zvtka/d+Ns7\nRb2aHLoN+mTLpwO9+4QajzSSMjU1K6pUNqWjZh4BQSJWoGBqlRX4/SSSb4HW\nX93lfs203cgbyNsxXlszz6E90gi1w+Xoh2qZGF2BAs1EJzM8ZTxBSpEKFKNA\n8gQlF+J0+MZW/FB9XxKMxF6+K5QuRxHXNjZWNUQuS1ef1J3w5vxxJ5xFV5N9\n2AMdF9j0kmocckjmEJhx5QdcCquGsaV173WS1OeCp7xANFcS4iFFlIAxpJRR\nNJBlwABrTNpo/UuqOH1Y3G0AwUZ0MS45zZNlPV/rPDwHIV/R9jn4BDw/T8Xt\n7akAmFWpDDMXGmtzaX4XlLPSW0h4ufeOBvIoKPYBVyxLj0nrDouvESDlsfvb\nqoZc3QwfH/vHld3pTdQbYNBWiau3Cem1BJiuqKrr4typT32zdN+liEJ5fCGO\n7W1EcvwUmiI8ykoahL28t4TL7ROJU2nsp/Ci1NCqvK+CsOilIz4Odrkg8DKw\nxuj62CSjRv3zdCGhiQS29G7CLlybkExpIC2mxvsOcJsBZYtGaSuIq2Y58LNA\nE9Dr\r\n=3my7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c0bf85201107dc8a95576c2392f5b1771bb2c969","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d5f6ad3fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d5f6ad3fe.0_1620775303349_0.15763302126542889","host":"s3://npm-registry-packages"}},"12.0.0-canary.25751d2ed.0":{"name":"@material/auto-init","version":"12.0.0-canary.25751d2ed.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.25751d2ed.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2df00d14eae80c8d143c0e0b214b2310c2c722b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.25751d2ed.0.tgz","fileCount":14,"integrity":"sha512-l0IHAwbK5ofNn87x1BxDU79bSJmj/S2YE5wIvFej9YDn50vzxwcRr7WG1Dp0sRf39ze36ir7yh2lQuoYWtB2WA==","signatures":[{"sig":"MEQCICYmZmKPXVf67/O1z3xsVQORqu+o0orli1wKebxcPWr9AiBr54XHANG3dQ/TkpZrZqfwuVzeAYhtgeAz7NzTHLRnsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm//qCRA9TVsSAnZWagAAToAQAI6Dumf+BryzR/gt9Nuf\n/XqiMh0W15h+I/vqgO9CeMnmdRNKRV70EjsYpxEqQ2Xp6zm1om6hV/fgyH82\n5mBXAX17/OTmGVQDr1457snHA/w9xxSHmhpJCm5+nzILyZb0jH+8yVGS7wWJ\n7mIZwiWtuy0Yq9bSFse+nvT2kk42C6MTB42RuZd33JiRCIDU8Lz15wzjYz4i\nekd3DTVh4lkxRIXSjThS+ClxLc2vIJ36aWQiY1d6S85VzEH4pvGaVTlYWF9p\nNA4/2OhDEuXQ7tngJkSTSfnrFMKNYYwh4Aybk0kP8haoAQr7sEE2IB6OGCGB\nGpNpxk0/pe3G1bXppWTC+DqOIZjBAEGDNlPQP0308TJ5J3qo0ySiLD+wlchK\nAgHfopsXZqxvhDJUGVfrJf/NvccZaZRLSAYsBMrYvI7jlDuBd3TPXWkDCxiO\nJDGix72sBjwB+IXfG9kynGhBIcjIcOV0aojVL7EMUH2RgWqEBCOgBc5uCjTr\nihgyFiIkkEy4vrbYUz5D0yduVvTD89HAC6SDApVNmXFANRHPbyOT6bBDZgwl\nkUglVpkvLfxWebpJi0syb/bNQuJ1TcLqXE2zX9gih2WOHVFzukRBHckhR6w9\nhbd7og/+YgP5eGxJ17gyZ/IEsZHvlaGLlVjOpgUAL7vt5eY2PfDeGc4myQwz\nhhro\r\n=echI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c38dadd226475a1dd91a992667019eefec273bbb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.25751d2ed.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.25751d2ed.0_1620836329542_0.7152162048402595","host":"s3://npm-registry-packages"}},"12.0.0-canary.a23ecb682.0":{"name":"@material/auto-init","version":"12.0.0-canary.a23ecb682.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a23ecb682.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e2610510c9dfc9380c4bf9ffcb9945e613aa44e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a23ecb682.0.tgz","fileCount":14,"integrity":"sha512-m+rpWG7whm/vlL5p9c9JCKKJXtg8co8+qAm6iurKexp9MUol9qrHgWI3x7K+u62IX3svTIuMgOkyvt7yVI/3FA==","signatures":[{"sig":"MEUCIQCofvaE52TVu/VZnbESR/u0HhkC3DMdLfF3OcSkV9syEAIgALBPntZKV8YOPnLDfaJ8Y1ZanZCcggViXG0aPxOLhoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnBzbCRA9TVsSAnZWagAAHPsP+wU4OvZgpbyZUWr2sagE\nzBlESV6MIbk7XEpUsojpsYxMTG9Io3OtilURjvFovE/clJgqQno+apCMv8kb\nkF9DgprNe+ujUPcUDV1oSWqk5exiR3AKGJz80+dvSvA3v9I8/RyCVs+ixutJ\noysGHbsXDn+5myas9HhcGkcTNq+5UHEn2BP46nOUPE05olpd9HtpQ5Bh4e/K\n5WcNlibr03l92IoCxE7VWCgLyzY5KG6bnD7R2eI6xxitaZU/DPbI5oqyr32y\nGdDho3Q9n2HgFdix9ZToiecztDAsKSoGvjI5H6QHxfu9UTynq8y3O07vER65\nEc6A0B9pHhGMN3VafS89NomqZGz117pftgdCJ4bAkJn518Exi+HL4Q83xA/Y\nNhSTN3LlQ1SmV/NH2m9f4GwG+d2BnUNnZ+AFrt54/enCL1SMjhItapP9N1/Z\n7nRmSVf8lYC52AWvwzHuOfN+D6iorclV1O5X5IKYtDt+GCpVHythdTUjCTP9\n8Ry2YHwj+KxfNDK1TiHNEKUzb9MJn0eU80eTl5+appcwisY5pOx0gZqsQYKs\nahQReXE5F5Hk3Ef1gsXu5quJD2cExTw/of8E0dBjrqrQOTt626M2DUtsu6Gh\nrdclLwWHenUCMFBWF/u/bF3yAL/Lo3LMQeUuhyBq6GKHQuZmx0ynwqYA4lyK\nt2Ht\r\n=o5zA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"da78c3f024a21d0e0df18a30c887082b202d7269","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a23ecb682.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a23ecb682.0_1620843738587_0.5144372051340913","host":"s3://npm-registry-packages"}},"12.0.0-canary.33a954852.0":{"name":"@material/auto-init","version":"12.0.0-canary.33a954852.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.33a954852.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f6a9f22e178bab52af121dbc0916f18ada1d283b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.33a954852.0.tgz","fileCount":14,"integrity":"sha512-KG928pH9Jt8y7PGhnPE08tT9WC3aCPz4Qoa8TVLGfX/wh+jg2tRuKlsXDy9Rju+J45HWuliqLy9JlRRujk/xUg==","signatures":[{"sig":"MEYCIQCpXsHF5bvdOVBPOo9XJbFUsRTErCHwiQoWjQ00Fh9y5gIhALUEhycGvvTEvIDFQFLwtagbidn+yGmE0HWQOcXwcVHI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnUCDCRA9TVsSAnZWagAAhfMP/2ImodUDwd8REwd8Mo4I\nkvcvWm8t4V871JUpogzHT9PoIAsZWV4KF9FDJBHL2UvHZ1eqwdKsuwykIBG0\nYexkI1atnt8PyRfvTdgKE/3BbuCBrQNp0NJs56S5MZ5vw6v7zwH2IWaSLb+R\nDiOiPtd20sQotdb3KYXejwgMQcNWNTZJ0j31eF/mLpFowUCAP1Pbh8pKjCKX\nhbYHoWPYVp3aJKPkafofjkqUuBmZPOCvZ0FG5NLllzdxNnunN+eCYgCj66q4\nBFkIjrQ0LRN4MNfo36eoLHJJiqWhU0xezpNgF1q2VTt+iUpvffjuQJatOpSh\nagnQM9JM3bpOf8ppkVEYfCBuK5WohXYLtDKH5FDuGJa4D6p98/0lVe4BZcul\nJz4shFV8Ms1l7j113dWSbeXkTcsE/Yxk/3Y+jWHdDjvXpyi8tex5kN6sRWYP\n6/Z37GfV5b4cf2w0+yViBFgUTxcaXdKpC7zmUUIMOpc0i15kC5nxVRQPbS/y\nPWey/FrV9feU9bsqqBqMkrYNJphUS9txVpFXseNBkglenm80zrgXSl8kYb8i\n30cOzTEiEdC+Et7QTLu4k0937Scr7lFAvaUDXwq2NMROWRzJVCusoGg4zfNv\ngWQu7FzCawLO7GT2Xdxbz0j8hBvmI797v4Yim28vuBE++xdJOOztKe2U7vo5\nD6iY\r\n=zVlI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"703dd5ba6a1225efec74655d3393690dca1922eb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.33a954852.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.33a954852.0_1620918402875_0.3954058794116053","host":"s3://npm-registry-packages"}},"12.0.0-canary.a4484849b.0":{"name":"@material/auto-init","version":"12.0.0-canary.a4484849b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a4484849b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e289639893da501ee0bb0e2ed71c517f0ee8287e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a4484849b.0.tgz","fileCount":14,"integrity":"sha512-QsyRAWryMv35cJhwjhpSv+pnVikMItPOBTNYmQJuumeQKLOFASfGCq4A8B+GS46tk38Xm8ygF7wZLpof8+vS9A==","signatures":[{"sig":"MEQCIHFAiADdOk8+pXuJVnJuHJN9Thkbvoi9V0wZyPvxbT3uAiBBXPlFQEBKFMV17ED6Z+K7Rj+fjjE7qITGgKsv02sDRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnUX7CRA9TVsSAnZWagAA194QAJbW11w15ZzeO5CGCVNd\ngD7uKKdlVK0Vq7vLyoNl/H9L3aPTGZv2GgrrEFKN/DEmOvjvbsJPpwJJbiZq\npdKMeHm2B+PCbAGYzD25ob43KMPrKtGL8Nz9Eb6/u7sTu8OSCr2U5uLtWxyE\nxIbLw5OiXE/FitaYIcsuPTE/spJOJFwdYHBYIOjwUeWZjGIIyVkcRv/EEnuH\nOacYNSMl9F+4tKcs4J34UPVmiY1FsgFm7PSBsLwYSeyGOu4WI2bZ8LWpuMIc\n+hj7aUIxUE7T/V2lrewrWkDKognLdPJhJo/49Wt4IuwL5K/Rf6+Ee771Nf7h\nKB17njk89fXYOmltOD7d0gEokJfRJiODCQWTCVMPsKusxAAm4zjrZVAZv1tv\n4g9qNWZOPPaW7TuJU5ezvb+GiIV9PvTlPlCnppQ1sPjC1dslGNLVQPreOxdg\nfAjjtvklMbr/AmQzX05UJCMcIDgYghQ1Wq+0Ob3Gjr+JbLmXTo4H9NPvFFYR\ngMXPHwMsIQqTSzRuzUDRQw1QfuJcWKbV4je6OjJmOU77CNWIGpH7P06f+IEB\nHJYaq+YBpU3GL7yBhFMLv5vDJGiMyh0Z/OHoughjF0aWdTzen53kjGqcbz9C\nnnLy8ZsCft3Uh0DCPjO9PMgLSI671K1iaYXk/g59O+xq2yfe8bp7SNzuYCiT\nRvSd\r\n=CowR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7908229b1205198ad87858e49ed29ee3836cebfc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a4484849b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a4484849b.0_1620919803007_0.7525331628872725","host":"s3://npm-registry-packages"}},"12.0.0-canary.b4c3f513e.0":{"name":"@material/auto-init","version":"12.0.0-canary.b4c3f513e.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b4c3f513e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5279675e9ec479c10e3ec862f1f2c91ea81e95a2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b4c3f513e.0.tgz","fileCount":14,"integrity":"sha512-7I51Bmt062J26qV8Su24yAwf9UvGSrbfuzb4rIKc//AeB+iQeDqvenqrisLfZlJfStzqnBSK3SVhB6SH6gDZxA==","signatures":[{"sig":"MEQCIFn7WDarkerut4kyjpJIf5rRZ+3QQJgNeeWRWkdO5XyQAiBJ4kX35lKal3rwCcsMCv95aE1R5LLVSICxiRTH/padrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnU6iCRA9TVsSAnZWagAACAoP/2+o6QEkP0tPhz+PVGF+\nN95qSsbqSOWi259ZMPfNMmz/lsI1+iStn7XrJ/zLrt+n3SN9VLyF/bZB7egN\nYvrKK1fO9QKkWnBCvon5f32f2yIoFxxQi2wOg/BM2wFseZ/eRHi7yS0iNGj/\nL0j2hsv0yqZ44Is92CcWivAyhcUq+iC/3elDeuNu89jKkxaeY5Tni8o/ZJE3\nGHYnSH7Et+MQieSF3do7EHDd0nvGWJFkf5eM7uej+h6MTFxMo54t6F4kwYqF\nemn3fDSyHzhEW7qEFC2PUo8tt9duRApkww2SIXpUtGymxBZ24c8fqHgSiek8\niT8Yij0CiTEl6N6sQ0u5EwLcg0zGXkvho3/3vsMXhA+WExRuRDcN9xi7oEX1\n6EiTF9fymezXuEGo62rj3w7sb7NgG0V9FuYUUFNv8xedwF3SR0zzToGlT8LZ\nyct9Gqv1aKQLMtEYiD1bFhuYVxkU4YqRpzyCluCeWHc1/AITaTO9EkUbPURn\n0JuV47R2y0e4+R1OYxqZFb+YOTjDpP4W7lDB3bBdUz7PflVoAqRbP6ikgMkZ\nCMIcTk4Sm55NTmHsziMdYTTSYzrvnp7IjRrtdKYkTyZdgZH186UTVC8dcMIC\nH07r+DFtLiKpVeTqfIe1C96j0KsMmcKG4gHmXQCFPs+1KmvH27pmLX/Tf9Wq\nVYCW\r\n=oKb0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c2183e7caf6f0437e64e41b632f75d33156547ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b4c3f513e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b4c3f513e.0_1620922017727_0.9113132911570854","host":"s3://npm-registry-packages"}},"12.0.0-canary.1a8d06483.0":{"name":"@material/auto-init","version":"12.0.0-canary.1a8d06483.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.1a8d06483.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d72f1dbf0d133cc3d7fef2ef3a877dc51f3d423a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.1a8d06483.0.tgz","fileCount":14,"integrity":"sha512-Ymi8HJ++8O8Sjf+7+0qe0SJYpQ3Csgkns/7GyJP1ZjjqnBrtwrWUxj72J5ToMZkNBoiERUm9ztp7UwoWCz2oeg==","signatures":[{"sig":"MEQCIBpTCWkRpr1nUdY3HEBN3ffU/BYJrEkGt7fII0bH/rfEAiBRo0u3iR6Fi4qkCCzuioi3KM8oZ/2jGTJGeHGH/xJukw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnVADCRA9TVsSAnZWagAA0AEP/1IKzvPCLBehjAxjgjTe\nTujmRx4IJU3+SSrYCfSQxykqdxZLyG1qpAWtbs9M5VJksWU2ObBnH3lIMCkD\ncU1opilnNF2aYGD7GpnqmENu5ByZhoi3NGilGu/cLjdD1nR3+/P3OuoTBxNV\nG4qTW21/Yz4fO5akiqtwI2Fv+ojMyRu6Esnqh0rVfnfBwiZvLhEt1q0A0di0\njHFDSDmnLkXrswQ+tGxPSEfsz7YTMiFh8zwh9WLYdKu50/hJmkJ2zOGkat/3\nH9+26a00uWAO18xslAkqMiLrZIR2/svOj6VYRNn6QhhqnYfVckEQczBeAfaR\nw5237xT6hrgQqx7/g2WkYrAHjS6GS76bI+UZxVhVhXLF1axbNBKb9MsmkvZE\nO4boqTWP/vu+GXNGtbAQAryiZ612WqxvpIZjZx0lqGLpTi5qy9gHhmBr05y2\nqaNWuakYiHptRHw/x9L6ESjfqm1JcBufT0phJ+ieDQp4tbEXOtwxNEnLRW6X\nWvcPtUyr6Ganda4Ja3l0ywIYJrw2LLkBdYrl9R/syaykijv9BrsdpPowBqdR\nMiNwMpOJ4YbnqYOXbmvGRzNL2yfGLBoDJajyU7Yfh3Y1OK+3bvVBJSoz/MUw\nj4Xl+mzqasN6Np7SMEYFpnugaxt9fiaTfHD0hAUABdIUwJejM0OeIfMGXxe8\nJrdd\r\n=plEq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4fd7ff5259e7910dd76488a7faab45af839a13b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.1a8d06483.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.1a8d06483.0_1620922370649_0.01949363068860177","host":"s3://npm-registry-packages"}},"12.0.0-canary.8e6081836.0":{"name":"@material/auto-init","version":"12.0.0-canary.8e6081836.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8e6081836.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9479b46b7005ab7674e8cd7cb6db9a6d9575d9bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8e6081836.0.tgz","fileCount":14,"integrity":"sha512-4IG0fwPxaVSQlgCkhZZf/3EMAEIdMYXGcWTQOpDlj87xZfQAaS59UnYMgQhWHkXXW7RYS3CY5vXl6D7Uy2BtzQ==","signatures":[{"sig":"MEQCIC+Atmbg66jEaqlZ8lvHNG/HOpmOBUaBmEplrVOQVuWUAiBPzqChbh8xJkHF5L01ksah5re0Bte/hsiDkRlwW7HL2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnu4lCRA9TVsSAnZWagAAUNoP/2x/8G4Dr64oBRV4yeO8\noMQPOO7B7WqLl5IHVwYbjjqI/XDWTuOQR+WNvKT1HQ/8y+BXvnL5rPnJj42G\ngPRpRNFX9xyTJCVPjQ6yYAcVjy+QUFW2SVKNfsrV0oNyw0XQJZhwjOpwFru4\nxXkLKXMKBCSdhPjbPyzAoWA0yUPy5CJ6j84C254S8D92VdvDGncjuYF9IR65\nzNuYT16bHY2sAR/Q/7KT0+5o7aT5QbMhdOUlkWFVJ7rmYJarZNXjazbsv+ll\nKlUNXxOo5DMQHSXFa8aMdFJQ/OiVfsF9y3212NH7upLY4CeAnivBMQ1xlGlj\n+TZEZQXg2N+lo38RYd+HI31AYPnlMEIXcrrSbWnkZIeGf4cvfz5/13+utrz3\nxzQ3vjNgu+NCA2Pqjq7YMBpqAcGvFJwjr2kZrtPZNMmYBgZCeFYeRaC32She\nmEFRWdxnPl8k9sS2uJmv+4LvvyZBvYBR0KS2qVulR68h0YtVJn/99m2yJR7Q\nYlduIciDAnI2xZC/199kep0loj88BhSjkykQ8wFcCFN4zUtOZN2lHr71A/33\nptb4aMCVDE3cWuh5QBPGaisq6VUcST6aVlnFeu07U/NxhKXPnMASjteDW1o3\nluUUhWvr7x05c+Lqk+LARFfQxpoYkL4YCm84YFfJ2q8tlH/WyMaZDoWBvuMQ\nmeWJ\r\n=qwDe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e648805eb34c990054d503fd3f70ed25e40d6d9d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8e6081836.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8e6081836.0_1621028389230_0.4130684256831334","host":"s3://npm-registry-packages"}},"12.0.0-canary.a2b0f4cee.0":{"name":"@material/auto-init","version":"12.0.0-canary.a2b0f4cee.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a2b0f4cee.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0746ac0065198183bb94729f93cd5e4daa7c79df","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a2b0f4cee.0.tgz","fileCount":14,"integrity":"sha512-lGE379M5t00djiKvZyPNFC0FzfLLgl1qJZwdXg0V0H21/FqBeKP6zNY6OolDt9ILfhlNCPWNYe73kKTXyUFXZw==","signatures":[{"sig":"MEQCIB1Hpvbxtp2UVld+yHEcsJ3BT1In1zzY6o+VDb5FCE4vAiB5rndbHj6PjY5U+W0tXiiDdUAfauVoXx6Nf3fa1Jac5Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnvE8CRA9TVsSAnZWagAAon0QAKOzbyALVUr/SXF9SI23\n8rDCVTfgrWvi8UprtOZAt7rXvZLB0H8mSXViAsKhz4ZDSOqbowDzkfWi40Ck\n28ICJyulOBaULKWBg7dqdaj0MAOon9Q6hEVhuw8j5zMLchrIXp7zTXLwAmA/\nxFMELjrppvbRsK9oo80EIy93bH7xMC/Kcs0Xx+bxoY0TKWMNdhrsDPgyUegd\nYESZPpoin8zdo2bg8QS8sfx4RrLie5waVXTGx+Ioe0AVJ/c/+DTFsnUE+9L8\nmdowrAfIhovMT/MOo+7hnTVtUAVfsETk/KuHibQRARXb1UdyT1qcFxNA3DlE\nrQLDJr16TYHHz8ZujMdaa0KmKuNHxTMh6Bh1nov1swPw04C0XfdBrJVXin1x\n5J3MU21KPhlbO/g9KCl/71DJaXiSmr9E4CquGL5/5XbBRRogiXgSS3N1LS6j\njeagr9KjZ2eA0elFNlooS5HRh8FKGmlU/8o39Y+WmM6DcFiyyzltesAPq4AE\neKF9rTguC2So0AHVd6iRcsPobQkLEeN9EuivFBAomdaOUlNj110crXsTuMh0\nbqrvEwpfBI+c5myKjFJRpaBJJGA575Zdc2drkB+uWrB4CNjQdZ6cYUO9QCSv\nc8aBNRoC5Q0BaO8UZr5mPO/fV4gClCESKBaTQSQBciW8giO5UkdYzusFXs3g\ntRWj\r\n=rrfE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"67c2d3cef073a380a13ddb6bbbfc90886c7af364","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a2b0f4cee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a2b0f4cee.0_1621029180487_0.5176879774873","host":"s3://npm-registry-packages"}},"12.0.0-canary.e8e39ad19.0":{"name":"@material/auto-init","version":"12.0.0-canary.e8e39ad19.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e8e39ad19.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1bf62cd26887266a83e6bdcf7ede03942eaa4741","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e8e39ad19.0.tgz","fileCount":14,"integrity":"sha512-n3ZqCSWKYXsqN4N8JSLezVrMf07ncIubRoScKLPniAF6sAN+1lSfBK5zvW3O2TbcCm/n/WVc6abZjhXfu+XT1g==","signatures":[{"sig":"MEYCIQD/OEuaKTHjdtMly+izsepgONkeY1JxI+Q/mK+cRBBMDQIhAME3GbtL5jlF4hrT9ThRvWGg6b12F06cY4Rb9XluHRps","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpB+jCRA9TVsSAnZWagAAT8IP/0uRoWkBk3x6iX6naJ/M\nHGwGO1C1ahfzLSfKe3nR569AAhUkB32QUd2iDIeHPJBSSeoBYbRFWke5LSAP\n2EYIfi8N8QvFRWNI93xBdGgX9AAk1u6wDmHSFexnpOccjtamUCWzTbvFhWpz\ngZlsgLXDWjHaE3iruJ/npcc0BiBWzyt7n5Ol2S6zVFcXSE0igvQgEoWqhzrY\nQPy7ylhpXRUsVyfh3GXXOXU53iTDWCf1IH+zT5XyoKBO/bljd/uubBRaCng7\nNILiz+C8+wyhBCVzcUYCwehAQUg9C0R9o71sioVJL3wK3S13LtJK8WXBIXBu\nkfc6EWKV9q0IOMv8LNZYw00jGa4jQ/Yi2MDuyU2ExHeosRsYlD92dYlnKjzW\n5lj8z733z9L2n+ohthtSYE/pfMjm0eVgCciaGDprAkqUbDkHgRS1ICn2ouo9\nBB0fflWm/77F/9HqVsAgMr5KnH2sSm5TfS6N7viquvHhsGMFOawWeH9j3dNi\nU7J3Wv7ODuUYdZjSiHbNZJ/Qvd1XJNN3QmdFB8hdg1U/q4pIuZL/qUie+dpM\n62BruWyzW2aYox952DD5rWRnGFVMHJLmyKc2ox8yjIxmrEw+FzAcdkFzKal0\nS/y4pexH04gcImYW1r9ZHy4tUTpEFcMNnHB4YjfQzac5Cim8ZFgL9jBBfs5N\njTX/\r\n=Gvqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2bde63cf3be6363eb1508c4d7e1747acfc51a761","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e8e39ad19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e8e39ad19.0_1621368738687_0.6991268608123016","host":"s3://npm-registry-packages"}},"12.0.0-canary.4bb5eea2b.0":{"name":"@material/auto-init","version":"12.0.0-canary.4bb5eea2b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4bb5eea2b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0bc5b14f3570464d0021395f6ad8b12ec9aadba5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4bb5eea2b.0.tgz","fileCount":14,"integrity":"sha512-UexZaaaXviaJkoipEfBsTMQv5MlOAmnQdWqjoAccIz3V4jGltHwJdjiXui+eVg1hjNdK6bLMtwz+1k+KsLbgAA==","signatures":[{"sig":"MEUCIQC2rpNhNG0lgq/vmPlxHhY5W7IxijdADdlRcVgYlLC2iAIgV9N7WL601Y8ZOvE0nSHpDgoEG2qXASByQmurYDLTkWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpS5gCRA9TVsSAnZWagAAWcQP/3BnKN+vu5wvMiJwGM+K\nHGYcudC/FIeM7rSkdioqr8rKAR4cF5P3F4AMaqIuPqACFGANSIInPag3mmuM\nulYzesNELxJJftzV0XtYOiA7ZlDr4iFpTL18AbZ6rrFAclY7/PIwq3gx9YUm\ni7ZA9A23u2QuaRtwzzfyP5/vxkwwPdCmEQNhgNA0avWCznQxrJq4DNLF8dQM\nXkzwlchPiZefmq9D3adAOVa303ULj0wLz6ObN3V42JM3Et+0UKKWmtavCjec\n3znZvVmRzL6zYEAOUDD1DxJmRb7JHXUNYY6rWl2U5+MCD314gO0zM97H5c01\n8fhwHIZiV26oMIbGhzUP8sRhZkfbCl4EG48z/EJcKVK9rFF1Tf+Lq9PxhNMN\njoKrsl77glv8L2ul6zYQfPL8mki4Sq5w/efosLPeEeEuWtevOJQtsDb1wa33\nODGfJixDnZHT/J6VqUGYgX8kNI1NbNPmnAy6u5A3IxZAI+N1io+baRjgxMYb\nkFjZcOleX8mWbiO0rp91wHscX1o8H3FgWxVw0Yo8nzLcFlaURvGi41lCJdOj\nUAoDM9R5GxYGz+Xjy6od2XX3kYVY2uDjl0cpkH4/DCmUhPjp2ZGnpvFdgEVi\nKxfyLsRlMKOk0M0nyefvtui4DBnZlgCvAE7RjuzEC0N9JUZmhTocWghktSoT\n48HJ\r\n=dj/t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9abe3ad555ba3e9ca70f37ff3419acc2edb56676","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4bb5eea2b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4bb5eea2b.0_1621438047847_0.9278064015884757","host":"s3://npm-registry-packages"}},"12.0.0-canary.ccce99cd6.0":{"name":"@material/auto-init","version":"12.0.0-canary.ccce99cd6.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ccce99cd6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d7cabaf442173dc6052dae8546ba68c299367b9e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ccce99cd6.0.tgz","fileCount":14,"integrity":"sha512-ynenvnlCHA0nu486sgHiJwALm+q07Y81n4dGxWRCEx/Wz2Wx/NFUFfHc8TpAGEWG0kt1xl8r+w0G/3w/q4ZvDA==","signatures":[{"sig":"MEYCIQCfj5Fn8WU6oKaWXC8tijcM4d9ss+yeKGgGuiAL/QegoQIhAO7Azp8hpt+24zYbak40dPGgOXz5mrkqHoHIFFlOTtm5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpbOeCRA9TVsSAnZWagAArE0P/i4fdM/mURTS5pOnv3sy\neh6+exGpxtLVMRFmJLD6fMDbjO59JdkO7GB/byBecopQcHvOQqprljEjpHp4\nNRwwZ0sV/rlIawivdBOyrwYY2/cJOWedP2TbWfGZbjo85eWqkUZoRDEq6Wcl\nwkKOYgjBHcPRc25+50dREXj2T+DE9JsWtySpvEpSVYcCVTSgSjPvw5JHSWsS\nF/ImbdFBfI0RoNO/QU8F9l7u//zRkGodyqkK+IcO8SW4l1QLGojYINNVE0wB\nmbTrZx0aDSIFg9JjNolU3X7KtW0u6aAYyuJ7h5wcLZuIXcsNby/rJFBBw325\n6CZa2SVMLfMTz4uQXaAERMm2fy47NaaPZynjt8j19W5HuOnbfeiCaEyiOd64\n4ENLis4Ozj1bnkEIj+3uZQ6OPFxsNBmxdTi8WLoWZgq64WiCwM6YJQyC7szk\nh6T863NmLU3KddVSq5foeYjHcShLq29Qyuw/FaR+5jWOxPK8aAEe3qo3t3Qs\n3Hp5TzDEwhCZxa5Y1jtheSmtepyKC8aNfb5HHXLlhEEctjhePk7WtBD2cFYY\nZVmkDTU2zvCh8JFBxhkQOBUzaT3cDw+q0xr0RkmTrvcZ2KbBSewu1VDY2XgR\nQIvxzBOUGBz+qL/s7x1rXFawDxxkldY5fL8kcCNstSihGD0zMFmeGe2BR97M\nYvnC\r\n=yj2I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5d475a1522350d9dadb5fe3597683fa7f4851b83","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ccce99cd6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ccce99cd6.0_1621472158062_0.6715917997104293","host":"s3://npm-registry-packages"}},"12.0.0-canary.14767a8db.0":{"name":"@material/auto-init","version":"12.0.0-canary.14767a8db.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.14767a8db.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad2eb23e24be2325148619d3d23c1b4624eef8e5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.14767a8db.0.tgz","fileCount":14,"integrity":"sha512-SsRimwkSG2NnoNMLkVG7oPXPxdLxu4FLEnS4rTgTPfaiNRmpb5uVzJchxVrtfinEfpXfXhjaLVskixnqmDKwzw==","signatures":[{"sig":"MEUCIFd31Pj9vuMW4PjXgBBtCTFjeTsUGcZ7fMoz50zg9PJqAiEAq++gWW+yCuM0ZzIUbRXH7S/xRcFFC44/+oyjI/dXlW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpst9CRA9TVsSAnZWagAADC0P/RP3GY3VDjK9ND+wnySt\nr7ZSYV+ee/+pAaiegE9ONwFqEfyiK6nhrjXn9MTWkqFAnsqWUKyMX7/YbNy9\nYkot+wPDH2dtkid7/OQRGP5yHglu+cMLo7V41hs2q3ULGRyk+IrHGEfNqiMC\nysR9UdBN4DP+5ekIK/B3ufun1BmyGc1nJUq14HnLlmOJqbMD3Bii0JNqsG8Q\ntpHPs83QREofYWMciGF+IJQoK+5FP5ulo/m2mxCP9E6z9opqzTGppbP1GEVY\nLGaEF3sK8u6oG+B9iZ1ggGbgn40UJswAOUNLWj4osq3hiCIC105ANRRXjd32\nREM2V6c6nJICFsbEn4x0owGGhCOLh6GeocGl8s6aMNSaXSNAnzQxYMFfnrhw\nPZyCDcLxpIMyjev9STV3k3Rg1PvWpZ8r/riaQwkDnqFlAsxP9tT+mYsYKD9V\nXKbQlgKIC5+g/WfTDaAyf0+NNOaLhFjgdo5SpGBBWAH+EXlFztRYmUm4xyix\ncM/vX68JAZz5IrDNDhCkkwE3s2bTBB1tp+Iuohayr9XS/TRD/WzU1Q6wn/HD\nXx/aA7L2HOe9hA6lMNJasEXGqP4tgal6KuEuvRY6LuLbra7h4/Z+LxpLhx0I\nsg65QNtW+szdsSjPB/W/F6ee41HpMpIoEiaymQINvXnCyLhJsEPWn59cjNzk\nwKY3\r\n=EEs6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a324b91ce28769039998a00879c6f441cb1159b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.14767a8db.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.14767a8db.0_1621543805055_0.7543248707292534","host":"s3://npm-registry-packages"}},"12.0.0-canary.22c6dcff9.0":{"name":"@material/auto-init","version":"12.0.0-canary.22c6dcff9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.22c6dcff9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"87aec66ae68cc27739b3207bd260f38fd1fd4143","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.22c6dcff9.0.tgz","fileCount":14,"integrity":"sha512-qV6wNupBTPIL0ZepcuTggMU7i9XvFwKrmGUWg6VzKl8rsI/jQfZ/Qi0yojswra2xuh7xreS0pMQA8BqNFvfZaw==","signatures":[{"sig":"MEUCIF1KMamPSCF/EgQlB8QqIovA5a4p6DiU3zFFPNeeWHhZAiEA/6zhnLO654zb1EijQJdts7Em35tUDbTeesrLVKw/6Kc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq8OZCRA9TVsSAnZWagAAVVAP/i2s1vfmA7daYq8GeIiG\nopqfStxuQSzw0cl85Dg2WKnwaWZnW4porcD3qdmFCzcR6GiOlYq02IYmBywG\nWGPVeClrsWVXvTej1u+saj95yQY5DH15XaK14ggcVfFcekZGCbl7Zs3cgqkT\nVS5wwTCSqba0IF3XEbS/TmT4neiVD2RQKfyzZuoJJf8nmITaUvy67OhO/J/r\neEWFTFl5+tc+zuycLWQHUevhqfAzoB2LscG5qGu+LP1oaE9Bh3qsSxAY1E9+\njtKZtEVbCl9xITIXqQuZiSdfq9q+jptuhN2RkVfNFDfO61bBsC5qJ62Y/GZY\n4X4WLXNS/dguLyebRZXj4d+LeyAiRiQdvhRdIVpeE/dzIEuj3i1QxQnECOBs\nyTrKSW6GwRTZv/CgZivEOTatBn6PQJMDghlSQRR/UjPMld1JcuaSt8njB6vU\nfHMIQIP6IH1e1e+AUD1ehNpe0zCL0LGCry/nJwQJywCFdk8X1gOJZ21I1vjY\nLo2Zm9wHt/gZMMdxfBwX/P055N3x6IcbDfq6GlYKxw0vU2z10+5u/RAfejI8\nsfz0UxaGXYWnwrSCDFwPwxNR+/ODp2h0C40Lih9fFNXGF6hoB3+sz6yu02yz\n52ssfrhPsxGO3lsSoa/l202zTsMNAjOVlPvBt7u7jWCGAwkUzDyNfC8d8AYX\nR2xA\r\n=x34W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"74541e300384d800b9cdf492ff70ba20ffc583dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.22c6dcff9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.22c6dcff9.0_1621869464777_0.3865963580497662","host":"s3://npm-registry-packages"}},"12.0.0-canary.fadab3372.0":{"name":"@material/auto-init","version":"12.0.0-canary.fadab3372.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.fadab3372.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7238f10f9b60b9268efcc2a47ce1e48285d2bb1f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.fadab3372.0.tgz","fileCount":14,"integrity":"sha512-LbBVGfPZbv2h+tjs/EFZ91Hix/upyN/wVFxZHAr+MCYGtOiDB3F1pke9DOjuxCeMxXQHJoMwHgIWXs8s/0PYmw==","signatures":[{"sig":"MEQCICRG7Y5e3X+ZKrRYAEVc5QhtIYpnRPaPKu1ltrVoa8raAiAaL1DcV1Hst5FvxLkD671Wx7mT2hGnpIOMaAxlIfBalQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq86hCRA9TVsSAnZWagAA1egP/ioT6tS/SePFqCtiLB3t\nBcsJVmPpIgMsfmAJMyz/T8nv/zPFBhDAozksUM48B76doDsT0PnavV2KuwTv\nKyXC/kmnoDdWdtKRZOp8BS8NxttptRXmHsYGVO9ihkjR15DirRenNX/LQxXt\n14O/wgwRyVXhxy22JhHHKGEilPshvLnhHeQuo5wM1xXGyVhz5UqS8yZs0mCV\ngDXfzxDMIAQshMqNVspPiIWD+cQc/XCjWn8drl9+5UObw2rnnQ7AZ37dUIZQ\nHyhPHbh23AxCOtVwWWaPdrq6n9+bQYGqEDn7gv/+RPNA3Bn7szmsE7gwWlFI\nbpp3Vezvvfu7xNZEkHbANzNdMIUVicWaXIov9Hq59NxEJrDVeiKyjYBgPi49\nFT0ZuRY4YeG5ZtX46VP6oOvFFCE2Y9pENhv8Lm9NNAkpqIz3nMgFoEBNT1IN\nqnxB9G4aFz/HEBPwy6zT+rs0WSQ43LQgIofMmj97jbb3ErCPpCTnCZORNSM+\ntsN25oPr03g8ekUvcFi2xM2HQQdivW4d9DBDo+Phwr+uenzaKW5m5JGLDRdA\nnztV+/5hRGdAropHIh33dCLydrU515RKOoDJ6qYfG31nrXsg7IRSJQzEtsvF\nFZTykLFInwFvemg5NPSWp/dJUUr2D2R0HJSwsNsv6EQSbMqCr5HCGZJgs4Zy\njUcw\r\n=Pzrg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d76e611194693a7270b5e10fd87906ada48c7af7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.fadab3372.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.fadab3372.0_1621872288852_0.40850929647356615","host":"s3://npm-registry-packages"}},"12.0.0-canary.caa73aeee.0":{"name":"@material/auto-init","version":"12.0.0-canary.caa73aeee.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.caa73aeee.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"08e736fd31032b0da416d1e855f733f528ebe355","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.caa73aeee.0.tgz","fileCount":14,"integrity":"sha512-Ju7k0XdF/m16DctMnTjNHNrXrne18cGdmWaiakKx36CIDHHtT18rENi1R1EMLHiteW9fCaUDFhQJskMk6KidoQ==","signatures":[{"sig":"MEQCIHwBmlDRbRmh2nWSUwEjyGroovEFTG1KENzqLI77453gAiATkKgZ+mGqoN9U8Zc9DWwr3pn2JaC2oiVwB21pHPS3Qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrQYKCRA9TVsSAnZWagAAbMcP/jAFDswdaGVla/nQu6eH\nvjDg2xa3p/+lm5mKifTBDdTrXxsxUjyGJuW4KRhqxevfoGgh7b6pN5vpOzA2\npHPjaXoGExm6A/PRe86ScFI7EiSTsZNx7AuPA4+9Blp3b/qEDxoMNdaYBT1l\nY3uUYHerrsnvAsDtIR6Hs4YskgLhQaFhhj7IRSU7mhv6VBXXDOTm004Rn/86\nXlJBWTtyVo5+C+oTi62tFpH6Kwp9q7Fho59WiXLtv49iC4PAgqFOPmfigxwA\nU2og2qo228cjRPdmwnV1Lyw/6gsBXGRXvCAEOwUI1djTsIJTsk0XNCw11dA5\noC8KSkuyM8Et3AOci12hbJZQycmLbJ+g4x9owUwojidTThSo8oxh9R7IrrgD\nP77ytHZBB9kJKjXDOwKabK4o+6XHLCbhSRBOkQFHNzbj4/PKyoLy/10+3DE8\nu310nJeEHFuJBeK+LNnm4KFZK2N6JpSycUZswObiRnukBXIVYOIpUR9xsN5Q\nfltAT7bZAoSTw9TeyDmQxX7DiqVys2b7oDlQzNzwb5BGvc8+EgWX4LPlKAtn\nB9PgI32Hl/Tw0kh/lfoMfZVm1SXg1qmIGE/Ne+yZNXupLLxWsMnINIiTBL7l\nBCPoeq4WnWIY3cl37ywhNtJKV+S5bpkz57LdT1gYGEeJcrWtdpaxbA3UY4eE\nOQO/\r\n=9ccD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dca5692fda23e55426458f6b0c56c2b6dc9e2dd8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.caa73aeee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.caa73aeee.0_1621952009755_0.2967606792487041","host":"s3://npm-registry-packages"}},"12.0.0-canary.ec31ae1ed.0":{"name":"@material/auto-init","version":"12.0.0-canary.ec31ae1ed.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ec31ae1ed.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e3b870cba31662961de2b91077e5db4a4e3b6d13","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ec31ae1ed.0.tgz","fileCount":14,"integrity":"sha512-l9VoPn0FW1Bd7yyi6OlHaJesvKCthOFB5vsrO0i+iFeMrGQhOo9vsOHH65j3nmCR1z6xT8FYDpknSeiaY2swnA==","signatures":[{"sig":"MEUCIG5Xd0HHYpnRVN9uvhFrcjuxyWhTWqC+dk3cyEhOhEBhAiEA5pAnJOiFqpvT3IDoUvivDI2Itq8hb0x3HlOI2iaI81g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrV9aCRA9TVsSAnZWagAAXMsP/AzyohSbbPV1Es722JRn\nw8YWWSMHyrAzCCk6ewy0XuEnqR0y4ZHrEV47AUwB8OvrMwiT3jDNUS/41I3H\nJ/fMG2uOnb28rZsAI6dzgUmiguaijq4fewUO8arCjTSuLB1HiCrOgjlmztcY\nC58NU/Q7c+ph13Ug/dj7a6wSgar7tSLYlx4UeOsYrVt/xxvrSr3hZaTBBRvb\nxSo58BYCcaI2r9q32sUKGUicqX2IenaPhnRl/lpTyY9sqNtDCYqszwinIqU0\nTG9QEO/OsB3500XRwVfTwO2E7EljM3TXwLKZUphKWnt/lkCFdnStys3ymEuo\nBFzTntLOMiAoC8jwF9xm3DZ8lAKxa1S06vig1D4Unomog+23zah0+/zxFSMx\n1dk9MxWjkp+8KwlBoxM862BxedkGJf46uSLyKKy//U79Q7S6Hq6TPWrHgcMu\nHVO3HFD93hGJv5iSXj72lrzJumP+xihLPdhm9lImzjAioh7GhWKuUn+JJzci\nL0Xg+pzbSwodY+EkfuQe5ttokXLOcW0zmSD05CzPpvzHLF7axm6KceqSuZHA\nevFxeSfq1ms/J3GVSp3vi3UHDgHhYnOpLnZC/qrrEDry2HY5CgRRsGg5Paw6\n6WPrxkMJoVHcQTExa0inxYCX45qbVGt6tMUi89ZP/5iTKPSJXoyjYLuRu5dt\nFpja\r\n=Mh8m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9db084a3aed73c844554c3b223d5185727b6d07","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ec31ae1ed.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ec31ae1ed.0_1621974874081_0.635184678297998","host":"s3://npm-registry-packages"}},"12.0.0-canary.8530d3514.0":{"name":"@material/auto-init","version":"12.0.0-canary.8530d3514.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8530d3514.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"43124c9a4c0c32219c7447e5dfec0efd8711f8a7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8530d3514.0.tgz","fileCount":14,"integrity":"sha512-su6vGPG4wf+SiH1fdUqsssy7N98ouYTWWv7fGeYv+Joh37IO7Qt9xwpgylk/kTeVBSpPclIvqZo/jp7PoeLCmg==","signatures":[{"sig":"MEUCIQCARIvI4ODtLiBBbxfjW2t6qKowSOyian8dWG3tSpelFwIgQMWVtoLDN75jutMg4/kfGFq7PEEAWqVesBmS50hzfR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr8LvCRA9TVsSAnZWagAAvdoQAIM3NX7GvfAAtugJOcgD\n7atu2L3rg7pzH6tKUzhimJSMJHNAPjoqeGw6T1xlnTbMY+XgUZiZMqOZVtCL\negyM2RR9OyhWnHyhW4XPWXwOFRm3mwvXK5nsBjff/5r/YGcSEhoO/W3DPozO\nWucucNOgwvNtit1d3H0hdckBmgKwuR7Z7GPOpd0WCJHai9o7e8/P9siEqsGF\nY7AnZm95MjHUQlRV6z+VpXNlSEIv3b2cpcBXXCJM4NXnHVOSjE1NHrf+BDNC\n8Sdel3FTlKBMByERhEiSqM6Rhf0gqOYRmL9RzUZnEOnB47v2Ymv6kAYk4AI5\n/958HHLut4TBiEM2FwzLrJJXhTudQzcwyCUez31psjhUmQbkQKEQNK7UMftD\nijIj8lslRGSJG17jlY+klsSr/qiLuUh5CBLGEj1pYuXxBBr4DpglT07tIiAx\nZT76xiRl+NfeQE9ImRC41mUwYE24+eH9kwUoEPq/RqbxXb22UuSJqtNDXlAs\nNsexdufX5eEIljfqUXY8dISwxUBq2ePrssx3l0zRTP+JSJhGus7iBeUoSwoY\nLRSRz1yd+e5Qlv1JvPLCc2p1CcXyWfDr7P+wmj6Y0Hkizw/1TKu8sx3ZiCl4\n0DkXPyGT8oDTkTcNJC5oJEimCctIKmdMgXH79qp0N6FDl38PRHuWDlGko9zT\nXGKs\r\n=IS+9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e32508a69db8bd9ce4383a14f2c576d35950566c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8530d3514.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8530d3514.0_1622131438643_0.11085126398165834","host":"s3://npm-registry-packages"}},"12.0.0-canary.00b5899dc.0":{"name":"@material/auto-init","version":"12.0.0-canary.00b5899dc.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.00b5899dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"84984e850bbffe7f8a9298d2d840f7527d31fa79","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.00b5899dc.0.tgz","fileCount":14,"integrity":"sha512-OHGI11SjmCRUxoIQpAo/0nPvP8LTXu7/tGNR5v+QxFb4dCSSYFOSDtNNJvoKmib8v/sTluRCQqBtZsdJvnVMAg==","signatures":[{"sig":"MEUCIEjl5MNxehfmYHYrQ7Hox6PuOIblAXodIcvahhKiXYXUAiEAjO9K8OsOsBzzTw4zaiSrOLya3XPa+8lMHJyrnXNrQPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtrhfCRA9TVsSAnZWagAAAH0P/Rfqyjb2LtIz2g/4zSMy\nwdMgAAvN/bo+KFrciwUKkiKGmnrupppe9XLf0f1OkKSzQjhYvYW96BzCIRC5\nknT9ei4ChSvpofdz0nek6nf1l20MLyYTetskKheHH2ESngCpfIHTNrdoAyrK\n6gaMwoR7mFQACPYO2GeWWTv5UwzfFBshA6cZo3sUxv5Lgkz0g1WTwYfWlpaq\n6a2Ae4P+5rSsSvnBf6I8VV/PTULKTU5mCrBE4/p1JLB86p+Z7AA1SmAMCWPm\nLPP5+yBi6eRrUQzjOl9gPp1JPtz7xWfj08l4tR2hF+vwzqv35hbT1H6o+rzX\nXZXuU7N7ebUNO8Ikv919IUFX6nBFkNYudsyyqJLeBKNIp82kgjgKG/qm/sck\npCRKG8/7eTMDEpabedzmu03/sPEkWh58/iIs2TIQOLMwyqquQ17QStPwG8mE\np3qyXUVx6wNm1Z0WjM0Wg9ATdUyGhFp5KE3YQuGFxtkXsXSPH4b/vHhVimDk\nr0ERY0W4GRJ7eA2tUuYTY3ZhJRNJn2Yeqz943uqlZieZuX9Vw0nhzmJCbn0u\nYM2x3fswxBEU+nRclkatZKNI0t1RD/VSBfm/mpzTYBFmHWENMTIO1hrLJfAT\nrcGnS+O77KTaS3ZzTy9XBJWsWYZU3+r0UMQ/vLFj89if/8+pyusdpyGB3OCa\nwt+F\r\n=VqIw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"19ffd4cf15764c62ec7b1dfd76483a2919f6501d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.00b5899dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.00b5899dc.0_1622587486318_0.3929406388772798","host":"s3://npm-registry-packages"}},"12.0.0-canary.f1525ea3e.0":{"name":"@material/auto-init","version":"12.0.0-canary.f1525ea3e.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f1525ea3e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8a686251ce8a3d728fdd17317a01cdf04be9b60f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f1525ea3e.0.tgz","fileCount":14,"integrity":"sha512-eW2d8MPfUO95dpC04nGeuE5iyeEjo92ZXR6BVgYOyoqdhQRjnnJrg+8zJ/SUXjyZvGHH1HXnnb5X0O6Os8MFKg==","signatures":[{"sig":"MEUCIQDON0mOj7VfWmp0fmqwc/1JwMPlNjBByLie+VAnO7aHMgIgVoiShFPIUoFrle7bl0vr/39OMOnhsT6PLXuCM60Ku/g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguN7YCRA9TVsSAnZWagAAz3wP/RAiY9VryhcPBEGCQLLR\nSpXSLwIKfsx4F5VlUOJDht4WJr2IqD2W3fUfITmCGSoqfR/rLynEQDSxjPy/\nhjyVYTWoOdB/lmdRRRTHSlQJFl09nDpRrDjWi9BcBsH80gpoCOy0ncrQiMmN\nupWsmJ6aJ2Y+OctOLwKSJGUOjCHVZi5yxqK15e15ZYoR/eR6FTwpCKdFv1W7\nVGfV0J4zxt8Vw44fyQ3U3kwYBlw5+/rqu7bIYyX3AgD3VL/QM7DbYG7rISFN\nDv3U6YqNiRip28lXYcr0f8f+IvuzCYqYeV2FUEB492q/HyHgAncvcWqxm2B2\npAlktsL92LeEE+/eU7uPw2RQUxt/TQ1ry6v1zKnX540wp2pXldREvzY1oyNF\nS6s3UZmIDBxrDSl3BI99wNGCpZDYy1ErKKyhShRcj4JYWmgLwUdfOu6iOYqp\nbHNxTJ6lLYNI9vJ5ByiR5RXlbvnQ3DteTrNMuoTavQjjiM7LT1dKIH3PMp+h\ntSpUkSl9k/4H9+gUE2yGhnrPA1UJZIIOgjbmXZUQbvh73CBoSgoOK2AS9wJZ\nj2Nt9q3OLObx414ZnPy2hY0E999HT9wXgF0baub+F6OBFIXmYB5EvExW2XeJ\naeJsZVK9hG7VCXOF+PrWdwZTpJH/yphZV6++5TKslxsJP2ezIVYzN7TmEMLb\niH6y\r\n=akvg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"97ff3c2e33330849b0ca447ac6983126a385d845","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f1525ea3e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f1525ea3e.0_1622728408093_0.15205548089191523","host":"s3://npm-registry-packages"}},"12.0.0-canary.464a00286.0":{"name":"@material/auto-init","version":"12.0.0-canary.464a00286.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.464a00286.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"de248aa2a15ec14e0e75c2407eb27aa8936561a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.464a00286.0.tgz","fileCount":14,"integrity":"sha512-Vw6Wnuf2sAYZRWyk53YThc34JYf1qKQCK94CQgkJB2CrF0dC+8/RsDRaV5O7bMi8H7oHIXTf29Nn7rSp5DtbuQ==","signatures":[{"sig":"MEUCIQD3BIb9dFSpRmTbxi8X59n+9JgenZ/YwNtu+MINa7wVfwIgEKWANJLj/UK/1p/BWOiNyvy81fTdrZbkPNBXVOrjqG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguOrjCRA9TVsSAnZWagAATskP/RxLhH6LLNJ8yzJL8cpB\nY8hcWlKjfB3Tv7hyCBhpvLIIVQtcyvvqNukrEuAydEytcbuwwAyEDCDMiPWa\nqf/ujRCZnOzBJgqVFNRW1DepvL+jRwanIfcChBZ2MH3Q+CeJToIFgobiBzSr\nLFK5F5wmsgVfHJnjsrqWay20t8nf7F7ndJRZbQZeRj2/Xi0mMDhbqG6q5tNu\n03zpMatm/zuHs6CarB1dK1AXDgkukE+btmUm3e50qlxzVH6UGREz7MjPObSw\n0RrwJKcp/C8LAiJVbrxEdy06iK+ZPsYZXypmSAA5gFEVWYduSOSok/UYQUW0\n/UZGVCq6TVYGUDEyoCJJpzBMzkRegXraqOZ56DpU5/rhng03GJy2wd0UYdlw\nGhgHDVYI3RHUW60dCEk+VenR+DCHeMhIEaIGMqb+KGfEGToZ64t6zgjOmelr\nAWj9HLJFJPoQBMNQ9uJURE1W61uXZPaZDP9syYM/Wz+yDOBJKf1h1IMNIX3q\nRolnTN2i6jXx0+5K89jcJsF+VKXWC4uv8C+WQ3Ja1k4NxnCUI7l7RYxCNrfL\nVjZHcAzGvV0wH2oEDAG8jLFjSO+8ekawKyG8bMPWsY7VKH+FY4FY0U1Qyck7\nH7iUuO1VUWrztRS0gVhgWD1kOGLNxPBmwwFYYm68De6dHwVnVmyHnSRid5dH\ndVIP\r\n=saJG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ceb43f7f74f7db77edbe7a13d3b92e853d599d6b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.464a00286.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.464a00286.0_1622731491039_0.810676556860096","host":"s3://npm-registry-packages"}},"12.0.0-canary.474de7878.0":{"name":"@material/auto-init","version":"12.0.0-canary.474de7878.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.474de7878.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0041ff179760a751d1f1c51888b3b8be36aebfd3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.474de7878.0.tgz","fileCount":14,"integrity":"sha512-j9FPCVHsUoIdstdRheEnxFLjhOLDO8BM6uilGIDn+cJJ8wSenJPZvr2/qph1lrr5+EQYhpH3VhpDnMX1qCJDJg==","signatures":[{"sig":"MEYCIQDuLvaLRXmiM0dX52RX/ySB33E9t9e5HBYvA0ub/IpwFgIhAIJ/59hmUfYseWT4UEcBuU9qrwMITRWi6BQhKemsHUw7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguPGWCRA9TVsSAnZWagAAyAcP/iOa1KQiz7f/Sah0v2oO\naiXAfWkl7szK14tIOkDQ4NpY1506u2V0o4/3FaQ8rNTO1GDY/DouF4eNmwA9\nQ4lvo8UnjPYPcU8VXI3n6/ORdKeCWp+zc5CSF1VFvXaUaSqBMuYGTboV1+gv\nJF2tWtjyc+tPhtblXxx1XYpidRZHq8bbqYAWfMzVcx129Wj8udSohQObIoiF\noM+0Qj5bKJrGWkllq7N+16x2dheomTor9pvR2I1crqCBLyRqM7tIYRzfjjTB\nItFSyxs/CaerlosXoeKtyicnezFkVOyUWNY4V8bGF4xEAKYhUmWcWLRaNllN\nyGBIJpxa386lihC8acEPA5O+QpOsUkImLBrgwo9Xx6gCslnpea7yiRGdmTUa\nh6PT39rAPo119Dgega+ouDP5I4RRFXdRMs0KNnNburLMDkKqrbe2nASj05V+\np0Ye1vYO//cYnui5fQTGAgES0+lTPVc6hOHJSz85Jb0bLUSyCJUm0K9SyfLD\n7XOpxgLZFUylOiWNmnMwMJ1J5fdp+bJqG6PwSu2Ozd9ITr1c2nZsWs0dGe+l\nS4s+/MB9fbCfjFLjGqkjxqWIisRS7AW6S9c5md7S8Mejrha56DuQzZf3NLVQ\nczqsiHXOQAv2qR4PbiQ5YldL62gZ3Ya3EPV3ReaQrzZ6H+TbCGW5N8wrMRMf\nqvxX\r\n=ff3D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"67d604ec9cbaa0dc385eb36be35e0adfe641b244","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.474de7878.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.474de7878.0_1622733206093_0.028834692686209973","host":"s3://npm-registry-packages"}},"12.0.0-canary.b87ebf74d.0":{"name":"@material/auto-init","version":"12.0.0-canary.b87ebf74d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.b87ebf74d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2f5b0c17fd5722a5880561cb38c52d8c7ceeab34","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.b87ebf74d.0.tgz","fileCount":14,"integrity":"sha512-0mjErpUayaC2ubs6iZ3RUOmFvaErl/bOIdRppiCiJtFG3fRfdNBmVCjay1ipUmtUNYrtsd9te3ddT5h/9P7h7Q==","signatures":[{"sig":"MEUCIQD0p5kLtoByjOnzs45W+gNKoPO1jbQxbrc80cBs3IEUtwIgerF3Gzct3wYC/vveboSxld+ACv/N0O2oo7lzvXH0cYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguRU9CRA9TVsSAnZWagAA73EQAJNWS2t/6wQjR0B4yRmg\nMQuEukDDIpQezrp38rTVCiFbeAWn9QEJQsKjhy2oiAjZczwCIw7I8xxOdlPJ\nmFtEKe3lIYCh+Wd+RlryNUvy7Z6kDFyOeIX+1wvTCPYfEs+ClOMuINrhESeI\nBeJNFvfCbXMxGkXzAoHPTOUc4ApqM3EzBiwZh7rg+PCt49VBEdqCVZ+Xju98\nNrwlYm6wXxcF+BZVmyt6dgRntHAd1TvayLZx+eBcEc0QTa9wQvY7mKvYhzT6\nsZYJ6+dI1tj6UWl4S8k6AcConqkalsZ3XAm9BKmiCCXx+BikyubUMV26dAQ+\nHwLthrh0gxRUvqYYk1kyKnn8HV/CMUhpjPf/bQ1W1sJU/0hBLXgLtMvVpZMu\n5KAbEX4ibAraYWQBp/+noG7UdKWewIg7MF/g4jVxeqUeKQLP2TphlEIawW0e\ni0WyyfohPYrUmNqXOLEyVa3cvsXz1nWtaiebueTdUCIVYwqZzPyvusvvqjcs\nv3JJ+JsrHK8sS8JNz2vTiwwq/t9//8ZlDUALFbYvtuhGv40Nt2YZDd2thOjb\nRA/qgr0uQIMLp0+C9ruTNpClbFMH1hV+e/9t+7F6Ut70hGmDTPpl9J18oLoO\ns+Rgsc84wdI4/dk50w6SYrWtrXrcsNW/b65W+rXO0CWJLBpC2nNXLUW6qyz6\nIEsG\r\n=61ys\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d3567c6dfa0fd347d2141fb92460c63fac28b46a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.b87ebf74d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.b87ebf74d.0_1622742332918_0.8095142672695963","host":"s3://npm-registry-packages"}},"12.0.0-canary.2daa49b35.0":{"name":"@material/auto-init","version":"12.0.0-canary.2daa49b35.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.2daa49b35.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1655d3d86c3c6b86f54b617c4f4b4043cadb8171","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.2daa49b35.0.tgz","fileCount":14,"integrity":"sha512-rHgRdl0R71GewB6Mgp5PFLHzm+ch7m2HYqSdQvy7f1gsWWu7yEZ8Zv0WvLP7ofqGrQJlnXuNQdHk8ldAm94sLA==","signatures":[{"sig":"MEYCIQDyLNEmdSb0LhqdrFT2wcsaJH6lx7wgTM0Y5b1EoxnWDgIhAOszo7DNpdrTfNmUC6t5d79kDJvf+9NzUxKR0AyWfmJ0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgulEfCRA9TVsSAnZWagAAirUP+QHunH3qDiP4tbrWxCc4\niwIyRFkckP3QjYvpCbX5tkSdaWPIs8Fab4QHEcD40Klu1E1/bim+NT8Z4nai\n23GCJ/CtPAmBiqrEKr+fqj64CbTMll4INvjYUm+X4gSLe6z/ImM7AidnoZq2\nSpeIQmDRgtQ+VkjxJ9MFLN+BKMlMdzVJ+PsjtjxzulCyL8au7ihAGdmTETc/\nfVd62wJbK3zu43KJB8kJDGhOvWOahzyFc+i/N95mfFWp7Nnx86XaDtAzmLiH\nERMiYqnAQzTmUtzsfC8L0kFdy5raIMd7oFXv/lziW7UC7iGRVrzdZja792bq\ndVKyW3ajCHPx6ninUZJbJDJMUj7ICevDLGpYvMb/nPz/9nbWcsrGnwUfZhml\neIH75ddVcqYxWju4QxV5K8mTUMIyehSYXH/dtz0GwFXmzR/s4YahCbmCKpxf\n7OJX+ASmbu/Ky/cH9oT1/Omg9IU8hOtJYNjk+5yKEBHie2h6svANsbewIL/1\nOWYTwk+KRa8NiStNef3VFEIIDEa/NMgPodAUXKHfeJoUIiymKCcaNt07OqiZ\nLAijOOYhwKWe9BB8ADg4XXOqUQUSKgCEMjUOWw6QQylJl8cuxEYe9lli9l5G\ntMYTbqLvtrMd19df6eojX/B6l1o9kHhcSzCWOy3hbcy9brL/goMKFaHvadh7\nYunc\r\n=ZDf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3e759afe4116e5fb3941df918249b1b1348fe684","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.2daa49b35.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.2daa49b35.0_1622823199144_0.5236987423174597","host":"s3://npm-registry-packages"}},"12.0.0-canary.08db3d737.0":{"name":"@material/auto-init","version":"12.0.0-canary.08db3d737.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.08db3d737.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a97546cc7b3bcbbb118e7706fdda987912de30fc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.08db3d737.0.tgz","fileCount":14,"integrity":"sha512-S9WOD4IcFYI/XgkHpsAvCNHUPbchxwyeCyOfys0Lv+Y2Y0AOrQL1wAAGigTioctNxBMvRd8cNtJcUmXW66GwPA==","signatures":[{"sig":"MEUCIFOHNHafgVQVPsQAHNMG3w0bdT3vYvMSrDBkbkkyQ7/KAiEAs5xG1PNRy6v5Z7EkDp5TBRGIASUVJ0mAip3rEMjZmzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguoHECRA9TVsSAnZWagAATQUP/jDEjsSMUg4VAlatGNVC\n0aNZ6GIqs5+BvxS+pjbNAEkbHBs1Tn+/sfotth21m5aiOehSDOc0swDIB2Bv\nGTfql12hC0xxCb3eimYLs4gF1uBlNSKybzSRY37REsTE7+nW8IojESv81ioY\n9caoidLsUpFIvtHWOkZKWP3904vwR4+0TcGtLYnfjREh/pVCB0/29rle+ZWK\nB+2r3a2K3bCWdBn1RI8hu/9gyL2BbivKdygwzoRNVRTRlHXlr5s0B4whffMk\nX9nl4/QGYXAE6mLcVR+ljEp/+QMKVfPSWjkLm58hm8/AKkqMfP92yk6ThDBx\nvh/uD3e87w8LmmQIFlHW2tIrs9cX+kL/ngB+19KRceZs4J0x2zHNhUgxTPSL\nlGOnQJ8dwAFdq4MPBu6m73FEFDFSXEJfsAicDtpoVVeGFohqxhhl0zCKube8\nD0wU4tRY+0L7ew2I0f+gySyVMIyVrKImqKJdaz/cEx3KQZqs/n31paK4vgey\nyG+wIZS4gOzxH/ei/DJl1H8r/gGN1JqjWcPaiP0mrH9CtdoZ3T68ABFxUAZR\njziclpzg/idHKeKJ7DyM6p/IRVtKsQJ3vrNEgqCHno3KRkqzenJVFTiKhENt\nyBt1/AcLINpP8NfSKwd/ihK0Sp3vBkZBIdK+G2bf+z4l2gEdRJI8GNnAFRq6\ncz/z\r\n=AwVW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0175b9a3635a8e6c8c6690948618b55f39ca1ffb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.08db3d737.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.08db3d737.0_1622835652684_0.556916822903408","host":"s3://npm-registry-packages"}},"12.0.0-canary.5823407a7.0":{"name":"@material/auto-init","version":"12.0.0-canary.5823407a7.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5823407a7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"328c8a5888d8b3c4ae8d6decb28c79947e67372c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5823407a7.0.tgz","fileCount":14,"integrity":"sha512-WuPuxuQddxxESbIw8AevE+MieN/+mrId7XOqxQoUYnglufnvRs3mS6qgq6tl0OxzzWL1ER67yv9nOqY5oAr/7Q==","signatures":[{"sig":"MEYCIQCMkOsoE7qTc4aOhLHk6K4a4EQyHaSnvtofCsT2ECoo5gIhAJcGimYnCWyrh+BRj3qgGAb0fDFK+fcoU4ut7LKWzGul","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvr4bCRA9TVsSAnZWagAALyEP/16CLWlOP/7Mg1E+OcD0\np2TR7nt5Z2PCIBhCw5lOEtdTNDTyF3DmXn/JnJTcf6dPepqG1Htl8v3aaeg8\n4IaKZeRYfIMjnaKLkzd2RecqHsVsPjBZ2alcLew58qJXJaMePV/zgZaw9eNs\nbpL8i8IVuSxtxc6KftlLcyoJ6AJjd8QX2xGj6FNATr1oe/CMCAci17xVZ4sy\nga6KmqmYlD1UjECliSWtDJUgdbd0BLecmcwq//WjldI7bE7p0eEDUQxymalp\nrsIEATaNIodgxlJTlD1xxPIWFOW2Cb0SGGc0EB5vIhDRjlQ35LS+fiQ0dBin\n0fsM2eMtGcE4OJE127L0gKEbEWEO8Q8ich47EX8mG2WguzrkN+X6lVsCMhqg\nvEO4udUdCU/X8UBd5DAN/93jwIOOsM83XyhjmgH6P/QShsoLGha7QxmvYah+\npuF/szH3dsPCoxNGb4YdmzNqzttHabjkxF9J6rsrw3Xw4y2b5lnaikixm0rp\noMphDkyXIe9Skt93ZaEcL2+45OOc0eJb3vWEEbolIr5EkAljDTNSI+9qqvae\nLrZRtlBDHzAUXOfCwV4vSvBqpEsOP76lRLDnQ3CnNRdm5b1+DPA353lFNcnK\nyNNledDHGGTPtjHT9ipQYNkZACRKq/mGtvn8/+Rc/ItLHYc2jHG3NUIPB/Wc\nohBR\r\n=uB2Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dd3ce4590e0d881d04e885d116e10e680b6c01f9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5823407a7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5823407a7.0_1623113243055_0.3428451008796156","host":"s3://npm-registry-packages"}},"12.0.0-canary.23b0c5e22.0":{"name":"@material/auto-init","version":"12.0.0-canary.23b0c5e22.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.23b0c5e22.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"911a726108b78e67f2cfb5d1bf91f419da6671f2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.23b0c5e22.0.tgz","fileCount":14,"integrity":"sha512-SV4t8bgAZaad7wX1OXHVz2LlZ9TnAfTxrZ2VNH8DUAVC6HCQWAlcRtwV3TiMHxdrO4RK4QHaCa53ZRvVe0F1LQ==","signatures":[{"sig":"MEYCIQD1FXNgrWTl4GfAguZAxTA6/sPltaHtgWtrIQwpsGumTAIhAIDxsCJHBntk8tTof6c6nfH/frnLur5dqzJAKNy+2lxA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv5kBCRA9TVsSAnZWagAAvlYQAILc8oWzPB0YdpT1tluw\ny7bFDDgekVLYq+u2OpSlj9xS2nDj5c64ZDnbm3uaKjCXBJdzjreN2jBNxi5/\nu48O3lA7DvX23mFD54EO/32NlE6HLJ65uhXFmtR+JKsskBoagc6l1VcjpVzA\n6Hs7wrp5toALd6LUuhmL9l+jie87wi+FANZhR7QGmWrNkC77bMBn/mFO+0nK\nwKpEtBOVW95m3XbrfD66ZVW3kUvr6/M79HjqIhW+EyH98QezeXrKMsAs9BwZ\nBELFty3gYYqlC29kO3ExInt5yn5Dxb4mKsJUlhmYEepIA21FKNgDNKVZvW9k\nPZhWjRz6R7nKUzxqJkkKpa+gXPmhhObmqpk3mExyN1KrjVSGa+r1BNS7ri1W\n579IjoMg1Dhwfn7DcOG5VeTRBC2cJDAsHMU3khAZBRE/MrDweMTX9ZhMMEy6\nT5/WOG2f9soihk7z3aotw+lgGsUQJU8qEmhJNugcrCzP5hSaNtctKt2AORZX\nRzjtDYZ3AuN3IcV6SAVvKyXJ5iz4vzVGT0Cl9Y5R3Myx1fKOp12cEUFuZxno\nQqa4Kme/jUYhdq5R/LCQa359zAv0C1M5jM+q3G7RGufyOA/B3TdYGpoL99G4\ndW/+XbHVAe91plBvxKiAB4ZQ7q+uiRZKBccuJTcn2NZMwOx9u5s6pMy9g1jX\nA4d8\r\n=+qAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fc55a497a3b0d48a691942de987d781555ef9d82","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.23b0c5e22.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.23b0c5e22.0_1623169281805_0.5975801817746198","host":"s3://npm-registry-packages"}},"12.0.0-canary.2952c6a76.0":{"name":"@material/auto-init","version":"12.0.0-canary.2952c6a76.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.2952c6a76.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06a72f89a6e97d2ca076f6509c5d9fec8804badb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.2952c6a76.0.tgz","fileCount":14,"integrity":"sha512-V1zqYGEKW/MVl+6WfHQ33IQQDhfCwFkKybcaR2XgmvNMPjYpGdr6PkZWv9RAmwT1JNlN9bZednfaAFGiKhiguw==","signatures":[{"sig":"MEQCIHKe/voEIgBjt+Y/m/eGYO8nGe5jZSJ3DxWBuOqntOhLAiB6nfXVelKkbi6c0sS7Sg6EXldGHANz8PNpV524sWHgYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv6ttCRA9TVsSAnZWagAA024P/1eruOpGl61qoHuZV7Ys\nurNEW3yexcSSoPS/s4XcvEhI4z/0Nc6gXgP8hRg9KV8JFTgbWuuT6101gEpX\np53ZgO86DTZjKieQIG5egPHdAkoisxREjhJ6g0sje+N/Ii5eXkkwigooRB/o\n2JQ4+HGZ9t1FLz8TF1g33PHGcAg4/17M0GD9BiQX0OBQldycfeZjFr76pZ7U\n22jG15cKMU3Jmv55hr0OjeK1DJ63fPiEiZsuhiCdthwov7BwXp62xzNCyp0D\nnYCUI8jhdqVRK0OA56JcTcaKjIxMi31XxGODM43j7Ozxbth4c13q02QvjnCK\nSllLFccB5o3b2/rMvbsS9JIlGIRFcNqxY+Tkh5054bD/EyfC7fzqF6fZwQoQ\n+jN/yqDR7bn0o5Ou7raaau2hTc52fGICjuLMLtmeATd4ueNXMuxrGtcX+nwf\npcXzmlMEP+tf6CVQR2nIn7IqrJ0yBz8da7xPqCLQoj6wwcK36bZobYlFnNzL\nH44QJJCfkSw7km1nbjoe+2kn10Zn/0zD8aRcAnEHjd+Y9MRiSpezfGRIHkUR\n9q4Q6aWDWkOi/EzgpXuiHCxrujQYPcJbhvxJivw+WusxiS1ksG4JTtTwerrg\nKliWaHqPlCc9yL6U4nZMFvmwZLLZOi7Nk1Hr5lm/mI6p+rOuIfDWpmUMhCNy\naadD\r\n=S3pe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c1b0afec5d55ef54d74fa1cea1899368fe5c7180","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.2952c6a76.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.2952c6a76.0_1623173997838_0.0719120282248027","host":"s3://npm-registry-packages"}},"12.0.0-canary.f12425f88.0":{"name":"@material/auto-init","version":"12.0.0-canary.f12425f88.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f12425f88.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7c3779c5369985af9c1b7db4b728e0f00c18a5b0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f12425f88.0.tgz","fileCount":14,"integrity":"sha512-ShYhdS+qkGk5xgMmaj5Jm2HTfCzu++ipnicka9OYIf417yYzBuws8gRGjV9AkLkLT2BC2INsRuokzcolsTAJiQ==","signatures":[{"sig":"MEUCIQCyMchnYomLE91+Ov9WB0BhWvfvTfeZXfA3eGxiM/GC6AIgE3BIJPR33hK0gqHJEbzXC4o75wpkVToGtth88JP/WQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwWU9CRA9TVsSAnZWagAAn4kP/2O6rhCQUlxh6Vhk1rqY\nz5BOUI6ShnNczHUNBz/4l+zpQzGsBkHxlZqFM5FHcHvMyauR9aTABq+V9vou\nkf3ZrgbwrB2t7eZeBwBM1g/t77kFTD2m5Z6gQp8sG7ls4BcMoZ9eUQ6MClSF\nnlPqzP18Y7JHMckdHiLUMTNEoNmduwCKN+Pq7HwV9y1nezRDOoLnvuNYvsAy\nisV0bL/5YgpuDD2T3BiZ0oOJoi87U2q6ry2/FB/blT6nnsjrS5lUerjxVvpN\nCEL1NHhHFauDh6HYvU2DPvjti6J+VW38XlN7E15hk3w+STFUaDoz946tANIH\nVYg13FahpO/lx/QRQpoI91qz8ndqQLOXkJ/Jfn5i3SBtGmnVACabePzLb0Tu\nUDujvf3M19XBb/YRQsM7qizKf9jjYgQ+kWo1buAu5MzHZxLViuhKLmMJdIrT\n+tzXw1BeL/koQig+wWXylEgjQu/+UPq2req67oYj3g5rjOWdo0QlM8OR/KQm\nVR8w9r8As6u8f+853R6LF18/VLtvw4kCvI7x09wmv6aOlTJh3TrMOyGXMfl0\nRRiH79GRWUr1hZQykbrrRs3WfWsju7+3WKcoufz/uwzUUFNsP6YkVCISILPa\n7S7pyFPZrciE35Mpc+v3RjFKz3xS/bhg3wgRhodPk5iYlljQVzF+dbchQvJ2\ngd++\r\n=pBjA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c8fa3a7d372e06e42b474eed4ef3e4105dc43301","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f12425f88.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f12425f88.0_1623287101446_0.7266450513163722","host":"s3://npm-registry-packages"}},"12.0.0-canary.e543628c3.0":{"name":"@material/auto-init","version":"12.0.0-canary.e543628c3.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e543628c3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8911ab5cd657df000f4e529557b8dc57ff98e5fa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e543628c3.0.tgz","fileCount":14,"integrity":"sha512-axLpng+9MIxUyx9bjxufqDLwOonvQgQd9OILR2vA8Aa7DbPVla6d7ou5ACzCK20nEDxfQDytCmkvmtJI/19rww==","signatures":[{"sig":"MEUCIQCdWGQNOP7rTfp3tgfn+QiH6tfMmk/z/WSE6Ci7GHwVTQIgGk9Gwb2fZofpRkIvQ8w2KQo6rcArD6eyfmSIJ9HY8uk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwWV9CRA9TVsSAnZWagAAmFwP/R4AIR8lTcBZnWFimqB0\n/GwZL1J7UXVc/adXmkt/D+6yzsTghLKLYd4cxEjWT4ztfw/DfadKix5cbT+Z\nb2gzjrMc1CcNpq48P0twFw5mxfYLLdOsXM+YWfFten2DAbaXQB/0/FLLGxKp\nwa21Xp2zNFZ0oNkBKsxSbOnk+QHoXH9J1LQd77qs4wknDA2xVLN8t0DudNBz\nrHYS3OvqDrbVuc2562MhuxlIzfOUIa6Ov73/WSHumCb5KplCHkYTDZI3KgnT\neekLHyzUmcxHF0dPUp9WbnEE2C80+Ns7X0JxZjBfU+AYcz/dhaaqjPeI10yG\nCo8C9AkFaUekcBKcxgOwpehpfJYwCRTco7LYegHMZgnw0eUekmpJ8efZ5xZF\n7sH9mzp3jeI4ZnhrCLadhH4bpiioIE1UftNmMDc3C5Qs1fWOClotrzib86u5\nT/hKMjBjBAQIJTzhOWjmaOT266gv++wUF82pGL4BmmG/Zg4vIbgEE7Ab6hBL\nFjzwKiJFq6guWRpgoZ1n3OUg3MZq5OKXW6YyDomCsbKKgKsLQlbXTwVm7R1w\nkceX9SXCXYrZRMJgTBVFb1FuGf73TCoSxRfnj5GW2ThNZaExP8ezgMipunvM\njPUbzEzgGNyR8S1jgjm8kR2I5oWo88+TYxR6DQh1iwE8qCUG5oEAMo38j84t\nI91s\r\n=jmh/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6e28195a46e3b2108c76ee1a6a9ea9416276ce52","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e543628c3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e543628c3.0_1623287164890_0.7673963426946275","host":"s3://npm-registry-packages"}},"12.0.0-canary.e0c346286.0":{"name":"@material/auto-init","version":"12.0.0-canary.e0c346286.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e0c346286.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1fda76901e1cdfd975f386fd3e372b9b0d64366e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e0c346286.0.tgz","fileCount":14,"integrity":"sha512-B0Kd/WDYrdE7J55F07KrFI4AW1BZutXnf88I6gyNHf/3DOhDI67hMNpexR/sHJtnhoxxuFHfKnMFEhJ738W36Q==","signatures":[{"sig":"MEQCICurc0KTG7240XXZDQqIHHmg+X2upP/+sMndPq5GtWDuAiBI599mjv33T1qaI22erFV9NwdgJc+ssGsv4bq4SHibbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwj80CRA9TVsSAnZWagAAXgoP/0xsSM6q/sk7/Du1omyE\n1wB58Q++Z6sUE7YDi3LGMFjqgINOMXuKtINFAWi7htWjV16OsU3atEaC7qcf\n9uasW4IpOgHdIHIF53hS5DSgH7f2csfmAQqwk+Xm2jWg4dG0bn191MT/g98f\nNsYhGqlTXeIv6AIYKM9jAukYpn4H8iyjnX1K2Sg8z599OdkxrpbMUNkvGwWF\np0IAeK/wIB0JMdNfWcgE54JYrcwc0LkChgZKNlJLs08s09JzpLdISzYaopfn\nKoqWOXz3sm5jl0oXZJ5WoPQ6NmjaRaRb9DJTx1Rf7zWmVtQfh54a6GOqpQhE\neYE23+VDoiRFmYYFVK4RMZ31zA1OzaZNQmZxyBC108SJ4QZ90omfjBWaIHQR\nOdE4uaBPietFnvkU6v1wAx/PlpSpPvF9ms5MsseVaFGx7aJw5y+jiNTAmPtc\nioTHrSjynCKkEhGEub+lSHDRQTdsm6dALrq9RnXAlhH0LI/fQbdReZQSR8tQ\nUnEtIvy1CXz8MTOZvqcpdrCrzc+MOHGBENIkTea4Tm9gcPNwUGogcbDTWy4d\nA+92ab3MSWfr6fO6JHDO7NqhyCMxeqmYwy+dcwYfngweFSxg3YcEtDpJ2bG8\niGQ7BoiF3XYp4UC5FZu6v5oP1eR5dLDKkbBmo5cr3CYPL4LZDiYLSoWGgvxS\nl12/\r\n=p1bc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"405607237a611d804caa0b022897b683aed90ccc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e0c346286.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e0c346286.0_1623342900192_0.5216749748002742","host":"s3://npm-registry-packages"}},"12.0.0-canary.f43af5633.0":{"name":"@material/auto-init","version":"12.0.0-canary.f43af5633.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f43af5633.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"664d10538dabbe769ce7778fa36aafd3c8467467","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f43af5633.0.tgz","fileCount":14,"integrity":"sha512-+pP2NAaxl5sg6UuugM++EQuMis9chSkEYSWJaD+l4WVLS1tLty0fA4zZGqrSXHBj51CMZhg1Tpmvxr3Kp2bL4w==","signatures":[{"sig":"MEQCIA8QuCJPQ/Vh6zeqS2VkJwgN4LO/84FDhXulCTCOPi/iAiALejoIRaHCLH3+qflXGoCu+305qoQSM8WpC0hgRS6CAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwnduCRA9TVsSAnZWagAAcdoP+gI51aMq8uoF8Y1oUS2z\nxiaewYbnvC1+a+q1bXRsgS3maDU3p9U3zjrNkfMVSl35rErobKsZ53lusbL+\nHq3zLhxRGsnYlyIML+h6OUKjQXcQWnWvflx5xKienyqTX4FUmdnHb8EhrObv\nCmOAb0skt6Ns56qTBk3THmNP6/MDSZZ9rBwTH6gtooc0HofJAIFe25zHwCdw\nwVZesA9g7lxT4B/aNPTgz2ppIM9Tv1ZjGmqt6VmnOLr7/vtHLbiVvANM7Iba\nQR5EbhtcQD2ON2vrKqkPkMipko3kVttxJm91c0ocB7WzcvkaPY885LYn4GSO\nf2U5t3/S1nmYD1c9w/XoHRH1/brKE9wxmPBwexhLqvAfssQFEKRb1JMdcks9\nXfZteU6Tom6Gsqo/f0iS7HgP8+XtX1g+A3Ujy1lE7dzoNmcz7BQQSEw/w1Li\n6GVxezPWcAVoQ3DimPG4VRpp+No811qQKXW8hk80v4h7OpLbB2upoLl6FUdF\n9NqINhEvauY/MLlJUa7uqGEWJRcs4XBaR8A5IvNHkVpYqtS/H3+JAV8wFjJt\nCG0lYl/8Q4q0Kz1HB99297hwCH+ooRR6aF6yPRSEPN8ZjvpyPJfIssfi1/71\nt3tHabYiCyFGoQ05sAOUK0MCxn/MobQxrWMeg+hcGZ9A32Y0f59q9lE92Kd6\nIzhT\r\n=GncV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6889f0098642c4b4f3987ba353e17a9a22de856b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f43af5633.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f43af5633.0_1623357294619_0.7982213520822437","host":"s3://npm-registry-packages"}},"12.0.0-canary.8415ae585.0":{"name":"@material/auto-init","version":"12.0.0-canary.8415ae585.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8415ae585.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"251907117e29c52cbf16eb385e672f9da90aa33d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8415ae585.0.tgz","fileCount":14,"integrity":"sha512-Q7d/19wmo4l21g9kZLMwbcru747xRhi5VKc8d8fSO62B9KHxAAfJK6iCXYrjEcFjkZARLfFXh+1a8DlQZ6qwnw==","signatures":[{"sig":"MEUCIB08BmA5vPvEEuXAQqqm2MuEJxy8Gccw77OFtbBDZQYVAiEApSJzMiGcckBa/Hxrh0b6Pel5zYKEFqynAOlSPuM78hE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw4mmCRA9TVsSAnZWagAAXzsP/12w/rZm/36LgfjcFuEW\nixano+OebOz4iiXjy2aGavmLnCHmGvFJNMIsOSDVkk/QoEFwhMRf2YyjlLCI\ny3AazMW4QjyknMniGD1z8vQH6rwtlG9p4PdOYw+ofkUnhqDUP9/4HYjY8OOT\nnyZ26EUFqhog8XQ/umR3GvAYVoMrYhy+YqAnySxLi2dbplQRPYbJmAw/s6tw\nPG+PrGWbPZ8insEOcOguOqLeCgeyCbcK2SGeLOSl6YpHdFRbIOnfyFwVPfYg\n+45tGchlcHELNgZLpOouFx29LehEL7CXm2Lo1inchSuKfPp1Z3taCdudAvKa\nJKAqW6u+0Vz6tVvwqJNrAvSF55wdKsWaSudkAvLmGZQcal6a+Mb1mChxz4GF\njBxgTIaRUROEzmB1kmXOjSt/JMKHQlfrHQ+x1FNggUcpkBxcBmnytnaJSf/s\nwXWZ7Ihqx4pdgUVpWVGVXuUcI9HzqnO9ZoIiYvVnAf2TTR6kJzm6icmrCsPS\n8ba/3ofR4zFqfS72bb9HWtbChnZO5O3GrJ9vuYUznyOsnTttht78VPWzeI2J\n2rMY0ka4kuvcvLGXRisVJmu3M7dYIhfXKNK+JW3skoLIq8WNq9l079VyVRq2\nZfBwv9e4TNXjqlX3UjVMBHMSsNJgTKl26FMXM3/W7OkBu/15yuN5GT191vCp\nR7OZ\r\n=YjbD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d00f19e41330e3956e7355a23ea132e5ff37403e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8415ae585.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8415ae585.0_1623427494709_0.45597381697462813","host":"s3://npm-registry-packages"}},"12.0.0-canary.598fcccc8.0":{"name":"@material/auto-init","version":"12.0.0-canary.598fcccc8.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.598fcccc8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8d2cbfc85bd90e439b90e83235b77dab4e55a387","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.598fcccc8.0.tgz","fileCount":14,"integrity":"sha512-kkzOLgm9wcUSYrRJLob4QzhUcMaWszL2OGkHSY5ylg8PB0fWdqD8Pyw6wyJ/jTy9+sBAqFX5duTtLRSZJrHXQQ==","signatures":[{"sig":"MEYCIQDr6h90sF09RT8bkwhXRpR/41qfvpVNHh0dseCKAHfYggIhAMbuuqgvaXMrb9xoaWgI2OQe5JIYxvgrBii9NzjAB2gc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw9mACRA9TVsSAnZWagAAQmMQAI/oL1bcf2DqRKhclB9o\nZlYKQvO8cts0+zbWLCHx7woz0s1dEY5FdGfbsz1XkltFhliDl3fQeipPUoWP\n23WUqIMKODXnpR9I4TL/3VGJ4n4T5dGjiYrwOe6QjhE7mMC/68NkpDz6mXVa\nHdW5kPog/euKwLhjA3CZ28AjE2pk0h+sdnPvhbDh7tJx+qNKDhnxY1TyDvso\nd0vG8hhxBIrLJ+KQacDQqLiIZtsv5jLQO5ntTFsP7QkLJib9RDrC6WNMVx5c\nj0GCPlXt6Zy5+H4/BmvdB26RdTmbsgpJWtXoLX5+XOkTFTcRqG2pQeuhCgCA\nNblSCGLH1viRTWwvC45h639jYUYJGhFOEWGTIX20tLXDjzRDHmV+XOWyYZPD\nysFab0C2jUVNDtqSXqj+H1EODKNeL+PG9Y1a1bZz9j760Nt4Om0VAH7kKZ7C\n3jlPHX3EK8o6Ri5w7FWkyttNvlXLqSx6LZk292r5VCsI8k12uPLJDgvliLXm\n6mdleB450yfiF5YtT3i/nFArKkvYsaHsOzwXlcR3m5/+je0n6PCJmkwDYbf+\nk1NfX9A0f41QaxYqz7aT/hEuKeXfQBHo2yM1Ghvt1Uw8WRWTJdfobzM7KsTj\no2QaU0K5C5r6v2TOmGLFctTqLNexPo8lUtDdxxJkmUCMbtWqnLtoeLstHMpx\nqQOD\r\n=UF2X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ccbc9ce9b0bfd89a7b5d57d3e0d6bc2ae297f66c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.598fcccc8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.598fcccc8.0_1623447936335_0.8606746784640913","host":"s3://npm-registry-packages"}},"12.0.0-canary.5d0605188.0":{"name":"@material/auto-init","version":"12.0.0-canary.5d0605188.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5d0605188.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"181761eb586bf1b092f3b7432afca60454e4ed58","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5d0605188.0.tgz","fileCount":14,"integrity":"sha512-Vh8+8REGCKcqkQf8spWpfBdFkTQSDLeJQQHyQV6kwYh3tRGhvAGqGHqtsMvChMTejmmJ9Nvi3DGecVyzI1G2FA==","signatures":[{"sig":"MEUCIBsMatnxMndVVQHEzFQ5c/3330yj/Dqist9RiXaICWoHAiEA8JEGuqC8LwFtpXSubIKm2t3erXC6BnZcNJeApytfk1U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx5QKCRA9TVsSAnZWagAAqYQQAJJ17h+zfHCOGOUHpfgP\n+dk00CTiyasTec7Vc52nyYyMCqhs5eq5i+r9ItlmGNzl4dE761kpn1N53KZX\n3IlAfycYpyLeS87unbVUxdKpupXlK/+mcfBrKWXeYDZ6SBr5uwWGxMbP53J2\na7UdlPlRJzkIy6Uu53EoAcAhYjQU1V0xaM1PVbCGPEE5SzvE9IVaKHYp9rvH\noPQGpZBOgGNsVOAido2tzsFPzpW6wULzK4eFWS9aH5BuhY20Ubbn0MADS46l\nCPWyK6caubLWWHi6dZDYkm4FURntrr4tC8HOYVHDvxPTELuvscEdgQe7YdsV\nE9gTcVxp+bhF9OrkvyBkL+KBN2lhzDZF9deusj9EWeC3ieR+UGYRzgdnmjq6\nc27DLy1d/bu90Ya+LnHbChtiRaYPkDCE1K3q022ECDpteY2OZvwlYYWriHFb\nK7I51Iy4h7a4gptLKNmq8JDAuZGZLwLAb+aGKqSefWzi3ZYnBUWQZh7kuMGB\nXw6GPWr4Eq+3oNOv5+DoA70FghAE5nPqO2K44prqF8Hk0hbwKnfJxdGnJJA/\nRznx3Gr8oub8Zy1JXP7yVhk/xj2qP6cbCtZ/OpLkVchNEZZtatDNFYyzKIAu\nHVtV/hlAvocuXgRMef5sBwy18l7v0yiPDbJmykESjQCUdhpGYrf6+GOHJo2w\nSmlH\r\n=nA2/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ecd220c6043621c1d471242f32f317475b671f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5d0605188.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5d0605188.0_1623692298337_0.2134127761672382","host":"s3://npm-registry-packages"}},"12.0.0-canary.f147a2271.0":{"name":"@material/auto-init","version":"12.0.0-canary.f147a2271.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f147a2271.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95c3884e86d4bb8b514c9dd9195055bf4e7ddbac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f147a2271.0.tgz","fileCount":14,"integrity":"sha512-441on3b4exEOSV6d2B6bus9AP6HTNLFFW6IHhY7UtO1x07cimK/JH0UNcMqQFmCtnV7aqrlDlCkS3JLHqV7gew==","signatures":[{"sig":"MEUCIQCnGtRMMGoZMWORIF7EDgA58qBPLqgNCZ2LSLUX0nC+lAIgLNbdf1kUe1Jkxbs3HLYCpc6T5I49lf9Qcejyv+dypeo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx6s6CRA9TVsSAnZWagAAd6UP/3Jcdj3okx/oawA+s3aD\ngEo+wkif9mFHmNgKVXEpnzihbamwnFWHnUa192CWXkpUYcdksGdlPtbiPlFK\nfD4DU6cwE+64nm0L0MkNC650T8qeHYSqHzR+u9YPNeKPqIPmqfN6z4wfXlfT\n7MPfMOkLDCxm6X3xJyCYMfNtbLpTGikYdegzJ0bmSHQAei6XdnkSvvKFsgB/\n7rfjaPD7m3u9EBCcBbDBbo9kNTRVh7fkNjPFX1dMjBQH1ubpB1IFUE/YiMO6\nwQJWI21at2TstlhQx8m6mxDeJBga49lJg+BOu8ffIawnj5NwrVVMa3qYK7vz\nuKbzRhPygLMBw8vVE2rVm8ZHDLfbr3Fcq4Otsxp0UoWyrxfnZ5mEAJtSG0L+\nhvrBi+7cgp4kczlh/dS9m5+kH1694F0LGlYTWSfN3PxQD7vc3Z9xTDug0ztk\n/sbqGauT7KVPDnIfdb0FL93daTcapPRuRI9NiQWbS+EVD3RgGymwfuucuLcU\nitubTKw9gbNGkNgfO/rfDhaK22t+Ptt5l5t8RLf+rAnP0aHxV5W4HGsb+lZE\nw0VYn4E+Wru9EaxQOLY0Xy6/JNy/EIU5xT7cpv5BqXMXzmsbXEKUwjYHm1bx\nRTRlqbqTju8I2CloKhv3SvdyakDO0So8u4lwMYygVMCa3wMuFfbd642edIZS\nxhZa\r\n=tQZm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"70b871f06c34302277b9eb3064110dd70afb181b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f147a2271.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f147a2271.0_1623698234577_0.18698210544701155","host":"s3://npm-registry-packages"}},"12.0.0-canary.33579e00b.0":{"name":"@material/auto-init","version":"12.0.0-canary.33579e00b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.33579e00b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55abe21cf3755b1703b38061212489e60610e859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.33579e00b.0.tgz","fileCount":14,"integrity":"sha512-4Hj8l/Vn/UCSSpI2sS0qOF9/94H+0kCFNRa9nmrgGwPfNl6hYcvDIhzlmptQ/rwa+6SqSVnyuaUige3/j7mcgw==","signatures":[{"sig":"MEYCIQDLTgwwZdLXLUClE+oU+b26Vr+R1AyoJ167GNOqNuVPYAIhANpTc8bskpMKk84uwKJfoS3XK7QE2QX1/s4OXsUYGqOJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx/JuCRA9TVsSAnZWagAADbwP/jWmTtwIZbXdOpdswpMb\nMCCADex4vi1LYxPk4pktUUzBOmv5ivB/3alcaVyS4KIJjt1go3nK7Gcu9oGV\nFM/7IQ9hkPdy5Awd4z4l0OGdMH2Rgzb3CAI6wu1jD6bznPciG9GgMkFBsoSL\nBnCplHZnR9otDo2yEjkjhnNYRUtoVoQDfcc6PtoNn0RuUVyYx/QnsB2aIP4k\nwwmZl1feHPWjvWj/FJRtdPpB/Wuo7ZGP1DFGvvmLUyW2Wt/FTwvrPlusRvnG\nVstXFgkfgnaX1vOD7ZmAA5WeMPnmQg7+i69Jn9r3eEfI87Wg2aMGwcyQpm6m\nauAH6J9Rym8su066hgUkPAGJrfKm/F3EJrBxUs9m2u5ii1tpW4IKM9/Zj5PQ\nyqZSFdhmSnerNQv43iA6E9p7ODscQDkC+v9mK5Ny5KxwUjgw/aPWbIDoVP3t\nJp5nuLk6qhseXt954JWZXnFS4L8AqNwUawScj2CxTHtuY4Utw/R/N+iOzXWS\nEgmJOZQ1FrNKh0+I4ygtvI5HYizxz9/f3jo2aw1Llf+srbr3zDtvhIJnw8Nv\nCvGcBFiJzdw703JBlqQ1N5x5+aF3EAlPKZ0tzU146p0Qu5ymezyTF3T0AsA/\nMZ/QozcpAfdnhxXOQSvABPOQecqatBqJbtQNIoT8EEGEN3WH3uUmwkpbr/36\n+qVL\r\n=0WtR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"13a815cd8b945d23ba7ba2ebd6730088fa195237","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.33579e00b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.33579e00b.0_1623716462619_0.2481287514031878","host":"s3://npm-registry-packages"}},"12.0.0-canary.a6909c0e6.0":{"name":"@material/auto-init","version":"12.0.0-canary.a6909c0e6.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a6909c0e6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"98be4de91ea34230d38c5701fb58cf63f46e4770","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a6909c0e6.0.tgz","fileCount":14,"integrity":"sha512-7ND+ZNSKZvfzhSBI9OXXQn+da2mGnhYO8Iq/ccs3xGVLVKf4N37BUAdrzAh9MsTEHUnozfBEcjl9LPCSnE0aPw==","signatures":[{"sig":"MEUCICDCnO/TqPa0DuuEkfg1UMG70v3AeLIwB8LrERKvrRv2AiEAlMUPY01God3PVXrGFWwU/9G2wpVcNJ8NN0rekICDuyE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyPF+CRA9TVsSAnZWagAAXOIP+QFuIhyvFiDoJUUjQUey\ngMJ533Bv5r4TCbL2sqTVv1aPaeq3r/nzwoXpJ8jf2TaF3gQ19HVVl1vyGEL+\n9N8n5MhKkVB4OMwOyCAncgMx4hyUMcVnYQuRcB+qheFp4oWnZa5wWIhLIcRY\ngF7XGR+WXqpL/uc4sXcOt/JirnuUB3MoRy0I926V+brgKcwLH/EjsC2zNORX\nG8X3OXMfLiLyik4bf4hzac6czzBjbMgqTtK4R3H1bExCKN3CyHlDBHOLcWZV\n9T96wkgjO9YtC9bNsxdtYalGBTILk0lSgxoolA6wTUeQmxxd+AkuZh9/N9Uo\nA0vEMB7WiPUvOIowis5hFYf9TyS9BuJW93mgcxA14J5Tn/lk88LgWr9nO5E1\nFGGBZ+tHHvC3hWBHTE0p9qTD69kSAzZvk1/qXCKr9+/OQYHzLb8kpQpAyLFe\nyUKcCsxH4rD55GHo1xh4+rWSCSoXxOlNBAJPdUbWxQPDC6uuHEnjkDcbn5Ip\nuHEui8qRPwEtqYBE3hQQCObrdbp2IPOLWUwjx/pplqUTmJ8NwA69LOS/BTQ9\nul+rWNES6oRDqnoyqsD0qzdxFiHuNkKsQz3JBAtHSzFJWmn6USmhMgX5EjkH\nIFPF5XCY/3V7veoauQ7Ub0tIWfvhYgtMNZG9CbTaw6TvFd4klMkGMRYrIRrx\nwuy/\r\n=bKlG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f4852598d008bc1750e5e9d2a0e828aa8804f87f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a6909c0e6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a6909c0e6.0_1623781758670_0.9910543931784002","host":"s3://npm-registry-packages"}},"12.0.0-canary.c18b5925b.0":{"name":"@material/auto-init","version":"12.0.0-canary.c18b5925b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c18b5925b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ce3b8471b4de4d4771950ee21d3179b8868d3ad2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c18b5925b.0.tgz","fileCount":14,"integrity":"sha512-xQgrbbSmPNl9sLyIcy0yslL4GyiALlu3dVHdlV9c70FP04lllJp5YwgU/K7zby+wmuR8gF7awLc98OxXp2f8mw==","signatures":[{"sig":"MEUCIQD4pbRc1Aatu+zgi7etJC0AykFHEtZ7VfLgihtMoCpHewIgUJ9hL3WAjY3H2qsdXKeLdXEHwyqc7rriA3g7b46QcE0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyRVvCRA9TVsSAnZWagAA8TQP/RAW5GNhTvAi4s7E2AjD\nGL43/Xp3lL5Y1gYySxXU7KvBNi0ItCiaUjfQVzSqt+a3b2LBrEYyf/NXmIhV\nJXYhO2Psp4VU1WdLCMyjlXt4CAhK66Vv+/ladgPOK1gzuEJRYxAnun5j/RT4\nFlhZ3UDBgyl1NcIsjtSfILFcTuw8Ncc3cpqOauxAJfzjlNwnu/9ZCYHaOxhz\nOdW20KWCw2acrpIJcPSXtYOMcjjsKkVHia5mGMvZ7mflhPwFS8JamVoBcgjt\nCi5+YkfkxvnjYzdt42w6eNkIoWsZo0/AT0Rk3JPiGIg4nGz32niddAm+ghWY\nl1+hErDCM6Dn25FC9Ii5HPIiRxcE2RJBZHquYY7hxNDmMLykusX3Mch6Kdoc\nrZca4HkZxd2Ex2F1fxFCGabrKftA1mxVj7yaRNMUziH7wI8MPea5dg0n7JpJ\nMN79oJATqhtHatTcZHZDsNoIzUis523ieGf5YDvybFEPMUSgDsPStMASCxYj\nv/tsL3B1KQuLRot6OUpt7K7ZzPFmmvIOAYMfDt3jQLJ0kKOuYcV/jpwR48y1\nhfU0R0rwC7vy62p2sKhl5LRiee5batcJqxG+MQh/GeZCe2V5vivMNb/hAynH\nSOn+2nuSSHZp2pVxNFa5oqaWHsM/jj9J6379o59fBrt2LTMHWIq1vAFgIrpE\n3hJW\r\n=mrKc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bc767c077b93ce415f2505e54f329042c80b0d3c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c18b5925b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c18b5925b.0_1623790959654_0.040046527091919915","host":"s3://npm-registry-packages"}},"12.0.0-canary.7ea2e830d.0":{"name":"@material/auto-init","version":"12.0.0-canary.7ea2e830d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.7ea2e830d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"19dcf567e1005cf83d1d91fc3f27772bbed4b99f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.7ea2e830d.0.tgz","fileCount":14,"integrity":"sha512-EPGSZLemdKujkxa5PgIK5D3SaPf2cvc8eCWgKOlzwC828trpNYLHseeM2a97kZ707EkD4b9Y/Y/AOZ2rkNxhvA==","signatures":[{"sig":"MEYCIQDsAUL4U8YxdOGvx2Fdnxb+/IvCQwiDfAAJwRW5pxOT0AIhAJIcdm4ymEU4NNcwVDiv6wyjY7Msu4Gsxouw8/3wnA65","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyS6SCRA9TVsSAnZWagAAqaEP/jLZeYB/srYLr386duL3\nhRnIYqPC60W6aX3PHEdDIJGlYxnqsfwKojoR6B+saaXXBxoPT81NCFXPUEko\nz/020DiPCFOTTkGGWjdNMvymRe0nfTNBZTl51CVPiChHIRL3+IAOXOfUNgp/\nHT3Rt+zDNU+V1XL43OhZWVYJiLUWaosm0JTr1irDIhvekCTAwCBmqhyuKiTN\nsvGyRCAPVtDnhWTh6357kajTqeEvMPS3Kd3toJ5MOEbuPbEQLYfKH05do5uq\nnYTp5SzSpIkjPcibt2YIcPj9QxU9qx4+pUoWU5wQNNQZ2bNMGoCuQiEwN1FN\nDTRODc5RAohtGz6+ezzgnksr4xfQ8rLfqwpDmHeMr1iEVJS2tIPuMeDUcT6g\ntA8ELMQEoL7NDmYZ7wCYeaFW/nRwfNvot7IUwkkNG4TVkW2iKAFxI+FC92mV\nC8JzoxidhzS9wQyoaMdcgCSktiNT1i5uzHlpAb/edkSsYd+dq5jo0QiXlUT6\nsZMUXaIMqr4VhtrzuWRs4DPFq+TFN8RL7rRFUe8vkljLaG2/a8xQD67/cDrx\n3ztdG+TVObiqRt31u53N4m49+i7w93qKbZ6uLxeTIQAxUYPZz+veZ/nyk0HH\n8Rs502msY24ZQ5i28FsSc1UOYlY29sU5uknvEtbU9iD4/OIUIItJUPAv8H9t\n3kGw\r\n=VGN4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e1f3cd5692e7f4572664681a049ec1ea1548eb15","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.7ea2e830d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.7ea2e830d.0_1623797393923_0.29476667215271535","host":"s3://npm-registry-packages"}},"12.0.0-canary.271fff902.0":{"name":"@material/auto-init","version":"12.0.0-canary.271fff902.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.271fff902.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c900fc7ea54419d2fe4a44a0887dff2a5fb14e38","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.271fff902.0.tgz","fileCount":14,"integrity":"sha512-lD892SnqMNf7xZEJZH8wnjyVvI/unT/JK748EemwIXAYxLPgEyIQgVgg6I/L8Y+Oso1N3+/rjiiaHc+xKfs8QA==","signatures":[{"sig":"MEYCIQDgO807S22Nq2TfuZmV2TtNVqlXBWnNvpF0kReZcUjNOQIhAIYzEeNJ1D+dUweVE1OImEz03VPdqKopDI7OxCuCPTUS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyS6nCRA9TVsSAnZWagAAiwkP/033w6/JP0ER76cy9KrP\nkpRww493sqbyOZAcyxKkgHqwBr/M9FHoBw5qBnXq2hVdR763daVPQLoTpoDR\nw+Le0Ywvl6zKLN5IXJfFGDIZi7hPFnJYVZpdFFCNypC2fh2yDQtjo/Eme1qm\nAcmWCmtGSp2llJI7CnYq4511ATD1Cjkms7oJ3a2V5i7MWIb5KHA0Vb7u1FU4\npkYUVR8Fnm+aHYXbKxWaaw8CZOFUW6BntS1XSL9ulhJdXhg5pk4fuZFmrGb1\nhieOFJGqh+h7tCWdKIJNXvberTE5W85hGwpuNoupswhhvQ253oRLvQGw7Heo\nCnXPShQ1WT1oQUNBV2824aeLWtMqjcp7eeNvtm1aeSlpk7wlZAJnS04O52uf\nRLbJk2Zg3oSzY6xRSTGQTmTEeqk09mt8UVypkvGUsatRVzEPJcHsTHpmvmtG\nZ/1PVxeahPnAc1F8T7J5waRMBcPBDjjmDJjF5nroXIbEPMlDK6Af482i/fSv\nEogYi/0VcpaVrRS+ztyfu+uFZShQrARbOO1BQ/hTN6ElWUQKTs1iIoAWIuhx\nKdYxhQfNESyy0kUfN9xh1RIDlPBge+8IEy5or0U4kuNfsxxh/Ee9ImQ1ukOf\nQGI0eF8AYsgKOkHUAK0nL5QIS6tQUuQ+s/eXlPgUG6rNuQ575azhr9WJZc4Q\np6jB\r\n=R1Lg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4306227bc7e5f014c5e961178b436b394f0dee6b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.271fff902.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.271fff902.0_1623797415816_0.4467397212407356","host":"s3://npm-registry-packages"}},"12.0.0-canary.d96f0a1e0.0":{"name":"@material/auto-init","version":"12.0.0-canary.d96f0a1e0.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d96f0a1e0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"67b1bf288aaf2ac035805d405196ba420eb9bfd9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d96f0a1e0.0.tgz","fileCount":14,"integrity":"sha512-hMxH/3R7+frS5DW9euNA5iFtbsZSzG39LSHIgb7QYNlLeQYg5YhptV/Xv+nowkW61g6J6lTJ0Qqk6/MFFBPqow==","signatures":[{"sig":"MEUCIQCpRgs1JQgi7uY+7l4nOchknTkPYl61VWvViRzgOWr5JgIgDlFMksZWFSKR8WDZwCuznbOY48Sd9HI1vdraHZf6fi4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgymeLCRA9TVsSAnZWagAAjikQAJA4mvivK+YHGY7ZT13W\nz+v0KfcPamuyeXQL+0+KDxAqHzX3k0574XRNbIgeLv2duffk7b7akS97GXCq\nl8JhuOXtw6TIQOtPK1F8HLKnYbDVRy8B9n8i3eBQEMvn0RHt78g4amO6v/hu\nSwhReOR1FD3crs8Yw0m7ifBmh48/Jwosoi+blStS53T3TRCBpenj/+Vb4DIo\nqLgMwkvPvAvA+XOsznqnw/H0Qz5kpvYlWYkqyvBPUIW1UnolYXiVp6tghbe+\nzth8qoBnNs2X/d5t7bZgursvD+MEC+CQdxqtdPkVRlos1V1PczOJ8I0pVEyz\nW81TeW6mD4B3pu5bj/SumM3BtshNYKn47a5ytpNWzc09kmltzixPuCV7yXbp\nf8Q4O660ehY+jXwUoWE2hOf5FQBJCVZj9J1RBcgIGdgWD1IeRzuUhS7Vzduy\n6ZeYizMknwjZ7xNt2EAHS2ILi6m+SCLsNurAZ+tDS6A85wuKBGDZN21BMAst\nKM/480VKNFn7py4PeXRWnsYAxYnjUh3dmlNsDovMa+vtlQL0T701Sz42XCiO\nW3WcZGnjDNFqA29bCI36FUQpanSq1CGwaWqCKEAP/IyPGTQXLRK44MVlXBhm\nkWW3HYAKZQeSJGXSRGFrjKCfMdj/FBw4np9/NkOdxbER0fST9hi9L8bs65Z5\nJgzD\r\n=FfGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"32470ff9121448fb2599b2985e276f51563ed4f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d96f0a1e0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d96f0a1e0.0_1623877514673_0.39221818887290216","host":"s3://npm-registry-packages"}},"12.0.0-canary.a6183801a.0":{"name":"@material/auto-init","version":"12.0.0-canary.a6183801a.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.a6183801a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd400cea1a72a5004c04063d4fab7fc69a0add1d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.a6183801a.0.tgz","fileCount":14,"integrity":"sha512-s11td3KmYp2/MWpHSkOCf1V4r+OKlEFeAvQBXq458AS6XYV6QQyFHNFrrI1J5sUA9CGdxW0QgRmvmdsz2dinKA==","signatures":[{"sig":"MEUCIFVre8lislXjvl2sg+HtaVWaGo2BgMFjt/mk2143dWOUAiEAyaqS/aqVvaDBYYOCEOIz/JUNs7qa41HM+8ZFNllXTRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgynVuCRA9TVsSAnZWagAAEUIP/1c+HF2wpD1kXGbalKHd\nJHqY8JD1LW59X6pM2dmwBIlF82Q9BPCU6YeyC4+60NZQCG5ikxcqQVyTSz6L\ndlgLO8ivSArbIZEQWSuIy40r/blcGRXr+IesxF7KJIcOxuADJby+uR8CbxcC\nLZiAeAvjZc132/PgUWQduXlkZ5I9bhdkLrbBTzh13hqKCrmKMRDlCQRaoyVI\n4PTlr7EO3AG1+tNtGkhlGVnLe/RmIDKBXPOZNM/7xEdo6203FOw2oLsAuadB\nxJJTfT7FR33pM466YVZraNFWAqaQOGD7zUJPihb/As5nZbvOuZFdMRhSc412\n+IA7zahEbfhqZGrUPSMGMGQhDc3eq205gwXiyIQyqIAzMA8XOvWUgf3OaXXv\nb+fZNrowpnjUlAuCuPrL28EhHdtw9VN2ocaTVCF8NClbeMojXcAIuRmAFhzS\nROGwRWpHyouCgc9AH5aSlmvlbgNUYpjAsFChsx0gtOhN02H7b/j2QfnO8Leu\nS708x1YKkMDJF4oTHLmOvwmngMPvPuKPX8VS6LFE8HYhYHZDcbHjMWlDc+HI\nubAgulvFlJY4M5lKZUr+CqWIwjuI6yao71JbC4Z8ZpSrpqNQb7hUmgvzVdl5\nt10VnZRHcTkECoFv+nwzTUh7G0CWLVJqljccx1B8vMrHD0fKt+x3DxPoNWLG\n5h/B\r\n=NbQt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5eb42f66e2a670e1f9573b4feb1a600a95b49b7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.a6183801a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.a6183801a.0_1623881069668_0.4932234488803069","host":"s3://npm-registry-packages"}},"12.0.0-canary.940550232.0":{"name":"@material/auto-init","version":"12.0.0-canary.940550232.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.940550232.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf390d2d2051fa82a28f974aabe717ca4a062726","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.940550232.0.tgz","fileCount":14,"integrity":"sha512-zig4mxAhyYxF322kiMxRriI/s2p8HRNRw+xKVTL7vx/MC4mhak4TA80UzriLyhwHKSbduR+7fq6j+CxKt1cJVQ==","signatures":[{"sig":"MEQCIH8hZHVgkhKzMydD4ppkGW6YRMbo2coYP0ln/iRA9yu9AiA9cW8sQhkqVesNSYRhDcxG/CIiHfkLrVtBcdry/lwPbQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy6ThCRA9TVsSAnZWagAAFUYP/jP+I5Kk9CMGG0MIXGeF\nLKDW4XT64f1Rx/P+3ktO5IGbGNGDNPxu27VPXPuOxpA/nZV8ODUBC6lp0CM8\njFORyxIUqLqXdEeNaIm8QZ7FwBYOUC/gaTNVkqvuhyNRIGfib5EngXgpemyk\nrcJUeRh9hj8D92flETi0ZwCgKimC1uWtHnwHI6UzVRceZVc2PnUe3q32o5U0\niqiM3KBkkjfQAx1b5zIlCnVoxUo0b20Y4EsdZ2UeWVktgtnGFiOa8myRJfEq\n6Ze2YyYy5R7Oag4wiLcWgv3YEzH8hRgfkcvq88XKVI30s7NI9CMBVOZ/eQKD\nsHFfDi4S+IIvh7WnRc+YjzKoivmmLAbp3/qKsuNvqFwzGfx0SCQ3n76PL1Ow\ngDERceQlqmHODT6laZ3dzDz7XqIUOTsjawnaEFiqsxwQ98nJHjKbt2iLrYq9\nI5ps07IYHUBHYiociBxKI1x0HhYuyOqD2Cm6Elpyf9XwOi/8BhDdzcN5UQbR\nVbB4GTCs7ZNm5oQ+8viDLOG8EKJdSWZgYCLkhZXi1sVO0q59GZXqxaTzVCKC\nLnspHE03NQxViomUdyRPfPRcqDREYtpd71yVhmXEidpqDrasFM8iKzVx7xuW\nsVdDn8zb5cdyuP8yNd1LmQxdlwI6tVkH1IwWIFyt3/Tu5bvqt2JQfRShCVLX\nRwtx\r\n=y6JL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d6560428828a2c7ac90d050a744265e63c8563e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.940550232.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.940550232.0_1623958752949_0.20561453842792798","host":"s3://npm-registry-packages"}},"12.0.0-canary.f705e8048.0":{"name":"@material/auto-init","version":"12.0.0-canary.f705e8048.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.f705e8048.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c532375e1814741e6c8e6b95c335cfe58b23cfe0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.f705e8048.0.tgz","fileCount":14,"integrity":"sha512-jk3D1CzRkTICh+gXcoqk6StWdL4EIanNgb4xdGEeIa8tMwHV/O19EVrBiaPahLLYvIRzTBDz88yYF6ZTLQNc5A==","signatures":[{"sig":"MEYCIQC8piCWBvbf+7EsulbgEtpa4NbTwmPZsPxmqNKa4Z7LOAIhAO6auogK0PU4LBTHOZihaLmjOBtrRC09VAs/jelHsJFn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzLp1CRA9TVsSAnZWagAAcCUQAI8ucudI11sylF0VyRmp\n2dgFXd/1AOzBEzdnTQcJsnU4hkTRlFoEZAMfCXK6i66dTXTM8yfedvjBz50x\n1QE9p8TKQpWS15jafDlWO2tcx7pV6rT5EBw3xaopZ0lFldVJ8JbWjaRzJ+4B\nDUdGbyBesJpoFfYUcJb9Vy0G9qYVSw8injKhsUPUqvSCa00sbNBw25gKYJEt\nclGMz+8h5jDH8lh0vuwcATiuB6Z6QcOHX4PzzElYMchzAdtzYZ6NVY3lgePJ\nQYi7PSek4o2ec7fwJSaTUqOmnbQANd19naiJHiW+sGa9SAdGVcAVklJ4/2hA\neYBCpa35UNcIthTcm7GPsSfp7KoLTjcBKzH4/Cr5Cg7FteqcXoxebLHXO6hP\nWMgrDoRnl++e2y+JjSW8RGIQkAq2HSb/BmSGy8qB3hAUge8ojm6YW8TPQJ+j\nQeGIS9gIWMPCDzXkMv2VjdX5S6UhtRgXzYv05El4efEQMnounbTr+l2wehI5\nM6ikyrvMk7U54d3qCj4Qe30gKS8lqql0gzLmPdlEwe36n6vFIU2fDTELP0k+\nDDI0zTIxh4pIHky7Ql5a8JqLUM/af8vGbxTy/veTeeUWoM8H/1PjbAgP1NY5\nG6gN0IFsBCPACcsTSFfOge46/pUwpLxmMk4BXVFK50fSszPkVdv4mct4Mj08\nZ+jh\r\n=jNhf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"65fc1ee152f3abef35713b70962e3d5b848a5e78","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.f705e8048.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.f705e8048.0_1624029812871_0.21052586342545387","host":"s3://npm-registry-packages"}},"12.0.0-canary.08d791f37.0":{"name":"@material/auto-init","version":"12.0.0-canary.08d791f37.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.08d791f37.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"36a51189a04abe75c390cd6b342b2aec4d4be820","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.08d791f37.0.tgz","fileCount":14,"integrity":"sha512-Jo4VBvjwL7YCJe94nrE6rt56oXm0scCnTtKaRzPVQavK1usJi0hfoCVzzpYAdrEHys6UJdtu0I7TFdIIfody7w==","signatures":[{"sig":"MEUCIGzpEUWMtI/x8sUtDyWiBMVtKum3CDuK5q3ZXjA2lwE6AiEAqmAq5lcLO273pMmnjnkLBQqrKRuhqVo7NhlXrWax6rU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzQvZCRA9TVsSAnZWagAAlb0P/i+8AenGXFzZ+ftHCnr7\nWR8p7R3BV3OV8vDZhlrP7wqPbKjd8szH+shwyBoLLZ8TuPasZGd9+9QyBKg7\npGm2YgEEbI7cLxsuFEe9jrPaitjFp0wvZPM4m6OwrcECjTiVf6hFM2WOHe7D\nCDXhPy9eoyvTS3BS1mNZ2gRuSHFQ1w6kuoo2ZD3CxUavu90Jtpa++dct6ahd\nKWla07mXbUG5ViGrg+AjnRJZyctv70mCF7t5vausZkdkrzimj5PDHU42KKPt\nMYL6HJguI8D2MCXu8hNbazcSOrps+fDnbmzeLE19HaM5I91Rcse8YnPn3CXN\n07hatDHekcrIqpxOmKxPbLGbJZx1t8IDUGimeH0AEhD2scedNCm6j3+2jLMu\nn49D/2JzKlZekghoEb9HL8RJvARUDYpZETYPIarH962SOrmn2JOI6j9CqlRq\n73iM2MCPkGZOREENq4pVzVmWCmcNCrcDY9+BGcIxYc55Lbj3THZb5ay1kRhr\nzYtHAbHVteaBbdXL0EKQHmoM92y4gZk41M9UTf1Bldxiw84IxQND30Seu82W\nOsZlvj//NS2LYLRob6dKlwnee1Cg/tbREN9Tk7qQC04EdKk9gEhFFGS6UZWM\nxL2L+OwHCytpF3TRqCP/DJgEOT/VBeQGIVFeUP7D7ETDDfRL/R6/qu91FqOU\n23DM\r\n=QqWB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"854f301ec7183c3cbd2e62f9ab541f21aa6a459f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.08d791f37.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.08d791f37.0_1624050649158_0.2833004045797449","host":"s3://npm-registry-packages"}},"12.0.0-canary.e38d7440f.0":{"name":"@material/auto-init","version":"12.0.0-canary.e38d7440f.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e38d7440f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3dbf13ca7b3007a186b7af8b724f72f9e93ec724","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e38d7440f.0.tgz","fileCount":14,"integrity":"sha512-A8eOjsoRp22YboDsMEACAbCP2KTRsbfP5J+g0kGPrR8zFagFasat1YMuPxvAKUcQsnGwmM682qRr/d7B/7qWxg==","signatures":[{"sig":"MEUCIBnFHdMwWkQq3yjtj0cqVvEZnvvsRm97OWOYiaqKENR6AiEAr5XvXczQbT+h6d4WFG/YlKEVSsI5qN8hTTWZC/UALCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0M7TCRA9TVsSAnZWagAA3B8P/3Pg4hoBsE/wUT85IbcD\ntgaEyqWj714JUgI6I8h6sKf4XFYopRcLUmGD0frklnj1hYvrMciewquVH/ry\n/u35wkmxKGzM8obpBwAw3RyfD9n5jRGA66dvv69U6oiFAa2PZF4Clt9kXN5P\nCMtiskPJjt9ruP382wbf7rro7czDhYUEaeKJ3ONV9v2lGPNaj6Fs9Cxz9Hnb\n5B6yfXJ+Po1US0h3MhU96AW6vtEYaweUiS9wKPsfXzlLA2bNO1UGi9BcdPXC\nxybczCsUNvgGlP8EeIkAD29VuIyQisvhM1PRucQcMa2lQjTGwYqeNhLLLSM3\nHzeG1AySuUZzukEbLhvbcQ0ZxNQVb610YzIqkOPn5GsOsc84DU+EhMrrZgKD\nMqfuwBrtEKWT9p0NsMpoPEImzYasZLxLaXfJ0FajUfxPkz42KiyaqecvIXpJ\nQVEffCHcmXBrtGpNjqXsdVDTafzbRay9DdP3BMXC9gAb8YXkk/rmR7LBW4nc\n9PlsXDyQ4qNxJ5Lst6+/9Pja6TXULi6ml0wnn4lu171UVXOY5BeUivJ+bwtO\nqEsCR6hHRJlH6WLauYqmgoE2Knt3PzojeHfgAdofLLPQWvT6ooDE2P+f3vwZ\nkHfcpURvuKUJ2nrSLPMfd1cmVPdp8JbpHQalUljzh4b5GKVesiuhGqBqnX03\niG/d\r\n=Ln9C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d46835e968c827eb3b359624ebb85f8e3ccf528","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e38d7440f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e38d7440f.0_1624297171043_0.21757162804974817","host":"s3://npm-registry-packages"}},"12.0.0-canary.75900a5a9.0":{"name":"@material/auto-init","version":"12.0.0-canary.75900a5a9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.75900a5a9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd24623b80e7dc8835fb27d3ae1fadac20513ad9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.75900a5a9.0.tgz","fileCount":14,"integrity":"sha512-ZXPAw6n0Grq67yYMS6p+hMVM1Jg2N0f16x6SJQxtwomzB+7vBE9HZ6HCAvWNC9y4GI0RPhm0f7Ezc24yzHSXlg==","signatures":[{"sig":"MEQCIGYfgtyIG0h27uqsikmQw5Kh6OJhJLPF5aesOQlbuMoeAiB2heCaQTdRHAzmejdIRKJQ+STQxCsMglMixFF7wCkN3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0NwHCRA9TVsSAnZWagAA2aAP/jWco544QCBELE0kWk4B\nzrBlhN4OWKx7sizHpCQF6NnjZJW6WGGvP22vvtykiZCS9uQQGjgwc840Z5TT\njXw8k401GExGSambq9HTZb292cIe2N5aGEo589xxKN0youC/mme56AgM9Zwj\nTQrnbXTzMqAv+eZzAGAHpMgs8Yj5bdh0n7INAl+aFPLIlfGRpGzY7VmAflRR\nhwGoYf3QCI5Ok1pATjyB3REElwO75BKGha8QeLmc0rcf8X+bNzI59hLF7/KM\n6TLPm6UPiXwZCw3WSHE+6bsbaPkTR9EPGBBuTGEUWaUnAwTf54hyliluGg0Q\n/CRVOfJ7Ac1LMyNinIiB33YKDiM58HWKBRBWs5gI+BB6PTR/KxCG5UZgm7Dh\nwkiJLRa9pA4QH29bvY8+lbO9E4FWPCYpq4SXSrxQ0q1ZvTW18zqZsre8/5rl\nk/ktDOYBe7YvPU/KpCJVSeup+lgePLyEgCC/QYydH5eq/C7bxblnGAQQbVAN\n7Cw08kRZZkj/BVEif+4FFgLt3Z/oWgMvqRdiyowiL8abGh2ktyINzWYL8if5\njNIvDE/FgPFaZa/dXbNlGbWxYu/JU2q7dWMCe5rPgkFk2K+ncVej87dK7dpi\nMbW1NcEKQFFgesQtVeTulWrJP6HZl0PsWZpRnexaySy/rNqcKpb07tipbrYe\nO8TJ\r\n=MATT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f08daf05a41f44cbb5e5c07039e1e165d123c405","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.75900a5a9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.75900a5a9.0_1624300550821_0.08917628635223118","host":"s3://npm-registry-packages"}},"12.0.0-canary.33e6f50e9.0":{"name":"@material/auto-init","version":"12.0.0-canary.33e6f50e9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.33e6f50e9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1d46e968fa875a668968ad280b5a2bdff47f51d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.33e6f50e9.0.tgz","fileCount":14,"integrity":"sha512-CJjn8exHR7DeWkb9ONd6+Zjsynie5TztmtaFFJe2VZCP5fUK7l7Y/OK2Cd4NqT7GsdxAXKgqq/GfTGR8RPXymw==","signatures":[{"sig":"MEUCIEQKcjucBD7nrJSTZt3zyX193f0rAMC8KjHmHAAeDnQWAiEA0A3q8eNSxhCKEo3HJFUp1q5fzt+0hsGlHfIJSbE1DEg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0nwaCRA9TVsSAnZWagAAIjMP/3kX854oSBauMj7Hk1bq\nFaqmUq9p0Ts5LhfQTUfkIEsnCU4aLYT1qyBUkChlMMbEskd5mwIZjmA4gLog\nHJUhSDqpS5QAKBsD6SFhOHA9cE9Ud+Zf28WEIe8iiDcxWlVsYotsZezvV4zb\nnsPBlZhK88Zmpo1zHlC24Gdd/iMMFhzed8In5TSquoTO0TrCkH2SfKUPFplD\nvvLNXQXdsRPwZIGTdpvUBvBo1W8JfMrTLDwmjZV2av5/b+Og0oZnPrRLkGBT\nh3L5I4Bc0dZnycWZZPWv4iBzmfImchhaakQhZbBNdMyNsaBGhwh45jvAOS0N\n4KAl5ELFb9mq668APXKOvvg6AVbo9zvAuevB8aMsRUjA4pFVNLPE9xtKwmJE\nM4O/anyw+i06V2+sCJyB+rymxmxWjMYKoC2z2xkv49WfvpHpRS+3m5xGj/TX\n9iKSwMzNPvbKRVD7hSKbgy4mw0lEE488AA+d/lgqiwJIpSmxc8gSG+YSTS1w\nvwtMj6noV3XvjvvSWYnbUQP8beV5T7BxaefQ/SVSw4v+fxzx+m1YoMgoHGJi\nWRwizU5+EIRb+Eakdapv3D1VEJgb1hnstGusH68U4lx+zVIbH0N1dM8WL6pa\nj4V0BH3UXw2PfuknEVrei7DeiPiSdmsPoFDAPqAWrXmv3DvKabBYZwdPvQup\niFxW\r\n=UiIj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fb208c22fe558f863d851b5bda74038d5a3b09d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.33e6f50e9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.33e6f50e9.0_1624407065535_0.5736795243585453","host":"s3://npm-registry-packages"}},"12.0.0-canary.8c685301d.0":{"name":"@material/auto-init","version":"12.0.0-canary.8c685301d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8c685301d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5bd576b9c8d8419092521a12150bc9a3ad6b4555","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8c685301d.0.tgz","fileCount":14,"integrity":"sha512-9MGZjGUsX8kWq57fKMhnon3j+1Br2nWDjGvUyb9oddx+J8dGyCnUhDUM8yM0lPdbK07jim5Al/T4fkRbozAW1w==","signatures":[{"sig":"MEUCIQDPUCMg8MqXBvtTNL+I7Y4cKMMWRHEMAdh/9xYO1m154gIgK7zOOjF1ZMG6NhgZ26s8x3HrcigjmP6UvlTx8UHPMhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg03wuCRA9TVsSAnZWagAA15gP/R22mUHsk+y1IpOS63nr\nUqFT70TcIlF6wT2cqXNQXlrBSMjphJL0TOFhemcLTeWaaOnyLNjLuUchVNuT\nfiPBZiqDzk7JglcgEuMXOWsbQgn4ojgf+4H9W+Ce/xYcX6A7vS34KmmPZnXA\nzGaOh8t6bZGMEBKCJKu9OwLg/LrUkI99bH6xCTIxysdBiW9ZHhffIsAmdtqH\n/oRs9wF1PLjkJZh7GUEh2Th5/DXwo9W1WrYQzoUABgQIHe2A/qOZERGeFCXE\ncSgF//czVIU2uDOljb2Gcl8fxsmKwz0WaNQHbpte8uK9Wb5OTwg0vDBLzFeK\n0WXFmvuEzuOzM4pz3lz9tURYFgxliZHbt4phQtA61Iy5E4nckUCi3stShs9R\nxXFk3fqPmIIPPUm/rR22idics4rfZbGca/U0rU1tpplc17zPo7VCjkTdlLcf\n+Qv0AcJd9v3EhGrEmn5etOsOL9Y2+EtmYMET0NjYQtjlrtPRZI3yYMHkg0wz\ndWDCd8KQtc/CZ9/XzfS7nOXYkrdX+Nmk9rPWvsKp7VP2LHPCI6e/VzOGsmlt\nn5HamnWixsi54guA0fhs9HF5rmZJCMz8MsZ8D0UuW1TsMve9I946WDdtlSlB\nK8EpFNWbPuZDjQAr8wRhcmhIOmWfGWbOu1lbPpbIS5JRlinFEEB2tkmjlwra\nsA7r\r\n=aPh/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"43d0ab810254e565375b55ae118522d89b7e9254","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8c685301d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8c685301d.0_1624472621887_0.037836484317911534","host":"s3://npm-registry-packages"}},"12.0.0-canary.8c7d994ae.0":{"name":"@material/auto-init","version":"12.0.0-canary.8c7d994ae.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.8c7d994ae.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04fa2a27b2773d7ee37477bbc0eaf5f4b117f0f3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.8c7d994ae.0.tgz","fileCount":14,"integrity":"sha512-3m3AP3S6zl8AWg6TNYNGrBXuFmghR5BInp8nDkKqDPRxNNdQSUnj5xGTWNN017c9JorKJIb7UyW1zTLgJ2Y1ZQ==","signatures":[{"sig":"MEQCIGaEb2w1AqycRQRdG/vgYamo957/MYx7GTLM00V8ZSz5AiAEZXc6s6XI3LL5qgSXe2cp5TSv7v78zIKMGwdDPngrlw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg04rqCRA9TVsSAnZWagAAYs0P/i0xbk/TCr3az/AHLlpV\nuTJy2I8GkncRGoLnyGRiM7qCSHOJ1rvv7PrpPSCXOLz4HbH8WsLzp+OD9hkg\nT5id4LH3i9rTiZ2fPkRwlynJBDly33Ng/FAezRglNA4nKie0zSCMVARd/yR7\ntHR6wFrSDm4800uzC9JCiTbZHZvJjISKLoLsYVEtyTg55kPT2kCMrb7Psqck\nLU17OqUybiA33CuV/iICy0RbhQo78i7VqV7rI/yu/ynzceZ5eHIeYCAusIN/\nGwaN9KyD2Q0qI5dHGzxPyY5GUNmbCYu+59w5WgKo14bUAwbvyd1XMgxrl0Op\nxq2QhePQqPkdGHFE1Evh/w2M3KU4ksAiDTg8p2SV4cv5n+S5je6nir3HJyXh\n3T9POBbLhD6wGY6t3Ll76hF0PcEcWOlccoa93zKSaE3cR5hBz2TOZPq0iiDL\nk4YmcAwQSCrliH6eNakiFanAVG8T1T/M71mJRT6nldA9m77evBHLjd9kgY5W\nGIad1qL4TcjeZHvBbbTllmypu+vrWBbNoIFGRKNz7F+wGjIUpdma/3zSo5yi\n39VANYitVeJ7yXWQMTXxqvGmutIIhwOpej4r0t7fvmPpc9Hb5DIBWfVEk2ur\noiqSkiM77o6s5FtsNiyGcyk7GEgg4LpOuyLLe+b+RwgOuB36ZGk8beoxQkuI\npmfT\r\n=H5n/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85693f86d68563f451e95113f3d03a29fedcf142","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.8c7d994ae.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.8c7d994ae.0_1624476394372_0.5512661554453544","host":"s3://npm-registry-packages"}},"12.0.0-canary.4ccd39bdd.0":{"name":"@material/auto-init","version":"12.0.0-canary.4ccd39bdd.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4ccd39bdd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fe20da6aedb6d727c45d764fe53224343067dca4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4ccd39bdd.0.tgz","fileCount":14,"integrity":"sha512-wbZnAlGaAV/31Ucl7xpabbmCfmu9wRI3QE8VsKngSaTuKBRgXduvqHXsEkfy8MOce0Kd8OzhOD6GqB/CFxuk9w==","signatures":[{"sig":"MEUCIQDQwwtF2eoqgJn6T4qfXH5DHs5KEWj4cL0pYT4X9twdMgIgVEtZwmlJ1t8OrCZCw2K2f1mnCV1frZ55sufXReXAnxs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1K9FCRA9TVsSAnZWagAAJtEQAIYvNUbobg0uggDaMlON\nLVI4MOIz4CWMdi+0inJMdt5D7df4ecD9Z4S7331inG8YPXii1BhX+sFVsECR\npfuGfpM/qftmeLyIdVJxXq8aC0EzaEBo7ZJxyllEsBEsQSw+nYQsflWl0BNn\nEN0kvN9PRtNEGoYS7j/PtFPcIe0IKnNCNbMyGzv3fZoh9Z4Ue0yWlyEcGU2T\nDra6yg/P20PtyPHYfAjSBuWRh16RXapTLZD+6IRBqvpk3QWh8aFL/7G+QIqw\nd9D1UaJraPTLWmj+wqILnmMWvAN7zm5CK0Vwxrfb4e4UXXC4HDLzCu+MQxdH\nkfplWB463EQ1CinN1Mf88amVg4b1MQuycAEW12FxBdo++y8ETtuyGM4/FwE7\nroZK9a5rEgutHtuvss4fmWLRaxY/LMSGvkCXtvNn2vKRKMiUHd9WanSLuEEn\nkofzFrmaxkHR0TJvsDDD1PF7FE2qFHHUPzD7Gm6QExxXw+1iZmPDw8l2wJDr\ni4CLtrQdv4hoER4k+otxleR59mEAfPxBfes5IOOtmQ3XWzDDseVyOUSdarYW\nP4YN4fev+tDAQtYIFzinIEzlraTJM8huK2GguXUtwQP7N8ecQnIHzfVqKSJ/\nyleG2v0+j888hbBne/UxhN9gxvPZutlFvTosM0iX1lOQ6knDkCNeOa2Owdki\nNYeF\r\n=AGbQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0954a36f2cbd31614158e8425662a4969ce9c299","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4ccd39bdd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4ccd39bdd.0_1624551237174_0.5908092280474888","host":"s3://npm-registry-packages"}},"12.0.0-canary.17553e9f8.0":{"name":"@material/auto-init","version":"12.0.0-canary.17553e9f8.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.17553e9f8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f415e595bec3c66728b53d69b29a847521347b4e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.17553e9f8.0.tgz","fileCount":14,"integrity":"sha512-ArGyLwgF293pCNELbDnw/0sydHva1wJij60x7PxJ7Q1nQcbdbfJ5apRKn2OZffJR6Jcd9ZbfVFSmkMQzuG29+g==","signatures":[{"sig":"MEYCIQCK62C8jeNvyQBn72IfpIE4HyEANGXfiCHApAuKW0XGTwIhAJ5AGhpxIWtqJfj85r1gD7UZya4JJRJE8sGkP/QNaEs6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2lJ3CRA9TVsSAnZWagAAHG4QAILaQKsh2n2HP7Cjaqqs\no2szNjfDPOj1dXP4w95nIO14SgDT4hZoRcmSS2LjTeTYB0lRLh/2KotTl0bx\n5koZ5/f+TDz9Er9M/Kkgw7FJT4R0zIPSPtOQ3xzKzMEk0T5iFYWW3e+fekuG\nP1jDLL79GG6oEnuJGjkLDYxE5dFl7QD4BxxsoEzG/XbF3vGPNoWvpwXm7yth\nFd0M4XqhJ09Li5+oUG8/yvlS84wTmNCsNlAUOAfyWxqk85q1tZM3KXh8s2yK\nM1bIrA8y3/YMZ+BOA+wbA8eGV4EnV1soP2/ltPGKcgAbFgYL1929J8AttMLm\ndNUSHIxbwbVlrLCWQXee97tNcSXOHysJ9Tae075xEjVv5JQfnYwNiQOEJj2b\nrmzgp5uX/GSfBHx/isvq0BtbGoD1y1KHV393DiX2g8bqKCf4gP6X8CgChJme\n2wUQjf5qyY3hpZFdvp/zFiNhaihNcUCSYKa1hY4Bu+pztHCEM+PDVa8ALbEZ\ntVuyL0YP1Ri9Fvsg2vCgBGR5Mn6dEgBaltzmcYrFCJDrpa+GydJQqE3n+FwV\nb0pGmXbkDXEE5kPG/AuUzPixba8rTUgiBzsoZq+PKCiWJT3M0uCEr88oeax+\nbSKshqdLATC/WVBkkwDG/oi5mAca4jDWYpCd8ezNJd6oExfUlm/Ody1fLihd\nayes\r\n=n8C8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bbd7dc5fbee09c82081517ffc14264d4834209ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.17553e9f8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.17553e9f8.0_1624920695384_0.8106869375431165","host":"s3://npm-registry-packages"}},"12.0.0-canary.4c80072fd.0":{"name":"@material/auto-init","version":"12.0.0-canary.4c80072fd.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4c80072fd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"be514b87c25109adabe03319bef3a3accfed41b7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4c80072fd.0.tgz","fileCount":14,"integrity":"sha512-HpDF/n581Y3lxvPIDbfSC2zLEv6XKbOPChNVaBkvkt95Dyir8q9rkxTmU8kjBAJeUaTbg6WYJIRauFMmPlrNgw==","signatures":[{"sig":"MEUCIQD3YkuHoWSV1zfPbuxuZGiLtREokxxbgFYzbF8tcRij2AIge9AyDr8G7QE3VSCf4HMLKvtiB/7qL59Oq7N0a8yJunk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg22j/CRA9TVsSAnZWagAAF4YP/3tNTVnzolHSCo+0EnI0\nlJSHhCJuSjS3miLGrZdZUvxT3Q3j96Ad4sg7v3ha+evRllWcrJImehOcyfDS\nvVtZW/aYT4v2osViRgyBrT7XWwN2L+ODBSmzzBlpHrptFgyQ1xV5QN0vplQz\nm2AJpcCkweNSpoD47/Wh3WToBiXrugw7KqRw0fCjI6i1Q5lHqPWiuXhuVZQO\nYXvGOfGQTQ2clGbdUI+r4H6iD5l3rfJQnbs61JtBuSrA3UZvSgJJJzDDOWeZ\nZexdeYy8ATNB+QNklYS1vWPcw372xPC/1akEF+iAnVRYD0R1eEhTCFNXwSMT\njME0IiMDB2O2wJbZr4QDVEKGZx3oZX0uZpcMRNiR3iTbmwxupjuyb0EQzJng\nLpmekSLMARKBWr+l4UVtoUMoE2gv1oazNuoYB2TwDtJv4cSiqtlurcNSXD/b\n1OZ6X0HATWLIxMOq+liAnJEh2oKBzIsp9hzxdnVrtVuHDOZmcnLpCgs1PHa3\nD6CU6AsRXhSfFnQocg6dlAyoGkmfwu9nW2o29lnsK6hzJAWoJfczixDfna4/\nLAaiAM/KALHVIAhO3cyoJdYlubkuvWNUgKqkTtcvOt7w/xNH5MPeVV38lmiG\nqqPqYTM6V05vCmgCEaJzbkirkg1uLUrXXWiUAEEnicXoQe3+LnXa0lG5jhzX\nBx5G\r\n=jFoH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f6d10da43c6e0fbb1366c1e37fbca58ce00dc12","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4c80072fd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4c80072fd.0_1624991999418_0.13618558813881587","host":"s3://npm-registry-packages"}},"12.0.0-canary.796811db7.0":{"name":"@material/auto-init","version":"12.0.0-canary.796811db7.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.796811db7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ea942f5e3a0459bf2aeefaf895de95ebbfbb4b77","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.796811db7.0.tgz","fileCount":14,"integrity":"sha512-zG3cN6YVe/f3cBFuT+wD+392+3fU/p9UyzRXgpjMqOKNkOqiI+aR6G6gzWlX9ORta31Cv59taU+r4l4jcHdbLA==","signatures":[{"sig":"MEUCIFMKkw2BGj9G2dU9doJCwQrOdKJvIjdUj1d7mEcyFbC1AiEAyuOuSY2JRtcC0dEqhAIWBH4Qs5qJ2V1BStVcNBm0YzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3QYVCRA9TVsSAnZWagAAIH0P/js8K9c2uNhkT0BjslL7\nl+UiM0eyLALoSyfiPoVgZfEcLEb0Q7BavQNsW0kpcpHczGf0wapbCZMDol+8\nILTXc+abBce03qjwL1/0pKonRJxIsfMEazWx2UDpTcbsMZzPpl7Xtrfnf9ze\n9ZtWk5W3v43R8+bRABbmJw1s5NRSSCg/qsrSmKDS0qRLYgjsUq3Tiwi88xL5\na1nG5rHbCr9mlHiVyQgtXHRESXEP9dzyJRPyqKWytZPu8pbG+AKLbv6ClIwQ\nXQ7sy5OgFz3kPVaPGblWtP55WNz9OpZKqwj7O9zukG+buCAZmB8y/arW9zBo\nKUZ3S+sqvlpJ2aA5MlHv2aBKl2QARC82pfdF8wbV9nIT5bmIsiEzXvhf+fvU\nxyWAMb4BazpZ9tTyt7rSE/DYd6lq7TygOiH1UR81wNUUGVUQXnRO+qdVFIYj\njott4EAo9O+jE1uFvmOChi40cTGOOyBBaSGuq6PTMIAeG9SLdpXG10Gm8TuF\nKjDkvkZrragBAJsT9mJiJhzfqgqK4EEfNrBThPD/OlRp0pZzqQQzcCxm39L8\nMl34MVsCoFzx8KJyYg/P5XGic4qH44jOMnYx9ghCMRJ/y0D140NvMF1vLjA3\nkIFox5MuOit5GAPyod2THXrXgdKdwORAzX/7i/kJDXX81pPKUvKCky2FtJ3/\nn7FW\r\n=Eha0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b02de77dcf32bdce7d23406dd395390b35e386e0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.796811db7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.796811db7.0_1625097749427_0.4221445879426695","host":"s3://npm-registry-packages"}},"12.0.0-canary.70e1efdca.0":{"name":"@material/auto-init","version":"12.0.0-canary.70e1efdca.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.70e1efdca.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c73dd34f6f0454ac6b8af7ba62ee904a6d65d7b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.70e1efdca.0.tgz","fileCount":14,"integrity":"sha512-SC0VsMilZFQoL4kskm9P/qJbt8Ei6kFCE6iXBujHX6aybjTfIkspisSrlikK2wOXx2dcuS0/nxSATaDUt7qlZA==","signatures":[{"sig":"MEUCIB/Do4138g6Z/76prMON4HdlooIvYq42HcU/hWW1yRjBAiEAuWOpFVKaqr41QkK0jBW2ksgp46DUXflAzSWASvra430=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3fXeCRA9TVsSAnZWagAAiGsP/2+himy3iVNg7kpn6pOJ\naOiWPsEUZCixkOEGwQvelIrviE+NknsMQUtcLQGjEN+0QEjqZbzREerf/YyJ\nz4hJKYiXVcOyXiAzdRYbApYg64KzJ9zR0aqLv7I7s7T8r+sBGBymgKq3HyyD\ndG6KVzwaH05CJOzSH9A7/buoDa/u8yDzNk8MQdktuhTdAEOJg5NGgH//1Vwy\nn47sswltZAcoeaZ105pgtOIhqqvJxv1wNDvLYETH+vJEHJGlRu14MJg3R7Hg\npu7qy4/rdo+LAprtfVol87dqmBpcX0HhUR0yxuZ/4/7UVSUdfZXHWwgkNXqh\nAoQgpBhMvO/i1O0CEcSPpb6w6LP1K1F6iYmsX9ibID8AVeHPw1oStvVvxFDu\ngHzrQHiZbK4V3YegfPy/JdPQ8jxv6uRjwGbb86EodlLUlvRvsOlN4zGw1ioh\nQkxYCi5w9c4kFMtaonadYhn8aCQHGxOcLzVm5ZBCbkGJLnewFAisCNBNWM7g\nwrK+NF/aU363o18TOAELvVZRRzm34shmaXjztkj2JpDfScmfGy/8rqcsAKWR\nEmn7zmOw+SPZ9ViyHEbBLrTUxXge5U4mxko0l1noOdc9oDGbrK447Su5bAbV\nl3+EwtetLd68D/EnMOtudlosewj/LoiTMefPqbfIFrqeje6/QmuQ+2Zb2Ep/\nigiP\r\n=FU76\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ab5924ae38bb3ce40d3b1c303e1ae6d175b844ce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.70e1efdca.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.70e1efdca.0_1625159133474_0.9755224180510624","host":"s3://npm-registry-packages"}},"12.0.0-canary.435866d32.0":{"name":"@material/auto-init","version":"12.0.0-canary.435866d32.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.435866d32.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c118d918ec976ad095d957a959d8cd1ffb8403c8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.435866d32.0.tgz","fileCount":14,"integrity":"sha512-myed/WAlvddCQxyo/KQlwJq4wBASfsyZwum8uC6t6ag/exo3eAoH6Kvkt/KRlVCwxGmt4JiQOAjZoyZvUTb9Sw==","signatures":[{"sig":"MEQCICbz5DtNX13NhNTXimW1JwdRty4C4uSxijzXXooFavRbAiAgy0xCiyHckmbGKW8Jnvhy1f0HQxYYpBZxU7DzQUZqfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg31jmCRA9TVsSAnZWagAAY5EQAIz9AxYMoORT13YZn16S\nNtDL+VnCsS2oRdkNRZobs5wblrqo6s6gzHwmAIfBMTxcNcX9jXRu0mO0TPPp\nSfJMUBvfpwVRWj2w0NK/VpoGK6pSWqoytJKA0eoeB8B1LRTSuufKJAHxKOCM\nKICIWxx1tb07Yn8LZyFr+84m6PtBgxOKdmqLXrs+5hAVcG+zR8zx3inih89U\nSSzv+8E9WNNUaC+VdVJrstXW9/mOBRhVM4C0Mjs6CtDpoS7iEs5psQLrJmiq\n2gPlMLiAVVZ0b6JxvfKNfFGbuQ1rNFW+NNNYWnIoAJJuW/hPDdsJpa2zHmjr\nQ5NsScTOiJvcGBc/zGonxJINd38YMFqRLFGMc571JqyrLrkwHFYzeekObtcF\nL9a2CeLDcF8QvedFYGcO7OPb32V8JgoQRu5CH6/jAJzI8uBM8bxcAXI0DWMA\nRu6NzkueTUJvi6cEKwM2314vke4YJ08TP2bJCYXH2bnIV7OkdX3DWLcmaowo\nYV5PD/g2hmikGuknk3mEDokEVJUClngWG28nqoZHDy6bOu2fOfwKqyvwzMOU\nU13/5GN86jsQai9YZixUTB6Zy4tr9fUGECj9LHvxXx5mio4eBMhEtm0HZOdR\n7Q8wsliSf6tnbqBfUmQbY7BEFvbe5VrHQcrE4NzrEwhjyMCjM+joppa/yOMm\nI4u3\r\n=omkH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ecf68c368bd1ea5571aa4da569d6fe6c4b8b8caf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.435866d32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.435866d32.0_1625250022265_0.917650246796093","host":"s3://npm-registry-packages"}},"12.0.0-canary.d0f9f3f2e.0":{"name":"@material/auto-init","version":"12.0.0-canary.d0f9f3f2e.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d0f9f3f2e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6af869ea506c9f96a0523da6027a26e5d44fa82f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d0f9f3f2e.0.tgz","fileCount":14,"integrity":"sha512-SPOoL/VGdaKLhx2bVuy7Xfr8+sd1YHH+xqR+zCK7KTEtCMs/DhhIbZpguFDiUdOG3gudzxbCiUPPWJPMPXIo7A==","signatures":[{"sig":"MEUCIQDLL01JRgTyAq3Re3UtN5Z0NoVUmTEnZjr53Qb31NctxAIgRVWEEmr8Iq51xiGOFQ4eyDZc94rQtRa0ZrNbjpZU9bA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg36hNCRA9TVsSAnZWagAADgAP/i/6/N6KbhhwfZjZSxPO\nOVSL9zt1Sz6gPJQvAKbIryIsGkohMEn4JsbYmNNYJ52NgT4jPDCfbXVMNHmG\nN3lEBmmtVt1GmL6X/bDKbFjqSwEz0Qp5gAubZ88MS4d2K1o3XCCP4/nimeSb\nnRqulswuR4FrxNXv45MQvM3VYhp8iZ4icTDvsVMddWG2KeMNZpYeiQrxel2A\nfdVS6CUwMAXR5NganTdXnsGoRYSpEFaElJP6S4WyxgP6rFtydmSyce8Fhguo\nmXQbMNVzpI8/+YaDkv6EFmetON9hOQKDYIc1JsTkKQP+tZuZReteY9Qo8+ro\njxttyCHuligZ1gYL9YNWRsrIThqeHftD78lt5eQW85SRLdnHJz2+pdl3xPg/\nuDP+i17g0JxCyA8aPpjMRE9pgD6OQxPkOoMzGvFCyzyfTAtKlnNYWGuUKAcR\nyGs7Z99QjPJsWbk4llr2N1lsq+PxSfs7myGuWqOSX2JHxe+7HapcPFErARf3\nThcnddE69BSncaDMoWzDz+7LOf3Cw022ZQIcAjl66cqGHiHsiF4yj44v/jaC\nvUDAmGXFOBzNcwEKcMhWz1FiEk2uk+P6BISOtvSa/Nlz2HCpT7JytZ/p8O4x\n2DKJvFi+4YNVH6jGHTwGymCBObVeHG/dMakh0iW6OtfhF1cmKhSraz7RPlzp\nzHNu\r\n=xmCY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed31c78c6a84cb24353ffd1d406693496f090e29","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d0f9f3f2e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d0f9f3f2e.0_1625270349318_0.8994136383754794","host":"s3://npm-registry-packages"}},"12.0.0-canary.adeac0549.0":{"name":"@material/auto-init","version":"12.0.0-canary.adeac0549.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.adeac0549.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a8d0e7ad50ad3949c35a1d838783451dd52ed25c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.adeac0549.0.tgz","fileCount":14,"integrity":"sha512-MuNBtjRZSSBWJlUdV7uI5KTklQKg5DUQfJanQQi6OfrbEJNb9uI27MFPj69vXT8flzCsdJnJT4kRDJDRMH1Z8g==","signatures":[{"sig":"MEQCIGHV/57RwF25wg+IaBq4ACKm5P59+VhYkR/8FTzwTSTLAiAn9qxIdOAIpsFSKDxjS3fNIFIfQoUUk8erlZg/9YYlcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5xTjCRA9TVsSAnZWagAA/b8QAJdG5EJv/qa3ZBioFuhD\nw5OsPbdmqQoovVF+p4EX/6d3r6pvK8XIbMGk2tB3GyBFe+lPj2kHJ9Dp7N//\n1Z0njkJ8DKrYQ+zLSFN+Tum6/hmEFMJzfcvkHJaYWiSMYvQvn61BZOV21KPw\nNfhfE+PYP8hzwafSJSz47EGZNTCLTYDd66Q2a1aN9hjmZXLjBy0zX+nMupKq\nlEfZbqbpL+Sl66JE8XgistHw3owc/3pvtsfSwhV11wPc4oqD4bRAuBMdU4c9\nX28M4alqeYmMv5divJE21OcE/N23+JA+U4t5bEn1giO43SumPbc5NF0JzWlu\na9EXw8rlNH2QBN/Tiuw2dofiLAxTJkTJ3zNwAByWDbRqPYx0JKccrBxJ1Cc8\nMAyZHtaiWXA3LYnYzDSCcAXsiFMeydZjuA6OuFgSFDUq3wnA4fHSt7HEe3Wi\nviLMaHyIB1jh4P2HK7e/7ROm2e07YGzCqXgEvNJGpXsCUCQlXAdozSp8r41d\naCi5Rb0YGHGpjPq4n3pRHc3+XA0rjowy3I3djvQY4aMlHGbLwaJ83XSOBOl1\n6lN8z5GGQoznO9+FDsSpU1HLtA4CmJH23WoQ78j9YPx8qT7fC0eabKqBUdQ3\nR3ZUU0EWw2KykfIwh4WnrK5T9J4oVRlL9QayCY6TCrYsEzCJN+ODlwc9pznm\nmuZS\r\n=Jeps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a189bfd7e13b17660ad97870e074af0ee245e36d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.adeac0549.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.adeac0549.0_1625756898528_0.5883816350037323","host":"s3://npm-registry-packages"}},"12.0.0-canary.068fd5028.0":{"name":"@material/auto-init","version":"12.0.0-canary.068fd5028.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.068fd5028.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9843207fa03e137b1ff2059e31f38836f9348109","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.068fd5028.0.tgz","fileCount":14,"integrity":"sha512-UnZ+EpcvoOyjKazmW3qai/GSd6rxyxGOXclp9ekYRItWdAR7gUIAChpLvMwsOOohm0Akwk75HRaz4XNEBKxhFA==","signatures":[{"sig":"MEUCIC3iGfvHwSKGECwRB+snku++rN51sGY0wabWGnd+xKgBAiEA3AHmxdDc/KNR2ojDb0tWdWaMDt2SgOhhI/MHxgZTmvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg50vSCRA9TVsSAnZWagAA1RwP/0illomfbDepffK3WE/9\nxyWDMcUkqP48Oek/gY68aapcPvt2YopyMB0clqbTGqXeqGK7xcINpG3aLDXe\nht8gfsHMQ18dhyzof+oZUUZUHH9tUXl2ewXXR9h9C5Wu5xU0PvP5TPatcSnw\nCuwQiSMxly8iNEywtpxsqeVNm9MqmJ7YVqsdSnZJnBDeYVsXuvYVH6C+t3yn\nLdaD1ADDv5AMQWsYnCXcsDfCxwadMoV1jhFiBfhh4ZCk06hB7RjMluuvTg32\nmksBdgOV/VZTszdRPvnGxIBMm3BzOwJvloJXfVMn3e8Yl/0CV1XdgfaL/Mcz\nUS1RYA8Ogn6wyvnqZxFQzF1j5zqeZwrKye+LyvUp/8detbWrROqKwBFMV6Nl\nWOKj8uUdTr/EtOSv9vvssHow7oUWyJ8+2DD8awiJVALtlf9wMKK4diq08M2M\n+jERLLpSa0otBd2gsGtTdsbwAvHlKPo8911dIVS2AE9wKK5lwwlVn0OFsYK+\nnE4nkf9yLlv/5SAkUobhH8e9kl1nM2pYKjkD1ZQL88sX1J767TnYkjW37hLr\n44NAl0WACDMwfcGdmdz2dn/5TBZZMU/MN0cKAMsiLaeL6uAXcI1ox9fuwbhQ\nk9sirJT5fcBHGeJcY5RptE+Io4C1UtY9KLHgGpHpywetc6M+HM1p5hMomJWK\nQMxw\r\n=Lrg7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"daf6a798ec3c54ddba492f33c939c41a8d88655f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.068fd5028.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.068fd5028.0_1625770961952_0.2601491248193941","host":"s3://npm-registry-packages"}},"12.0.0-canary.5dfec7a14.0":{"name":"@material/auto-init","version":"12.0.0-canary.5dfec7a14.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5dfec7a14.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3c307717a78db14dde4282cf11e70571d4dd8ba4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5dfec7a14.0.tgz","fileCount":14,"integrity":"sha512-JE5JaHqcNENQxs3CRXefeL966CvJV/Tf309ssVD/cbDFarQ1opseB/1mkqww93V2brQUI12cs1/Eeqe7TaV0Gg==","signatures":[{"sig":"MEYCIQDWDJgjdOriW+dCfNUtK2Vd1gNYNtYQ/5IqmnStyGv8UgIhAO33IBbyMC888pzUmgJpVCe4G5/pL1L7tSDpfE9fpVyQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7KAKCRA9TVsSAnZWagAAaX4QAJgWp+1e7BydooVc2+TJ\nVd/teKCpJOYmT/8UOBrQ4VRBU+54u5ftYFR9Yi598h9pxdXkpZY9U5VAP5Bd\neIfcIzOQkfSVP6//2DT5aFjY96WZReoiY25r0N+Tnkii8UFtWqvdxLGKDSUR\nU1b+famc/357UyMh/4dgkH1q5A/gGD8RbOQGw0IYJihyOkPtch1T9sQe1s5i\nj1EOivX8IuGtwzRnlBZgKbcjf7rp82iBOFfpGwNUXmYQYW4HSGoC/kWe23M3\nMs5ResCZLa1VxN3kmyGo82vCTwUIOIfRjslhUKyZpPsuoIKB4Biz8qmU30VG\ngMjwwN58nPAgq4sZ3QfUitBCwAAgZb6v0rXwIuo35v/K0GdfzK44ySiYJRdc\n0w9zmV9Tc2EMrvl0W/TRoa+zosnttCPh5FyRa7lMl+fVrU1w4AkqAjFhJngL\nxsI5TWi9OtSrb3rT5kxkflR2z4gxWcPYd6KSVzgAkrfrmjbXzykC4ZKAVKB4\ncLPfixR84WI5h+7i9NukUHtdVLCktvrx5IarpvnkjfZCgCfWP2ZfLTuVLk7Q\nOmeMpQjjyAZ3+bqjW6b+zPCQJ9LNIbr9lB/nhyhu93xjzBhovXrKqPO4z5/Z\n65BXulQyttnE9bIhcCqSUer5gX6vBMg0/j/DlginBO9ka5erklShFOu5nF3O\nh6Zv\r\n=T0NH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7295656b25be2c03cf7ca7ca800e7dbec4d9b531","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5dfec7a14.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5dfec7a14.0_1626120201906_0.6067496802470835","host":"s3://npm-registry-packages"}},"12.0.0-canary.07a73750c.0":{"name":"@material/auto-init","version":"12.0.0-canary.07a73750c.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.07a73750c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f17abdc3b5ff6828b1e4ee64176557ae5956da2d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.07a73750c.0.tgz","fileCount":14,"integrity":"sha512-sUWpoD7TNFA688e5glMp/UTvLEhM70G1zlqKzRm2FBA7CfkHR8mng+Hmy5UFg0UtHG3sIlGvNZ6f+U92EkW06A==","signatures":[{"sig":"MEYCIQCoDtCZ5fnURT04FlM0ddmML7WolTAZLBkUo0xdLOv7EwIhAJcl3l5MMC7HbtCfBwu5gDrQ/k75/o6NNsFL2eEGAV/+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7KUCCRA9TVsSAnZWagAAp5wP/3PueZ5JbBdd9L8pe9td\nbW1SOO06pZa8jQXW0LHKNUj0NHhrCt9nHdxtlcaVOWDnOmB7Qzks4koZI4yN\n1sD8/lbj8PI64Un6mbNZhZUSdC4yZc+3aDWWkLKZB+g+qdxyRz3HptduKHqM\np3IYQ/K/b0T1iJEvj6E2L3s+JVC1uQqHHQQmz1BXsKmpXtRbR1oCGBYijtcC\nduIvIVHN4GgdfiGkXBid0zJsH2SKmC0wumXE+sLD4YkW8UqMWmO9dsRnyDhh\nWK8fovVGckTPYpFq7Vp7i423tsGi6eVVl5lsidKd5N9bqtOFNB5ljnDnvdVv\nXVPyeJ7iV47l89nIMjMQyo8WkIWD7mxzucm272xC9af1Xwj4DrIIVt2+e743\nPd1qOGg3YM5FKNSBEB2vOJapDLYCifsGhHjx9ZsQvmzc7hRr9jdu0IT+D3lE\npdJKL24IIyQmqd2Bp7O88GRPp4vuKdSNzqh2SONL3bmmDOstTseFsDgmL/S5\nblk5sXbO8DkaejJHXkeYWDIK20ElTHdFYvzOYxORmJOKob13o9iifXG6/UUU\n+Anxs3EFEMuxuaZNzcHU/Ak+XfAHlq5hN6TVGO64iCBWKgwGBpn/nCMsaqOA\nE0E7vywfkiUPi963pEFQs0p8M5IIg9KjG7SJn2h2rRDWhnSoBB2dA00mRFHi\n1cj8\r\n=hFvR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3534c8199752b92a52696d2065e73b8e4a997195","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.07a73750c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.07a73750c.0_1626121473976_0.5784440456749114","host":"s3://npm-registry-packages"}},"12.0.0-canary.3e4c6dca1.0":{"name":"@material/auto-init","version":"12.0.0-canary.3e4c6dca1.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.3e4c6dca1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"41fee009c9a83f002caff7e65ea4efd74b3d3f05","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.3e4c6dca1.0.tgz","fileCount":14,"integrity":"sha512-D+YWTZYXD16MDhHqUjdDNQfBO/8q0mM7/YPOdQ0TntdA03Hj2Xhl4n62cXp65YRSReLpKX3eIG1c5d9wE+thSg==","signatures":[{"sig":"MEYCIQCmpufGwHPU1/Xv9PrwTylsLDz74YbrRlL967l88mkeaQIhAMsHPTlwObKPWGeSsKDT1oKtZfGEtubREuDQ147jAZh2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7PFZCRA9TVsSAnZWagAANl0QAJHi854CUg/xiu3Ng5P0\nD2S3mH8kWb4dvAqNkzGm7/dtosi52+3n4CC5tSQahlYhOruFyiDqkJmNNJGS\njuFmZIYYxOAvGrlMP/M2cONZcRSPuat7ZrG4k8GlKkx3GN0RPcxD2Wyi/bFK\nXhkoD8XOfYqRgMm4Y6udQrGHPaUaYkBcnywyfPMijEv2A0k0inVEdBTXfg8a\n4SJNeUin5Ca1FAyIkpKJZL3avnju97pV97iaFPTU8+EdASV+n/dfykO6DagY\nlJ9Y1HY75dK+992j6nwfDwI4ssuvLFbZij2wy1WGJkSfIrqULWrtogMBzWmd\nOfF4yKlBFBnWo2T3+B09OpXimqlQrc9a33amse6JWyn+243mOBBEf+/t3lVM\nCdXrZ2y+rK+G4GdRz+UXwvmpx9JF0EyKwYT8cMzY3VtsKwGbfKLfnm0VoUNC\nGhtVUqQL2Vb7jX0NqzhH7cT5JdiyoezyehdBfR53ctUJziUZkobDbYJp1MTT\nmd6ZDpOCFQ2qcTcza6xAPz/An7s1hD/Em8Gjtxd457Tbzec+a4CNf2yf5le0\neRSfLl2JYG5n7cOo6LNU2HIQ+QR9e2+gldQFSGvzfGVHTwl8JoQlxiHubqVc\nIt/Zq/CVw6pJq5ms/Rt7qZ4mX2rG1S13KEWKTpL728gxi0Uj5wKJGEfXxn5w\n6g/n\r\n=cZnT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a6a8bc529062b0303c0df830b36d3110a389f4d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.3e4c6dca1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.3e4c6dca1.0_1626141017134_0.34757532314606476","host":"s3://npm-registry-packages"}},"12.0.0-canary.ea77795b1.0":{"name":"@material/auto-init","version":"12.0.0-canary.ea77795b1.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ea77795b1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1b7fcfc58f3a9e49c41c68a6fdda033aec3743e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ea77795b1.0.tgz","fileCount":14,"integrity":"sha512-QfAR5h10zc0R0DEb3/dOu5UTjTYjpCZYOHBIKiYZQ4J2K4kVi6g4ZbHTw7PLPH9KyqPHeWFKdTak36hBUazRLA==","signatures":[{"sig":"MEYCIQCPi+h/5ORu0mKuqMmEtPQOqz8IstPLrOaLMfXLhtF4EwIhAMhu9cddNq8lhem4pKna45A728F9JlTt3G+Awcqo/vUh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7bXCCRA9TVsSAnZWagAAAm8P/01R5+lLs0SZrflTparY\nMdMbVeL+x0NIy8GiQfPvUrvsnjq7Xxd5SVE+hgXpm1mTrmajSNoHUDmb86mt\ngLSLwQ61lfNFae/ZBvJer8bxEyCdZmkdt8OtboeIx3C3214tOWRnrRrTvg2M\nLtsl6KWyUJUSjYcK4Iu1quM6QiSLLoNTRTNjCsBrNZKGQXiOkO5Y5zAXm1Ug\nz62Bka4GWoCljB6wnAtbGArC4BX+FKyxayyTbApKK9VogTanbcDsdcyZyElH\nuGm/9NBLxBGbALH/+jniYQkHk6P39IdwD3we7rFu1/rYYGlq6a/D7/kMHY9I\nPUIpVovsCeKtj6W+z3s+tjjSzFla6JostjhXtiTMFrNi6X0e2DEPIX+6/eUY\nWou42m4ViCWrLywdMu60Ph6mN0+MvEXQKHUPOQuryGLrl0RUCRhNX+4CsL3S\nS/ofZR/oXZYU38+g62kN7wYmtCKDEqm1ZMqL9ZnFt3WmFp6h6E8cJGj9vAp9\n13656e8IsRWQw/k0ziNgGzkQDTGb/MaQKpZhzNA7tQzR4q3N8qtRn9ZhNgBU\nPQawWLlqp+SUrvv6XFHuABEIpqQFSFIz+29v6ZRtummfZ4kVgIURe+OFcU7p\ndmm1VW1bjBHPS/blXJQO6Qcx2MhVq63BTEu9wE974QSnpD+e0FTfV1h+RvDb\nre3z\r\n=6HWA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"830444e6567decdb85bd9b22a92d5f85b103f107","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ea77795b1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ea77795b1.0_1626191297985_0.5202866138642903","host":"s3://npm-registry-packages"}},"12.0.0-canary.15a179fad.0":{"name":"@material/auto-init","version":"12.0.0-canary.15a179fad.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.15a179fad.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c86cb8344f3f4c7bd8736641f864dc8efb76ceb6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.15a179fad.0.tgz","fileCount":14,"integrity":"sha512-BUFth9DAX7qHAl12vFZ1Bo/xSxzJp1WStFo82G7fM0oFXc04WikWcsria/zitdwfdQBUkiZP+evtEDBsWanFxQ==","signatures":[{"sig":"MEYCIQCp+aBL4CeBil4g2IIze8KaeSIEuCcq5qL5C0SmZUjxiAIhAMLF0irTxtG79l06DnsBO4p1ahnNhvTM/l1qH5oMrZF+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7daPCRA9TVsSAnZWagAAGO8P/ihBUEfYMp6N9AaP9GW4\ndV/unb0i7Yc67S91CX2QW1infakKtXfa9482UHJAtyEzQQppMoYk8ryTdgdB\nHeJ8MClUmjE/cbel8MUM2uDPtH6o5LGIm5rEDKZXZ9Zr9YxtQ6I4qMBVOh/5\nuL54j4tSIcrssT1CqFaIbUovWQ9jPUMKrVWBmzsp84hN8WolAsvdw0VM9MEG\nA75VZfzoQYZa5XAEBLxFMWENA0y/Vp3ppif/N9bs5c3k5fgfxwBaTjSzWBdT\ne853PGtzARiDvcWK7Mlz+n7EhgtNfjrlc8O6RwmrVydliwzD3HtrT9zYCZhP\nvrzX08jONHYEH7Z+WYwrt/6gBmbs9kzaEYVYkF275No/AeXq0TETP99UU3f4\nVw7TUobbYfJ2F/QNJLDOBpDtRi5Ki2+ryuGPIkkah4D5eI34lfWMUOCDw/I+\np2G6APP0NibbGycvldVYgjT0VRLMU2hmdeDiM4MPrsHzGo4cgp2EcZ/XYqSd\nvpbDQk2V1yvWCHvQcHTWWHD0mY0NYsM2lMbLSrvpNtArkRF6uFZ5hppyjUTQ\nB7va88SBSk6YH1pvL9NS5yrSHz9lr6g0aLwh+MldEB1pKzV748uEEkDPdQoD\nqir0zD0R7tCTU3ut9DYW6PFNAjAS8IIp0fH8OxnuIxNKzkrEqZe3TSNs1GmW\nQ6br\r\n=DD9r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eb659691c3a77be825ea082c434c0b24c53cd610","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.15a179fad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.15a179fad.0_1626199695182_0.44640110673782796","host":"s3://npm-registry-packages"}},"12.0.0-canary.c73142a1b.0":{"name":"@material/auto-init","version":"12.0.0-canary.c73142a1b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.c73142a1b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ddda0b593ebdf5ee20d87f59f383fd623bbe8a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.c73142a1b.0.tgz","fileCount":14,"integrity":"sha512-tmhlGNvdBKjGQJ/nS+wIqleEkStXVoJ27xNJbJCvJK45CwbOi3q6hmRsKvMoBnHb5i4r6MTOD4V0fWUay16nQQ==","signatures":[{"sig":"MEUCIQDA39ySAG8xpfbEbwjBW0as560fahLmrG2cGH9YWspu/QIgEzAFbmDgLeFJ7jl4mWDmgaaPtey1ar/XnwA18ELADFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7d7KCRA9TVsSAnZWagAAelIP/jYI0YrkhZacMiqW+/qg\n6/C/r8phbWrnqke4H336oXIL4li88LoC6m45IqjGhEQkgRDOv8bpwkNmrxAG\nEObTWsVGSsdbl94SlSTAtMGlOZI993ZGaI/wPaRYkxwcn/18JQJplmtlf4vx\nAq9JN9SndIeFhgFlhhwRaAj8jeVq51CcsIghA5Vk+q3vwBmRULoMq5eN4e7D\njlU5Uc98kfImOB4A/3HlMjUgCdKt8mEEvFUdSoCA2Mem+3L+crk13DJE668e\nCFRBqHL51MdCG4m9uQM+mVv76BllV1A2H+rTRjYpsKDZWYNwW1EJDJ+ngvtb\nJJt8xGezksWjLGOWatxRs8ySC52HOpT5oy2lCi7+7VZJG1QS8hTo+EpDfym+\ns0F8RWkYnoeWM2qRWVSQrGjvRKohEMPUKCZcLBAdzLPxI535kC5jL4xAPKaL\nIKG1GLFWxAuRyUHjRbWAJnTPmLeeoZKlM7dP8YaFN6fnVmDBahFfRxN+Ys87\nbMBSEdLta8Dwv0LWpkV/A0J7fUNp00zBXTZRtw/xBw5AWZMRwPRg1yp+VEWt\noIvhmKbkGpCTLqnTixLZD91P/QMZOFt40Y5+Qh+x160MdXZfIRAN9oXszcVy\nHX8JW24xyRfRBXPDuCWJxz3n4Inb+tSV6t2Iy7284JvU3Dc1ISNeT1xDvX3+\no7fW\r\n=mIMx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"037ccc3828bb7b7c6f3375754059c10c231a6b60","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.c73142a1b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.c73142a1b.0_1626201801782_0.2422715404615554","host":"s3://npm-registry-packages"}},"12.0.0-canary.d923db73a.0":{"name":"@material/auto-init","version":"12.0.0-canary.d923db73a.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d923db73a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57390643c9dfd9cb9418931448ca042b2945356f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d923db73a.0.tgz","fileCount":14,"integrity":"sha512-edS1PR1kpbaBNUj1m5EpGviZi8tSQAn+9pGkxbLKV6jcxxvGJY3t3HIUMEyPJQ5+SfJOtvb3s3PFqRmvCbe7mQ==","signatures":[{"sig":"MEQCIDFYAZrsaC4t0Od60Cc01nSrpygS3yVL9cptBMxRGHl1AiBaGbhKU/8sekJjZIsHFfJLgbhRVE1HI7aD8dKuyg3Rzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7f0wCRA9TVsSAnZWagAAeQsQAJMisL3dww7GEzQ5tz1L\nMgCz3CPF2Yop1jeKVM2tQoJaQUBTNcKdsbmf0z709HXrOOfeuXzsZb3L8rZF\nP9B74R4Nn+6Q3Movs5JItswHOeDk+U+8G0Lo7WcM3P7NjCSyBUHHT2lcjpQT\nUFwCrjRaLwm1anPXjRVb6nljltyb9Re8mxkMlJDOhafch9Ydgf+QYZYXwzmS\nobvCRBmpiC3xDQIJ7F3i3zYO2SJCu2sPn2Jj9F+B5ywCpM0DDf8i7N3bhymF\nlVSZPfC6SNzBpS6JRm+JVv8Ldzomdojtb7cffAir4dWwu2biRiKHSkXTe+XJ\nNuQQvQmGq0o62ccb+YtQmEYtg9bxyQKjaJXeRaxp9yDoBjwzl1/Ii8Jntvld\nuxA114nYvETxxpj+U85wVvjdKDr+OK1bJ0IXYM7ReCrk8G5+KaLnOC+5O6kv\nQG0ydf+9yc8CkvDyypYmSJhAugqaS2EcRhZ05N1eZVV1KHDQN/BcOABZuS8h\nbFhzk+RaFs/tpRY+4B/hzmtmTrA2n6EgjDDQ6CzSfQsNVJPPKEwD7q78aBJ3\nHI61I0bN1jHHsqJUTVr0Cd5d+2AbeaFY82tGZLRSBc9Y+fUBDJSQaPJyyPNX\nS7civOSw2iMJzYlL5THbEAXSxMxTZ0XJC1CgKtcO+IeIw+tdQ8IbWHGIho5n\nfZpv\r\n=JBuk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ae010eec116ad324d7e442d7ffac5c8ddcb9edf6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d923db73a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d923db73a.0_1626209584218_0.9446929764734395","host":"s3://npm-registry-packages"}},"12.0.0-canary.22d29cbb4.0":{"name":"@material/auto-init","version":"12.0.0-canary.22d29cbb4.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.22d29cbb4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"12cee47ce23836510ea626ecf3f3df3a2e8e2147","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.22d29cbb4.0.tgz","fileCount":14,"integrity":"sha512-nLLLcNiROkD0FIHRpuLMf00pDIL3gHdc3EmodIybYECA5ZP/yEijWNnHrXFVKsRS3p8zsyPp7x6kj2yyl57YsA==","signatures":[{"sig":"MEQCICkjO0f/NWVVeeYzuPajsnoNocoMOARZSlpICsvdiMdaAiA7aCgNPKWyd8mRMMKFZirc7JOXsbRxzf0XYHf4IwtCmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7hh/CRA9TVsSAnZWagAAWvYP/ix55r5lyWpDdogIdTmP\nvuP4I36cQQQcG7OFrvWiLAgiJybEcGY8FT4VZMqkswytrJEnV+1vNirtLlZA\njmQJdaVx9iocaLuMYLZFbmVAivx+puS7aQEKN0Qq0WgqbEy+eTKMAJndKADp\nHgcNaUr74EHqg6CaukVU6Dakd7j8bbnnMpLSIGtk5x5aGLSGop1o1OoAgGwT\nvgwVrLscBaAH/ntlOmFWsHNfXbVRwxDJ2WztBbpmA4pghida1kyHMJrfoxoX\nINuUXww6IMd7dj3UaGZP+VH+viFBKHoNKkgXnccTimwKGYrgYG+P6v1aBnPe\nCqM68iCkiPLjURnjYKeEVZhB7lwTp/3c2sKg9vmVawPnf7h0UZm+ZC7G1TGE\niykTzRsk7EtybGnJRd4h0PDcdpI0EMgSgVByopNv/Ud8a4szMuBK3ujPfRq5\nMReFgjzZclPdzjrQNXwttQ7T9TP77hT/1YgHQ3eT3cq3bQvov7jc1mFeLLev\nkl5CfL1CFoPVfMTY8BDqxsMlWXE97K8IrHjVQkAhDoMWqu05+j+ZBQOIg8fg\nv7dnSOX8W6rhp8w5VPlvglB9g/u+dQ1kYunu4HthVYaA4jViYUZJDr8kbr6/\nZJDjI/y6Zl/aHemtXNKr+TMrMsrQK2E8sAa8xt/MUhjcMdN4I/Y8X0NoH21F\n+MG/\r\n=wF53\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b37054450964af349924b81bae43ec6b3beb2808","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.22d29cbb4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.22d29cbb4.0_1626216574808_0.04762901808306497","host":"s3://npm-registry-packages"}},"12.0.0-canary.2749604bc.0":{"name":"@material/auto-init","version":"12.0.0-canary.2749604bc.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.2749604bc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4eeb0ad3171353ce7a7ecd8652b3fcc640c4f399","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.2749604bc.0.tgz","fileCount":14,"integrity":"sha512-177oBNxgIuvMdK/8C//HajkyVr8BwKUkgLRzsNt2kiS9nxBmn/k3XeHXnpyVDiOfvgZNL2r3arRgKAZJYmqdxg==","signatures":[{"sig":"MEUCIQD6QdNI2hN3fkSGC6QZlWpzNvfYFR/FEed2sHnFz6vE/wIgGaILskktX5yl0zLhaxeDU5BWHWm3yGgsdxAGDydchxA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7w8FCRA9TVsSAnZWagAADbsP/0S7EMYFijFOg0XuvDZo\n9dRLi7hTKuejZYrhC77gzQXUZNxBLcSixTv1JXKF4tyCdibonxxnN5PWvRMB\nMwLolT0kXUeE63Ywsa82ZGzK1nWIZ5fZu6Nkj8tiFsYgkJb2UiW6s2YPxmSc\ngIFVPeSjhx8sIdPrAsm6OasyNSqcq3XJDKQ9dcufbp29Ly5ueiDq06T3hIp/\nZTmps/7kiQld6DZpgGFudNAjV6187qEMZMLbmi54bRyvpyFg7PCaEobLGE5v\norg1fU9vv9EczpfYE+yvxikdED0chB1co3KVoREG9Wet68eWwukGvMiJDDGz\nvba0DV62dkPQH7/B1dowVeZpXnnQzcfx42Z8o7R6hKru5ked+qrLtDABibQL\nX802QWNWlm3bKxC6CPZ6NVip47EVZNMlvnOE66FlVyUlJidsS+ni8RV7eHBi\nZi4ORZfAa9LJYdggh9UQquM7qHRO+j3gbI42SPf1+iTGBNWv6Gjw7vIUX4fQ\noGbAta+IroNWOoY895NPO0IleIv83Ctn++S46FU6IR1WOSuhazZvLwLjK7p5\nI6E60H8mqgLjOYP2OrvoCupVOjIJAuE8LJiRWKC8CStEjUFbq6GCqo6Nno+Z\nIXpA7SRUQ7GstXNW1h/Mj7Q7rsoSNtm2DhUS2grjkwMuZ2OVKggLbpu+5uoT\nDZuk\r\n=k1zr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"58ae4287239fcccbe4c5dd9259164a0660c76f85","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.2749604bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.2749604bc.0_1626279685018_0.15572602233482447","host":"s3://npm-registry-packages"}},"12.0.0-canary.e1703bed9.0":{"name":"@material/auto-init","version":"12.0.0-canary.e1703bed9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.e1703bed9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a657bd48c6f9bd28ca6066007b90fb52f8ce042b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.e1703bed9.0.tgz","fileCount":14,"integrity":"sha512-aNejToeX2UY3ryh6Ld9YT6OVvI0W7y7E2aJMtfIElWTAfcwSbIJhRR3EnC4YGVXFtwTpj1yUjitflVLjRcLuXA==","signatures":[{"sig":"MEQCIFpXMoTCKlGWVcb+wawpkGB35iee79bbIx0bj+lOEl4aAiBMbluoujprxmrkH+9JNIGCvIt7fD+Jf5T28OAFioAVfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg71tdCRA9TVsSAnZWagAA6ncQAIL09z2p8gT0uX7m/a+R\n6zF1jldmCUcTh1qaKLgIvD0GPQq2lH0b7n9ktJrh+1O98n4YXwqeDijGF4kb\nenP2asx1vxgI8YV/sAgq7ImkqH8YcbVN4KnSgiqcaVB45N8vfFNgtZ3U2yCL\nAx+OtHynBS78JlFLr0dBjFuBvWpNekWsmm6qDkqIldTZ0aRBqgTFgrv0p9Bg\nagu4qyxffeHkUAkKo7/LUEq3IXW5giEKh1unRJ2RbMWhPnrY0s2Hh9JYiyCW\njp5a+znWrDXcqhvrghRtpmD7NlFoBUbRdbJG8DhU0YQIcQ6qUgQF5tL6B7kn\nGa1EemNOTgP9+tkRIgTR/QD8DK5YjacUiJu7h5x36y/D/BRTXG6FiJp/frDz\nUiIGfgvFiQgt4W05jaWh2bSkh7ZkerMkvvU8CrvyJkKAiYot8oqK/+fdryoI\nKCJvjLMHFp2Mspp7PUTwhuPc6as+3na3RxxciuXwxME0CuSGzIwQIyvhxo2/\neWRTL22+kJOGbg+cZ+aF9vxu7JIL5usGVruwxqMpkDynZ7kVo8AoxZwe6EFs\nffG08nk9xDuv+FnUn/ZmIjNKSbl5YNTYXgT+SWJlea7R8IUj08kRuIroHLLM\nCS/CgAoJBc32ESyQa2URWRWnObDUK3fLgvFqneoDgvVMaYE5WIZl3XcMq7nr\nTCrL\r\n=ojIQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ca9075f939dcacc82290fe2b01214639958bde93","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.e1703bed9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.e1703bed9.0_1626299229287_0.7219961228842062","host":"s3://npm-registry-packages"}},"12.0.0-canary.de48eff0d.0":{"name":"@material/auto-init","version":"12.0.0-canary.de48eff0d.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.de48eff0d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"16b1f2d708e8ba13d48751e2126b5fb4b85718c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.de48eff0d.0.tgz","fileCount":14,"integrity":"sha512-h/jAIJYrMsAzzJVqR0gFrZhr0OzMsXSUyM8REtwoFKHMqROINvRzvM3Idrx6xRrqUuPT/LwzhvebGpbjeV3MAw==","signatures":[{"sig":"MEYCIQCxI7+O/7BnVluzBMqL2Vzj6w3kmag6oMqCCjW9qo7eSwIhAL40brRVDWYEpUn3QizwMj0cdEu5k0fQgNZkLyywczYm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8GtACRA9TVsSAnZWagAAbTQP/1EXQq24ndYnBuArq/sb\nfBOgkvbWFuInN5uBvcLQpJQ2KtWoFhW3ZsFb7MqJqeRNMgc8MFYSFFKawpCU\n/7YLRm3/F4ETV3OzO+0cIcm4ll9/ycx/XglfDxqwoLr+daR4Cyl/CATdJm6c\n+TDgRahY+t3ZfApyIpbP9aK3gUdMQWSiWdvbUJJNIWWkblUtV1q5yW67VeVY\nsQEiAWgi3axxEK02Tu+tFthPMflAIVT3ReXGTc/jCcXzLJG7BNoKZFc63q30\nONetcMAy1Q0jxrWZ0mw91oqTlOs+SNGbkNi7EwcHZf8qQMvLNyux/f0NQ1Ea\nhjDBEc7QYA4WPZfZqy9yI2KvKNUTQTonHV9W2vpB1E/PC48q2xaXlv9T+zYC\nbJuoaUUeP4e10Nzwrw1xOH8rX1ZGJmtDeCsG+mFLpuxaGx9GX+8KRYcpc7hE\nOTKFWeUrDp3dv4l1+BXTO8TopwbtvlQN5FhVAJYCTWzD4V29B63Us1thcYse\nERSFtxf1L4xD8TTUeiSGswXuTk92rOpMrwcvyTYQ13W1fyAtZK00USXSBLOz\nk4C1oAMPMmyqbYt8ZcaH2oPmKC+a6MwGA96rJV+aQmH+KgiykcT8SKxDi40I\ncy4Knb/nrtzq33Eb0Gs4WCitDC6cFkpJOLqM+BMyQaH2gIYhZMWhU7lezXBG\nZ0xt\r\n=DG02\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"121530dfc073c7b24dc1cb75732a0d4c0e6a3f28","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.de48eff0d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.de48eff0d.0_1626368832583_0.7304315968857786","host":"s3://npm-registry-packages"}},"12.0.0-canary.4f060adc5.0":{"name":"@material/auto-init","version":"12.0.0-canary.4f060adc5.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4f060adc5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"98ac5ae0257b96d8d29b834285f0f4164d5847e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4f060adc5.0.tgz","fileCount":14,"integrity":"sha512-r7BhDzf8yjcIVxxub32/8EgZbqMjKofz5J+6zQIMKrvhTa1m5vHCme9Lx9jE9FLyHOAccshqop9wEOLybnFnAA==","signatures":[{"sig":"MEYCIQDTMROJlzDdHihslBdUZxT4D8midhzmGC3JlTX+ySKncAIhAP1ToUODmmgLH/pZmh6Y2qXbqJi4+r3/Axk+KQ6tXJiC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8IqeCRA9TVsSAnZWagAApwYQAKOHCwwH9OpFivquv4QD\n4wzrCz0cCgEyEw5pwqFAHqpfsnjCGbyQKqPIf4hxdPv4fKwzhVBtvkAvuJ0b\nd0I8XDbyex0Nbz+buht8rvUqbtzl03wSuGNfDO2XRHRSwIHlU4pVtZoabPho\noZX4BBS/72r8BXtXFJBFsCl/Tsp1ZsEtALvSPyXlSH52wYN0uy5tRXFstJSm\nB5wzuqZRTr742WBXxTDDG+gHwV+fjms+a7NLpEP1L+jZnYPONEcNWazGyYo8\npdqq9Zn7U5qlmFpgUG4a4iUTpc5HqKGKPCIZ6R9pIViNMI0CaYXNImDAQ26P\n/bIHjLo5a3zwypOHJ99Qgx42aQGT2MpgrVXM3Pr9Wj3CYTXzkI5pj/D+GIf+\n2y4BRW/vUpRKr7kbTbpeLv3AsISB8Luwfek8uZhrL6gYgx1WbFB6HSz9h+iP\nn8DDUoK8QGYEJixmw2nF55J2Ik6+DhHug8vrP3j1ibVTZdiD1PfniG+oKw2j\na2pgNPXLz+83tfc4fx4ZFBpu3rxZ919D4La9lAyyp4TchEhgVJqZSMt5lNRr\n2vvqJnoux56zZvmw2F/tY7vL4UhTSdtJPJNr/KFJSBQS9Pc68pc+VZJHSm9o\nVZ7eJGMRx3MATR80zJEg0q+jaUgDHOWTzpsnkcMREV4t/AhOutlmQDvRoduN\nJ2O5\r\n=2Znk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e70b8cd653f195a01f93c3e9928feabf39fa87e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4f060adc5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4f060adc5.0_1626376862458_0.8203797159401729","host":"s3://npm-registry-packages"}},"12.0.0-canary.bd25779b2.0":{"name":"@material/auto-init","version":"12.0.0-canary.bd25779b2.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.bd25779b2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1ae27e5f86404381a9d0df1ef2e40e5743a151b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.bd25779b2.0.tgz","fileCount":14,"integrity":"sha512-R/hFxDpKhOwn6b9HecxZe02LM5IlVyuetkt7xgO+U9EbajL0Ozhe2NRN3WxzIb5vZntrHOMVS+7/lwnQdQieLA==","signatures":[{"sig":"MEUCIDgj2n6FO0EmM6pNstjZrJCftzqxCOhVihgG7Tciy38bAiEAupHSB3hjIOzrTsDi9yxR6IFEpBpAxSWMGRYu+TIzRvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8J12CRA9TVsSAnZWagAA7lkP/jkhCPbrls5qlMBNy5ek\nHQEAD8/K1sIhPg9kSovJ384z0fCnkLo+aJiyM78Fa6FwAiBpEC1JIrEjnBFx\nKpEsK+BbZeCNCDZUWDvbiyx1VfQoRVkiZ0nFcY+hszLDhYW9T4CjtqNPHLM8\nzeFAOyMxWG/sf5p25q+xjV/IBlPpUEaDDR7aLvdWPPxdWJ/tGaBHRMn5k+n8\nV3j/eUZMwT+ckwOO0yZUtx4XgQjOls6RtcGZsqnJRCZ60KYSzvQBDk6Pis7Z\ndbM1SZEndLUF1onFHRZgybsmmjjckZ8RCbl7P56KEuIg68tCFklAbPP0ZCqU\nvrpsGbafNo6aYQXs+BQ7bDO1UGl9Ek4F+sdUFcxRG+pvhnSHVpDqXBjqgtU8\nPTVGr5WLyyT5y27rLnXGQWwQbWEdc/Mjl+dAMf/RcIflN/T6z/2C4eUzWWAc\nqw8s15BlZnOoZpfE7cgjF9iEUPSQlvHtlWntWqxDXhx3vlPgtu5vGgaNFkIj\nLOywbs/L1Thk19zmGUfVXYxbuBajaNVaTr10n+j/cl4Fx+V5mcseaIti8w0l\nxKbfADkkrLx7l21/goynu4uPBrM6kBfIS4keW3Rbhd873qWj/VIvSqlHMGIh\nebHqHEZ+kI+nHwd3ILC7E53xUKE6OB3l77aFElpVbW5nGc0n1AIo5rfMBwy7\n4zzp\r\n=QEZv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3ea8422325f9bc5f9a356842191da47e282aa4dd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.bd25779b2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.bd25779b2.0_1626381685846_0.14923003337881546","host":"s3://npm-registry-packages"}},"12.0.0-canary.9f68a932e.0":{"name":"@material/auto-init","version":"12.0.0-canary.9f68a932e.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.9f68a932e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"418d0d4695f2f020b38b8227a0d67e5f645304d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.9f68a932e.0.tgz","fileCount":14,"integrity":"sha512-uOZOfZkeTUX1Pvi5fmY65qYuIzZztkrXwIcogjXBb9T3B8+AgFAtn9i/nHTouRRn7+9nFLsGmX1KuclOctGYkw==","signatures":[{"sig":"MEUCID0j0Zu5Awk1yJ5KX36eTdbDk1/c39F/703lu6bzY8XiAiEA+KR3T8IYyNtENCdq975Vb157jMq5muqtThtSPVzzhwg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8LFUCRA9TVsSAnZWagAAdpsQAIpzYbnGZCqjeTKIl2n2\n4n5z1+cSxy9yDkb/eC22cIhYyPcF/KbEzDtRqVfnyXwI39duxG66FNf8RqvH\niWr2oYj2pHnmCMAjwPqNKhUONKHdMCKvvDT+E5RbxqWpYJaz6TY13alCEBi2\nInZ9hiW1n5x2p6sUUIw2pYXOF9ez1CH8D7YhSB9SReZEESIIJ/0DoyTbCgjJ\nc+DW5kds2cWG+GbF3vs2/ZpCdICVB9rvmMWAm3ELTbzg/BuspVtqR6Nd7JcM\nr7HlRByb9o5sNLqvnD+WiePxVo16u49LAEWd+PFFsBuuvi98oo3ChuPheV62\nq074mS/a/rkp4irlTXL6oZrEch+0K/L8Q6F/zEbh5kiG9pSfWw0Ctceye5vT\nZiN57ZNIoi+CDB+mOXDs5ZwYy6HbRoQb01znRtafDoBQdf3NzZyJFjuxKEB3\nfCWg82mZje2cblW0kUBuYhlRj5IBm3Mr1XZUj7i4ji3cjtE9/AGJke6ypdfD\npVSOviLKIctYe2FUy9paEdOkvOUuWHPZDBfnsNXYUcFdoP/mit0LF32ahaAi\nH+GAacaaLcNqBrVZTDgKvYUs+QjWWXWc5RiGcsUCBrH+H8pPJN1t8Z++YfXt\nWeETWt8GTQP/8YHaKPbKtUSHzmz3si3izCDCCKVXK1PgVZEXu6iOsH+uVJmg\n4AI6\r\n=1DXA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34b4e5801eaff79707e9f2c769df2c1a34bbdb11","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.9f68a932e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.9f68a932e.0_1626386772601_0.9814405429392823","host":"s3://npm-registry-packages"}},"12.0.0-canary.4eecdeaf0.0":{"name":"@material/auto-init","version":"12.0.0-canary.4eecdeaf0.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4eecdeaf0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4896ff9986eea3e764f00cfa1a8847a40405e087","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4eecdeaf0.0.tgz","fileCount":14,"integrity":"sha512-a/q4BIHqsMXXQa4cMepd6oofK0x4RCaNz2OQZi3ecCYtAwCJqWd9e3CLG9k77CvbqdJfHlxGHxEL44C1tVc80g==","signatures":[{"sig":"MEQCIHywz+pT7ffsrGYyqbCV8zmn02WQP3k7WeG9ohAkCv//AiBg1wZnnYdZsKCn37hKIwSYl8B9R4L+UrzUy7yYdW+amg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8Z48CRA9TVsSAnZWagAAKHIP/iXYh1/wA+b467IlWYzO\nkR0OMHAAWTGxSzUu9Wcay77J1ug0LuBDZmzbr37xCKvCceonXhTFm8IhlYga\nv5s6Xy5JVv9TrJWT2y7/gLnCB4WCmMN5yEiGbJ/W88p0YNAa8a11PHXuxtUO\neQsY9fQ6oLHevtl9dP6o6tMU1pAWoVr+0ff1qp5f0GTYLPMx7eeDiWwJvPTv\nKSiI1iRIWRaoVBEXNFdkQhzjCxkvDsBawGM45JNr3p6F3qtbSZMqSEi1hkRc\nQK3nHHtb0D6XwDtj+mmltn9TrOfGKAoNZ+Vs2D9J4EVdHObHw5i+c628Bzb/\nSmdGzknygC0BTuNpmDYuqHv2VekNKs06sFv9egk+OQPmSLSIi6XCge5BY7M9\ntZOwQbRfHHFurkBJqBdsvRQEv9pUI0kgvdbzPYVe5vTL0ts/2b76seOne8vB\n3vWXkbY7qTDM5mPcaZux9fPZUMTBAAa4irrW4OVpN4awna6nGt3eVToI0YZL\n/lZWXrUkfSRCJvLSNFk+E+4AW7MaCebFulTHTv5xaTtwCMngRxg8wy/Aajqm\n00pgcJzMtNJ85Os/EZTZvNmmJxAf588R9w6Tx+VRMJpNI+7okckyYeFQkuxn\ny7nuSNZ7d8nNHUbL9up3Mot7UBjzbdYbRHwP9U2fnzA619/rOLmZPbH4gbOL\nUyPE\r\n=Ib3z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"89a3faf78d32cadbed38135c9ae10ab1f3c8e9a6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4eecdeaf0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4eecdeaf0.0_1626447420244_0.5253406452012026","host":"s3://npm-registry-packages"}},"12.0.0-canary.7239684d4.0":{"name":"@material/auto-init","version":"12.0.0-canary.7239684d4.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.7239684d4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b07977662629041f19db11f5ce90b94c006a092","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.7239684d4.0.tgz","fileCount":14,"integrity":"sha512-gaQDZ8EBuV/4GKwOfv8kq7CPJXsgTgsnYy36MrIkaqI+zxMtblVOsYjIFZdUvCBz+oF2sAnkoEV7MCLdIRZ34g==","signatures":[{"sig":"MEQCIFY6bivk8t9pULb8a5hKAEXy7ctsnWkGJkv12/NFlekEAiATBWpwX2bGIZDu6LRt72CiAyf1lwL5TglmeNIXlwlhwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8ayUCRA9TVsSAnZWagAAHIAQAKKydo7LWibUQ3P93Fge\n9pZSEU0zor9DfbvM5KEgyJMi83aBib88O6zPl/3NjLPhMf7LVFfkC7CmMLO6\nrcsB2+myPog4EjxnHwHRWHOVpth7tOL4xnfnQWFQnUeSnV/1nWoVORKxY2bG\ni2Rts0GmjPKo8z74jntv2IeoM2fAwf9wgOxFM0XrfsWyPrMigESJDjRVryz8\nIrBSuB5cgX3Eq3jVZZHPuJCKp5PLi2eGWBv7FcmN+HG8cYIH1luYUbRF+RbS\n33ZoHQzQsYefMjzzyNqv+FVTuOejuPDg1s3GZQZOZLuU8aILS3ygys49XE2g\nRo4zK7rQ1MPfPacE/vFpX5EbIjc0g6I6uZY+WEyZr84MFUqcXlz947IOIWjS\nTYFSJcLm5O1nw0yivBZzwo0wMi2MCEreCqoUN9lkpVTTZfq1Q+mWv1n2r9tW\nqDztiFQR4LYGzrFPf3Q77HXZJ75wUdPo8lWK8VGFLsVwQqZna3xJR4kBhd9O\n6qV4dy8FlrV4WZSh8KpUuYhpM1LKm79FhgliyaLlzqVj06Q+EstV8Pb7d/nT\n0Sd/vTD8emw7Qe6Xxoc5/vUKrr2XmuzwmM5dl6f6NvkWlOa/YRIjoslNz1TM\niqUU09/E1JPufycDS3DVOH7RJ2Ab2WDroJNyzENACBxMaGZp1d6UCkyTdDwt\nkyP/\r\n=gKMw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4b35543a488bb22a0855f6f0d00b047fa76bd623","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.7239684d4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.7239684d4.0_1626451092532_0.07036208905665009","host":"s3://npm-registry-packages"}},"12.0.0-canary.d5f1f7c72.0":{"name":"@material/auto-init","version":"12.0.0-canary.d5f1f7c72.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.d5f1f7c72.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ff7f687424fb641a5b11acc76cda00f2ecc10bea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.d5f1f7c72.0.tgz","fileCount":14,"integrity":"sha512-ueITr/qcUSXQC2ppqB8+2KNdkmlRrBzmlHn8zZON58nHslo6N/Tos+EgVDFH9bq6DBEu37e2SRy4SxUBr4Qthw==","signatures":[{"sig":"MEQCIFyrdBrRofDPGgUB5JWO3h6FqVLSfqKzncph08PCS8ORAiA0l+a0/TV/piIGUZgueh+FG8pDr15uuITI+0zj9Pui5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8bARCRA9TVsSAnZWagAATwEQAIWKhZVEBGlVThYYFXvA\n2nR6WGmjtEY38hIB+ARzF/R5rc5J63DBVn0DktY3vgfJUgwnrHPfOUAHnjlk\neGwiixKdVUOOA8ykl42PnAMKY7+QkrjOJMucnokjHdT/qUFsI/eJrVnIcAzA\nQn0WBjCRGZgqCJGCBSeQoq9GvB6H1n0e/hCJgxucPfCdTcOIndS7w568PZRF\n+sL5LoRcXeBWLVTnowvcWpZ9GP7485WaDEUo0WjHgBJiQd4yUUKR8hZO4u93\nC1YXhsW7Xj5dOrlk+srmc71lhfrTcExjaAxpJWaEoZHMG1RRwQ26JkTJNxjO\nbdkAeRWCZEdHSjV7vLIX4W578WxZZR1IyRhJ2ZkEPvjR6R7iBnQH8JoUmYgT\nqDDIV5uSO0V7XlOBRKe2hAE8GqfxYZTLexII4hV8Cc+qY3FTadB2e25dAlq0\nY0ONR3hUTYAarHqaTQwdnr0iAqdEnEwacu9ZIZ5B2q/EgXNGxuSYVUV7mzuF\n45BZAwzhbNf4TLoI6yKB9RG9TKo2eylF/CeVNiYTclDsIlyp/EMFwhf0WTgR\nxZr9l+1za+9CdXhzxGn/i0UZfWGaR9GuvCTEp5+vjFlt2K69u+TmoQDYu2YU\nHIhC9NF3F5Tnyus+Xi5u6jAWV4iAyCzPZfWH+REffclZ/TDrXJEHNY5TQefI\npSWL\r\n=kxoe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ef327d93f5a591e88ce5af94a2bb181d97b58472","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.d5f1f7c72.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.d5f1f7c72.0_1626451985490_0.12725909474427266","host":"s3://npm-registry-packages"}},"12.0.0-canary.4d95812f9.0":{"name":"@material/auto-init","version":"12.0.0-canary.4d95812f9.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.4d95812f9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"53a17377aeb414b71c8fb9bef6551a9569b08859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.4d95812f9.0.tgz","fileCount":14,"integrity":"sha512-1mhxXQlDkREo3RnSqFvwt7hkahOVlruy66d8WnIU41rQGI7xs6AC+4zZ9f9opwmSq/g6T7+mfIqUJyh0cvDmiQ==","signatures":[{"sig":"MEUCICO8fMuj2khcSqn0NEG8LMBBKYbCP+lfURE9Thrt3vsAAiEAxC5h86aAKyGtJfEaRZgFVb++9wD4ULPm/aCWUKZ0etI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8eEZCRA9TVsSAnZWagAAtpsQAKSkLviztVY0FwpYhkPr\nLRRRlTqTehvHI+WHm0H4FHXBgmxL6Tmtm4AVvV7aqI33dCI7inoO4qLXdcDf\nF9HeGhi+ST5aV9QM1qXGQEC73ubIyrI9wv4zPMJ4AinBUJIhjshK7PZkoMD5\n2qOr9h9XlESMWM95d1LRRHoviyVH7b66IGZcQ7CtRF8C9V7PPAo7T5UkQilJ\n4uz5Nx1bL8sd5hjNBcVZx4R30HreRL1nESgZAJfSOqYJLAQoOx7cAh8GTRbi\nE12jGCQ2ab3xSMWI9pj/LG4KTEp6k1Vr43ntELplYObiYrscKZdhqDrNADHW\nIKZjNEXiJWFJl52KgAIhf8DzKQr4mZ0iSAHM11i9JXLdLMxf8B+6XF5hUg3d\nawcDdKYdCrMr32d0K2X6BHZo9DxNilgEJniu79XsorLCHUCy+x7RT4xmbSo4\n0WsYH3dBlJUS5ev6FoMARJA0KtbzKzdd8sKLP3JLpFku7/yjhm2cxRGj4JRw\nAe4fE14ybvyJHO3G3cXYxytasle/GsUbnDCbsvGY5ZVsJGycM9yLNTX2O2w7\nC4faNtEkd9rwc1Nvn+bk9u+rH7WKC9yECORyofXQM+nJ9B0vXx6oPRUoK3XC\nvDlLseW6f5vTxoaECUf9hvHEw+ZeZnuOXbeIut9iPlycpd/67kPJ4/GU1UaC\n8Wou\r\n=WO3/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34bd44726ccda77331fa29afdc1d5ab7ff0879af","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.4d95812f9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.4d95812f9.0_1626464537867_0.9053385506070244","host":"s3://npm-registry-packages"}},"12.0.0-canary.38d1846cc.0":{"name":"@material/auto-init","version":"12.0.0-canary.38d1846cc.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.38d1846cc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"593f23cde0482730bc06d165d6402181867d46cb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.38d1846cc.0.tgz","fileCount":14,"integrity":"sha512-frHRQTzYAUw8UBgmjGYb0Ca+i8NpQ6BEGFKXAYPrJaqvSSEx/Z4dxjoY0baDqP6YdnkH6uFwXBuvTRFig9ttPA==","signatures":[{"sig":"MEUCIFJ/oQnyl7n+7AK6ogC1Du8WmQBcZ+rq5rlzcDanILvoAiEAnPsZJme2f5qYvWnJ7aHfNuxF2LUfugt6vMGrnmDz/G4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9cc8CRA9TVsSAnZWagAA6R8P/iUehV3onwFRxllyBnP0\n29dUZ5ByTTmvM/ufOCPZwlfVDbrG4qK6fttRlEnx1+vlAzOCMT9iybhjhop6\nqlkFRmdRSp8hBQvpniMFQKW64wJpBVRnCAKRRbCB4NPDxf9SqDagTellfuVp\n7D0ZXDPIGu0zWV/NFY7m28NjitLbItpVF2EuIstJbPqTbRQL192Ap/XmXoJP\n0AX00thnZxSvqsrUREkmpme0mnhRWE+4STuGEF76GjctoQKNCbfLnKyadPV8\nZrmONG/Ybf5/SDKO82dQvYDpdDoNhHbaEDxAIxdqH1GmcB4Nl/gjN+noa0/2\n0kk+0AtXSROBsmqsc//z2HJ6pyyTu9kZRdIcJrIHNjmYdEKJhibNXOHBeLMi\n8V5YeV+UdmqYXrfU3Ca0Wghs1lhMh4SBPPXvgkV5D8k1Y3j56exyun0WEJ6y\nHxlMkpg3jQ0ME6XvyEslIOnsmSBHlimay0EisnNMoN3YHreY4UvHrxrmqYOI\n+IcE/fE2VA6lgXTbF6t2F1W0178RvKlYd5e0MfgRs46NLcLZR2mgBbO5DMwd\n4o+IXFoo/MLKMmp4M5P7l68rK7h1Ovj9LBuXtPgdpDfyfOtgOsyZGiWUcdjM\nu7c52yMYKWkqgpTIY0INDyFY/ZU9xVKW+iUiW5wcpnh3viR5iRJmKq24RY9P\nDsOt\r\n=CMRe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"77a8b2af56ebd184dae02df9198e75b16f4db385","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.38d1846cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.38d1846cc.0_1626720060619_0.8003683518625806","host":"s3://npm-registry-packages"}},"12.0.0-canary.3f691eccf.0":{"name":"@material/auto-init","version":"12.0.0-canary.3f691eccf.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.3f691eccf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8951feff5bd1f8b1ba0d1b2cfee3ecbac7df2dae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.3f691eccf.0.tgz","fileCount":14,"integrity":"sha512-EagguXWZd0XS2PnwRN6KpsI31f+K+KxAoDhvyv0otckzLI3XdNPIUGe+yhaxs287CLauwT/IGigkdUk1TEofOg==","signatures":[{"sig":"MEUCIBDYmB+txR0aBvv35BeT7IEVG7/cVQcoY8jB2+jf7LD2AiEAivhMFDYFfx5RGToyrk++v5WZ9P7CjDTM5zsyU3byIgk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9vTXCRA9TVsSAnZWagAADhUQAIYS74nAWHcYdXIzbk2R\n0IInqU3shneBHGeUo8r1OZQNbCytZ0uUsFUQhSlap92RMJaHYU5ELr7cfWGL\nUixweySaX6ODpHgzbfXL7MoL7kQXIrtOvh2aQGvwr9MYUZPUnlySkKtEogeZ\nfAsgq1NjOEruSDnlQLpL/6hs7IEM6A7BWRYKaSw/edMYfZ4AOdg7CLnrPMtS\nIa53gviPgQlJG1DH4FX9s8Usd4UJl4bBc3lbyCjHF3ovEhjeW6AghdKXz+ka\nM2VTNc7lX1y7jsAWI+otrcmmXMhfnoGb5OSJwAyixH25cUO7z1LNobRWWFs8\ntdWXOfaMf4EgcZ0OLYaLSqDE0LwCqOxBlfGLtLELgzq8J1Vkh4PpLBSO4WOT\nhn/x4lIE0f+lddKcrAM6zvzNLT+Trx3CB6hUmFtg514bUYPYrqdbipsAurK7\n8TuAcwObX8amsJrHgsMOEjU7a/3AykWTw9FyN+BgHgZhxy79aaPC0MNOu4LB\n5Ca5l6SXlKOEHKjYulCon+xC7DXSvKOx5eXWN6h4017+rVMu1qQ22jAq6BeY\n4Frq7yLu330Y3HgC+j8d/9RH1JlxXwFAi9cw6AdeXeL4iWP3c9INjqJ4Siy0\nQvr/uD8Mt4t2Z+RwuOGKBXwBS+mclihtzFrDIDpvYYdAFlAag953KgU4af1R\ncPnx\r\n=nB/C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"58271219b83ef8db16c68153037e69345831b4cf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.3f691eccf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.3f691eccf.0_1626797271779_0.0700001427432575","host":"s3://npm-registry-packages"}},"12.0.0-canary.ebb5c73bb.0":{"name":"@material/auto-init","version":"12.0.0-canary.ebb5c73bb.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ebb5c73bb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"66a37e69090f9c96d1d2b8f514c65347fe0f42d3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ebb5c73bb.0.tgz","fileCount":14,"integrity":"sha512-GTNlKCmJHOmLIx5Mq7Oa2aJ/Yv4h+4ztmIDNcXvPp4IpTFa5KMxti1r2iGNAtta+7Je+3YBW6fuwHFSWSb22Wg==","signatures":[{"sig":"MEQCIBV8PQ8JR3lZhymi8I6CCJZodB7e3Qx9KFlsiQQZsfeiAiA3wE7bcsgrQfEbUvuiQPkPxu582BkceeOBXoYaX8mGmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9wAfCRA9TVsSAnZWagAA+FMP/1BTy6exy6NBicNogwpv\nQ5kuLsH/SDthGDVrbLX/vexZTGHaGnrJVTuGftQAIabLD+v+5nxlragnZDdc\nWIlJYtT/EWDkmn1HSDh9o8bS6qWYmYJsIy9OJTLk/0ln9FyanNK51Klb/447\nf5PlJzFbmf6iqnpmu+RJflarLIaQweEIOk6fzf3Rg1YQKO4fIHpD65KcAh1x\nfJguAE1pRwbhzS/DfJX6DPIGIfOSsr0lu76mIMjm8JGCBQ9Ar7CVfs/iF7yi\niS8RUSH01hNCUSggky0wmnrdcWiAkkO42XPU7b9iRk8msAghXOyreHpRS3QA\nEbLu2SECg2hv0/m7CQdqPhpIdx4/KcNV9/Xfjavq9AucB0MQ5l8B6gd2xFdp\nfciTyN9ccd/AVt3DABir6Tj8Pk/cfJZrypIFzceCNGP1XQ/zP3SKsFp7++oB\n4O7ymfJEreQlebk80l7hxabEnUA9m/3MzvZdtjgMzPWG4KvrikZ/zp3RRoVv\njUNwd8gIetVaRy06nsxFooGbS13Wh8sA9SsG1Sq18MV5n8dcyn1JKY8YcWqd\nMSuIUOktl+3Vint7UHeU09bqwtUZ4C2ITJmPPuVvyPF+1FCmQyaQWof91IFv\ny+XWJ9T1/9g0wx9/o46Xa7BKNnx8HjQmpfEPxMm85rFaT3Q1lrBTv7h4oW1q\nLp/d\r\n=104A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b37a38f7ce62c0d87ebbb4bafa0f1fb02aedb050","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ebb5c73bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ebb5c73bb.0_1626800158949_0.5115330679347294","host":"s3://npm-registry-packages"}},"12.0.0-nightly.778a0e8a.0":{"name":"@material/auto-init","version":"12.0.0-nightly.778a0e8a.0","license":"MIT","_id":"@material/auto-init@12.0.0-nightly.778a0e8a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"46b509749c7a2cc458ef8c343d8d958a69a64c7f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-nightly.778a0e8a.0.tgz","fileCount":14,"integrity":"sha512-Y7xDAmflNLtlx7AjGdgCyk+aeEoPCYVhkK4nLfTbJdx8eGHOqAMVal/6zIpGzI7WyN/nZTCa5F/e3rXhweo+PQ==","signatures":[{"sig":"MEUCIQCe4i3PwYe5totUbeBjK8/mJDCrk4AzfsuztL60jDig7wIgRs2ovR3QUZhCXHwLzJMwT5tZVOrCYAzxNEpZrA1mF6U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9zpnCRA9TVsSAnZWagAAfdQP/3XQ+AeYh3Pq7JHfdyIC\nejDw/QekEaur5Q8M8bBODCGtCZp4EaPjvTBr/7FelfFNqBWTm2LX6L6sQ3Rz\nsTYdoO13XZL13GQRc9wqRLJVJQZyCBzU3itJNTOfDyS2CcQXNCd7AexUlVkC\nQy8vbjIlkstL0YzJki7kIVX724aLkfjpfdnMmkWoT/0mKUCc8qV9MItRSxRx\nH3IAwjG4qI5XutyO3KgvCAirspLg/up+AY7zvTzLj2/5Ig32fZb07w4rLZBh\niil6O/121QAGcr21haCYrqPe5r+nh0Lm1K1t9MocZ+vSw1wmSd774COanra+\nZGFIESG5SKyNxtyx+K19FCxtQsXzgnOFv7+FdHqLiuIqTAnIsbJl4iey/qkP\nhrFda4/tfBK7ngfmDeVnVgki+eeEIc/HIjTw5qWFywnHx+20RHDd0vE/dIQw\nW71y9BoEAuALMwvMwagTJz35beKHH1iooFCpsMxGJiQh29trjTCiG2pYlCn4\nmgPgiFoM5YUPGUvFFRHDKXofNsfQ7SBAHN2GUgeG7OR0YYKhmiUnuVqj5gWL\nbw1+f5oJQqxJz/RU7SGIyfwbAHT8S2iB5AfJVks7mgtHooK5b69L3+Cg9rfE\n+8/4ZIFnYC5juky6cruzwqvx4+YGeBjy1uOYrJNnWb+y1rmXc8JyNXGSaHIa\njly6\r\n=Y+7i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d86234d661f09ad766ffa2f82c69582e585a8fdd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-nightly.778a0e8a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-nightly.778a0e8a.0_1626815079484_0.48632613463931595","host":"s3://npm-registry-packages"}},"12.0.0-canary.791311bba.0":{"name":"@material/auto-init","version":"12.0.0-canary.791311bba.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.791311bba.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4c7d6c2c9e45dca71c7fe52665e83d654839cf9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.791311bba.0.tgz","fileCount":14,"integrity":"sha512-sQUW+CD4zrj2SbVo1+VNSFrrbZbsBfeu41jd3HXPaOWaB1V1T5O6DdNF4agvfuotjDxd+Hp7SvHJP8Y3JnIB2A==","signatures":[{"sig":"MEQCIFetRG0HqdWjSfCXNOM7K3rXojfaNmpn3rig645MOB9SAiAJ4X4I0wUuvIBi70D13nQ7FygiMbKnSbUCNQ6gfRVcxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg90jxCRA9TVsSAnZWagAABhAP/jvAM0mt4tWMiXzeNWOx\nXiXJdBF8A5jgkd3b4wQzT6BnbbwlGh/QJKan3zdh8IGH0sUlSqrfRrEBOlx6\njABvZJFAXLbJhSOkT7iCQG7QOTKfUnEgD0EyVRfXZcTcy9v8te08Q8+JJCaA\nW6nX1PY8L4E9amhCddA/GR+k9UqLa/9W1Rtm5mX1pLfttBr9nOwAhuhzbOTb\nazzMv75A15daopohX8N+u2ZTIg84071hBmUQEtPO9lif9kStOkoiqb0Ny6hc\nPlqV1NCqAYBPd6HM8200dKfs3PNqtRYUhXlLn5DHDnPnsM7zjaVNPsrm/E/i\n+bs25fqbWEGxdtDb2Ppu3d7+27ILrrxMLFwdnIE3lZebAS23Djybd2F8hbIw\nj5h9PSiQymlZDmjlGgDSidyeqZO9YTolRsmVW5SA4mwyiG0Bn9AgMhtLHxo8\nG9ob38cj4vBB9eHytnZrb8j1fE5/sKb2gmIKNElBxTCt7cwZLHREb/OLDjBJ\nlwVw8Y1tTYB00bp7Az5gz1NnnvFOYs79CVoQdUT3If0Uss5zYLGuTyUaHx8G\nMOwycQzuQDiEXh+iOUyLgdiNPJTgI8YDS/HQ7VOUsiqfie8prh3PTIAdYUtU\nChaMFjJOrVvFkF1T5DmMMuMUohQyMvyuYrAw2n+EJeOjhT7rgPZHBB+ZaV1B\n+9xa\r\n=mAK4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b915b82632a30b60ae4dca5d12fc23d5a5df4d4a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.791311bba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.791311bba.0_1626818800912_0.7738944032880646","host":"s3://npm-registry-packages"}},"12.0.0-canary.85e9a6ac3.0":{"name":"@material/auto-init","version":"12.0.0-canary.85e9a6ac3.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.85e9a6ac3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9c56103573217ef4501c100657da63d6ab44900","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.85e9a6ac3.0.tgz","fileCount":14,"integrity":"sha512-wrM6F4GpJqNjjOfxiaXmcLi4Oh4kzw0uzoyGf8H2Wc610a3jdBsHmk5qc4hielng1mAy1Ca4qTdIetVDuRrfbw==","signatures":[{"sig":"MEQCIFTa07nA+O+yuGsA/RteUdVIIINkTu83gqPO7ulzCBhtAiBexBh05UFgM8SZVas8o2zDw9nLSuPWUgaUMfHZ9yMyQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+D6rCRA9TVsSAnZWagAAVvgP/2JDSz/ywD1GtGjFKsyI\nibSYw96sZY8l9wknKXZL8CueV1r39qOL7ufZC/b6xo0T/sy555PGkWX+W18h\n30xjaK9qMVVCUqj7JQ5LQ2YJQZuU57UKaCwIlWGd650xNePB1UGT3ygjupYh\nykuE5ey0lI2uyyKlHM89f2/HSNFvfE/yrReZlP8JudE892I3MRzqE7K1VUPM\nF4VRiiwSVYRGP9jnfbzd9WzUuZBLqGYKlGNw55nExpJ0lH8Dow7QTMZ8+FtA\n6KTt1edhqpIEZhhtttGHHo8J24ed4ZE6IM1fFzHINuf2rsLgEUyp8psdUvf3\nvrHCA0IOwVwmrdrGmUYG4pHTLGaZDZ7bOGnPccLEwZt5/r/vn0IoXaOOD+Rt\nUhFwNh3uMqbzfG1iNqq1KDRp5V810oWrVfynwmX89XQZGWKaVQWIfLQZZhup\nN42ahVRMdhlrY/SV00dNIS6pLFentwJxIrOwImGmP3s/QvNkS9BVg0xG59XC\n7997bgdjP5AxIRtRFcuYMwyI11Y2R536iVyUClHp1MdwUC5HoBDqxyKiXYfC\nPtK2+bteu8iwQvzt+5IdA9HGHS6DoUpGa0ES/QNZ4VsYMSv6r1bJEWRZXVYX\nZ7J/sa/vYvfmQTR7LAxHMknnWlRnoQR//7yWO2tDacypGggQivRXFkUfwRVe\npPVU\r\n=4/ZU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"651354325ad21ac082f791ec2abb0aa32b3ba936","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.85e9a6ac3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.85e9a6ac3.0_1626881707361_0.49879681911935037","host":"s3://npm-registry-packages"}},"12.0.0-canary.6b0442278.0":{"name":"@material/auto-init","version":"12.0.0-canary.6b0442278.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.6b0442278.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e81c5b8abfd2a4c63aa9046f0be757830ac1e720","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.6b0442278.0.tgz","fileCount":14,"integrity":"sha512-XBtVxsdu0K0F5gYe0GYyxomX1kzAeSo5+QjmtNUzLjz1JU9EfbvhuEoVk61+syKgA0Qkxo0/n5kOG7eCf9VrXA==","signatures":[{"sig":"MEYCIQDHrbH0LtFCbdJf2wGQsjM3Id5Ei22HsGhh0l44+FmOKgIhAPGFcXl5cvVx4tGSb+LVYTQhSwmgYOn3HdhUq/Dbv/MK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+GwdCRA9TVsSAnZWagAAypQP/RuEGQphRWpToG3znY+R\nYHdUxQgNBdrNsnCOZsM97H1gR/5JS/zxQo21klrIuLoYl0rgeZu+w6pS6i2o\nQ5f7FrKnqnZJ8kmbaplYlUMx1XTHbZyds92nil4hE2UfSd8jtm04+h5wZBTZ\nyv+i0nuLT3E05eGfPDxuap8DWITXsDl2im+PdnfHPFsaBWmUZu+efFhPfrBX\n4tLvU/lu7bruMSlYFjWK3RcHpE0wKOHn9jgaM93vkzllRC/ivr28SvarU6RY\ntKVCr1AjfJtOsZkmy58aoXzX6ly44x5b47qkh1vk+5PMPDXhlyssqNLYVRhd\nrvGVQCt5LUnxdQtbpmlvkXXQnBrykI2GGPEbHBFWsiQdYdx0rtd12/AGBxSO\nRtIbVHw+RJwZFqCV2HX1ZgIWHs7LVTn0PjFVXL7k0E7uCYpU3rjMj/EyzVXR\nEqh6hb6Et5FDoA3/IICIHmABTOUu4mKkg3FI4f6AQckWlOmLpwFoBdDAAFLx\nRYDRhfd7oAlA3gWO2F/pmHLrxJ2uC/u9G/iX2pTJoscJSSBgj1W2aG521xdW\nbuaNvz2vTmTpxDp6w/Adnv+IR3AlqeKqZxn8JDFNDXjjpM3LMaFt62ysSJZa\n2YHBaLnFVNhv69YZmJt4unITaOoMvPrsepWwLEgG4ZjjX0PiIClGUh37imsp\nauXj\r\n=hnwO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fefa69e22f9083ed30aa4ea05114191682b45a14","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.6b0442278.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.6b0442278.0_1626893341124_0.16614200439636084","host":"s3://npm-registry-packages"}},"12.0.0-canary.5f00e454a.0":{"name":"@material/auto-init","version":"12.0.0-canary.5f00e454a.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.5f00e454a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"566e30700b36537c13fad49d30fc10bddcd80883","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.5f00e454a.0.tgz","fileCount":14,"integrity":"sha512-AqJSHC6z8rWGgr+ETREhU+1KwCw8FmtcAAFrIg9kVeTNw55sXpncWLL1ZMzqKSAWNFGrOwoNNAZ7G5Wpac0nMw==","signatures":[{"sig":"MEUCIQCZu4LoQJPHNlwQq+VEi6rHh0idSES5sPQrsFYjMq33iAIgA4ORdsaTpAA1N08F3BYzfRjnPT+KND5AsXs/LgByLNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+aVbCRA9TVsSAnZWagAA4OwP+wZMbBSsHNmpJRERJIq5\nhSwPLmXe0P4+9oVz6U0mch9Ddx/CIHErr7i1xHQe84P4VKHGYerhaTxTGJA/\nBjMNzWl27WNpTRVWhV1QNFKUTCP5sTU6h7SvVt+ONYT1u3VTGCHEcw6tvoWg\n9EwOL5YaJn2JG8np5pm8Q6vrkZa44g4Xzuq0uX1OFrVHd+Neboxfj2aFh8Dr\niiF5eCJxiQ9cXCS4jmkj6ccx5yfX1w+bOf7/VZ1/xffAeJa23OGigYxNQoOm\nM90SEPKhvmWG5eJo7kuNBW9XcSL0xU9JpnCnGzvU75p7rvio5PjByk75RcSD\nS/xyyXanWMvLG/Bzh3Rsqq95u5RoKpYYhcqk03K+MOhLxahhikW0ECoxvMOF\n3j9XfeQ6Ccc3AGbtTNhPJj/W+aLvZmImJF96sY7C3htCJ9KERBNNI/A4YRt/\n87nNLy6dAbqzkxacaatNVDNFV3eXCfAMpIHWd4bSU5Dj5NSDlE6zAzh9O6vG\nA0z0t4f7VP8DxivyYi/rXwmfWlSsyJWTxEGoe78g7vt8sYCi05npNRwjHSQu\nDOeLELnxqfQIu4qsCryHpMd17E+DgOwlY7FJqI9NGb/GvDefvO9Es3UrO3X1\nRboD/9lHQdDOJ0nZDex6H+os5h8hXyiXYKN3ymvKW2ikC4Xxkr50m8dNWIAQ\nr7wR\r\n=HPn3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9c8a5899d6bb5475fc5fb2c76a300d4a28f0ffe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.5f00e454a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.5f00e454a.0_1626973531241_0.7784008158753917","host":"s3://npm-registry-packages"}},"12.0.0-canary.90e08fc6b.0":{"name":"@material/auto-init","version":"12.0.0-canary.90e08fc6b.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.90e08fc6b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e7d159274885fefa05ca261ce61868e13dcd0b3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.90e08fc6b.0.tgz","fileCount":14,"integrity":"sha512-WkWFE77ej0hSGpLRbflLaNu5kg2iOV325Sz6KHQ4TAnwLtk7F0Dy6Nv4dxLwOwzvNFu5WAAaaZhqnn0kZGfLvA==","signatures":[{"sig":"MEUCIQD733XarTd2/12LrVFHk7WRpoLs0pVMY5PhhjzZs5FB7wIgEbWxoL9vhLRZKihvRehCYMIa2TWkEvR4qYHoJTlkNVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+gE7CRA9TVsSAnZWagAAQSAP/2B8ux/zJDFwnQluvVp9\nvqeb6g6bwVaBsx0J3W61tg1sK8wAf697G4bdKZRXU9xDViMKBTNZkwnIiscl\nWZ3SiO4t+qMIBsU1kFlfDuVPKkgI1fl2QjVRZlHPYjQ8TMGjGPOfydI+oUgx\nT9D4yR5mjNqRU76eDFEHAYeTF2O5Qs4ObdeN028hGXJ03Ii/5dsORUmpqp+H\njawihyK3ZO2Zji6m4KKeT4QMuzmMg+btJOYfPHFTi9sRSYO7PoTsRZdPp+zX\nxpdoZtin80THZt9lgwyKNK8FSglsmgPN9Opkk4RUSNSz95PC9kEgEvFrBIJ4\nR4nPVEpHqDLJuqVV+tiIH3iDgHNwXtCVW6RO2Vk+E/N6FJ2XlURyULfsRR+b\nEfvTh9yhFun4s4+HfR4Bk5EreN/basWQA0aldfG5hlP4fcVrC5MZYdCtGtI9\nHhPbFuHuehaDfQuTj8iia2wf2YwhZGWBPKxV59S9i3v2c0Cl5emwwVV9lCma\nikX90NvqVWSY8AHAAg3IkAkA3HU1X4Oo8xg+ZAeUQZuQ/xMSo0R6quZOg6o9\nhadFMraCeS9zDIEFreaB94u2ygo4Nf2d9jQQcrp4WZP+p7zEH5eoZSGasMJX\nyCvmMbP7GNKMCOQFGORv7K0GFHRN6Kp3+/h8neMGwZjl7goubbpX1hWdiUih\nTyHD\r\n=sy/x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"267e307e557cdce4bda13e55c34cb0d1aa0d0b8f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.90e08fc6b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.90e08fc6b.0_1626997051381_0.6751848401630427","host":"s3://npm-registry-packages"}},"12.0.0-canary.cf5b9eb86.0":{"name":"@material/auto-init","version":"12.0.0-canary.cf5b9eb86.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.cf5b9eb86.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a311202e949b9ca5960099ba66750baabdc3066f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.cf5b9eb86.0.tgz","fileCount":14,"integrity":"sha512-qJFJbS3CIr7wO1jFXzkHNUiQqg7yaFZXPPcrWKFjfjU87UFsJpLFucWD+87BqRMkKjChcSk5hXgZk2Fb+g1gSw==","signatures":[{"sig":"MEUCIQCaOp9Qc1dIQes8V8uwlZNoE+YRNW9mXQtDtgD2me+BFwIgWKffarCgFVaGM8Ctsh9PbejXkR9G3mti5pIXUwMeIc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wZNCRA9TVsSAnZWagAAly4QAJErGNFI0rdhJhH3899m\nz6j0FP5LPssuo1T6dk+tPeSbsa7mn/RNXH5Q8LOMQJ4f5LvS2E08jHIqv9iL\nMS24tcahTTge5MQV8275F7xQzdAFfcTWJE5v97RpbfkQp1FxCdGYwRkqLX0N\nd/FkOKE2VbuNAdQvBYEEJcDWiEggMb2cOrffTToEoHyhqbpD6ya8lQ24hWhL\n4kjLffFOiAxAIn9jUQhPOZkT5jpuGezb0lFUnw0ET2bFq+XZRgsXRh2qq4jk\nQ9OEzReOSDuQ3aXCPSUMPQQHK0oXVGO4ZxjvAym5++RtYYJ3IrLjf13N91we\no3BzsbQ8HfSQhoSW0vknL6cIbG77Trs4aFhE6hNoRsKcvkajlmu7HqClihB0\n33rHLCCDR9VKzxPrF5heQe/LobP3duAC3q9WKPTWykPr4961G5snPbLXTWkl\nOvTnQCCw/kNRhj459NlgfTqXK422pwC78GA8wDWyQDNSNp/vnp9RmiC2p4oI\nAKZqdysdJyb3Fx2rFHPa7l8NrrmGxet9abkN8/WXF4JoyNM3vHgktHI1sn7S\nmh2nr/o4aNoSsCGnIEKcsJqozROJcachApE7mFeTVRdCZVxvdZKvlBXzxH5P\nIy2sHCbpMg4P9BhNYp7JKAsu7AVzm9qX9HU7pOjl9zTQ1eUrFHKekOzf6xwN\nsNry\r\n=HKTc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8447b42cdc88335a4d5a37bb048f5babc1c5bc82","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.cf5b9eb86.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.cf5b9eb86.0_1627063885812_0.842501732595901","host":"s3://npm-registry-packages"}},"12.0.0-canary.3f36ac75c.0":{"name":"@material/auto-init","version":"12.0.0-canary.3f36ac75c.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.3f36ac75c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0fabe0ab4601faa0258be66b2f00ffb96fd33071","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.3f36ac75c.0.tgz","fileCount":14,"integrity":"sha512-G0quLAEKbJCPuiQ1Wq1gZAV7zGSeEFBgc1OCPH/mP52NKs3bJxNZfQDAqn65hRvZThOQ1OjO2O3yXspAuUrvpg==","signatures":[{"sig":"MEUCIQD7yersUISVBdNoIOCdUXJrqaFj5W4wqUOiGlBRGZhP1AIgPX5e01vXXr5e+MYP+tt5+OXDi0eei3HhoRVYgbeM9rY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wr+CRA9TVsSAnZWagAAGPMP/0A7bkxpwS02rwHlfjxZ\nB6RHnQCjZQLdzmSCMxw1daTJQNu8FvIe31KmPeoiwsaE51CBaN5X5MZmBwiK\nnnDlUO81JR43dzZmP8a7VlidDiErVOIy2r95alBJt7mkZeCBDXinnWBxsfGh\n6uTHkYOljjBIpUr9m0s6gsK19ToHfop3tnur5Ift6j/N6X7wyiugLzQOqXzc\nV0ytDQcd9HsBiR+vRHSVIS+6XMFsF+ozKfI6zTOCJulE3bVmfafQIGmprbDm\nNYEYqGOPiGoXy8pF8upTFoDeAxrjAaRgCgaZlLcuMBe4ORLxlJtFLHItj7Ug\ne10J2Kckyq8XDheryQPc3ohRKuq9FuQ5cVHk8NOSlhYnQ8CeJl8n/Qx4xnEM\n1CJakAxGaGaGp1t3SC/ERKRZ9g0MYFDo3kUAdopGU5ptd5lIuf33lEbe9xls\nvS1q9lSuk+Y4pJUuXovKeTgV9jeK41T1g7n+EjreG8Wp624r2PdzjpKZaQJE\nNEtzRp5Ujb96p2UBZZIEiVR+UbR5xOsSqpjIqboOOn8eOuaDzonTgE+oh7un\nhTT9NCJghwVSZhjG6Zp8kzsuqrIwUui1twJN7GkO9bXZoQHKRxgMFMf+F57I\nazzE+6y84uGAmBXMSJYPuab3AaMTwnsHverR0MtlsY3Q0coysOBcgh3EFvmG\n9CrZ\r\n=aPl7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b0f70c5fff2a6f188b24beae7ecdf708b5bbdcb4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.3f36ac75c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.3f36ac75c.0_1627065086017_0.6399733268299459","host":"s3://npm-registry-packages"}},"12.0.0-canary.ea1e1b850.0":{"name":"@material/auto-init","version":"12.0.0-canary.ea1e1b850.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.ea1e1b850.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"66294de849dc0c4c84708ac5f38b92775d515db1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.ea1e1b850.0.tgz","fileCount":14,"integrity":"sha512-rCMB9z8Vis04nZ/qzUsKWzFH0LaIFKUM0hlNn9CiQK2euerHw6i16B1X1HFO3JAYjBScRVzR0peBZIXFFS/Jqw==","signatures":[{"sig":"MEUCIDhXZLgcSQpwd/zcRIxl97aLuOdJnuqsqmnaIuRNHHUcAiEA6p2blicfvjri8mxRBtTx2SqhB3GLi5fre20o/uX/Zrk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/H4iCRA9TVsSAnZWagAAXWcP/AvdHT2V6c4IpDfqVm3p\n+872IEDelbpgJ5Rs/NMm2IEBh+463KQxWjIbGnw648Uq+2m+6etlREdiHV3u\ndlGFicsfn1mIzvN8JVpYspLbbgMG5HijhBpLVJBcrhBH5vI1A6kZnbMquWfP\nkn6zsO4tR/NCHw0PGF74m1Eh9SP/Yr3Eo4zplkqCHwClVBfVvSX+OQpKj9A2\nu/3pXmGTrO5iChQ03xXJ0XzW5D31J+0C7InsqTU6oMIk8UAWy9QJnOgFS0gB\nj7gxN1xfURgEaJIWxKiIkjM9j8DX4ANvgqGJ6aRjl36qLNVD7lBQBNMO0pTi\nAR1KiAAIILkLA6AL/D9GTXJKUQ9pPmoMpvhGipJM4kzZvxrM8LUhj4li+XLt\niwgCB/A4AMhcbEI9M6bzNo8Ojywqeazbwi7NUCGAQqbrrhTYchAQeLQDff8p\nbacPaRDYcCxExPRBxPZ5gzn0VrvL9Lg2h8fmFc3uo1h9wuYhsGIEdeyG9wEM\nNOcBxRviKyIJiXs1TTHyIn6qQU6TyW4vc3soPvk7I/PbcuZzYwjIBLqCN4s1\n/1VRTEeNH6k+Jc1r6pMmBzD5QHmWeW9nwbYIqY7ZHthxi6cOy0q7Sie2PcfG\nSWh6zQowkYLvRISy6NZ+2jnUmA571bLaW9KvHQG7+qikw0NzMfRyz5PARPuR\naIvS\r\n=xiKv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7c296c6f9b2c20eb32b0501c98b6415bd193dc46","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.ea1e1b850.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.ea1e1b850.0_1627160098479_0.59673336039175","host":"s3://npm-registry-packages"}},"12.0.0-canary.22f390c43.0":{"name":"@material/auto-init","version":"12.0.0-canary.22f390c43.0","license":"MIT","_id":"@material/auto-init@12.0.0-canary.22f390c43.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"53c531414c1a972cd0c06a475abaab9df64c3f49","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0-canary.22f390c43.0.tgz","fileCount":14,"integrity":"sha512-JusoCwdLmSyAsspbZhv9k4QDdPDKUuNPGgUAcb08Pxql+81VeO73ZbADh6FcxcRWxMFZOsa99cifvliSo+8U1g==","signatures":[{"sig":"MEQCIHsx+L84hahMcqF0nsRUeJttqXYG6pZCXYQG6viYhUYoAiAtCF6JsaAZQ2EeAlu97EbAsLnXkuRHWvNF8xcA/U9RlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAFd2CRA9TVsSAnZWagAAA/4P/iIDSbRrMdZ6derSh9Z9\ndfaaY+YvDGq198gpr1S3yoXI9ArHrJUEMkIQHPnvYeOY425kkHv2xEJ9k/7y\ndTp0MFy2eSNN3ejQIsBCoDlGxaveurXafEF5RpkoaEbsNoA9aoFWBO8EkJwt\nQftYqLgyw8RkLPoJ3sImIlmP/OWoWjnxDXMWB3pAZVR0y3AhR51zllvKMW/H\nO56DECKE0ZwNmEuz9DWXYQWGJ/p5Btn/UXiJ+FiTk7Cg/N2Gn7VAtdSH9kLn\nuiaqft5W9SFTl2773wLp/8LS7UCd5EJcrcn411tRjgljFrWhVyBJOvTJLVAy\nC5VL32reKlrae8lRpvUWZSeewfroyPjhQd90BACuFKfN5QU+G6TBtd51uaSa\nU7HHVLFPxNhriB+Kt6uBMzcxJQmzTs3Mk/qMe9dLyl5xUwSYyiw6X5zo58S5\nP1PRmF8rSIiqKFbUREnpWDwpJJmEwJrAUmBxg03I7PAB9oz22MRLuTBPCQms\nZUkRyUyx5tUzhvmXdSq1J+wBZIjHKDk551M16XG6bwOuOgzGSg3Ikt4KMt1w\nQAEajq8pGY2NffUE2aBHpxcUCDpWqrpExQ+4muFDylg3+2xTbhu0AeFoE3F0\naq9TOD+sty2nszSx38EY9LbJ31r1JGyhS3G8HtCvJ0XNls91WsjQ5BgtFxn7\niaCZ\r\n=T9oU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2eba31ea1c3ae3c0e3497f3dae6cde368675a496","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"12.0.0-canary.22f390c43.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0-canary.22f390c43.0_1627412342768_0.6629970115674435","host":"s3://npm-registry-packages"}},"12.0.0":{"name":"@material/auto-init","version":"12.0.0","license":"MIT","_id":"@material/auto-init@12.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f8ff38cd94b940577f6e64e2bf2457756c906508","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-12.0.0.tgz","fileCount":13,"integrity":"sha512-DYvyUOzzv6tn3ECQ9xKXu8Nm/FASicIks08pka3IsSRfLQ4eXGo+EYt/ryqYJ6k8WZF2pkGtH/8C82LIF202Yw==","signatures":[{"sig":"MEUCIAtN/BZK5vAfNbSRREmw5fKFFWxAzZdvotwqOa8Xl4DVAiEAwZnmoSYqIsNG9gl/dvQYvvEAyKQ6O93VT8I5CS2C7ls=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAGMuCRA9TVsSAnZWagAAQ0UQAKQiXz3sG+t5RB6O2x1C\nY1vnufMQBOMWedTZggfEK23xral+JD4O1+GHj5+sheU8ODV64qfvJHmaQPEe\nc+fytjVRHSc64uTuB4pBo4nHcEeQE3TQXqeUz8VRWYcAvPPGrGap7+Jn+3Sr\n8q6+moy8RmWV7IBBmuEuuYtlQ+0oPD1e9jw79GwfBOyDQo8rVPFY+cERsblr\nqzqsUgvJez/4cq73zxkr1OhkamHwHYrpSc3n5MCV8MENojlWRh8UTdDfNcNO\ny8rHyVCknAC9l8sf7EE21XegBxsOaDBXS4+upHp7VQbB7cAriZXY6Kn9f8vM\navTOGioTeq1ttf6mBjcsvMVAV4sayXtcn/8YzFlDyVhHrUvah+28992Xf+3q\n1RezOoPJexWD8LQJHnH8HC70EMXG8TmGJT5aAtOsmPchADgOGTYFsPoILliq\n4AKZuT0OubWQyd206u98Q+H5C/TpjVfsoUU63dJUz5Gk3HdPWvbRRgBJIwhh\nymTFS3CAxXQ/7MPQCb6T5AJJOTirKhBQ/xHL10mW6GO1009i0+qWCYlydwxH\n2I9ITnZ4NACW17hWJqCdK5btod18j23pwqDC38n9qaIwjmjtgF8sfV73LOpk\npPNKsOKpKg3ZiNLyJwVn7WKSctiQ52mERS1/86pnU8pGtPBSPslv2tTs/2uo\nd94c\r\n=aI0y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","gitHead":"ae85f7eba0d72f4fa5f3e8669cd316336b3e6828","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"^12.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_12.0.0_1627415342036_0.09091225793807944","host":"s3://npm-registry-packages"}},"13.0.0-canary.ae85f7eba.0":{"name":"@material/auto-init","version":"13.0.0-canary.ae85f7eba.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.ae85f7eba.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e2dac4e5f43912f33d9a8a954f0b9d8314eb5840","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.ae85f7eba.0.tgz","fileCount":14,"integrity":"sha512-fwrLABFC9jvJ6+2oDqBtVRvvrZ9s7DqnnkGciUTupfTpgDqP8kzvny9zHLfD/RYZwidsuTvSGdpOXHIwo4Wv2g==","signatures":[{"sig":"MEUCIGq70c21uJQJ6BZprJILmgSRE8qxiqcUKQtqvxCHKAdYAiEAhRL1JysPoTUWG7tkJYb+2bcOHktyZ4ZkPifauHMkFhA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAGOKCRA9TVsSAnZWagAAwGwP/RPKoMye/UcLBOsUp9nJ\nfnAhdowvWGftomdLgL5iS2S7kE58+wZgRXMSpFq6zc73e1QwY6r+usU4tiIM\njjY7nWltgjM46G8vCvMy0JwIfK8AxR7EzhshIAepgH44YgV5JPsNZ7XJa56Q\nIRIXf/Zly7Ya2r7Yn+NQSJiBpyYdqarq+wZq/YsWm4DbfiAeM3o+UsGGHC5T\nCl9l/I8N7/EG8hoiBlTvgcPz1nJrMR4EC6w+x00SkmCUXHhQPK+pf1USrNn2\nEuZQpjlasnaO6JI7B5mLBWMCU7hEKuHcM9tydqRkzq/lIDjJsMMyi9FpNh9Y\nhB9vH6qPRwaxjm0RxxSL7WFN2P+z2XPnjvZLKulEq48cTRnAGZALFFikmQKy\n9wL8Zke28dsMohKNd59JZUAbubhC1O2SQvI8cbGn2qqJqfvb3QgGfR56EyHj\nxjZTRA9zAvnP9xRam0+Pezv9bXmsSGCEojaR/IOeCgiGAKUHWTUQLi7LJlZn\n/nQtxWbbmHoF5Jep0I0aO5USElo27N1ncpc1Uv9fKZIxA3l8cUeNd8j6f4ea\nrbqJTsEZ/OnsSIaB2kNlOF0GlobOnl5D2yVAHbk28UuFuu9HX+QAcxxWThCo\nsgkMiW3PGvdkMWHeDcrsT29SySPhXPjMvxNlNzVZlHd2T0ZtAri+mY+cBOwX\n69I0\r\n=t5VH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"087c731cd84ebd8c578510bd4c8dfb5d11e8c574","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.ae85f7eba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.ae85f7eba.0_1627415434102_0.7124420621483514","host":"s3://npm-registry-packages"}},"13.0.0-canary.5981207f7.0":{"name":"@material/auto-init","version":"13.0.0-canary.5981207f7.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.5981207f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f32c6208432d52b42632bfc617693a3a1ef78cc1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.5981207f7.0.tgz","fileCount":14,"integrity":"sha512-c1KiXufpWLnJy2HtM0jYTZV0F8eL3bg7RXbRnKOQWBAZe0Tzp0252jgvmcgUG+9Tnldfrfi61UPUZGBKPUcgbA==","signatures":[{"sig":"MEUCIBZXs/Td3YQf1H3LnOH1p4jElHspVORViQDsoWfT31XjAiEAu/Nj2vZ9dQcDZlzLtYihwqtVaNcxoh6hNjybyCpNBis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAJQBCRA9TVsSAnZWagAAYSYP/13QY8ID+FXAfAINZywh\nNX6kPHtscJPIy+1SSrF8l3hmtx6bCED6JR1RQk+slZJwk/JPwmP4YmGb07SV\nfDbNRtwqkUooZtFjzroOZ1W5+wR1vqU+3JoEjaN8sh+WqkvaWn9n0rc7ZVNt\nuxlcnh8UUWVNIPbcy+K9pf6fRebWiztSxgYNU5D3xthS35faPP6M2RA1FVsT\n+QS8Ndtdqx2NFofqNZaImya0JT7rKeUHzktUTJyTQiTsS+4he9pCk9KpEqvP\nXRGtT7PTH2DcYEl6SYwUw6rdUV0Yb+Aq1PPVQuhjVp1CpwcQ2jy7spm55iem\nZpKcFa+Lpc8zf+nbgM2etl+W13C3GE9DTF0OvVr/1gXi+VmQanEmjTcKPvxp\n75Uz0JVsLvamKqswoMdgsMvAGYuNsY9xJkrMENywtDs6/zNX3c4BM8cIvTwC\n4JNF2jybTJq4GxykqfJUHZbBJNb57gttnxSu6I/SGh/49BOt9uc568iChF3B\n0SZg+DDHfCg2nF6jsGQDXz+RHwjAzNsJcg4oOclBW4/x0khDB+BVXPRfvSHB\nlnLYjbNiHvM/crpAnXuYhYTmsnUHuIhbvimtJCZWUS3SZLsVYt92EE07ebD+\naon9aDugrsNJp/bmTMJw2UrOvHdDsoFzqjX4rHVx4o2IGnlk3+QVR71HuU+n\nujeA\r\n=1k1V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a8b67c19b2a9f80923dd162098b373bbf34b58e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.5981207f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.5981207f7.0_1627427841646_0.6808240570494375","host":"s3://npm-registry-packages"}},"13.0.0-canary.83bdd0222.0":{"name":"@material/auto-init","version":"13.0.0-canary.83bdd0222.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.83bdd0222.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2dab4a67f26ee5a2e430d0d249d7d581ab0ae704","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.83bdd0222.0.tgz","fileCount":14,"integrity":"sha512-y68pmRbxBO39gCdnt0wbfKC5jHcn7/dudrSO/HGU1vXhx42uzNP5GBLxT5lZ35NIYTf1r7tENii/JPUzV32c4g==","signatures":[{"sig":"MEUCIBI9yWLAA0s071y/vg3fwKNHW28Y+19aoPM3J/QcAuyGAiEApFSCyxhSCYbP1GpSvNDa44h2s1p+0zAExUyVNNilK6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAZLoCRA9TVsSAnZWagAAHU8P+gJiqtEXrB+AoPeFrt2w\nPyDnbZo+1kT9Bt0iXxmDWwfytUwLD+QgARX1Ll7Bv+OCxTsX5ALjL2ROoq6S\nR+bqONEIMwfvxbYvp8MlpBId6eBhYPvN0LSe0IDENRWJ3a/YgFsC1rKdAwt5\nzHQiZ9QrIWBvkHJLEahrdYBuqwF9V4rcVkZwhR27PWej213wtrrhUTxIK3cp\nNo8dk5DG3tuZ/EpEexGqVRZngCmyNQmvqZeuYrdC6/nCHxytc6/tdMACG51C\nlN3ciopL0rAIeE+C6EHNt0YVIY2SeyYpE13ldnl8fSLEXplJvKIAzAPIOJxW\nH2oToBm8/YvOp8IPdw7/eIWLca/2jhk/CoEUQi7OyeZe4uXNmLpiDwBAWHsT\n89Wnu7VMrH8xmrWZFjVMJupUKsxwQnbOKPHRXxfBd6fzW8zmfL1+NU9mBgMW\nabbBgY7jIj8BM5SRPPmJPjFDxwanwQwEfdtT4uz+VTfzOG9CgWQUb4TCWLpn\nvVn95Osj59bU6aN28vA7Mq/ngCmnsMQ3KzFq1CXH//dFWzNHIHgdDEcFQiGG\niUL7sGXXPWKuJO7c3Y49cUGjVVcHv8M8VDsrHX+bNM/YEOoG/JDVABZdJedm\neGfTb39HIRoAS7H5UWcnHtu/nTNPtYwJYmcydZy+tzTY8YqoCJ7av3TrCP0x\n79RC\r\n=nkPS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f2b23ad4bf20ade58cc1b10490e9ca3f9469405","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.83bdd0222.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.83bdd0222.0_1627493096443_0.7365979020463547","host":"s3://npm-registry-packages"}},"13.0.0-canary.28656298a.0":{"name":"@material/auto-init","version":"13.0.0-canary.28656298a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.28656298a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ed72faff5d5a87f0daac2aae1cadf76dcf275597","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.28656298a.0.tgz","fileCount":14,"integrity":"sha512-la7jBrTsyu6lrkJ2DcBzq1cZiQbfS/IN1kaDfnRWR1Drlsgu4v16rPgKNxlxgEivciuh7jrzcTt4fcWxTRP7Vw==","signatures":[{"sig":"MEUCIByIq1pNwQA6AUWdDgw/OtSFHXcbCq9SOg2q0s1UW4LFAiEAy+pxXq4pxOkPDHwPcGdRlwDRZLuhsPfYuCuiAFUxhVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAu+BCRA9TVsSAnZWagAAMxMP/iWGKLfwwbItVSRlNr7T\n50W7s7ds1lTOp17ZMY5G3I6SgI8gtX2Ip1iwYs4J1ZThPCl7ZJNsjyDI6gEp\nq0yqHHtLnbmUscWfHdnLYh+Qnwz8GguSNV0IGwYxtMAt30Qj6BHjtdrZtT6d\nEPhz3necixLQ+sQ6hjZ6smwVb1R6GVeMm70DhgmBT1oiJHc/mf8NtZGWogCE\nAyEAjfEBc+AZbfvaq6PyvVUsIxVVW0UzFvHEe/v24QHxofTIb06hHagKbIHw\nCAszc13o2Gxj0Jov9IvxSLwzzodiXX0rjjibmnBsR80bYTJvu69ALGmDHAq4\nRHjPQwD37nipnn98lnsuPlYj14bOO37aTFaXdPDEL9gcJMa6PN7f+8/FZ3R1\nyORXL0Q+kenMBRigdkhmkMGh+9eb5hwFdk7BuS5XDxwiRkWRqQodbRNQs5hK\nC2AtNji9XAktymBfgUjPSNc38WQeSBBX8I/h+0s8csg72xGtVANqdLmOAv4C\neChZXAwMiK+dOLe1yH2pFrtyWdnsOQGx5F2e7u0F/Z4e4KP/aXnN/JmlfqYS\n4Nejv+wKXw4e4KBehSkXC7fteDwWQBqHgPYONsgtIsXGk4w/yuItEBfyJovj\n2EbVnLF4TDLAMdVz8Ywa+Iuq7YJJhW7ZzwE43nHPHzpo5QsnTcW6k48ws4RH\nBlYW\r\n=TrUE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5fe3e7fec89669c56504c13aadf80a71a543df78","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.28656298a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.28656298a.0_1627582337405_0.9408647219163915","host":"s3://npm-registry-packages"}},"13.0.0-canary.9e797daaf.0":{"name":"@material/auto-init","version":"13.0.0-canary.9e797daaf.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.9e797daaf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0bf6eed3ef94083603546627b8233efe0d563e62","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.9e797daaf.0.tgz","fileCount":14,"integrity":"sha512-DMGZlqV2t1Cqjk51+QpyWmEe4riSKgdV+hKfx8rtSTkfcWUwoQKic4vcp+PpUgTH4TLxRBV8Lao+lawNwc4WOw==","signatures":[{"sig":"MEYCIQDcYi3H7DoWpLMOI7VLv5D7tiqm+wDvC8CfrFExID0kRQIhAOEswoWgkc4bA5yYPakImZpiodwCS24JhY8M8qX8aJDA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAvS4CRA9TVsSAnZWagAAU10P/1NvXghMGu2nNcMQQui0\nVqiYp3pBJfENPuXqr7jB46PmzZY/clJvVF5+O61v82UGNzLeo57xp1NtL4AX\nPdbR9dqtON9E3ZLfR+dQkDxh2SSA18MmRZ+PXg7Cw9yloTvd0xbuNkRBNQvC\nLpoPPh/6Xyk36ArOOWp1uMpU/v1X8kLVPQkLPHmVDzWvEPnTMZkz0adi/U21\nB4WYyxwaaeMbENBqzyyezWPHsCRAf7pkqXUbTTGiHM82qFZwxOvYaVyvi3Ak\nsBuJ7ZUTmB/EtPAE8c9lq6QRA+2G55kit7/rRZpn+/L3e2qhTt+Gs4Wy7rde\nbRVv6dk6twiR8XjLLDT5d3qeRu4n5eODX4bfun8bWT/QZlhUHRFQ0gM+8yxI\nAXp/GSvbnuhQ4LI+0hJ5vSU8AisSrntMZOtFRZdol5DlXfQ2cgEtTEvyzMwU\n8XLbRsObci23ZOr6Tap+zUF+2z2ZVtQOKx5wGtR1E3zqIfYZoPCqSXDCOBPn\nW/8QiNBvjehhMDnceeAhAoA8ckeJUzaK7EQYf117vw//9I3d/U2PhvqrCJy5\n+1rECspeRIcmL16/CIGM0sB3fSl6RIsyrDlQyNr/qlZc351SFta5t/pP/kG0\np3toRf5OfKAHKnkKx1HJ44Eqkov/558rAcTRMS/ZxROR7rk/7Up3FirlegFX\nOEor\r\n=yoef\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cad664597e3cc10ce42dff721f26f40b986db48a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.9e797daaf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.9e797daaf.0_1627583672225_0.40043634518162174","host":"s3://npm-registry-packages"}},"13.0.0-canary.adb9f1ad8.0":{"name":"@material/auto-init","version":"13.0.0-canary.adb9f1ad8.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.adb9f1ad8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"063420174b9eabd06632c6fd550e2c7976527d94","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.adb9f1ad8.0.tgz","fileCount":14,"integrity":"sha512-kM8wb/a+yYAuie/FGiCulRYj6VQdyz0B36x8YOogigD10AnppHdNFsUgBolAspFOvqi4a/j7ABK26gj8vY7EmQ==","signatures":[{"sig":"MEYCIQDzA/5j5wuAF/SY1zZq/S3JARxl+oedrXKsrrO8jedVywIhAItzrQom+hm+VgsBt2iK2bXBcC/5WCEA2ETPvK9Zmsna","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBE0kCRA9TVsSAnZWagAARSUP/1yfD49fI2htlHSanKVD\n7o7Fs8HKTbRhi54PTEYPDpJnC2QuVlLzbxYAdb0JsZQ0JQSlPgABk3On3qWn\nC/b7UNh+2xx/gYx9G/WH+GLiFgTk/uFbCMrXUYWcSpHBMDaGf/HWLJkUteu1\nuEMZWk07cCZFfnHs3I4WX+4Cua2htFrp5O0ecq9Pj0Bu41Chhl2KmKp1dc0E\nGkaJMmh1ZmViHYpRAH9Hw09RKeWZLacaROEINwegsi/IqTbUn/0Be42yy6Jy\nXS1jRhjY/iWSdvturzjLSFIh1PbQAbx9V6NJAZfDW/cwo+tIq25Fg7dfKXSw\nBq5ceTVsTRVgjeC4mDc58N8VYYRljwvZ8/ta5pd4Ua8F+0EXfkPLdsdRxhcN\ni1Sh6uOYc0HrpDII3EUnqFaepoX9NpZdIwwSFCGLeOUBOuXewXI1gwji5oM+\nBqtTicMMYJtdwevSSlmqQ87zu91b1E1oXSFAKtvpAFnQ/Z3spBr1p9I71WcH\nXoGTKNQSlhyzhDgEqmpMPI61b4nkAd5ngErx2TN7Ft9mXSRqa4olmaMv41wn\nBNlYIdM2fFIx9AWnmPiinfQbzlF6w9yFwI7niro9wFT3bPDRjICmo63p1bkg\nFiSjzIrjcFgqraq/DOvQymzGZ/WWC2KIR/JtWgXs0736yC46RXSA71intzzN\nRNej\r\n=96OT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"db010696805aae457c8d8c9da8b394efff28ee35","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.adb9f1ad8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.adb9f1ad8.0_1627671844062_0.9809847828233358","host":"s3://npm-registry-packages"}},"13.0.0-canary.cc5377458.0":{"name":"@material/auto-init","version":"13.0.0-canary.cc5377458.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.cc5377458.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"92757eb89d4d0b357f30cfb841fd5aed5af5d789","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.cc5377458.0.tgz","fileCount":14,"integrity":"sha512-F57y6/tPDH988X1RWR3LQ2/66H/gZNgkbbNFGbY3lrQYBZH8yxnhuU2q0veMF2yedqWLlXJqcGmpMQGiKOFUkg==","signatures":[{"sig":"MEUCICal8iNunHsTWQcHUjbrGYoy+U2zJQ8XidGWNeP8LEGTAiEAnu74MFHPQ4q0DJUudt1EvQb3YmBkTbQFxh8C08A4vTU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBG/0CRA9TVsSAnZWagAAihUP/2A0tVywQRwdZJpcCC7K\nkxLnMqFlFMAprYDjwO7aay0/KXC0zkWO4x3LMk9jhiI1sji/OuLPGiObVe7Y\nlkdwbMj56RaC84hVVjyTZhRv78i+ydEzpgS4jW7oOQhClCATK4nSK6cpkdCD\nWe7If/ZamNyT/NMDz3wwqWf5tRDj/wL4kow9igKvfsi6DgRcAIrOosBiMha3\ndSokk3ALNijA+1hkBoj5hoDPJH39HnLeMVJqQGIJenqoCxyT4gEKnpi68dI1\nlPCjB3PCiP+XRj2lekFRHDe74z4CD4of0gs3USSbYBBR75rR9/JzPRs3+UlJ\nUP6GOw4KeSi4TsoKB0yzWnXDArduSWvw7QV3B/fOtQV9XCtgH8nW/gW2SwOw\nmfIczavmN7c7L1HKBfaLW9ANd23Iqq1lnpY0CpBmMNogU9uIeRgnAZTDIpCv\nGtTs4LyHf2785VutPOBMjG1zY6IG49T24pYfwNFziW1JoVx/0Hqfwnvq6rG1\nTM0VHC6ewAtIjfvYqjRKqoZO03JGqhbh/CxWc+rGJWzKn6N45R/iG1gql9Di\nNhxeXcLm6So0fOjNEroFWFl2UTEKbplQEy2oSIkzYEUqpwUMppACJkA65bEV\nFh2nX84952wVccVhf4MsLTnt500sKFW/s+mkMRTNymz4ZP2kgRi2WbpSDMWC\n35vh\r\n=jx7Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f4f5852cfac85d68dbd83665da839943c29dd866","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.cc5377458.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.cc5377458.0_1627680756687_0.1399227712765445","host":"s3://npm-registry-packages"}},"13.0.0-canary.a395972cf.0":{"name":"@material/auto-init","version":"13.0.0-canary.a395972cf.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.a395972cf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0652596043493f91cb6f917db5f79e0096c70424","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.a395972cf.0.tgz","fileCount":14,"integrity":"sha512-I+9/XJTGvRlt4+Z+TVUtIa709jMNYgnUOwWRaOYMHDxd/VEiyX4Wi2WVSbU9R2ugDuOK3EOBaAZQMS+YQyfqlw==","signatures":[{"sig":"MEQCIGxuPolSKr6NOh2kgencwFDm6jx/hrmqiP3+F6bjpHcCAiBGrKWlXuxHnkDI8j9UNf54YtnSGuDQsTmwomg+MW6q+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCbOXCRA9TVsSAnZWagAAIToP/ir/6fAqI7L9PO8+fuZ9\nxefsjIQmZE5ErTtMnoZ1Ry/1TWVd3cRufun4095zvVQG6/Uy6NWLBRNOhObo\nJ45KHtq/XL1IPYLgcXn7GoupcmPMg4P8b5UO0/4CuZxMdpY79pKB04sqGt/J\nAuKkgyBSN6MVq4xDKXiB4IargZGYcIpvb9KDmoNByBSIF04LJQBw1oZXNkqd\nYjUGTcFflb1obZb/D9Z9vxgM9jLXhQzqIXjbQImYUpuVjzNXHPuuuBVkvDLT\nMnxzPvN9nNoqO4jHHSWyQUWL546nFLWt8Uq9le2TMZPL7Z6itbRoc9nyxKiJ\nNKseT+xDMNmuo5i2iUMOmfwLtvvwekk+eVMZQ/0JpiBmrBZB9WegmmMfjHrh\nL50S1a1VlCxnph7U6laalkKKViSrE+/GTuZcWHiWxgWg1j/rLJqPN4V40J1x\nZkrlaRClkjv0DZcAWL09Ct3SL4q1nYTMPpaAGLqiTOnXbXkqCbXVfL1/N+r/\nYOiBt+fx0msSuc3jQYLKzBcX6oDpDX0xX95WKZFpGl/pKQcQSu6YPFuCdavr\naS5ExDcmN0D9Vqtrb83xO1nFFTzhwXogcIm+XwWSYd4XL7lNsb6gmZ3/sdFP\nBt1lwn2meU/Jkbo3g+HXDNzveeWvuTazNlqtQKGXNPEBGWSOrO+/qlaVwTzW\nK0JT\r\n=Grsm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00a6b6110465620df99cf5f775d52a1054c91cef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.a395972cf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.a395972cf.0_1628025751581_0.5406240179313171","host":"s3://npm-registry-packages"}},"13.0.0-canary.7c96e6b98.0":{"name":"@material/auto-init","version":"13.0.0-canary.7c96e6b98.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.7c96e6b98.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c7d0ae54fa5401b3694f4386c70b30c4415069d8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.7c96e6b98.0.tgz","fileCount":14,"integrity":"sha512-agQ5XYowbnJXlbHlnhRoMM415HutOB3lYzAmSQVYkvZKX/FlFiJ5Pph3hBLXIhmdI16XImJEWnLHNnE8xlsQjg==","signatures":[{"sig":"MEUCICxNEn6ZOdq1abTsAPG8bT/c33IEDlMt45ITyUTIzO7wAiEAyKplHPujN1dyIJFiwv6WGkOLYuWWFINg2MkB/+a3qfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCb9xCRA9TVsSAnZWagAAlpQP/2olh1wDsyNwrlfXFQzn\nndhugKxXbZDgM2ScNqPltmB96ZDrUQobKf1J2sVdEYsE4fZT33F4Jx7khMbU\nJpIGY4iB9CdBG//ujAaRNGcT9OqK9hmMUhh1xit+t0c9YEJ3wuPbh3fioZVG\nOtDzRKPUiDbv/iN4cpc7Tl2NViRvhiy7spHkAKuxKEQJd3TTr6BGFc1G1lRk\niIP0XW2xzDOPSkPN4GojZeKeEjrbwKiG6fod57d9I+l0kQsozuAjtESIWSFD\nBxb7SC1ez+R+iX1KBiEHhad8BTawGQymrkp2xITg0JuvE7Atxiq+yVBoCwf5\njSBLTYNo2JAC7m6/L13Wfs+MTfXWFIHoG5aPG8ANRA75t1rVchaR2lRcqXS1\ncBPPnDRIp0dm4IlPyp4XxZpQ4mM7BLzkC3weH4P0wqs49BNupIZj33PwIvav\nOgcTO1IM1fHao5KAbfBD1VOLkfhOo/NbsbJyexJvL3P/tx5+4EBNnz7U0TPX\nOhXwOlieUJLxVFy/dOXLqihcQTRbVnN8TzTRNc7Y4qUd7tjR19Ayp/M5/IMK\nJ1yAWPGYUw2Hx4n/Q7cZjX5kIxD9ZXkKBssIK3wrEIm/FBEBHHqoUHw21E7j\nNHlAfXddftjVzSiHuKc/eEL/lUC2EXtpDOutdHi3W3xWVEXO/AAEjq4l99l5\nNIOh\r\n=D4zU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"38c48bd580ff0facb66c28bf9caeebbd2a6a4033","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.7c96e6b98.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.7c96e6b98.0_1628028785334_0.9121794004889094","host":"s3://npm-registry-packages"}},"13.0.0-canary.a80c8b2c2.0":{"name":"@material/auto-init","version":"13.0.0-canary.a80c8b2c2.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.a80c8b2c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b84e3356c5d41efc2a45fd30085dd3aecce43d8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.a80c8b2c2.0.tgz","fileCount":14,"integrity":"sha512-o3PGmYeHaAA655oU0pnAkqCja8nc260a/w829WL/9aPBtu1NsVlUPjpEc/OqIG7bUOj94tbk+D67LQwXK3/wdA==","signatures":[{"sig":"MEUCIDTUnSFtYJ01IaCSm75uzL+D2JThxnaAF6FzQa68LLM6AiEAxafBGL74c/RpRKQYs3rToSp+hm7XkiXgFSbZ02KWALY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCynACRA9TVsSAnZWagAAIxsP/1gRadLrDs1QMb/TKCLf\npuFj33FJx8Dx0vmcJBM3nYXFk6byCKQjTuCFKCCccpX6wT7iAs7uPv41iN4K\nuA3sWAc11d+0qGVolZLiMWixKpUgWK3AQYoaCVTf3s/NiIEqh4vUdtVm/lth\nhEeUcEokm+y9BiXdN/WnljFAi/ELv/+U7yjfjDOuBnrhvJP9eGoOv6SlCu2M\nUMp8w/LXRoA/45V7X8AjY+VPRIoK9kOESF1S4uBXjSBziHdVBJBzlh+upctX\nFOAJraok1ctuyXvRAqtLi2xIrVnldBLoCngLsGUwq/N0pfs1HLI/5Zj/YjgP\n/3NGpAYF3mgdyILrof7Ns2oKL8WgA1Ayp0sQoG99Xh7lhGRcOiolllNTExH7\nsSJkkxRXMrNyhJEA7XRJoVd25qawwvoOm4WzUS8xQMia1KstnRZ8M1MKYpRP\nABExzVpQA0Yr60/t7cyk/24qfwMTTtlOB9UGseTCNKK0fOLi/IbbXUn5VY/E\nS5/DUlzLxsvhM4kTdlgOC2pHNNlBl/oSKtAugDvjIK8pW6eOYyDa3eW0nclL\nk+uv69dr2IMU3BL/3K9zVpbrL3fxFqy2DTVWLPj9CDOKuD/6iyAsjq2sAjFh\nzg9QG4AMQy8ACw2QlVYFi1+MZsRgMcESYCtK/2w2A15t3YZimSy7SJmO9q4Q\nBOCW\r\n=/4DK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cb4d3f1d1d37c50939ed5269748eebb96f798601","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.a80c8b2c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.a80c8b2c2.0_1628121536687_0.5049645530582443","host":"s3://npm-registry-packages"}},"13.0.0-canary.3dd611091.0":{"name":"@material/auto-init","version":"13.0.0-canary.3dd611091.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.3dd611091.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"62ae842c1ed847b9ba1c477363f9251389681dad","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.3dd611091.0.tgz","fileCount":14,"integrity":"sha512-gzL3IJQwwsm43Mf7MoKfO/1AYVrTcRUI6uMAv6WRNxl48f08cu5VVoLq833z3Lq6Y/TUGxcohgI/H6cuQX20aQ==","signatures":[{"sig":"MEUCIQCckjS0OAPibvpuCU3h0NpgdHwd4oNpoZpk3UujaupnqAIgSjhM8v5YqmLDjOEGpQQ/y1HReBPk4Pb927JcAozxCvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC2ExCRA9TVsSAnZWagAA2poP/R7Jx8LSFfcRi7Ltejg6\ndhLoGEqOXwC3wO8dgqAwz3D7Bj9ZxwUzrRlKYY33AgSct/MXiRMnnD4C+lGI\neQCCHQBA46bNvQKEsr8QGlYdRg2ad+BqGAfPmLuh++Rmq22x9H+PM3iHteGK\n82oCsGHWgCd+1gGRmuQvVAElI1F0ezVjv9n03es0u2kfBYNh5tLSz0lj4TR7\nRI3mTPc2AlPOgXdrrVFRfsCA1v1Jwm+VrAnynI6WkJW0aq7G1y8UCSXi8yYF\nvO+qyHH328Ntsb0fmuDnABe5hTGIrBY0NfYgEWrW2ht0t4DyJENmgHO2YY94\nYe51FKIrC191cLcsA477AlVh6zdUBUcuEjrXzrZN4Gy1LpbZi0MxgSD2/U5O\n0lw/hmrqt/T3rIexcmOXUswB3+Kbhsx+hFqPIY7Q2RdwsjGTCTtJmhUOIlLX\nLqGvodYh02+p/JCh587swoeIFn8YX80SzSTkYatIRPmfRqTLMTzlVGLAHHUh\nU3TQLln4gKSBgCJD+S1bss+cICuXAv4C/OPEqgzIusqA/ApWHlTZz9JmmWSf\n4Lihc5NgQPR7Lt25ynWje8KiICbYIqGf3UupFI9ZMSJwElRrKhEuRCw4DpJ5\n5mQzo4AfOTyXrS0cc2S6d/1e3DNN+fU58egov1Y24wfc0zkWY/K+PmoQT/KD\naed0\r\n=CQCT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fc6a6a59d9c86ac1f85efd94a4aa6a8e4c27c379","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.3dd611091.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.3dd611091.0_1628135729345_0.5951800486113794","host":"s3://npm-registry-packages"}},"13.0.0-canary.5dee37ff6.0":{"name":"@material/auto-init","version":"13.0.0-canary.5dee37ff6.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.5dee37ff6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"326d6e1cc3a3f5d1348b135f3af6ceba6be5ac1c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.5dee37ff6.0.tgz","fileCount":14,"integrity":"sha512-mKGFO9nHCnHSeFVbBCwXMKGExT9BYJGI5hhJTyIil/fw9t7h4D9ec7hKioRgVYary4YVOCECkAdI8jHXpRUv0w==","signatures":[{"sig":"MEYCIQD2r2lpBxVUdZotIb0dNVSIh9K607xXOj6jaH7fCFIATAIhANdn6TRrCMaP4V0Dc0X/VXqA69AcrTcamjBXweb5AQBY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDCLGCRA9TVsSAnZWagAAuasP/0EiVl9Jf9BIBpyJchCG\nzv1mczTK8MxQiwlELVZKSV7Ioh+Ogr6a5P2afzrrkaQr0cdGFRgfHnNLY3j+\nxDVzKafD5vbDe1eEWZWMr2J0vWdn1wHA2Jlt1rqwNSiXIcDM2hHa7VF1qwQE\nii22mx6IvQFFbnj5IeQaEWWWkk7iW91wrRpq9fhmviV76g1rqi7kDO7Jj9QY\nsp5qF6S1CJRrPujuWbPJ9ccDniceEdtbPYLdeWvFf5/wBD6B8OrpFbzNWtsS\nTFx7wRXhpEmI6JkO29+p5/mxbBPqWnxA/I97aVKLsN7SteLRAT19P/Iff3sE\n0QF7XIRSLVO0T/1I+0P9JCFxi9cI/CV9wxOu1gi2FIhsWDRfSDJk0G2Ak8lG\ngWw+vad/ZkulUCCu5wggDwMpPSzaFi41MwFqRU/NKfZ8CgRFeaQmm351f7gV\neZ5J2ghLfny5y9mub33uGBNKkHf/fGikSyj4pEv9aruIJ7Y5cZSy+C3kg2xH\nIYPjOo5fTiXns9I+/SmT3HxwRsMZzyFQQGoh8lN6a+/1ky32MSB0Ku/0eZaY\nonXOIUKrfoFZQc4rsnk7O2Jus+DrLz6qwUcV5KMqrMijvHZkKDcEnTQZ51du\nN+a9mqfobUoY+pHK1MLH2IrSSNKAjY/j+13obzkeIVeIH+ggfAaK9fuQAyvt\nH9zD\r\n=JliR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a7b521f6e807878ddba15c813505134621ef85d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.5dee37ff6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.5dee37ff6.0_1628185286100_0.8929770334297995","host":"s3://npm-registry-packages"}},"13.0.0-canary.bf405d22a.0":{"name":"@material/auto-init","version":"13.0.0-canary.bf405d22a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.bf405d22a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"02cacb976cba7f3949c7a697e21d1bcf478760fc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.bf405d22a.0.tgz","fileCount":14,"integrity":"sha512-x+2fuUiDmhDhIbQ7d0mZxaLV9gPgbaYgd+faR8sDy0xujSeLn/j/DN4Zt9PgVYgn0qTcGJwfHyQTypU6RFhSsA==","signatures":[{"sig":"MEQCIGfU767joDJhdOtQkPVnkeK8ds98s9SXNtg+aduz4vBNAiALUB0O26X3HO964kUMC8cLzaDLyDahRPJbPean4SOVrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDEdNCRA9TVsSAnZWagAAoAQP/1mEVOWO8cTbN9JrOBiF\nOBE5YRosH5B6/FrKQLL9YOwiRiD+yuCkWV1/2EL945R+PIKXLtCfj8nsD6Rs\nZ26SYlIhqp/amvTRJahebo+kLJn0h8cN81SLE2Zn6FscBPIDd0+FSh3jNemj\nP0w6z1nnTBFjh9r8yjNHub0ZYYMLtEKDMvg5wtR0cmfJu2N2D14+8k6lu7oK\n+2/WQoCIrlxnbhZSm6+GgYy8Hf0pIyrg2x3Gfuxy7r2u0LtPLtuPDIv2qiy5\nmO3P4xmbpADg/tkP90Yg+ot/CSg50SUglHg1BhzSP3Pq29suaR2CIp5wwQCq\nddQ7jlWN4ukmte7Dz5gQLjdpe181Se2yEHq6h0XXDRgosvqvjkSk4Sq8uiK4\niaVmardUJw01uk1uC18krp2y5onGVDSQlHP2Ee897tlrjwvbFMLvjOgDOgBV\nXUnkBQmtlmrTc5XOMgik4juH9xOlato09U4D5V9hRoRhfK/Q1u5IkWHcIOQT\nbUw9TBfo7IEzy9cBy6AAmh2wF/nwi5C845KfrZ+Sctf3GggpOh9UdwY/JVb+\nfB0RRS0+qdxr7I5VHjM202L4TVOHg0MsGyK4vMOX0ZJccaYo68+WYwDshYeH\nazmcas/KM6msY17eZ8bKqiwxf8xRCi0k3g6Qbpt00Js4XlB4x/5NcdL1SVRI\npSVX\r\n=Z98a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","types":"dist/mdc.autoInit.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00ae15a245c6a46fa0a13aa61a02e5958c0eddbb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.bf405d22a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.bf405d22a.0_1628194637190_0.6147868143035073","host":"s3://npm-registry-packages"}},"13.0.0-canary.b47dd37a6.0":{"name":"@material/auto-init","version":"13.0.0-canary.b47dd37a6.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.b47dd37a6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3168fce3be1dc45333ea7ad4611a58cea8046468","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.b47dd37a6.0.tgz","fileCount":13,"integrity":"sha512-yAwKYNCCbhYM4vGJwlQB+1TasSvM07YA1BGlcfi88tC70lMzChVjUAF/Cq6UvG/Nj0QMvV4N/ZQeNQu7vgS47A==","signatures":[{"sig":"MEYCIQDX7WykYZ7uBSD1+zig/+CG4HR0m9hSfyL7k2dBdPAy7wIhALP9qpBb/ryt52Q8sRxjvYKYPEGY2qmyzMYYOnFMgwvE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDE7ECRA9TVsSAnZWagAAmXUP/RjblLG8XF+C+0rGLBw2\n95pofc49YN8PO0m02NWGtbVjAvbg1NOkI38dbR+1dCZaDSvgi9/IiwfCj9XR\nXoM3qRDAiPzO2mcbjO/HAEBm/KL1ozXzoNEcpqkOUTZzehcgv+r4f3/j4FMf\nvTO2bAchF666SFt9oFWCHQ/v6czKQAzLgqledvCXRdm6kI4JFC3F1E3gBkLn\nGo8x7FZBdUXw3ZE1+FuzeqY7vCRDDvHvHw8Oj5F+8453WehIS2rOzD/8erIL\nCYNV/dp1vCe2RXgdm3g5lGmXULnDX5MUa1yPVs9cx5ZFAmos8E5c/rw5Ox/1\nvv7zQL8jFOoUnWVHQeuOapAxGL7lbgWMYnE4U9hGYLln3s5EAPrEq4Js1u2y\naUL4tq5QdmnQnb7itTn5UEG0SfjTvA3Hwn53Yay0XlZwaRdSbY5s9A3qlLhw\nUKFjrCUHigFFBE+doMTnREGSu1byfP2ZRl9MGkEGVXlwsHnoT5oFxslCTCvt\nf8vaR45wKo0GdwOKdTgPKhbP7qpPE2c1LorHXkFUUj3JJXWp5E2foJFx2rYS\nzAOBNO7h8rnD1y0XDcpmQZYrCTej16JuRM2G6csHgFvykLwW49et+61zGEb1\n8WPdhrvbt9Yt8pTDxya52jD+hLfWYuTqbBsrShKbWxRwfXCbDXnjP1Xbxr4e\nA9hI\r\n=wKY/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"47f67e5fb310c13dac39b9beefbd6b53fa54d1b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.b47dd37a6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.b47dd37a6.0_1628196547770_0.2537948939135821","host":"s3://npm-registry-packages"}},"13.0.0-canary.6c82b965b.0":{"name":"@material/auto-init","version":"13.0.0-canary.6c82b965b.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.6c82b965b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"df29e548c6f0122eb379fcb44238ffe9ae6bc944","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.6c82b965b.0.tgz","fileCount":13,"integrity":"sha512-X0YJ1T1Y1AzgQyNhWVek7FEk9DfkGHyc3TXFoiMrHwTK6E48Jun7IGKI721dwmu2CH0JNew91GOQlmo9bhoXhA==","signatures":[{"sig":"MEUCIQCs2LUIw5/5dI9Kfnr4EvTKb9ErcSoRxhIaFcnNtDTC6QIgdAzCRsxOodBWqTX8r5O13PCdiAXFKnAqjTWgRpO8Uto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDV/KCRA9TVsSAnZWagAAiowP/3PTfkmTmerhYt+A8Kk5\ne7E6WZYBd49VKR+he02XzHnMh/7vd9eyU/6kVhBGBiF99ddv/94pb9xSqAYB\nWndGiy6+xvGWZ7y311KLmpciiaOKo38MIsfwilSX4jaUO6HyLRyXiAZYdnSE\nAoS+3LyDLG2Znglu0MloHj/1T5OOLq5jyga/oXqvTiu1ZVA9M6qjmJw2/HXz\nEqkA49gI39DOXGgya3D6p/R6jcSy3ujxf/nXdqO4LUzWJOOHA3K4Fwq93XiD\n6ESZhJdEytzwQBAqSaKCMtVT9gSX8IWRULtoFDOUo2awLjdsRbZeK5HbB61T\n5M54mZAkAQhaOsgO6/4Ze6s+7W6rRU4gXXwX0UkDPQcbLyGfHUiv3Uh1yc6q\n7O2Ahovi2WgcVfqNC3ncFqp56Tn0jModELiaHl4e/RipmSd4R22llbqgztlu\n0B7ayVWUi/0Na5sLCw5So8tHi0TLDUI2lSO6bzpcg75aNU4tu0NGqPK8sct1\nrpoaJtZx8wrjaZNEPFrCjIW1lFy61/rYAGPUN5Y64NTQXNNc3Lq2o9ZdAjeu\nbaq+slR11LJpRcNmoGtJ7mFJYaeDuw3OzxG+RafIheYV+yzbLAWovJQasa4s\nJKe8HtIKJor27/cLAYWOYsTgtWA032NcNAm3eJlh/kAXWncK60nlXH2//hkA\nz3lq\r\n=7u06\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"434420b9fc9470dc77940d2240234a564be58d02","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.6c82b965b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.6c82b965b.0_1628266442399_0.12199834959621181","host":"s3://npm-registry-packages"}},"13.0.0-canary.4ca11fe76.0":{"name":"@material/auto-init","version":"13.0.0-canary.4ca11fe76.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.4ca11fe76.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f307cb77dd955c29dff71583f72f49deb0c0098","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.4ca11fe76.0.tgz","fileCount":13,"integrity":"sha512-gx4NF7pd3TWInB+muWUkog9mKhhgMQC+jVSKNMvFQAv4dabOfXS8VM8HSlXtiGvwB/TTEjGO7nZavYQgzP1H9A==","signatures":[{"sig":"MEUCIQCmBEr8ai5CiBwF/5u3G9lbf8RIftPzbACX/ReuZoBa/wIgM/pvxlupbVefE2yw0SJwszcNFNQvqXt8pOnGbA6J8fE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDWwbCRA9TVsSAnZWagAAaYoP+QBxh9/w69bb6MVCG9df\nijtoWl2Wfk7WjC2hiZ09jPxRLU6NKLnO7j7TiV+k+cvHneZKusWLRFy6HtbO\nmlpczBSyWR4c1Fsl3vYKwxRMDqpmg452iKRZHgeVa40vCOQ1TxseFb4w32/f\nx7PQYE1P+uYUI7X0SXJwEO7/j3pIgKiVN2q4cvUdjvjSCwGrKncIx659iNdj\nxPJk7BAj/WojmfQAiksftY/Pt6Ugc5L1a5gg43cqUU00j/+pRB2ToP2PfLrC\nykQYOTefoEOSlhSsnm6tuFjGfqc2gYlIlWRFv1r+Rx5uOIqrUgQvhQ+++fh4\n3dSMS7lBnmapRmEluNsoxyLWOvlVNda8UQeDArcGlmCAiGAZa5rtlaFTdkZI\ncYipE53h5Y07jApESsw+6645WQvamicB6b4Dgb4Mg4iGgg7FR8kA2ZUPHv5g\nTCGd/3mQVNI9/UEZ2BS/9Jc2Uo0TGnEnnn17dxeIxcy29P8QdMbU+znJaHRR\n/rfz3M+duu5REznvS5ldGeFZ8+NTH3G2kCFQUCxmjWlVyhl28HOAnTPHYRic\njS8AeYPiKVMrwhvsWtnYYB08KBPrAUqb0cW9NiZt3FLpLdUIC7T4lfblVnz0\nAuGa5GILo12MAweej/k0Sw9iS2Z2Hlh9tubVm3O5hhNtN6SF7Ys7SC95YFbu\nR6fY\r\n=G472\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f012412147804a7e8c4bbcb205a7a48a045cd694","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.4ca11fe76.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.4ca11fe76.0_1628269595109_0.7806801013778071","host":"s3://npm-registry-packages"}},"13.0.0-canary.510cf90f2.0":{"name":"@material/auto-init","version":"13.0.0-canary.510cf90f2.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.510cf90f2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"faac148311c312c486f3df774b55776ce682fc96","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.510cf90f2.0.tgz","fileCount":13,"integrity":"sha512-OwS82p17OrZL4ikgFDT4OVlVjIeLOxoKaswQxY5oVuRfsSmIv3DKDCn3qq+s+Do9u8soo/N3Bx5aMAbgfNcuOA==","signatures":[{"sig":"MEYCIQC/HXJiYoHNk8s84dPrYQ6Ls1xRikKhrE8vx0JCxJopngIhAK7zlnCts60zltZOvPJ6vhTBfNc4XFakT+Me1fDFSn/a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEWLrCRA9TVsSAnZWagAAKvYP/0xV7CLZ1RUDZVcFQkmc\na5hzAs5GcaU9sAkyIGFpmQo7hl1KR9t1HGpEfQFUYu6/mHSdX1mdfBdgpHKG\nyfS4AbB2IGZG0kLDgp1Mgt3u/WXFfju4n0SSARotTNoNWfvsGJ0mdXgiPP3C\nD0B87bNj1R3aEq0Ediw4iYi/rlVt5aW6Wq9vkoBa9BBaSZQf3i9vI/JZ607H\n/RZsRHORIa2n/gun1s0PUOzV2LvZr+hU7DkEklh+TbHCq7RuutUheuQ8G1/M\n25JxJvyecvgXrVvHALDaA6YSvtUWTrD0uTtrJ3dCbzTM21mqHPZmN928bYWp\nN0ieJ/yXYtU/lADGtquKxpJBB5d4u7CL1rH+eZdkQiv6N7GV/uoxTwqpIYqX\nOJHmPi8OsbqCEt011zzf8xS8TNV/7ejBEjlegfbhADy4AjhbPruPjidCJOB+\nWt8Kmc8QW9ebGY/Ftsr3k89W077mcRYmpHFKy2zFRoewS13yBvtCVw2ceJ4/\nXJyCvWg0IyvfpcLzBkZhf0cY91bXOZmmsF2I0382VexZi7FMYES0JrDgU9MJ\nHIjAFpQ1wOhjjXHvNaqqX/gx5vawk05r3HGr73HyueJYtST0Z3XKW28qPx5c\neiaP4zgTKvy58mBJF87yS8NAnzt7hxTWb9GzKwxSQi78aC/mN+Jos6UGDipk\nkNd2\r\n=9CH7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1e11d1f2c4c830419dc862b62700d4484604a3fd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.510cf90f2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.510cf90f2.0_1628529387203_0.8869831729343536","host":"s3://npm-registry-packages"}},"13.0.0-canary.17580ebf7.0":{"name":"@material/auto-init","version":"13.0.0-canary.17580ebf7.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.17580ebf7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b8f0ca569a924120ce44d6c696771dd9682a15c8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.17580ebf7.0.tgz","fileCount":13,"integrity":"sha512-gk8EGceP87CQju/+X1226ALQLf4Mf4CLgiXpiqpORORP4PGL0iOMzrVim8HEZD+QP9kHppnax/NBy6yD24mAaQ==","signatures":[{"sig":"MEUCIHAChaCzgjYCo2H5hCO2EFUQnRdT6ICQOR4wwYkhUAr0AiEAl7LxZzCGr7IJXTpuk55QC/Y+ZsgF2rGIUwq1GrFyCc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEXD7CRA9TVsSAnZWagAAW/AP/jgg09YU5QC66813+vae\nAxM+qGEC0l9okXfHmqyKQ4TSgmbyTyj6gNbQNU8PRXb8wYauB23isWwSxc96\nscOlWRNAPtlIxEJPtxxOQLcXIuqxOGNLAD+EUTP0DIcakiEQ4N5B8sa2bzUg\nhJOF7Sj+tXN8HgIewiS70PKf6C0XCbXyS0r32d5R7n1C6U0IP8VZaFBlhp8x\nQJ+tiFILy28KjPfqzInAqvlRqfLtRRKeoZQHYuDmRkja0/LgcxYjjJ8qHNe6\noabLSoSPOYP5A4yQbYQzM+DxGR1szRwM7gH7mD5KUoOJPm0u+MoCTSqZYcUo\nIXs9ukYwfs6yYv9PDUlSTi+piw4gtYGNrr3j9MqKuAgPZE1RCHqGyTBL9Zkp\nyHPaGQ0A+OKphLwydSJLp3uo6ydzRBS1tJtmTxlHOtAjL9ov73UrYwIRC8tQ\n3BjO5WdiIj8zZ4szBw/97apdbrZV7CENRsA5C2Uqor7+9y14USkKGNGeDT3u\nQRiEhlib66O7AX9UgL/9jK5kJaOMEfFp3rBcS/tCpwVnMGhvYV/RR2m4viOE\n237C+FMNJC39GTOFKkwCodHtYqmOnaKBJ8V7mPtJhADPAr02o3j/lg7zjIhW\nyqhS5Gie0Bz+i6Uxwr0Yms6ri5ZiZZexO2Tp+88nxV4iwP4eCycWkzUSBgY6\nty3Z\r\n=CKJb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5bde42052101fa1fdd48d89c3dde8b9e99bdd1b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.17580ebf7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.17580ebf7.0_1628532987758_0.5169830707664542","host":"s3://npm-registry-packages"}},"13.0.0-canary.7249a3060.0":{"name":"@material/auto-init","version":"13.0.0-canary.7249a3060.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.7249a3060.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"079582f90818499d47b2b33422f525587912c8ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.7249a3060.0.tgz","fileCount":13,"integrity":"sha512-Qzg6G5NFsWK8RtPe9/klnIc8KuN0uXXOsOXfzPe7R5ymYXoDM5WVMFCCUnZH5ClpicFnIh66dOkI1kxCoZ2Eog==","signatures":[{"sig":"MEYCIQDTExgu5m0qbAjX8lY9F3WdwIMppY6s3lUpRxLOGXg5aQIhAPkvBkdWC2393mVd+hyXxrsZ3A/l+gG5gv3uSnUVATHX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEXH9CRA9TVsSAnZWagAAgLsP/12tH7Y/tCzDMqnvjJQ7\n0P6viFjlCSCphE6+nSwimXPQnySlqbz0J6/2vVXUoenRKABwcM8234FZy0fw\nJ02hmtVyScFtUoZTRyDKQzoFewFgX00ohWT1GS3VYhGODiH2Z0xwi/TBHmv+\nKu9yi7vzqOh/cUSWYLnkGNWrm6BPeCPie2gAWaaOOVm0/NEMViMPkZ2KQP4u\nDAgjoeCvm48DNms8CGeN5zEpIeOJlZtrOL4vIFJpXTI5vE+EBMx9lan6mfjw\n3Uei4iSt06PnaD4eJNuBs9oZXvnIhxhkXCz+BGX7m3DrCJkZ03lHK53r5Y7s\niaaXt4yWiVFYwL9daSdLSa/5KZL9ydIQ6KdOLxP0e6QnrhyAaYzz1XO2+DgC\namgJ5L+4ga7AyfN11lU3CN9XwBb/C0XbUiEFjAyt0I9aBudmpODpFNK4eSgU\nUcT53naS/lsyl3hgVJBKR3dzCyXLW4+XyVD3EyM/FdQkjUkecJE69GyH0/Pn\nR/Vp9ReLq9slvoyhcwVKSaEAPM20phF7Ri6+0UTe3ZuQ9ZW0rtk+Izyzidzl\nYf5iw4Jk5gfZ51k+wUJ3jsKNZVhMKDhifP7uRHsni9YfKBEuhO1Dt+dgG3WF\nZir745pF80gmtaTCb4yX9A9/Y08eA2H+x3R22VVk057QtEGXcAff2x55Q/tp\nb19s\r\n=Ybw5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3412ad644836acdf464e70d019c36080ab377321","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.7249a3060.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.7249a3060.0_1628533245235_0.435405837935368","host":"s3://npm-registry-packages"}},"13.0.0-canary.4c405863b.0":{"name":"@material/auto-init","version":"13.0.0-canary.4c405863b.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.4c405863b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dab280771c8f78352dea139e3f3e84ea85156a3a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.4c405863b.0.tgz","fileCount":13,"integrity":"sha512-0qi/IrQufGt2Q99KiiI75wl5JIUyqwzeK4Gji4p6FH9MKrazzyp3V0VnZRK3ekxHhJsHtJLZWspbMppZUg2SKA==","signatures":[{"sig":"MEYCIQDCYHsVYVxFgpVU1VFfFCp1G2dhxV6YUYJVFd/y7XxC/AIhANFp8yps/IWXlQV62kBTKTZZW61V2FdMdAjAHj3KfMUT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhErntCRA9TVsSAnZWagAAZ0wP/0B9UT5/5wi2wJJUWUjv\ni+g0Mqxel0PBCMIA3B3GZpfTfR/BtZt70EF+el0XUOk1X9fEdM8UJa/wShwX\nA6Yx/+ixzy2jMGRSYRpjTVOWeKB9QykIeGgD+T/mp3CAOmxYRlDRBrJfPWR0\nACa/i2Fcgt8+EQaipNzUGUdBlbvy/LSwpd/2ReOlFaG70DPhQEoFJCBo+iQC\nCe+dk7gy0StWJYs6DR3MtTUsrwKKxrzFQt0Qgnizm7S87UiwskW2GbJiUEDL\nerzdTez0TbRpwyOgTDsbEJGi2ZulJlNZhFPjQUABNnEnp+tEl5GKCqPktxYZ\n81PBRuqwJt1yFGq/Z2bkc5HQpfL9kqWGX0ldkZGHXMf7JtB+H1bpy6+rg7ji\nkqg26W6c+1omwq++uhTL0KzmTRqC7eE63OiCS1yTAUcg3ktHrIaqjYFZjqVU\nMhacwn9yxHDtinqrEwOeXrVKNyqjFFSCAzWD2sgCaqfHGFCJp9eafjZf+Ktz\nuOpNucZ+agtsvDV+Gt5hCvDfn90B46T2hT+w/bC2QpsFn/OXA6PLj8bBoQ1f\n7xMtxQZYXdLAD4tK6KWBWid6EAQLUdRlAwtdLwnykrLtHRQFMfYe/G7HQuA+\nd6LrCSl69gWkyHtk8hWMt4YQ/DN62WxbEZWUv0B5WZkiWo3YAAgaalxHwZS+\nHMO3\r\n=feF0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b3861554313a19a861a5f6850f9df33ae5bc42b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.4c405863b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.4c405863b.0_1628617197809_0.4265847987711562","host":"s3://npm-registry-packages"}},"13.0.0-canary.f4241a42a.0":{"name":"@material/auto-init","version":"13.0.0-canary.f4241a42a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.f4241a42a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4003e10c6cbc2f9faafcf9c8b4c109a8f5385ff1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.f4241a42a.0.tgz","fileCount":13,"integrity":"sha512-+eGNH6vIrPSubf0pzIwVy4+ffhpQITLea6WqlheYEi9pQq682OkrEX52gZGg4QcYJ+vdtDvaLRteiI/OBQAlqw==","signatures":[{"sig":"MEUCIQD7gwqzpS9J/SHY1P8y4xacENryRDmBMS0VxgfjpxmdwgIgBZDTF6pOJVgvVf8+5sRCaUCVvtWtX5LPvArIiiZfpMY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFAG7CRA9TVsSAnZWagAAT3kP/j0pUzd5uHz+PG67y5CU\nUzkzIblKP1GaRFqy/gZsMNFs0A3gAJCCvRA2FbLifRPsvpuJa1EI0hq9Nwdw\nSCRtqrQ5dErk9MYV9VfM1dB9dgFkIZsLrx/0ihLaR57YzdRG6c9pX62D/FtG\nVLRSSEt3R7Soc+VFxmEWzFSW9bZzud5iQX66qZXI4fbEOfnctaq7twdTbLjh\nLEzPFHXTl4Ief49JU/1Dkwz4Rgp+FT2kb4UDsPJhU/yA4VhdSjXwlX4G3UQ1\nKvGF0mViLoqHIzmbERpD2nhfNVpJlzJp4uUuMlXVgKpbSNnn3bcpkCrIl/Ey\nICADFRsWM6OlxpMJlhqPUpvIhl6ahI9aSV0K3xnhlqxqRfBPU5jfAw8hGwlt\np/A7zsI4BHhrD006WP6Kh7cW7321yxs2KVF8iSvLCVdpY+quRNme7sMlPx74\nk12svmMIWYtTgZHiMNHhBxgWcTv5y12VtAHPkz4R6NOanoJjV5X026vEyonW\nx/LJzHKzsPXAzEdlnVMThzo0BOqGDAB7i84Fos9USZAgD/s0TjwrFD4XH1vP\nEEOKk4+KEnv+fAJ6q10dVM/0Br2aeQ7Pol0gxONl1VwYQEw0kBBPad0d37qY\nRlGaoB+KPc2o+ecaO5+01BWaCRY/CgkVYkkVcjr4QA1CraNrlsehZ2HSo9rR\nMwOX\r\n=D5Yd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bd97e42dc6a97fb74d92a9cb04e919c5c8af4da6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.f4241a42a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.f4241a42a.0_1628701115742_0.8543478734061145","host":"s3://npm-registry-packages"}},"13.0.0-canary.0ad12ed3c.0":{"name":"@material/auto-init","version":"13.0.0-canary.0ad12ed3c.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.0ad12ed3c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9bdce67af181a201d8b52f46cbc77e324eed9439","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.0ad12ed3c.0.tgz","fileCount":13,"integrity":"sha512-zXklpD6yiUmBn6UgGhbKMmg0OEPHUsf35Qu79r698fiS1zVGcskR25KDBP1mvsDlhj73JDmH3T2HQ8FSI2VZNA==","signatures":[{"sig":"MEQCIGUbJujH9+9ri/t9UI/MHSFmo96pE3Rthme3siahAVEJAiBA8Ie6NdrJ/lSvmF8nWUK0INFP8klxx9eAnm1gAqfpFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFEDhCRA9TVsSAnZWagAAiKsP/0PCC80xjvAQDFgjvlge\nACsng3VTlVqVjEecnAF9ETZRE9exUwkiWc+nwasR8EdgnhFBnwoAK/NWhmyn\nagOOObz8T+DMf7IgfJrt5chBqybUFdK5xhBAE0q1htsqFjVSRS5PVo9Mszoz\n/oM7Yw6rXHmDg9PvqxZcVGIO/lZOlAnqqmroWzq7nKfKbUOCZXPLsDqD8mre\nurOLOlmSgfAedDxSMMKhHGw3Ao558t7H27DuXgd3c7BbtTcoWxTIRgJp5DLe\n5g2cC51N1jPCOFg7KaaPOj+oIPtAFet1M4HAvNlSKKiaCuPiGZkXRYQzsvDO\n1UV/S2KJTHyysJxcxUh7RJxycLcfI8mP7beHvDJuDZ8Pn9t5xCdEIM1eFVEo\n0otvd1AoZDysiIYXmQOkoy9riF0B/rWLWEMUxN9L5IPXHhS6V9XQ2JC/Ka+C\ne9pmpCXjtL8OR9D9NQszxcaNBtla30OnPhUqTFy2bpfwX1DbEbB0f6pZXRVp\na0k8iSdBlFStVyaB1cBWre6sLjcsY9YQKqD62G8yFqwyZpgKissdh9L4y5uA\nlN+6YEuQs3384/IgdgrXVPWMbPuWAk6R7B+SMRXDOX9MfdJSeqvjmSxxx59O\n2ku41u/M6ANklUJkWlPdJs9Un8wsMxz9Y/PmEiXAGjx2o7y+Y4mEoj0QKVWR\n2s/Q\r\n=STRG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"db28e7f3596365b1d41f14b53d656a743eb28bf3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.0ad12ed3c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.0ad12ed3c.0_1628717281070_0.6106821117710257","host":"s3://npm-registry-packages"}},"13.0.0-canary.077dcfcfe.0":{"name":"@material/auto-init","version":"13.0.0-canary.077dcfcfe.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.077dcfcfe.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"22304acae8bdff37f4c9650f3eafd4f3664ad063","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.077dcfcfe.0.tgz","fileCount":13,"integrity":"sha512-wIZQqJPGsfx3lf1wYpNpEHlq4n0Ca1RpzxeFdgpjWCI1G2IsuXaCcPayNdDJFRm2Bywctf2b9CWwy2qK52GBNA==","signatures":[{"sig":"MEUCIGWfXRXuTzLU8ZOQY0HL7+Lsk5Vdm/TK434ZRwxXa6UbAiEAqMkry2FphIs6+GzUC41uFDq6lf8KqkuU6MsEshNtj4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFWBYCRA9TVsSAnZWagAADhwP/2VLLzq+jznSBTU3cwH2\nkcX5m1kTWIMq9inAh5HPSmcOP8UKR0Gnoj+SLUFBCUfn94rIV99Krg02rFul\nP4OJNUs07VmUEjTm+ZAJknl1fm4TCQL5cjja7JT4RqvZUBHasOPPobXpLzRw\nKwhWFsdT7RWQKk4GYLqIuQeGlI1H86n8NRRZPhxA4sgQ4YXJvJ6dEDo3uL97\ntw3IHZojIbm5c4MMAp13HQ8I7zEyVyOOXYT7hrrX1ZghMzV0ceBffdUEfpO6\nezMFW7X+gf7R8qiV5IVZeeofY7/QKMimR9LLh84NOynQZ9ALcXOlC56V9nXH\nKC2T3dPAwfBndjDlcTLNU5u58CwuZK9YuV8bhAL75yPmEZpONInTOS+QkoM9\neNuYksWdD7FOl5My6FGgP9/Fww/LqMkmU8/3SA/YIWDfMeDktZZH6a/sFk7k\nDHh4/wDSsaLf357gTx1R1R/tnWbFy/B2qneTAKe1SXpB3I8sWl/ylQGon72G\ntTRgKOzPU3bJDCXe4GigER9YSFw7kCQhZwTN7l0rq7rDRebJUGe9eF1xjkP9\niM7sQ2ewkEaSeLK1BoMH0S+OOlg93KPkC0dI9lqeeAIoUhxbROj2XeAhM3Rx\nPZjePD1cJ0UQcaRj6Tm/Qlt3wUeMt2c2fBWVsqCNUK6eh/yT0gfm9GUrs5Ux\nrJ0B\r\n=Et4f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ce840a62c702182bebe1a5f2ed037bc002472dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.077dcfcfe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.077dcfcfe.0_1628790872199_0.5455943023100722","host":"s3://npm-registry-packages"}},"13.0.0-canary.e3346766f.0":{"name":"@material/auto-init","version":"13.0.0-canary.e3346766f.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e3346766f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d8f2349c6964db0766e1a1ce49a06a57e58d71a5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e3346766f.0.tgz","fileCount":13,"integrity":"sha512-GFlyX5o0rEaa50Dzmfoh+zvk4Xb6oQUJ30DspkJLtuuhVTFLcA5m3eKqbF9kYgLB0O38IUvFaFqn76qrCrcziw==","signatures":[{"sig":"MEUCIQC6+bxF15pRPnJBptyERup3APhGvb0Rs7F1jhBAzOAJ0wIgAY8wAcQGdvTvQUR1VQDq1PUeNWS+eQjiAr7uwnL0Src=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFsubCRA9TVsSAnZWagAAccgP/R5zMocoPRwZ9JajcCr+\nF1RJLXNlBECSQq2J33vTM8D4LfOvGI8bVfmCLIhhy9M9B2OU+hnSBGeSdET9\n8vZ8Mj+0jh2NUO3OEhVIfyonhtwvZByUTzHdcE5NPrZ/HISAn41VLwSKeYFi\nlMNrckeRrroLt3cClvTNmxTjL1LqpQqKyeoFGN7VGRafzTjKmpbZsfFd5XiS\n+c4UhQ7Dm2ECTV4mdKJXyzZ/j6IcX6dOtj1t3IwPXJsh/B7kW7CcPJkFsQTF\nR6zBkcvT923gxnoGe3fBZDgc1MCzAh9xL5pDCENvn2d07nfgaqyS4prq/vBV\nLlaevEzuv9hZ8WM6NznCjhuhTnEojZ2ntNUi8stNOUK/WQePQDcxls1/JG49\n+tJ/ZE7RvDwNHACus7nuzb6HWwR6AHr7GNiqDTQxzx8/LqmrW5+GuoV5eje/\n/Y57RHSpbOn4v7C3oZXYlrt9iATyeyjIuj9nprzHW+B5TyV++qQHbSaKzK3D\nqRPFPRtTMXOb9Q5sBQ9w9YipG0NfBXqW+YvVbSy9vr+9QdOVW4+bT2/88Paq\nB8bFqFzBdUnxrFxTn6cDsACWr2CkEXUs4bh0v131zBRkzeI516FUYzQg3Ggl\nWMALvVnZf4ECohWAKRLWsKqZTCCgp0tKXXWtIbJfCYZUoI+H8QKyXjuxdOcL\nBp8a\r\n=67Rj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"03da616c76c8b7fab07a24f82209f171a2fec41c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e3346766f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e3346766f.0_1628883867428_0.6529293615098004","host":"s3://npm-registry-packages"}},"13.0.0-canary.2fb068fb0.0":{"name":"@material/auto-init","version":"13.0.0-canary.2fb068fb0.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.2fb068fb0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"841c72f59bfe42f27e2f5206531a0b7d22371769","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.2fb068fb0.0.tgz","fileCount":13,"integrity":"sha512-5WcusdtrtrCbs+0CpskNmTSNGzCLabcZyOfCQGQG8wHmz/xKoieamG5vKCyAOXkgJV3U9MsLj9jb5oNG7i+9cg==","signatures":[{"sig":"MEUCIQCj8N/gwg21Zupy2CvgfbdQ9kL5u6uXjtGeEOeoLjaahQIgTEBIxnnew54SNQ2k4fNNgYQm5wO35YpGqjorPOi78NI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFsxgCRA9TVsSAnZWagAANuQP/2BU5CHCuzUZBieMf2RE\nVfQldcMMREGJgOZ1oDbhYpq5oqPJz9xPrQ3sgfaYoMUqF7IHkVtVelBAn9Pz\nvT8WnqqD5fqOr6tKl8Ai8/X/OOb8ZPka1HOXpQ67J9si1MxUxMNFT/tFCVVQ\niNMhcvd1SB61NF1E4NB/358oN+joBwNxV6d2pLySai6CqRZDiKYUCXaQfGqk\nAjuz0Ofx4CZfVzgh/hvMkRrRWO7IjbebAK9f+axiFI3Ov8F6fC08C7nZ+m1a\n73kExWmvGnQrlXPzI+ureziWCDLgzR6S43CbMgq5k+jV9c8nuF9CjI5wkoik\nGh4UY/Tg9eb4kg2UfQj7XE9hi4Dlov5F8wfgKVYD16D1ofcChE1C/1CEm80l\nTCjnnQMjTmIBoDeyRcNHnzOZK6ks58La60eyO0N/f6O4JxELPnUCHa6m4DPS\n24rPgzBMVfx6+UzcP0Xzr4+NAOQqaZSjpgMhlZ+6WDRH4GWrySB4dDptmH4Q\nnn95T/fQUHEUfEh9dza5IeQYh/gzaLs2IJOZ2m5ZvjQbq7c4u/wVKg2g8KFK\n85xU8IgCSN+aWmgRi9ltUUE6sUqgbUhWi1qDpUcLqtlT7bS/mV8qaV1evi99\ncAO/maQaj+aXXF59QNcDjnV3vPvXFVyKGf4dZkhuSowJ6+lCqN43fMwcdqRg\nNs3/\r\n=uufk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cd1967c0a3a80639eef1dd76a8e579a4456fee90","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.2fb068fb0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.2fb068fb0.0_1628884064180_0.4882271844154469","host":"s3://npm-registry-packages"}},"13.0.0-canary.fb76c5069.0":{"name":"@material/auto-init","version":"13.0.0-canary.fb76c5069.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.fb76c5069.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b545f605c31099d36d1773d82fdaf56c9cb1e274","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.fb76c5069.0.tgz","fileCount":13,"integrity":"sha512-4koDv4EOvWip0rQ8A5HFadJ0eEjrTmcgDJp73HUjLDixdAWGl0EhEJFaFpdDwvRwUloOqEC7G8Q89NapAXZEDA==","signatures":[{"sig":"MEYCIQDXSBn/N2ORRfpbqJLN4G9GL7OtQveJkKdzkHUPgH5ZzwIhAMuWAXOjhNmEYDV6SKnNtcGdQyu4e6eQeuOaj9tQurWn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGsV5CRA9TVsSAnZWagAAqiMP/0W83UV4Ao31M5wbx5dB\nkKUtsl7+gi9uuZgl/8/EU9zOUlDRGEcZusAK9RLwwJ4OSbh6ADnzznj7MzH5\nQwn7EJGR5GAUgO1Dys4QgRwg5awVRIh+9CFFjvJOKC24exaIVimXDDri13uR\n7wjXofT56agQM6UCxLbAVzQ8v6tZE2h6M6OdQlnz3ej4KsUeuCe88CNOc/bn\nSam9j058xGWjO5okkDlIrJWieyUv5IajAGBgQaUr6ulAfAOBfh+GYwpUUlw6\nLLtRmaqKc74serU62IJsGMaW3oqvdx02CmV/6sGGSzVl1xb3Va43cBz3nTQZ\niXOXEVfvEwSqqiZQ0YEgU59XACidMA8fCeC8jWjzzYC+ZMXtx85dSU6EulC3\n9AfO52oGqe8s6qJ8fBP41cgohWNIsUXDYI8MYgjtNHWOVY7mjq1rE5DqnLxK\nvk02JnWajUQ18Ag2yuTFBUQapanDFGFycjRWiqdvfTG7U2Y1yO5YeMaTDOWD\n3Xh114uB3ZTgEbVy+QQCPec8OiFP+Xd4615VU3k71jwcEZjozxpLvNx+ob0C\nVTVkBVBTCJgET+OsDDil9P2mkhVZNcQqR9oYvWPjotool3nTGxdwRDAi0azF\n4B1XncL+7wqqwR//jVt8yohinVpU2Zg2brVJQq7LQeiJk5gimKXU8yuuSo33\n8I8Z\r\n=0+er\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a969624431e3c1b8d80c2e2a37e5ea5af6bea4f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.fb76c5069.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.fb76c5069.0_1629144441001_0.9970275974934375","host":"s3://npm-registry-packages"}},"13.0.0-canary.457d89aad.0":{"name":"@material/auto-init","version":"13.0.0-canary.457d89aad.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.457d89aad.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"238231dbeabd4cae78bf5c798372ad406e7550de","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.457d89aad.0.tgz","fileCount":13,"integrity":"sha512-tMLQrnNxi153vLPrigyRFg+e+ZKpADdFKQVSRwDjGwTqO9ug9HWDZ7e8CzHEA+VBEZeRAu4ynOiV2d1el0O/mg==","signatures":[{"sig":"MEUCIQC8UwGAIId50uKjgHCAGHmsM5cZWKZCe43Z0qkPpaEIKAIgJNzs8O2np9RH/om3x1oVNfMQGIRaHseQy1WjpwYeg94=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG9PcCRA9TVsSAnZWagAACkIQAKJl0L+3IJmpBABpcIjs\nIanfhEroRdkIDN7SnDpr5bwdDf4KFJZLreXFP7mcJN38lVSnjSBgEOdPQEvS\n1QW1x22jy5afmI1XU77fOvp6jnCzmCpJxNzHgJpHhY+MA6mRARiWlfMxf5bt\ne6Sa2zMby4BH8p0T+VppZ4cRwIJrUX62VaaQyqquM8aecDTwspTBkP4EX5eb\nD/I+Y5bOcQzP7fUTZzk6EKhRciv7ba6p0LiLbDZMSIOyGSku+CmUDjuobGsp\n0aX31ok6CiDfOEcL8LyndaBVF4b8spSMfOl/gbpU22ocU0thlj0PV2E6N9cV\nNxAD8Y8ehVbNQUUrubhCUdvLuJFdXQlMeZ/brtIqVuPnJ5r8V3j1IvBL1bUs\nwoDZMd363zWFdb4JVSvemzN84GOSvttrBONI/yXF8Q+TdYwiAJXgE4DP3sHi\nkmhmVkuf9ZkSC46lzetTWVOgDQbWEqNYM+oq/TND8jhH23G3SArowsZYS36M\nHrLz3e8RamLbQ05eXZIYIFLMZf5bWTrDylTUi/dLqF1OHMKrhcyPZD4/AhKt\nsxsMre8LwwGSXrgxSNyGcvkUtZIPQsisqDdMXJKnF6L4nzOt7DMHsPka4j2Z\nah6LmOXZOyAXoXkEip5D9ATFqmfV7vojLoohROYlo97VZ3wD3K/PmGyhczpU\n7onZ\r\n=N6Hx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e1aeb9efe0d3f4d8670a6ce174d17d7528b34438","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.457d89aad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.457d89aad.0_1629213659865_0.016179719328816455","host":"s3://npm-registry-packages"}},"13.0.0-canary.0de2f2edc.0":{"name":"@material/auto-init","version":"13.0.0-canary.0de2f2edc.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.0de2f2edc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"118533b52a479302ec27f6ce226ef3c2dab6a45d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.0de2f2edc.0.tgz","fileCount":13,"integrity":"sha512-h03iXuAAHzHm0IPzqLYPjNdwCCXo5PMyv0y8+mwBGwwA6m0oYbvP2qray9Xnx3bEiYyOslxftEguaWog0e26Mg==","signatures":[{"sig":"MEYCIQC24qi9xcmxlSYIoOzeXO2QBsak7fHXZlGMpx3/jC+6rwIhAOwoKTcbAOX+NEppCZb+gDzIc8VIxnVt++CCzYvLFPfo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCHGCRA9TVsSAnZWagAA5nQP+gMGIN9qld7qkoJK+a35\n9k2OE2jhsIZFCg88PXBN4KVcWCR4l9HXH3qOcIOVYxBz0LIDi4GaBYEPmIbC\nENPOuX4OgwcfTek3r4gCY1XvQfDaX0WGHx8RpsnNhBIJmpfSAf2gpw+JKeuW\nMlzW45vqjOG67HF/6vVc39l3VfdKUzDg7o9XJLxcBAmE+aREt/XVCS2YO+PO\nyoA14WqLSdPsKq2os2TSR/NjTnBMhqK37DqrlfiLfQS7C58bPWSd59c+UZeo\nGkX5HA03tKHT+fPrxoOO7UBouHNiiSfNX7/+Ra1z5oDdTrpo+QzarzefsSJy\nLiz9cTrfmY3n77eDobcy6utUA3VXn/e26BdKrXHetENZrOZcmhwovaKdKRhF\nKIVmgLGWNnLkCNhzH1LOMGGLeTPEA/IPcaqwDZ7wyqQhLHR5U0/PkkYKfzEf\n8aETbxWnPlSeMRAJ+cExQ6iUE+N44dr33DwpDQBkGJhqeo9PZSB3rgGMmE8X\nCg8BljX8Q7o/Tz5JyWX4IJTGuWJYw2gq3EkR+JCpt+gf9OAt+vsonWfb1Ov1\nGSi2s22zD8jJKy9a9YgUWXsI+cXTkz2ZszHzQI5fhWMF8gAm/GLoFq6nnnYk\nmJdcPJCfvNa3bw6IMxH3riI1hKoKJrYjccP4a0FRWFFIDcDR5uLlnSrRwQsQ\nvmjA\r\n=QV3q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ecc5e8dc0157f612d4cbc7b03507e3779919d5d3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.0de2f2edc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.0de2f2edc.0_1629233606592_0.8044108425512664","host":"s3://npm-registry-packages"}},"13.0.0-canary.1f9259b9d.0":{"name":"@material/auto-init","version":"13.0.0-canary.1f9259b9d.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.1f9259b9d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"af849538e28838058cf6f912576d18fcfc814b3e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.1f9259b9d.0.tgz","fileCount":13,"integrity":"sha512-d5ZJlvmDzCeTGutzBK416n2lah1qOUHdc0xUvaCaGaKrZ9R1GoYUOPjVztBomev3GDvk/52SRIoJKG0jznfBLg==","signatures":[{"sig":"MEQCIHyJ7lCwwePRjYPHefclAdF6ZcW+8w05/N07lQ15oty2AiAkLsZJrbm0UCYpg0fD++DSBTSTFYuNO9aRpRLqQ/cDbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHDR+CRA9TVsSAnZWagAAcVYQAIMQnyNeCX+dK3cedo11\njhgUXsZc8pJHoxYkyaJM7I/YD4vc/luaLROqoddYRERA2tjqKuzRbfRme24u\nCyz9ZPdcp0gGWQU+j93ugk2kd/mhZtxroSh1yfxA2RvIEgamZCwfDl9Jra7r\nH+cBEZOoxbF93fIgylkrgcLteNct9a8q7rIdsTs4kZYR/0TWf82xpoANJfxz\nFqTsZRKCeK3lrv83pEZLlS1OEGYgvGKqKsDqOXl+Bw63Qq+Be7vVEkW8xJqj\nDr8ZUITbo6tZWd2qpflndifkNhhzhWgEws+i5IxZtDzT3sO9zbj820Stt4UM\nDBj9yl+FS2L+P+JPvdL0BTLBpS7rD3qVTaA/qheYEdqOCZqvadfDlNI+4Uly\n7s1j/OaTw6XqrMgujyk+icgCeez+OkRSQPKgtxGxDjae7FVopEg5CzOMr/n+\n3pKNmUHkcdAiJ+uMO8VQBE1pYG82dWEUestfd+LdGIvIzJxuR9hNv+86I52W\nh8gt41lUk3Va1lYZAUyYM8al5CEpIV9D5M3g6gmXmu6MN4ecAB4+9wp2NLj2\ncpNUXwUv+P4rH0apyifeXmHnvfQJlvgZduZHGbkpN0QJrAiAdm2md/64UA3n\nhggugTi1GR07rkDsInbvpRV8W7j6vaYA1ayfBQ7qckmi71aq5lWR9myuHbF1\ncvag\r\n=Qmoh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4c2c9aa7510a4854abb7f568046a44631dfe3e7e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.1f9259b9d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.1f9259b9d.0_1629238398189_0.4888977179307199","host":"s3://npm-registry-packages"}},"13.0.0-canary.3b9290351.0":{"name":"@material/auto-init","version":"13.0.0-canary.3b9290351.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.3b9290351.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c4d71d4abd5bf750d2efa67d996ea93af07aaab2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.3b9290351.0.tgz","fileCount":13,"integrity":"sha512-TD7LRiNirXo1iX4rx6CC4rO1lFGLBglQQwFXqjlOEcBAMK/rJ/RbBfCrtYWgVI1F9ey2ah00xm1NLWAJzK/z5w==","signatures":[{"sig":"MEYCIQDIMK7SODoRIYtwzeq+7WeebrqVtPbnJ44BznniV610iAIhANPirIQLXUB7we6+QsJ1POoBVB45u2UEsfUuB5Mz9i+V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHJkaCRA9TVsSAnZWagAAwFoP/jVKj34L79v+GKnwxh0w\n2WoNYYGz73P2ugepdkYl+nILpF+gCWyOVHA2F9Q3FdIkxr7+fBO9TvBa0Y5T\nkmDEsuguL2UWrgwpy9vaO60h6aicpw2OaSA1HSDcteny7McqjTldMZt6JQyJ\no2IG9Wi9SO1lMc00hq6M/Z++NSbADnkWxC8f40S0oKz3fc860D2qty9iQAgR\nnrcl7/HikRs0YCX4nCmUONuskXgM+4IR3RZrm0D2O1YCnaDgxT6cRhsO6pSl\nH69VBzJbgDCFs9K1MmwUHSjWWxYZ2Mtk6ZipSL8mGWTMjack1blpUSfYiT/U\nxv7BbP6/rHV0qBPOMCZeT4PGniwkYmmvqf501Gs7k7qm7L0svLn9U2P5IxTT\nBM+LnL2H9xWCLKq6FAaYI5+GWo7zf7jFUZwV5iWrjCkbdK9eMhryHpVEIzwC\nhFdZyeYpM43UysMeQBwBtuPFFi7dKBSil/xq21+VthXvcSF3e7uyJ5my3OgG\nROUIGTju/ihvT62ovLR7h+fmHV9sgo+MkcFS+T0H9gKd1w23OQBn0NLUn/hc\nuIndhp9qkVeT2OR6zwI0RcB6YUuBUAHCeVhoae/ICmcM9+HZ1MWrKz987buy\n/LcRfNzlD2XowFNe9aet1CVQBP5Mkq7cNJ3BwQjUVp1sX/Rul/2WpNDP1fcD\nj+Bj\r\n=+Uq2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"15fe006947f65208dd0e450f8cad53d361b2930b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.3b9290351.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.3b9290351.0_1629264154265_0.3339074448171844","host":"s3://npm-registry-packages"}},"13.0.0-canary.43d2eed2a.0":{"name":"@material/auto-init","version":"13.0.0-canary.43d2eed2a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.43d2eed2a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"33bbdf39b144a1ed36dedf4ac1d822dec4c0ab29","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.43d2eed2a.0.tgz","fileCount":13,"integrity":"sha512-k1crP493BgREc2t0YIOXAYatETmPITsUQwSKl5Kg6ielbVmkKb25r019U6LRnG6WbzbpzHMYkzS3DhV5CWjpIg==","signatures":[{"sig":"MEUCICP+shogpsc1pgpcFJU3yqz7YLKGWDREE+iWmIC1U96RAiEAsflvKkPj1YjT2FF+2OhGFWsY/irhZWyuxHYZooZomA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHS7UCRA9TVsSAnZWagAAvNAP/37X8v4+H2IzB/kHBJId\n20RBJMYnAzhGGT6Pn6+4yVp+JpEK2vgn+ZwCdE3Un04uHyeBGOs672qnsvsN\nKPzO5tvGkiyQtARwO6DuphEuVQC6Jgnwz1naQwTCI7ER8LJtdip5BhxDUC/b\nJq3/7wsR63OWHDmrM+BFTkbeI2fPzNaN6DXCaJU9FYaq8cU1mO9jrrILkaPy\nuW30cBxsBA5xR2cRDoRAhD4AqkNKKnMZlNp1vJpbnCexP4geBwTb6+a5aX7G\nWZ5A9dZ47dHsIOKj8AXJ/o1lbKSojBIney8eXhEBVWNVirbiuM5Qlz95HPiB\ntdeDS/iAJSWcCb73Aw2WTNNRG4BLGgpB7TehT5UR27qIFYkSVd3mnZgNarOK\n4KlF6CegD5duWnLGcOmnrZN9ANxTcPNexxqJwiHqU67gD+6VY79Pdb+S0FiG\nfMxEpb+znqosmI66O7lX536OCM4DqsH9J3FvS9B0MvkT2J34fOcNf/HWhIR7\nGkjtjLo5DxJaOEhK9a20lRTtCMwdcVsz3xeQ2sA7HR6Y+SCqPTAxitR6UC3X\nw+5V9ujEJ1cJjbnsCmAJEzvmiiTIT+b6xPAEzYk3OWKW6Wa6h0D04ObInIbN\nfhPnX9m5OJGUNZUOA6yUwPDDUSZaULOow8ene80NwDX7bEDyadg5dt2QhyD7\nYzBH\r\n=VasC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"687e2389ae76da9a31b26968c0cdd837208d3359","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.43d2eed2a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.43d2eed2a.0_1629302484039_0.9166778557567816","host":"s3://npm-registry-packages"}},"13.0.0-canary.0a9069300.0":{"name":"@material/auto-init","version":"13.0.0-canary.0a9069300.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.0a9069300.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ac0cb875e80e03bc736640e1388dce7fdf742b16","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.0a9069300.0.tgz","fileCount":13,"integrity":"sha512-PrybuYx8fdt+xcVm214EtlKdaQFyPNO9B9fgAKjAynj/APPzrocBcrNdeLvW/cRt6x5fbU1sAXKUQrXEZDTSLQ==","signatures":[{"sig":"MEQCIDy5GuIZivombwRu/OP5FPTKzA94DdC4ReEDIS2xhRG2AiAZIJ30jqvcUx1Un2chQaoceSc7Tj2D6oJmjrmvCPSo9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHoPyCRA9TVsSAnZWagAAWxgP/1N0oK92shcxDsZCk5v8\nETwsqqmA53oZpbYMPsndM2rSot3XK3SxUCraPNDs6z3ZVrUxpbH3bfHcHiwv\n9ULI1qkHICh/2/wg3vXJnMX6remE9C3V1MAMYhvn1WUWrEoyiuSon3N2PfxX\n/1YJXa/hZgiA3g6pCW2iwFTb+H3lL2PkLNQjw/8V+urdglYLMFbpvzpNcWVf\nfNMHRSX6h6EYg4mmkPVkcHSVzjKat1jPWvgZfyBZ1vI9nhCboMqMf0rXVRWn\nnr39AXoHjP05OF6LPeGIJ3c+yGwQ5tq5menEgMb5PrOMWPr9qPMSJHUIeMzl\n1byEDNt0eNF3Nw771Motf+OPuN8eJEV3BLDGgzvf66OOmYKas/iACvKxbSg8\nle460FXGKrj4Y71WdEbtweFKKARz3LVd6RIO2LFvihi4Kx8IhL0+ieUYRTUE\nZ0QimejShQ5yANJmXzBziYhxt27js78k/qzHd48CTvS027HPHzLvE5K3VXkP\njxp3wDfPGfYaMMSWDxFaRx5fpxkT1pjbgjztivNX6Ne6jTYML8q6zHYMLR+X\nZjycgy8Hn0IxFCySrIBrtsjFbePBldbGB46/u+h297TaQHkvNFe/1IyXlZpm\nYiYXkyb0CKYVAzzkd5btFSnSTZls+owaKgDr/telbLX1IYceETjy0Kvzy5/D\n5qL7\r\n=4hS+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a7249c6c2dd2d786b2134e129bbe3b4ca596fee1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.0a9069300.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.0a9069300.0_1629389810585_0.43140675726415645","host":"s3://npm-registry-packages"}},"13.0.0-canary.7da413ed8.0":{"name":"@material/auto-init","version":"13.0.0-canary.7da413ed8.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.7da413ed8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"25239458ccfe5b98672000788961b5413a51e942","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.7da413ed8.0.tgz","fileCount":13,"integrity":"sha512-lejS+b5lymDKSpe8ULqCruR/58wA4pwTsdLdQR2G101IUNoz5q+VNNIzOoUffRlD00f05af32Uh4FcrHsT5G4Q==","signatures":[{"sig":"MEQCIATXTmpwBp/WUP+mZT1L1OwB9F9CWdnUn+byOzXGuNZ7AiADJjSqr/KdIgdg/f1mIgxb6pn+fMbR5JPSbTea+a6Tdw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH86kCRA9TVsSAnZWagAASMYQAJo0ukspWkAe+4TNWYub\no2aa/LWSTlfq/bCyYRKWhWUl+K46EPCIUyC2S3ataF4QvOm3N/l5a9CQLHag\n32UmdkjvPwh5YMmrQAhRSYUaFCehzNlu6AoZFd0u8bH8eivpXtKFZ8YX7t6h\nx4GqObixY3+oRdX8KkuvgaitpHLcQwo4X8Jv7wBdUC7FeC/ihDBY1YK9Hsgw\nx5htZBuuNO/Hb+iZtvd9KgiCPgviKokgJJHXThXt+jy0No6GVEgy8wNYwkd/\noFQpO1yYBBkN4HlakpgwJyRiZ+spjDVH93P+veLlVIZWLUwDwIDyXsLFOFEB\n3mLtAQQUIHQE7dHIA8aXF1pVad/0sRq0N3wze3k6ejiJGpqBtS/XIx5XZEA2\npGHYuKptDRuzfy1qoEgAEw4XyfjFzLbqAJYUQuYND5QYhY49RJwHojprbbvz\nYD4k1RV7tiAKKzTktX3x059gUEd5YL7AAViaVZwMd6k2602mnu31exM3Fmc2\nSAfOv1boo1CIftu9/yCoYuoR4AQCBxtwhyJlXjcS8ueyjTnmJghBC9ehdH5P\nTIEHhFkl0qkSRODjN+JpJv6RaUKOlEuBrsNU1ol1l9Qbn+b2MADBMVKbePWA\nvgpW14Ku5i8/ekhDN23L7hX2Yq+TeMCg99IB4JAxUE+BFEgiU1qxbQcWnmxe\nY7W6\r\n=+Yq7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"66fc8a91fb533a43e898483e7c4e1fac92aa0b7c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.7da413ed8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.7da413ed8.0_1629474468367_0.5489769974607428","host":"s3://npm-registry-packages"}},"13.0.0-canary.e1e69fd8e.0":{"name":"@material/auto-init","version":"13.0.0-canary.e1e69fd8e.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e1e69fd8e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dab85fc6aa7609a36c4708f5154fe8d332f09722","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e1e69fd8e.0.tgz","fileCount":13,"integrity":"sha512-ZSd+qM9kyv76v+13MDTyFrQI0fWZl6vPNCkzGDz3YJIn06Y35/38ddP+kDyJA81q6mtVkK0pJd0wOvh12AzRfw==","signatures":[{"sig":"MEYCIQDlOflrPd9sjJa8Ha4ujjrAJQevG467CykanoOzbRubPQIhAMAApSxSnSpBAZ3eSgUAIex4ssPyvC/tZiAzyZYU1au9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIAMVCRA9TVsSAnZWagAAcrUQAIc6CwF3XqM569bFEGLG\nJIqvK4smvTw81LvKaNjmgyKwP+Z61Z+5uZRq5a0iY1LmdHOqU932Ej5HdSmA\nFI7Uv7hlay9lQDTJsk7vnhiE/wGWteV1bAr7zQzER//wER9GtP08gimYXuUy\nWxjoHmrWLQEo+pSv0qOkBJyiuaCB6fV6RzDFRk/i+We4VqrCNIHPBXAONRq3\nJiyIxkMd9b2Y0RydNh6Sw4pPSw3iTdGdrO8bj8vhp/Ez8EY6FMmqZeP+9ET1\nQ4Tw1HyOyciCkV1NZPIYluv/wK8sl608+IzriwP0rSPpGiMqfJyVGR6DJSYs\nRNvOD4oas6Ojb5Z7tflBJu1KKzsJV4SC1D2worJnGoEUKwyPEdvFf7Hm7eoT\nDXL/LpGBPIh3MMZZtO+KB5t3H4P/akwxju6RiEEhmpDChjQakhsmx+NqHqYt\n1BpOgtjz0OU0Rsq+GNuT0NeFj7CHbG0xyIylAExU9ClV5Nfd36EI0Wbo27Xc\nloV+ImRTSUZtIRpYXPPiEIKF8BDrcBwFbbK0Xi3EHTDBPyGLVV423/NrvsXl\nLAbzFSGZSr/c6aW6RCkcnwpqfLDvoFljWZRW9ktLzq7dA7MXrNqYy8VU+BM4\nhtUJA1dDnPhwROUm0tZc3b0gcQGE7VMFeEjcJdc4nW8VW1nCeUUk0f+Qbi2I\ncfzb\r\n=nJNg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e400b9052366c6e1d6e27533a72ad00199b6313e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e1e69fd8e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e1e69fd8e.0_1629487893086_0.25928305180792033","host":"s3://npm-registry-packages"}},"13.0.0-canary.f5afc16df.0":{"name":"@material/auto-init","version":"13.0.0-canary.f5afc16df.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.f5afc16df.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9be9e35cbcc5eae26300af9ee33da7545df7fc7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.f5afc16df.0.tgz","fileCount":13,"integrity":"sha512-15C7kOvd5h8QmczeZX33QUqSvPXkVmrEYHUHikbfZq3q6EHVmD6H3k37S8ohK2HJW1OI9PwYGxbxKRz83WwBvA==","signatures":[{"sig":"MEUCIHYC/zE0VL+/bMWsg/qIE3c6uoqINpErt2lXDWQ6sg/hAiEAtFm8Ib5v+5IsviL5TJSxoGcb1ZvTQk3599p//su7Pio=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIA/QCRA9TVsSAnZWagAA4pcQAKGYPmNXGE/uhHR26tb4\njw52Bv7fznhEjLdaZ1VIlC+wbro6BbTmsJfdLlw1NGcvmO1lrURuexrrRj/k\nwUNAKSK3u+j+IEw0CCA+0sss28KYCYFXxUDI+kO7Cd3VKvu16dmzRN+Y1SdM\npR+H1dZh0xgeq/de8z2auhwLdgSATkiWmE0RGXyG2LhdROORmmrrKZZjGffT\nBgx46Sqvcmq8yqCO0OWGBNXztSpmsRemeE3f6enB+6CiOB38MjR9xXl1h+Cg\nEZSBaKLK5bZ6f6j3Ifp5SxWZa2OLlBfPqtHseKVNmHB57UeJmRnqsqXyBViN\n19Wf8R/aFg2oTXCmuFAxR38qq9nTWfXpT9rp9/oCNrLZlZb32XITsLkaNJCa\nWjq7AGyUVFin7hKItfl+OXqbSffJMQBTROND68LB5lYuqwbSr1H/GhSmKFbP\nRdZShPLq6bps3QHptFubmw4sJ/42xNjyJ0dOvfHC+OQua7r3EOmtVitthKK9\nNlUNR8QLhiX/B1qf3tB4OYnL5SVSURl+uoUyaSI53JuQnOCipZo4xX/Ubtrc\nnFWSA6WUrPNR1LcY3flKvkAxIcJYm9FcEPSJzL78Jz4HSBqanbvlm0OB4j2a\n+qEZjs4q8lQPNJRM5jIoB48Wof01ruQUt61Jae6LcCaLf9MSAsylKO3b4RXf\nR5Ep\r\n=Tnc0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9a5934ef5d223f46f61452bee68b0b45a21e20d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.f5afc16df.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.f5afc16df.0_1629491152028_0.4176938905374694","host":"s3://npm-registry-packages"}},"13.0.0-canary.28d0d75bb.0":{"name":"@material/auto-init","version":"13.0.0-canary.28d0d75bb.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.28d0d75bb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fdffa2783c2cef3287d0cb3a7bc5c50bb05aa4b2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.28d0d75bb.0.tgz","fileCount":13,"integrity":"sha512-R/jK6x8a+vmlYx6P1ljjcV9QX9CMQDhLx78lXUKNXfHpbKSkPZNdCW+ekz+iEHVZ07GAE2A/Cb8ue2PsiwAzSg==","signatures":[{"sig":"MEQCIG+WAsGsbF95B/ztBKltxiwFWOKxIoaYSU2fdHW5HefpAiBGc395WacAIHmKNKL6liXK5UQ66mg1AM46b3fHVgkSDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhICp6CRA9TVsSAnZWagAAsxwQAIetU0jZjhDF92xvjYwo\nktxwNa33jxZ40XXsd0X7f+sL4HBFjJAi9shdDO9lK0ox94E6/+Wt1PL035I3\n3HrbBAZy7JPrLwd6IEB/nacdP0nWNUtKSfN3N2zKIEBL8ajh/VFhBZ/Phs0s\nXeqFpMLUhw+F8n6jrnoeFb488Nw4SheMFqoNSSjcJs0cDfClPDm19zl6kt+l\nIB+YkIJBkgUC+0g6BCeIDvsFUc1hsUnsgQaqvSYnRc5PkRTZhBmWhX1L+5vk\nP3xr+eD0IQh0EJDdrO2EwJUqKtj+A8u3B0KticPdtAMvCjwy7YXIwwAtNA7U\nG4cX40gL40jXaz54mUx3M/x4ZjDoLTxq+C+ycLcOedzuuTT9qIaMgHxufi/J\n01Rb0cJ4F4jxok+W1n1ScFpqXqbMey/7GJStUltKDQ9iV7+VEYaFmEua2TNF\ncQAeeg90JsjsGFQUWacKvPFh7Z9j6KmTYHIvpCbysA7WAqB+3lJWlBuF+xEu\n9WUGqsM1/MCei8FvIT16nxGTTFj7hf6qm6zRx5l83AyIp7f0XoVPH9ZELZlg\n9UyIuUn/+R7UdpMIpgaBv3olNWYwbijOAVUKK9pwmWUOYPmhM42FsfvYQEeY\n3/lLuBLijD570rx72AAbfmSkoJEtf/SML0cupwlvKKhL/eBoP8lXwA1UesNs\n+8HR\r\n=JlO7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4becb1aca9e878d432cf8308ec0f14cc50e9699b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.28d0d75bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.28d0d75bb.0_1629497978323_0.03136926082701752","host":"s3://npm-registry-packages"}},"13.0.0-canary.21ece5360.0":{"name":"@material/auto-init","version":"13.0.0-canary.21ece5360.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.21ece5360.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7967881133801bd0925142fddfae1d07e0bfbcd9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.21ece5360.0.tgz","fileCount":13,"integrity":"sha512-FYOPTt+Z/yqujBiLdqGGzWrFhXF0w/g0v/YGMgBJGs2iNO0BLsfZiiHZXsbDu9Kxw0N8GsyCx0jPk992JXRqRw==","signatures":[{"sig":"MEUCIQCPq+1577H3ucpfHprvpnkBtYw3kUYWWDWKfNrVavxIBQIgcy9zjOwc5X1A3+/P4tzyS/V73PeIVKQO0Rt/W2EnkoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhID4gCRA9TVsSAnZWagAAKp4QAKRzTc/xPDzLB9ocx0Oi\nScNu8zsY00nWCoEbsNrxzRBSwkgjyOX2hPksTZLqZJFdVCScnwzRbRMcgigp\nSydFVag40W9CPpNgx9xtjYl8WiLGBKKwCo+ppO21iM5FkCgE7jdROb1SYzV9\nliYqjBC/i4NIXx/a9jYecqjeF/uUELmY7TCJDECoVJWIwISf5p7jMsIda8+o\nPfX2CREA0lf6EondUlBGqPOG4T2MNS3nC8l5oeFHRRxxjuEUNePnk/l5Z2FC\npuyYA7DR28fvGszCbIDYkn75zkwy8qDpdVPfZZ0FMeIjINyx+RNaqMjzVOyX\nOuQ3qeSFjVNTSCC6NeyXVj/rXodsHcsOeYHEjwmM2+kR89MGfaAhJHi65AaX\npDJNfmZXOP17GcqTnbGCA26o83NZ9wo2NgyhvLyMZZ1yoz0WZX+KeLtWudl/\nCepGUd9Iu3m9YBbr3SvAb53mqJU3jwdw+xTks58MF3aMqmro4T3ZVaW/Qip5\n4LBnZFOiNomTQ+qX34na68/VXjey74CuU9RxnEGTgJk27sK4IvFUDFI8FMgj\n0mBro87txIJ5lK9xPxoLh4SLMmdgdtVUYskVnbHvaDJKyDwHZndUa+qRzBZm\nbMUXJt7EsGohsu96o4UBV1FwTqxlDkqlzvQJEETuNIgkFhSsiwKF3Gnlab+y\ngpdY\r\n=Jzk+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9625caffe59fe4a84aea358993c2811ffcf33e74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.21ece5360.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.21ece5360.0_1629503008546_0.43210581528688063","host":"s3://npm-registry-packages"}},"13.0.0-canary.8de07c02a.0":{"name":"@material/auto-init","version":"13.0.0-canary.8de07c02a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.8de07c02a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7fcbf25a40e0b5ed04da0a47f565d5ce32d90ce0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.8de07c02a.0.tgz","fileCount":13,"integrity":"sha512-ziVyL+JhQ6WViyOvPsft2FKw3fy3WJNAuym3jgaaU8FOYoXzblZ/f49DTDMjQTzgdKUGdBJF+5Nr1sG3Rf2oDQ==","signatures":[{"sig":"MEYCIQCbn8Rj5GhU1Li1WG/PR7+sNqAdoTmjig5JmBTDYGAAKgIhAKZoDZbLjfn/yf2BDk4jfjgp5syT9xQRdnFOA93cxlnr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI73/CRA9TVsSAnZWagAAMlAQAIiH0i6Ic2lSXHHU+FQo\nGBGS1ynpDcmJ4E1wvOzif5S6zVgk4D+9buEjoSr0/jiupS9j9urKb1sa6sWs\nApdGB997DGTUjcWgU1DPuBouIu5WUEn7CAvUH+t7XlJuVBH/dwWop+nJNedU\n7OxhfUo4yX/CcNWMgG4XruKeXaPvKcEKhm+MJfi4JEkumGIJjwMbulnShP3Q\n8EUK+UtXSacDvFZzeYl7nLvLr961ihCZe2NxZTsSvZCTZWhvSDccI8W7yqwK\nF+spYylUkPsYV3LpSB2pwGWnAfWVPTGQqQviqRBQ4LFt6CDNktIcRpcnVXDd\ns374njGZZinYE3U7badpc2KNVfEZ/5D7sMjOl53fwC95VysPvmZmar+/TaT4\nl7qPcVeZimZRVX/QSiETbPtO0VV7fSlK9whL/POmxU5x3yKbdPLyuhYrv4WP\nj7TRQVBj1+uZSI1Lq12KjW2MPmHHEpShiF7TKWMGOKM1JLnibEROQ4BmIvFG\nnETeLLEEuEysNQvUyILEFCRPKfo45DL1FRgE/Q9WGKE/xAY7Ee/gAt+qAfm6\nnFbLKg39YouitiZGMcYkZAuWCn5y8HGP/vlQOzdlvRjdro4Qg7VxvZl8pMSM\nx6IDoorr3HBcCPPd1WYdLGWcz+jfPqomq5ROBv0wzOu23KuI13hNrmQoFfBS\nMcuc\r\n=bTQo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e55081eb44f85de06afceb7c0d189f0d358ad60c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.8de07c02a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.8de07c02a.0_1629732351451_0.49375294884124066","host":"s3://npm-registry-packages"}},"13.0.0-canary.65aa63b0c.0":{"name":"@material/auto-init","version":"13.0.0-canary.65aa63b0c.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.65aa63b0c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c8ca1b499cc3a6c415acc0ebf440d3d1cfedbe78","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.65aa63b0c.0.tgz","fileCount":13,"integrity":"sha512-uN7Xqf1Puv4TDa7gnxsOGcjH8ZhPZ/R9qzORMOYmqJc+BJ/lqNEq6C3/4IwrpRzKCN7lKkz5xOVvuUbKV9MsTg==","signatures":[{"sig":"MEYCIQC99+GLcc5XPu1DxHNI8rqC8kBYuUlDFcOCjxy69P8tCQIhAKJ8dK15dArEqTTaOiKqfghnR6EIDTagpd2loA1pzm4F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJQ/tCRA9TVsSAnZWagAAQXUP/1CoAUNcjFpgBUX4KPu2\nx9VsINA27LiWhe9DBmeuv9AqYvnNDZ0sgFwrqMKsJJThU5E9P+LY8obg5LKg\n7klzr/+xFR18mw3BG3dlRsNoRLgh0L7uS3lfRSjnVLJ6rLaW/Z64vXN6zEMH\n6Sh4FHWbjDsVkNgUJWrCGP8K6Z7XZXkSGhQof7whuSxFxvCIGRYv/Z1lC3L4\nUhpRcPpzxGx8hnLMrHIUzw+Kt1CQgXZPqPI0pmPxp/uG9kVM80yOlKVO8/K3\nIt4cox1khDYpESuUYs5VQMcfNKWLv30sRNJeSHoZlSEnh0QB+1hhj/0kiU+r\nPBt8S0SejT/X8s0TFSQnj5im0cYGbboIXkmigUwX+Ns5mofPpwJjkf6PvdPM\niB3T06gR+AEHAAV1tKXKUgsjyG/Av8MOV7QmOPflLQceS80eIBvqs2HUNiGY\n5NQgmn0guI2LRxvDET5eFOEJ4bh+Mvg2elKS5GnQUE5zFnnLp16bXeF/q+DC\nHbMwprkJ0s9xtpjjd5KQRtqbd+lOZdKySTdew3PdOKXwudRRI7CIWvDjPjPJ\nZn3Ke39ZD5fe2SSKR+Sz6/b6cCnUvbUpvAzPRknORiF8iHguT8b0iMUYfCP0\nRMHF37KAiCQTXGpjYY+zZvOSDrvRq+dh6qETzFxuzg+/dBEnJrDHzaY9rgqy\njs08\r\n=E/eJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ac2dcf03064da43ca7eb352045fd4da0af02200","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.65aa63b0c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.65aa63b0c.0_1629818861136_0.6740268052674163","host":"s3://npm-registry-packages"}},"13.0.0-canary.15981e9d9.0":{"name":"@material/auto-init","version":"13.0.0-canary.15981e9d9.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.15981e9d9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5fae3e45f76abcb375add889189c71c44fdfd3ee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.15981e9d9.0.tgz","fileCount":13,"integrity":"sha512-TQsX7rMCwWPInGMiOXDDGWt48PycXXLiYEuVsMD5+bB49rv9Jj8zd9ED85nd6VmHR7O+PrmRGRLgfCY3yUzQpw==","signatures":[{"sig":"MEYCIQDmj+UonRekBrWRBnCStLhMdwqTsbINB6DyQHnvqVrcHAIhAJU/3Vh91AkvZEy/AqIhxh+SjPXxtpzpannuVwM7Vcyt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJRtTCRA9TVsSAnZWagAAPRUP/RyiTdZyHPxiHoBZsH2b\ncfq516HYavf4gjAdPCEybLfWm7qBtpjFug6VltsGxZUPvO9kk/ZQpYsslkaG\ne1JhvIS8GBN9acHXKJUSNbceR/zZgpEZsJGeF+m44x/DEfrNSt3KTHwnmoaF\nlmdTpffF7Pu9QxlJePfUxu9YBuHw9OQIELd6io9UfT3/90AfLBkbIkp7qk15\nLW7VWJNWQFKMkDMIkR0UU2OWhTmYNBviL6mCA0t2/LK4lRbvgyh2lzniVsho\n4lOnmbbTnXgiEENvA1rRYQcvgwJOALXQookokDz5nZVF/JhRI5xQZ4ckDL2/\nfv8vb0J0jI89uZ7BI/t6a5lScS5e3eqzoQEGQ5IIzHMCnBqfQik3h6jNJikL\n1uVz/tj8X3A4fkKVmw1ojOyjggXXubDuSA+aw8WEjNkyl0TQ1gZViByajmCK\nB52zBH1bb+K8K8QJ0X93lDPN2S5JQnylKie3EO/WE1QNKPlXjmvGWEod9JEf\nq8bN+H1rK3QlatgszX8eUIMmKkpnk/i0C/haaXlCS7X+V15c7PE1bqADLC6m\ndAOBw9vuG+trAJwBR90W/Le9nSxnCd2AFhiPCwYu4+yVlJBntXitgUcO1YLF\nLTbUJAmVyOPnNlw8g/lPcR2l+fz9mh0WkPHkeRpOeBaWvhNdE0aUoGJ6jauG\naHBd\r\n=latv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"93acc5a9963b30cedb03f35eefb49cd35c93656b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.15981e9d9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.15981e9d9.0_1629821779151_0.8008372989575856","host":"s3://npm-registry-packages"}},"13.0.0-canary.fa7520f62.0":{"name":"@material/auto-init","version":"13.0.0-canary.fa7520f62.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.fa7520f62.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"19c6531ca3fdf223b5fbc435d0e086743911751a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.fa7520f62.0.tgz","fileCount":13,"integrity":"sha512-vz5X2d0ZSPWWDoSXl9t2jTAl9Y0oXITeruxR+CoOIWywPiOdbCEhOr3olnSDJeArPiNyCzl2xbpCdtzmIpvtJA==","signatures":[{"sig":"MEQCIH2q8EOi/l03/9AvuQfj6sqHPZ8YESfy387zh19utnzXAiAgja9ZYJ6b7J3Gq31uc20T0KP3iPyww2dtN+gDBtQ87w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJXI8CRA9TVsSAnZWagAApWAQAIpn/IIK3u6XeFR4UJ51\njEs0rHQ+XlLgudoELq3ID7Vvikw0eQpCe4lyISzR7HYXTalcxIgvVn+2h2Z9\njWhI6VUJSV5Fuba78vB+Pka+rwI1GIqFa3GoJ2Kd12/tjloxGK6yIfagsN2J\nMqfnY7Cll0iUNC4w6reyqntfOO7S2BdpharS0hY4QGsu1LILn3BQYkvtoKam\nctFNbPMZ7H9m4Unh78roSf32+II+DSLZjsIZ/BgI0g2T4K3prWVu3gmvNt/Q\n1pCc9cBwGHXFNIO8CZjw5SWJZfOeqwmS1VrNnILC42+TIxa3qfoFrSBxO860\n/p9j4yHJySwE7O2oLBpKjnhr7o4CZOjquIwdHGAgtpc0fPV/9S6PaFfR3tl0\nmAcs9XZPA52Y59o9HlFcQqvRwXiJpBWbf2cdw6THGvhdvK+Gbknhm0x6t0iS\nPJNQ/t5QWKXukmib2PrkVybYneBpTmBArfp3LW5Di+K2WaOogod5mSyZnxVn\nD5FBo2scBbkZGTBKfrkIZY945ft+eEfG3QmVEtqCZqoMY8kecJYcQQdy/CM9\njSX0J680DlNfIGFtbn/QaatQQp5ChVGROxK+C8fmC4imEChQeqpCkqXQoZWm\ndbwxa6pDm/+W7dCXDeCv3VP92Fjl4fGx46FELSKTYAlYlVTOq8SQnvt2ukcI\nuNEQ\r\n=11bx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ded8a7ce355618969092a7bffde0da813aeec162","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.fa7520f62.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.fa7520f62.0_1629844028656_0.1936248726502583","host":"s3://npm-registry-packages"}},"13.0.0-canary.ce25bc3ec.0":{"name":"@material/auto-init","version":"13.0.0-canary.ce25bc3ec.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.ce25bc3ec.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"87b429102e2b923b9260bfeab664102de05fc257","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.ce25bc3ec.0.tgz","fileCount":13,"integrity":"sha512-1NGUg7YNURLMWROjU1ZH8zkrADQpg2I1GkmwhDUWuTedw8DY5GWIpeiBUGTsvf6oTB+rVIwmKkmR2sz8LhJrCw==","signatures":[{"sig":"MEUCIQD5gl00JfUmTXfVN5i7VU8yEDmf+tvbDkFDWoXRKkOu8QIgdNF96v9mgSXOj/MgEzwB++oQpPtzE07/ijT38gkYNys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJXcICRA9TVsSAnZWagAAZGYP/336npZCaJv4n0wASpQX\ncw47pVj8fZh/joJPQIfTB+i/LVMN7+DJEB2G6qIFo8pW5e8qW0410mXIM0CF\njXfgQRVd00aOhqYRNfllMAaOOZ9zmc3wpKJKovOPC3+YaQkw8LVsAxyjOXLl\nM3kH258chgnAEGoLBB8lGFeqqb/Pl737HTogXIlvi6NrLFTg8G8zhFNBS5Rd\nEyB2ofY47dm5SFY+xTZtpKVGc/zzOFU3tULmHuOLk7wDMUiJtPITIha1tZar\nZeVmraZ+mjjPxdmSfGohm4GQ4vKOo5CqqCcwhbr2xVuAEZAvMglmxlk9WuH5\noHZ6N0i9RBosytmZ1myGpzrjs8T/0jKLZrDZvWzWFCP751GzQpP1xcSbbHZI\nxjuBlP3y7+J0Viphr9B99hMrn+ursqxO2QDovBmAMv5tucOLkr+0ioCso8os\n8nNt3vpSN54j1wwLy5gGOViw6eHtaief8wdCigz5MlS2fJIrSfE4bPT2mSoS\nAIq1nL6TtpPttisYxhPwE/Fw/y5sXC0WPJEKthXDm1vvYgs8xhOClSTek2LC\nTvWoUzYE/KNOm4v7mTnLsSMrIxBDUkZEuokd1kv35AZ1J+138ZP91hzOYrn2\nSd5Oqx7b2Y0y09+lvflB8LUNLFzD7usoL4HkOUv0tDFJF671D0LUvZ5nO5HT\nGgCP\r\n=PrZ7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5296a1abf91023fbe0806f06b5b5fce528c40509","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.ce25bc3ec.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.ce25bc3ec.0_1629845256276_0.7176354342281679","host":"s3://npm-registry-packages"}},"13.0.0-canary.12f5622e1.0":{"name":"@material/auto-init","version":"13.0.0-canary.12f5622e1.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.12f5622e1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"697e7f8db60cd335130f64c6f058e43357aa30be","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.12f5622e1.0.tgz","fileCount":13,"integrity":"sha512-/eINBPf0/VrpA2JyEXzWetrE3LW6ls1r7TyidZ6QRXPObjlUqfUBHbIiwFpCC/oom4wpSpodxNo3mXXE366tNQ==","signatures":[{"sig":"MEYCIQD5zJ7CFgIF2HASYWa6IAScY8N3crbQp2ML9RAbKQJhRQIhALnySlvEZ+wW5A7CslYJH7V7XQQ90M8NwmHNvMyRsxWg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJX4DCRA9TVsSAnZWagAA31MQAJ4b3cLxvXtwq+ASjnn+\n7z6P94rssV7xAFkSYCnRZWPdBvTXz/MzffaeTnW2NsR8u4F/eqjKZw/pae2T\n05KwotygXcPSoj2Kbxc0ULmNd7rb11sj+zeQy39Sv7a09ubJzk7UEnJ543Mi\nyD6Gm2hx8fQ7C8gqPr6ngu3sz/H14Ly4/HEuQSfUP9NSZK9L0b4YhXVuBmmc\nQm1HSqqeUEJRuT8zzFNnvx3rAUrwLOMjzWzil+sXI3ReJ7ir2sNGjXS77iGr\nhoEe6qahEYB7ubAKk1brakTz6jMs6AhCorkCW025LKrKDIYtHOoMKaJS5giC\nPke4dW3wdF1tl9cfLzLwFCWpYPX5RkFdZ0X3BrCYLMwh32V3rDISBAgT6nEi\n7wkOcIS2otecu19SLoUhhJXFB2u4djvrx0J5BKxaWQl9Mh7Mv3w5/HpPILNl\nIq97ZbTvlvpUBC4S6WMh0nZHy9NuYa7DIdBE/wH8TAHo3B2VhNTBua/mCX0H\nc3RKMN/w+Vp2O88lpP5etZS2ilVfmGYo8iKIA8tidMRnplJ136DTI5v0SGVx\n8korpPyyMI8PkCeVJWpG4KVF7cMEwJLk9lYDPKR/ihxlQOr+N+EL/KmgSOWa\nHSBOT95xXHY9ygR77NzEdUEwpbVfUrl/+BGZCOblrk+xmhx4BJ0J2qLsb6fA\nDc/6\r\n=2UOW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2cfeb72e6002a5f3cf296794da5216b3114fbbc8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.12f5622e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.12f5622e1.0_1629847043214_0.4688902102701087","host":"s3://npm-registry-packages"}},"13.0.0-canary.d97f8f133.0":{"name":"@material/auto-init","version":"13.0.0-canary.d97f8f133.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d97f8f133.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"19b0125ae5b252c7133979d67657f0190834407f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d97f8f133.0.tgz","fileCount":13,"integrity":"sha512-veJqSxp88bS6N/KrDEmv5A5Pz+vmqDycD22PW8kptrAXGtz6cqbQ3UOawRCOs4bVP5qpwu6+WLqLr4DIuPrYmw==","signatures":[{"sig":"MEYCIQDhgLAxImg86aKqsx1O2+yVxyNbHv753pcyG5zYy1hvnQIhAI9elOYvuc1Xoefvh0ECSMPtDB2AJEuJBgnC/rtNAT0o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJoy8CRA9TVsSAnZWagAASXUQAKDf5h53rv/9QbR0U1vq\ncIwX2n87+CzqxT/STqcOl7qc9vwWYiTyW2SZdkzCgn0fRr8jUZ+j4+F9auBr\nTvS33vGo3EL4DpriEKHkQpxPjjlnG8yy0iT9Fw7C/arW8mfY7ozdT9G6BJ87\nkaCBNU/OMEt4RdSQzkrP19ZuhqMkN3zEsAlCAnbeoXHU+/OZ2yYtodzIKL2w\nqCkNidX9EJtCf1vMuod993pCe/QRjP7WucApjqmSKSZzlCMcYxCkTb0Ds8TX\n1t9o16Bx9Vk5Lo23589RxFe8g3T45lLtUi4IKX11iu/A/H9mQrv6NM1smhwp\nNEdKw/Z2Q54xLvnd8I7+7CH2XFkM5QvaD3gUA9mq/XyPiY1/o6TtIOSx2f0p\npo9r3e0zXGyyMJD1J/GKJPkymMBIXfjIacX7iNAmPujGDiqtrZEure512u1h\nkd38b0aPAvuEoBtjVXWZgohUa3kkhcN+bUECNL1gs4JIxIOfHgNjuAsPqlx9\nsOtRgANvEA6iN3Tq/KN4FFHBBeSSz1En2NCzXnrdfRY2EvYtK5go5HAPSlYJ\ngxZiP5q6VLJiB+BZ2Q7XLlEjy7IaC+KJiN+E4cut0uLl0BP4x+zDQj85T7We\njPQ4g0dEU1vLWI6i/w2/7C79aGnlNkWi0hM146Ak58+s0C7v4ZOgF4xisVjM\nMLNn\r\n=nnOa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e7295f4786bb26bbc05939b4d6e3e42f011cc033","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d97f8f133.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d97f8f133.0_1629916348519_0.09450711622093833","host":"s3://npm-registry-packages"}},"13.0.0-canary.d86fb6fac.0":{"name":"@material/auto-init","version":"13.0.0-canary.d86fb6fac.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d86fb6fac.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b393329b6bce07e5647c318047257a98f74d5d10","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d86fb6fac.0.tgz","fileCount":13,"integrity":"sha512-j6aSRaAIxpYtmbZsaZRkuhsmSxhnzyDFKdANMGafOzeYENvxaqwiT9CuwsTsdVY6snRTOWrC+qKfwyhJ3zEj5w==","signatures":[{"sig":"MEQCICCZo591ODbcagIJtN2U3XoUF4YrbtYdGtZLer2sbVgsAiAhiy4msHEj7Fy6pNw1w/NwL/2GtJcnh07z6RBTblFzsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJpGRCRA9TVsSAnZWagAABjQP/j2yYIi2WUNGssweQKBz\nhTKz+arqRXVx5tmJ+FGxl39BOLTOM4Fe86k047GWT0p82vcV1EN27AZ39VRN\nE87BKleyjgsZ4Cehh6Vabw6Ac5IdkVBq6JVlHR4SE0oijJiB8ZFO5vKYHf5T\nf9p6/q3F+NkkisY/VpNwHUaIY87RJNFFSpNrtUq/iVlwWF0HnDsdPokfLvp8\n42980lFL8PUgyoEt5z3X4CEhmlQKOEDoSCRJl3pnkV1lF1UtO72mTGc6JSOw\nSIhdDiI+xjV4BV/9C/Ak2mZbJdD4qcMk/t0r0jlZnCn1cHrrBipf3C6cY3nE\n0hBENmItNGy1CA+h1DxISBm1S+gR9W65MhWZOPbkmcosenWErpr+a3/2QCEH\nD539elJKmokx0NvEB1rSnCUoBpe46lT5l5lndZSL07a+cKNxvJdr5ytg+2Ma\nASqbygSboybfN7vmw2XNqdexk6etpzUPIr//UMpSI+y3u4UssCGmhK2dWizg\na6jGXc8k7MdkzVny+NsJgerL6c8SL4qvFKMZvUNJ+U4chhK0mWByOeDLXlTj\nWy9qVC4DWk06bKyWADGoDJ2mp/AOh4mJYiPHQarojGc+kQ5WqZ9fSqYunOyF\nfFZNYjEHC1R9JbkZU0uWLzJm0B+37HAnlOOoa9RwLgbc+jbFIirVZ3Yxe1Bo\n5mT6\r\n=evWE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35d13d1a20fe14c295e8589fe5960bc9b4da1925","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d86fb6fac.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d86fb6fac.0_1629917585676_0.6101963593012691","host":"s3://npm-registry-packages"}},"13.0.0-canary.e8554dbbf.0":{"name":"@material/auto-init","version":"13.0.0-canary.e8554dbbf.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e8554dbbf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"65776b01c4ad2ba0192577055fcabc24220ac986","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e8554dbbf.0.tgz","fileCount":13,"integrity":"sha512-lkoofYfQuIyiy3J4szldrbLw7F0A5p/I54vQVadrmejieCnvIP4fgQYxgjrnMmhH8+E2cinLwWsQhcShjIuJGA==","signatures":[{"sig":"MEQCIFHgKDKEevgv3s/5EHDrWclnJmUyF0dBDGPDy5dgTXORAiAq9ldGHN/HXTMgJEnQ3B8YP9/fIaLYijn4/zN70W8gaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJr0MCRA9TVsSAnZWagAAiaYP/jwt6FAzhu6bR6fPiLrn\nBaE2hVjjYIoeJengIf1v+l1WiqIUUHlnfZpZHcdheOLdn+BKFIQWnGf3+ARz\n+MJP0dUN3oRXzR8xevXQaJtOaZ8H+cTtgVNF6uYi0/Cp4Qboagh1yOIwsim8\nzJ4rEhl63nGxMNWNFpdmCsw5MgscmjJDSDcgOEKQxm19+53ZNtcwHWeepdij\nzrjOAgcNqx7YQbFAzhPcrnXryVtEm+Ech1wmmFHfcsWbku6oAf3+KHxe2mLj\nfzp2U550SdlZNTVMJgtZXAD4v8TAPrnpj20BFJLzIb0ycMxIoIglDyabv22G\n0uGYzvefSER/L77q5/vxZ5zQW5ckAW9bKfLAO2UIH7hG4e8dfGfYsWVgZSzg\nldiTBLDfR+t3emWBpntgjsG80oV08TOw9ks5RancwwtU/m9gFUqUhMdeuSQb\nd1+eas3jBpk5FFskP7V3dyqbcC8vzrQmZ87QYO9jQwlxdDvMheU/iztJXJBh\noyznS9IDqsucEDpXnCo/aafHgoNiMd0twaws2KJFj44oGKl1dzL03+shIbJq\n88HzX71XLMKZAKfQkArKnRLIOxgy0CKkxJRqdIzMmp3o8wwooQ9dLyprfW7y\npPZygLWa3uj9mjO2TLoQZNvprXNRBBD7PpsUd9SH7gegiqWH6DEyFrKtPuCl\nwVvT\r\n=THcv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"da636a8d32198c6289df3bcef39340bf76cf8265","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e8554dbbf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e8554dbbf.0_1629928716036_0.8118468287516891","host":"s3://npm-registry-packages"}},"13.0.0-canary.877e3fb0d.0":{"name":"@material/auto-init","version":"13.0.0-canary.877e3fb0d.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.877e3fb0d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50ad36b1b728a8ff2c5cedde8a47c9deb885752f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.877e3fb0d.0.tgz","fileCount":13,"integrity":"sha512-qRhy0hrXKoTDk5l5R765tnlfpIkWwLfn4MOcTfiIwmQkAxJbo2RPgMWSZt3I7FbN3sPAXYhAC+F0mX52alCMwg==","signatures":[{"sig":"MEYCIQCp1WwTQfOhWY50okXzaelYlAC/XneX4N3M55RgIipNiAIhAI2RxNpErbOqHU33EubqnXjVcJ11ZmPdrLfs76VpphIP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ7UrCRA9TVsSAnZWagAAWvcQAIBn1NaE0MBDRQ8EhseE\nRx1c9iHxmBlAhLVwNvDO5/n8BIBsaTRcRR6gkOgyfva3T8g2Ri7LUVmC3w3J\nlJXJ7AEGYg+lI40/0Qg76/zGprTCdocLiFyNwVlKMBJL6rsjcauth/xQ577u\n8mKsHOd5RZFhbDxS7WopbwQV2M0AkE3bVKbhJsI2XCrNl9Kiq+r90yr2K39F\nScpYHO4toG8wjamOdlCjbxT8Hy18v9UWwdmGSVd5bfMaf3DIXVexhsz4HRYc\nwLv9VTRRZ7Xtf37Iy2td5okCKuGW3tPfI9tz3sv5UhDcHm+BjcZDcFtgs7At\n7seJQEcmQxf4vCmcufbexjhyzm6OoB0RdobKka80W/y7SnlWYzhR8bxmmnKg\nmV7us6CLTLEdvIRtUDEtyKNsYlFM2Ch5uQiA/By+8WsvOwjtMVsvr5nrVWbt\n3firPWX7cxfmwQolpqBGWTOxakQscN0UpLmyF18c78g1JmYPSC0aa+ngh1cz\n3NhnraE/pA4Rmua5zlN90ubrwVYz2+TQMYGiTI2tg3L9KzWpuxGw7jFoVGGt\nPtQ+5P8ul5JHNnoOHkknuswFIrXcrpyR8ucQWVmBLw07hqNoAfYaiMZmOu4R\nJldXgftTGsCc9Q0Wt3a/hF0gGjqPIH6gV7ZS/StEPl0CbMQ5P+GOCXhlKV15\nf+yB\r\n=Lw1a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"849a956f7ad3e0da0840469b917eb66537c875ff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.877e3fb0d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.877e3fb0d.0_1629992235409_0.22251693261611138","host":"s3://npm-registry-packages"}},"13.0.0-canary.6236f3576.0":{"name":"@material/auto-init","version":"13.0.0-canary.6236f3576.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.6236f3576.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b25bb46dc4baa82f839d36b799f8cbfdeffe4e0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.6236f3576.0.tgz","fileCount":13,"integrity":"sha512-toJTNW7EDwxulW23J9ZrLyX93V+Q8M7xu0ump39QTA0g7SI5xynwT3xsUoWSJfLEtrBKNQAEV1MB5EN3QRQMtA==","signatures":[{"sig":"MEUCIQDeG2YGeeelU9OVzTFAI+CKrz9W7HlRYgDSUbwOVI8nKgIgGjKKgZBFKs/exI1ly0Hy/1QCFThBZxD40Ai5cA/ipUQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ7upCRA9TVsSAnZWagAAHt8P/3V5gsTBGS0Mugs7Ttwm\nLlqEhWsj2I+wa/w96iFYLvBXpN+HFOfNh/CVQZVQcMQ+bnIwZUj2NN5ZZc3S\n6tvnIo8W9tMTeMiRHvc1M998mIi19b1SoFAzpRt0RVIbB4CmcHsuPUK9ppst\nIf12O43VFci/IHCc6bIDSTmC3pLylTW9wBH1loD6cj6BQpmxcwe2oxDQSYvt\ndIHL+LzYCDc6H3+vqnsPvmg5wqEVpcFFHWFzevGYTPXTufc9s/VlloTwFcvy\nelIF1YsqgHa3gL8R7leQxwnswHUYcHptg22ugZuYYKeASwIb09QGcp1SC2iw\nuePz/X1gWFjDy2qyfUXVHXIRtOwUWc0gRmB8o2q79qG4ykzBgwrVOIoaXdOc\nZZAxB9FwzFN5FqYBhIutF/UIvMmF+w3cxXnLwGhpbFnK2IRw0l/cCaRUqmVk\nMQguKVlSn4WbNXPhiXwSHk418lPcRIfabHLn6es6N5cV7f1+7MAUyPQAawt6\nFfFoJ2yHVw6e+g1eqHVSPAQWcnK/59vl7Qcz8oYkRRInqfXpb/nmaY2uFdsT\nAzrwNPmlv1AQfRLaoAgaFbUWIuv77bKb16D5FiTjV0jAWQAtCmhNUX6XwM3F\nH5t3X4jDZmHJS2b8IgqEBs0ikwa6RjbjTtgZdbvZvIeYYYZu1457UtB614xO\n2DSF\r\n=w4Ph\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"27220fe16ebbbdcba193340cb99388e30976a2d7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.6236f3576.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.6236f3576.0_1629993897514_0.5648043264249216","host":"s3://npm-registry-packages"}},"13.0.0-canary.1d19158a1.0":{"name":"@material/auto-init","version":"13.0.0-canary.1d19158a1.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.1d19158a1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"816af68e1a8a0101e183a25faa91b697aec823ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.1d19158a1.0.tgz","fileCount":13,"integrity":"sha512-ru3WpEWPL6fzQrCkwNqPURUR+HJOsw7ho4r3CacY3+YBxDJMD56418EBVOhDAby4DRN3B34Vl7rDQ+clFO7l2g==","signatures":[{"sig":"MEQCIEsl000n8BMYoO3LLdmhbwnM5myvyB6bhtLhRQ1dzp4jAiBOlc2j9tD8ucUOAxpwuokgolW4yFpED28aU6lTBxTJkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ8p5CRA9TVsSAnZWagAA8JgQAJf0fpGdR4/Eevv7XbRz\nSQAz3XD5mDbNeOnMB3iZ9KRYI6aiPGG/8+hKQDbCF3T1l6Wwzj7DTNUd0uii\nwaSXAFbyjBpZS+YX11+l9t2LFpZ4BjPnmP2AZ81LMIrNIZyivNgJuUkC2xcV\nfLdxhlSt/UZj5+nE5bvv5oBVW8i4l/ILaL4HFsOE5l8dSbArwavbtCseuTMq\ngN+7/pEmcUsMnL25qawHPImWPVdENzQVhPS4JRKnC20fJOQs5D2thMzgCbbf\nvQs4eOVfify9bMUlfTzDqXIQJaiU/fsgfjMK7KL2TjiLqbJzSNb6Q+m37XmQ\nsPwx7fLddogsUnN5c+xKHwpmKopFiL/ffzo0DPHo2akd5hNdA29D35pNKs1a\nS7TNnD0o79cM8hiM3PiKnPRIthwlb5ib6ANWbtUFD/XuoPpaFANRUoyqWuPV\ng/9+k62IN4Ia14TLtWaYjFOc0TQClVMvF7/7wLN8TCmgUlRomWczIX4GhY7I\nmpj6L+pG1wwKSahtp3Vbqorx9SQfLcw4nQ4wZ+IKgobZc+xZ3O/UdzZW9+zu\nX8X/xh7mH/FsHJANp7nhlf6+dZk6adED2fXhego7cp9+/ouvPVP6OfNbceZQ\nNrkglGM1UEu7nIXopWtybQt6tM2Hyx/a3hn86uk4MG11IclGUI6YtyFCAReV\nGZpq\r\n=jEKv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"451d11fe02e89db73e3ac79cab01741c3da63ab6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.1d19158a1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.1d19158a1.0_1629997689544_0.6625655602982685","host":"s3://npm-registry-packages"}},"13.0.0-canary.6adc9e83f.0":{"name":"@material/auto-init","version":"13.0.0-canary.6adc9e83f.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.6adc9e83f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c382dc87d569cdaf0e4d789fb3584dc1340249d4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.6adc9e83f.0.tgz","fileCount":13,"integrity":"sha512-TlK09B/W+Hu2MzvYDTmVuFQ8xRiytGFuwAA1ls1TvYvd8aEXFgaVI/t7vweGwvWG4tYi2d/0uqc5gNBXdzO7Zw==","signatures":[{"sig":"MEUCIQCM4+JnO00G3ukffONNLJ1bQENzhkd+BjO18DuN0jxKnwIgNtaK25EGAAVcNfx09LoKALl+bPuCkEDiIcBkoghfmW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLV8WCRA9TVsSAnZWagAAc9IP/Rw4aZdnuUlHgYhl24R1\njHiJ21Cl6AGjsxYW55gk9CEocb4L+W0e0kbiYZzqau3TDW5n6mZgtThPY+l5\nycyXv4DNsqFKzk+Qd9V44N44Ap16G8ymfQF2PehP8wvHP4uoV1bwkYkAt+iA\nmQoKAeOyYQv3/LmTD6qCIjxeRH6DxMsygDrdWsRbkWwrBCA6gkYWX6mM3cpL\nSWRmAhkvUHApWI9po+hEWWEyPZUCeUe+td/Nl4XpYH0ZAXTqcelXZIPUZK42\niGM45g72+/erxcdDHOsspY1OaG08OjnJT9usp8MLu546aWO/Yb5aq/tHBeag\nyPj7evGFtNYssOhGGlq6l1/VXMT0rVMCeyVSpfIspJHbxN+woEnfAci3RHV4\nj/OsqFKJ8F2zvr4hpUCSo+hh+ckpoKAXpRWhjKaBue1+4fAuTkmr5Ogtqgbx\nZACe0lvVBLpRzUybZ7ozRh4HHDzvlY3m9jPEa3be8L0xrJbhZv+0u0/jWl1M\nYmewLW/TMRrb8QW3qXhOG4dV/zRBNQU/3tcck7PrYk2TBD91I+RrRwUwe7Jg\nzZKppSXwMUB/bixSAkWjLE9WS+tsgm8fX7Dc7xik1rDZVUTtp7jHRWcEgGa7\n8VbsF65ScDMdEYlMeoSnNZvO6M4DXlbqLZBYAypyZKRvwf3WHEe5u7nzS4ol\n2lJD\r\n=cz9s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d3d9f017c96584c46d77544b9f0dcb6e22eeeede","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.6adc9e83f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.6adc9e83f.0_1630363414108_0.6929575144109441","host":"s3://npm-registry-packages"}},"13.0.0-canary.d082790f0.0":{"name":"@material/auto-init","version":"13.0.0-canary.d082790f0.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d082790f0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"32a808cfb7ca73a63c7b55865da06aa3eb4d2c09","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d082790f0.0.tgz","fileCount":13,"integrity":"sha512-+BWPFKZOdxBlt/ddWbAJMLSqDjVHEHKZKUhlC/fDuXTamsN6YWnX2Dym3hiJkyLWd4nO8rUMU0ApH66kKW9npQ==","signatures":[{"sig":"MEUCIQD/iw+zTx5Zw/RVb7cVR+yj/L7WNOGZnma3oXHT5nQZZAIgY/LCsUJ4nkfRPc6IR5FtMxeyNIf//rprjEINzYrlgDA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL/ZeCRA9TVsSAnZWagAA/ksP/0w8CzbpUAdSeCo/Hvf8\nQ+D3SXZozbnrZ5R/AK649o7vz1MERO/gvJYCR6k/E7x0QmGK0qpnmBq4B3NY\nRoq9AYAGCZ+9tbm7OxRcLMZUKDPVVAQUZ+XK01FldE7M15hxEQtvDPBOstVG\nbazhvOd5C4yNQ32JBg6BJkOJKHzYxEjzAOS1t5rlmVgmzcEJCxEScBcag07y\nkCPi+RyeX36sMmPJbPlP0fWIByBJyQX705znkEded/Qn6loazj2Ba5OrjdNF\nJgmJXSIzYDbN6X447axcZpPEKlnSVQEsHyx0sZw2P4OpB3dulUOg0sTJjcy8\n+yBd5IrDLa5KNgWyi5A4A2HqEPqDAhdxkRV6KYgC6gTWj3xISD2gv24ESRvc\nlLLwfDgpRx9z6xFlBSZ6ilnPP0Zkc85B799aP4ZplJix5/riFuBQTHgY09ZK\nMStcLnGC1tcaHOHbkra6RgSBC9UZ8MWcfpE/btQNvnIdIcWIGiG9XOvO694f\nasEy72K2t7rj20f+vaOmR4vgRVldUWdQF68hiZmP5Ph41uZFlYmUisr48POU\ntmr1ZEtK7XdbTHrn/TDTqePaAjBch20lGaO7u1ZvGWa+Ep7uF/Le8alzgw63\nYUv38tl6t9H0GcC1M4sHMYqewR6WxtiU2kLy/4RLTJRWmCdM/pm73SFV9rG5\n5RQW\r\n=DWjx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"77212852cf39af4379f15c0daae076eb8b562c15","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d082790f0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d082790f0.0_1630533214694_0.29733561633711747","host":"s3://npm-registry-packages"}},"13.0.0-canary.e2c4f0196.0":{"name":"@material/auto-init","version":"13.0.0-canary.e2c4f0196.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e2c4f0196.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64552bee1eabee028500fe15626fbac715b59967","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e2c4f0196.0.tgz","fileCount":13,"integrity":"sha512-yS2nbmBmhpNdkz3YGqrFkyYBcMLqje3yNIngeu2M8NeW8Q6G0HoCNx+/l6nrLve2dT1akSjM/SlYlv8YHxmFIg==","signatures":[{"sig":"MEUCIQDZnulXMyUDOoJvKWDJPn2AZWoK5YsUbF9RlxolBGK9uAIgZXTvRpIGxqvhYxwCPhx4HsLe/rAnWhVNlrC/QgCy0Ks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMDKRCRA9TVsSAnZWagAA3doP/jvy5Ki6ajIXuQNgYnRm\n+Rq/ppBEzDMgn9PQplV+ZzRT0ocKtMPXvHeglKNWA3pEyMKYmZs1I1g7Twmk\nvH6gqIPDuF9UyKlXC2UrPFE3Kaf+VIUV0Ee04/nuuQsYCqO3r9jJd8scsXby\nYOm8sqjQxg9gH0o52vKW9j9WEVC5v+S+7Nd68UbMM1qZf5lg43JxEtW7PR/B\nRpfem/f27Iozj5aiv9iXlks8FD4x8LZotoV7eOjfoqbngJRnzDtHRrE7s4iK\nVDe2/emrrH+CLVqTsL2dKypLFfGhRXJv+L7qG7zfp/uMvnIg1ity4XofbaLf\nPS3do9pS/U0cl5mNftoqz/e6KKFCLVUyVfU/QAvLdPSuxOIt0nDXSu7GCXcQ\nrCo8FGpFkZ33CJ6F5cibPk5Onh4RwXPwsfOncqh+OvU6iEleaFcdzznb4W4q\nZ3B8jJ2BAbfwbTazRuWsSUarcS2cMFtcfZQfazxEdGMh2vh/4PKJ63T1o7d0\nTSakii6GHG/lKlf2Gl1viFPlv+sHPjUIHSfX3vJiDETCzLn2Wjoy2GsaPB+B\nxyRhNbs9hNz4DJXcaIfd5tz0JwHqrs9Su6H9pTRUJm54eqdYBuTSePkH/UWW\nqlTKCJPNc3ipVkwaxXOR6FnierKWuB90rHXod5xjAXQV25LQE3fkWqfWm36a\nPTUW\r\n=IYMs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2100e21debb7fbebda0966c953fb24e1964c19fa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e2c4f0196.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e2c4f0196.0_1630548625604_0.03446458316373735","host":"s3://npm-registry-packages"}},"13.0.0-canary.611db508e.0":{"name":"@material/auto-init","version":"13.0.0-canary.611db508e.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.611db508e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"be1349df0f8afa61d778889a413bc97f53cfc1eb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.611db508e.0.tgz","fileCount":13,"integrity":"sha512-hrYOhgf04k0N+KANQ6Z2EHAcwj3oebAn+3YnE6CUoRw/K/+VCB1S/E/XR1nvojYJ3ox7XACOue1D3ephjV6BUA==","signatures":[{"sig":"MEUCIHrBRutgmQvgIfxx5/bUEf/jxQ3C3U9VFpNqVKP8dTk9AiEA7k76ykS/+RFxBrvHqONFVztup23PB5a/o2BP9+bBaHw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMEGBCRA9TVsSAnZWagAAmqkP/2RK+AJQH+zNe4o4GkDZ\nXbXFa5z7AevDXhqvdTT1npzENeglMmSmfoOtfhgXNR332+JpuXYOs7/EWuwJ\nm4XO47qutPsy6/VBQ9Ti4uclis8GKqaEhE83u1gSw2n14KfK1ZJovY9W/VJf\nCwT9rqxIgZGvj9foA+5/DFSG95LQRU3LToo03aSO3AtaoDINpX49Kp4/W2RT\nHUWi07xHDmsORSuXdKs3QIwnkzy3NJhrbTRKF7dXad3SIGur4JPsvPleMNJl\nMeYkL5ybehskDfDx0fCvBnqmVShC172fG7RmyLY93IvOJSxBFclnW9q/bgDS\nKLmy1NslGFMCZZzfb7FTIbdlPvXlSyB3o6ecs9Vq3Y9Ux74O58baHUA4m582\n4ifCy6bdSMK6M6YnsowuW6XB4WIs+oM4U1JDzsObDfC3H0hskDogVvr0DeBy\nkbcSrpIV9S9V7uFWWmP39FPUs0rt4gt7qh24iXlP4nNqukW/r4MXPS2fBxka\nTZnr6QSxTP2qUQGCDYiEvmwD6jN/GcgRmW0juWFioE4MiFbLwHMU4gpPzFhI\ni1v2L6duwuWs9qqyZLDN3VjHYMbS3JqgvKtslfVEcvS6oqE17ttb7xQaGVRa\ni2jPx0vRpbqFpIZoK3LUXTJjWODXtBvh4cOv9Y09vj60vW8hEc4x0zQHzpDA\nLbdT\r\n=Q39O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5d75be4b0e067fa5d6477869a053c630a67cd643","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.611db508e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.611db508e.0_1630552449419_0.6360418743890017","host":"s3://npm-registry-packages"}},"13.0.0-canary.d4706933f.0":{"name":"@material/auto-init","version":"13.0.0-canary.d4706933f.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d4706933f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"61fae6a1bb4e0fd200dba16229c8f4dc3a1a5542","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d4706933f.0.tgz","fileCount":13,"integrity":"sha512-U7RGcOXfkMNQW7wQ9JiP8SkIMYV3TMEvRy1W6PWwbsOGARixfNZ0AF+4QHUFMQjAhO/yvUtdc/NePF5lskNDow==","signatures":[{"sig":"MEQCIGs3F9tU0ljc2QA5haES23Jri4ShQzzJVfw+S3ilcivsAiB87nsMFoBxQ0Le6bvY9wx/KvuA/9NT3r4QUvOvok+h5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMO+YCRA9TVsSAnZWagAAjdEQAIqnGEusoork56hqrLm3\nMy67SfOMDOTp4G/Ra7YIybmEhWSoF/wMS2AjGFncPL5w7JZTCmclhKr5K4wF\nhR7ihMbLSkiGB5dDZJxzruSGLwPO+DZlZfGF/tUKXQ9OiuCupXz8ROlq2GUq\n3ZQZ4eLcx98CzsFrTK4vIIj2zj+nbJsuDwfQf6Z+Dbl/NZu2uLW9r1AsZqGJ\n1eGaYoUjOTXYjwIYFajCWP3dfqTkVgoj2kWQOzZIg1i2VNu7FhHA20LU8AM/\nu/D2BPCgHCpYA74Naj81jyRnp7kYIamOoq+itTVZaKyGpFFbEZBP0VnDS/3l\nfrP7YdRQJJ2Efo3HQ3XAwBZtaeIRHDwnngU0qnLi4DmTrCPG1YVVO5mAS6Z8\n440v5WSdUzYA+veuJwmEfvJaoDVWtAYWPDot7NlRX1Scj4cEfz7YLu88yVUF\nP9Vhq5wocJDW8EVQjquSKIY0nCcJaWfUbji+gcOns73iyJAGadezDWIPf7aL\nvmXWIwXRMSMRs7KsOUVHwmRW0rxJeLSFqU4k1n5Aa24mK9osKovh59hgU8hk\nfwMe82CYp7HVXR9Qj0bGcICbC75fHyGCgj9rEKAEcWMtMibQ+K3+5IBA5Te4\nS0BDM06OybPadTEciIrBkYdPu67KHaDuxa0ewdC/uZQ5JE7YSlrrIu50pq0H\ntMRw\r\n=9U03\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9e7edb1e0621060d55bf2765cadc8f2ffcfa0f30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d4706933f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d4706933f.0_1630597016318_0.778729764597166","host":"s3://npm-registry-packages"}},"13.0.0-canary.c16fe03ce.0":{"name":"@material/auto-init","version":"13.0.0-canary.c16fe03ce.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.c16fe03ce.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7ece6da87be9b3a64fa25ab3b86078df06d9b4fe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.c16fe03ce.0.tgz","fileCount":13,"integrity":"sha512-t/oJR097o7nZE6JZIGRVCILHLLB8AQBkB1jLWQLHA5zB6QvyfW/UN3oIqrbVmnJnUwb19Iai0nboT3G0lUIxHQ==","signatures":[{"sig":"MEQCIFdrvllrKtcURzbGUGzZYBFrF/gvZYi9uQy4aDYAuOvHAiBs+9JW2qQJjZvl7DYMRZXbEYkYK3g9QVcPWO1YgBsIPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMQ1gCRA9TVsSAnZWagAAVhMQAKE/1P5fxPx/jpjsKCew\n096qIVAtYGe64+WDFwZWpZ13KhC3AIFbkGi+mlfiFHdEQUwa320jtvj2wi20\nsN7u5oZ8MqHwn4YAUhoLdjcM0C4+xK804U1bFB6BlHJFjduXRay5rpu534k7\nnYAouZSR03PBREeoV6gyUztR13NI+3yxtmcBsWDWM0TAoTpDHFADs/9rljex\nzRgrLwICoXr1yAfs1qi3htpFFylfF4Ahq2YuC9gSDvtOn3ZID9lyYtIypBGb\nytQ0OVKdn36BIkdRB7VWebUGGecT590E+kddCyHJ+ZFHNhF/6qUEg79QG8tY\n/ThhBYS43q3uSRUM6fvnOch/psJIT6DWr2mamuk+hlP2WhitBOX6XZQKb1bU\n56BeYIXgS3CKvFeagqqeh7oNqMFISqFVA4BLTRIxhuotPszmQ8KFSbyk/CWC\nyeNgwTG5jJFxKnQ2PdqYfjcO2/fkqzNEhtY3jfDn6GHfpHSMjXtg5Hf71hnU\nONiW+OWXyciRjNAG0S10NcS69PXuLF8RI5o/y3MzlUuLhC8obQwqI2o/ykio\nuAUFcFPCyWYLHLo5oP9SYMC+IrW0soNJdLjWeAX78BUSNlvBfziRrGWvJLpQ\nIVNmKAv0nWJhkEBICERgKHcTxdT+YRXd4P8jpMh3/AmS6azhhCxFMlNmq7Qb\n8Mro\r\n=E/b4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"28281c91b41ff8002401a21d1210e0fc629d55ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.c16fe03ce.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.c16fe03ce.0_1630604640467_0.6617769113314851","host":"s3://npm-registry-packages"}},"13.0.0-canary.9203a958a.0":{"name":"@material/auto-init","version":"13.0.0-canary.9203a958a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.9203a958a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e7a234d5d91e0ea1c342b49966e3552578dd651c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.9203a958a.0.tgz","fileCount":13,"integrity":"sha512-fmmq1wPj+Al+W7VgvmulnGgvQ9a1oonpottuV/9Gf4ruUJOvv2c7oT2dHjngmolreNd70yaGQ7AQrJwG8cYGLQ==","signatures":[{"sig":"MEUCIQCOVyl0nV/HNK/ALjEzo0noa5dn91aVoWBo1BnnsE3BPQIgYD0faLv4Wp+OOkcGwNr2oZ3SOeqD5FPIYYIZI9VHd/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMWIjCRA9TVsSAnZWagAA3AQP+gLERoY1lF/nBPnYsE1b\nbg4BrdmH4EvHirIPMv5GnveFWVwNtnJI0LohWGhsHqlAip5gFb4CdPegjAO8\ntg8sFQLiWiPT8T1UEBACzEFodulu0w/c7HN/qpBXQdSRCj6TWDrQJrzMAgjI\nFyP1h6NvH7mbLX8D7Va7OWip3b8oLRPeTZq2FvCuPUzjuGqEoEwwBFKb1qZI\nlHxwkZD0U26HUN5a3HQHSE6MHn1fXFZpBfG/9tFoBYJT9iOwoBv2eIIal24o\niL3RIr+nBatPXLUPcXilbzQqQmjlu/t4B91oLNoZ6igNfrVR9OfU1ynVJFmv\n+HN9qMbj/os2B8rL0V4kVqMsBk4MmphfO4xK3WzIYYmZL/G+aiE+cG1tq7B2\nUC3tJv+mGnD1CBqMAlySycV5/XegJ7N3gVj0rkdzOpHSJ3yOMdUkpn+TXg2e\ncK2MTXES7FyxxfLkqn0KZuIF1W3gt8MWW4hHpgQCkOXk3FxhxEA3GfBDCNQB\nxEE5yhdX/L1RZuBg0DUv+BjgGFNfTTNdeD3mYrHAO0QYZwGBNkepc+rTbnBB\nPSIktmWdmErvqaHCOlkP9f06s7RvHWbSGSxr2qFoY3i7wgPzWY4G9yDLYT8V\n/7bBU7rDyodQ/hGdqqL306LObxs4NexN39w21GcIIRK0qsM0gHkYJvt5tXUf\nSaPk\r\n=we3y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e0f9de34d700b0d1eabd5186c5b5cf8080eaf74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.9203a958a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.9203a958a.0_1630626339536_0.9321070175534287","host":"s3://npm-registry-packages"}},"13.0.0-canary.fddd5ae93.0":{"name":"@material/auto-init","version":"13.0.0-canary.fddd5ae93.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.fddd5ae93.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdea398fc0ba49700f138e29aa98193334bcff0f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.fddd5ae93.0.tgz","fileCount":13,"integrity":"sha512-vQjEiz71sG+gQoNi9mz8zArWOXSM1OCZDG/TMRpH5Qy8R1LnY0Q6YuUAZ4uDk9D5u4iqoVg+ZfkNXM/K98OgZQ==","signatures":[{"sig":"MEUCIQDJmwcn7FFTf/DqjUSNQuufTu79KhrxL3AI4rmekQL92wIgYN2Ic9zSNJI+AeHJJok79EMLS2MA+cnZ7RL0uFS28Kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMc7GCRA9TVsSAnZWagAAhfUP/i16/LoxNOQPux41mi7c\nSCsCbQSbs734dm6cLAnGq+ENziUjOm2LPQ/b8QBpuLykOiab+nA2MJYLy0Vm\n98OAcpuoOHmn+ZbEBMNwqPBeLCJSZdOQm1hC4TMVXwHOrQeGBq5KVL89+ZwB\n0HbupXOcKq68WCqBfhfDgcsQhLp1/8toGxSGvWLkMMXKNRDsxGKFmbJTumUN\n12H8zklTW6gxnKmoD2LnwijIo5l5yLL8v6mTMdxXECCRV/xv52RGh4eIU5k4\n+VBkQcxTFUmazINxuqQ8fIm97wlFCwAUDAbq05cEt8CYPrDQyxqWR/VF9RCS\nO4kunxgi3LTmSHNSXkyxrChzn5Mp0kfv91br0JmfEC/5932uwXUxvLbnxZpA\nqDALvZrp2kkHCmYiZKTSmnWBhsrBJN4rh9JaZSaoaLo1cA5jZVTs0Ebi68+i\nyXN2fk5bMvPkdU3h8BODB2sR2KCMsEPPSG7jQnxHh9dWP+NrGKLpOBRVxaou\ngYvnHn2UMAus7+YUTMJ4btXmIzX+ewjnbA6B80W7ViAfNRxeQmXgXvytosyN\nW4Na1KodUcR3T4bk8Qt3NujnoQIM8qGZJ1XwWLXZd49hNT4LDGhv/4cKpWGH\nLTU8K6psK/N7liluUgV/n5DQS+JNYjx4HOx9/0akZhaibPlcXAZDuVJHlDWK\niqvn\r\n=tYdu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b5407901afd7b18f851e64db0350e0c38797ae29","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.fddd5ae93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.fddd5ae93.0_1630654149976_0.7331547842327706","host":"s3://npm-registry-packages"}},"13.0.0-canary.117599a8b.0":{"name":"@material/auto-init","version":"13.0.0-canary.117599a8b.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.117599a8b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"66943e125a6afa4606877202b58f442c90985c64","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.117599a8b.0.tgz","fileCount":13,"integrity":"sha512-60++pSGRRngpJINtK31kvpo87g8H9AisONd35949VfYxD2Htu7Mby9zYVUYXhRLzQS8JGKO6unES3bzepRvvHA==","signatures":[{"sig":"MEQCIGnZQcedJV9d5mmJNPXwoLPlJgadBYyp/ohvTlZirQ67AiB8ceXEl64zCOVOAqF6v3/A3b3sf/O1NGOBSNkDJf3a7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMc8bCRA9TVsSAnZWagAASokP/3+u0Nx6/fbfsT0cA/d8\naNhqx38N2LhiCmQa9hZDdwQ8xQXQxTgEw3wm55/6obP5XgDzQ0pV+8j6x0au\nn01lGhGUuja9PeyVUXUezk1qaVRSk5FAqOMVeE4+fjcsOJjF1TnpqPGALxa9\nf5SdDdvF3P9492C2ZdqR4FsSvxMxJrxLaGkcT7aPcyDav7h+r/yzDtP8fi5e\noaKKzJWcommLVMpAEKYzBF4tqz+dRfN51L2TVCNaz7OON2F5Uk9h1KSOB6sg\nEjvXGwXM0dtHtZT+gvT6bvSpUf4STvM95u2+EdIez7BEBZxcPA++OqS7XHAm\nqmukyCwawb3hVy2SYqfXnB+1Du0275V0trJWnQ6YuqvS2br7L+hucf2cIvca\nozN9oE9CL1b9nbI0STcdLkBz0c5diPpc0MKjVrpD/TLMPH7RJoA8vh2Xcj0K\nd3kEUmu3Y6/1tvbReap12pj/yebLZag5UokjMGn6rS6NZ8QxROOS8YOOpeHa\n7cqaugfO+evyzYttToMMFUkihCM+NyEX9E1JjVgC5/oN3shcWV+due+NjRVA\nfSFIKHR9GYQVtQPlh2bVUesjBQqvt01hBVdwwZu7aGURb85VU7kmsacEhkl7\ndGw+0ZmtVoiaEo0GSIkDTNpXPGRvWev4E3NmW0ioJQ/hVVhJ4V7pxsbieyT4\noLjH\r\n=/XkC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3dd17eaeb796b36aeda593de120f16c60ff06a0f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.117599a8b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.117599a8b.0_1630654235073_0.7315837649130281","host":"s3://npm-registry-packages"}},"13.0.0-canary.e4180d07b.0":{"name":"@material/auto-init","version":"13.0.0-canary.e4180d07b.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e4180d07b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7833baad6b75a861fe82395ba8688d1517756826","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e4180d07b.0.tgz","fileCount":13,"integrity":"sha512-5SLxCYNe6MGmYTRuUEQSq3eP8OZ05Vo0h3IrHj5TMBGE/Dv8gb0psK9jz0WQK0Kew8282a3WSzfKBI+S4P/fHQ==","signatures":[{"sig":"MEUCIQCOdlASU19cUxtCBynhRKhvznuEM09XhjNWTfL3fnlV8gIgBxxK8YSGmEkEO0CRcVk1hpHAYQ/DUn+5nnMcfkT6XlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMc85CRA9TVsSAnZWagAAWqcP/AorYspY3cYYj8I+GH3Z\n8n8bmpakTSbDiF8ao2qGg2A0cncPOpTnOM+6NLU2S4x+ZHxXgbnRa5ZSm/Kk\nRAhoMCDLqFCO60iLxj5Q+mdSlPXBjDKrhECjqDFJ/2Y4Ka9OUaCoWhOCoQum\npQsOykAZ+eow1uU0kdA/BYRJ0r1gWGF0qza7RNMkkeQSiQjAGIl7CL1bTrxb\nkhIaNBupM3Kws2npb0UhkEqZY6sDwaJfu9louh2JWICIplKKl9r4gRvd5mh/\nv7EDQFXDtsuqHoCgMyz/zBxr+WvhPXg+Dsi4t9zDX8vn/AtTB5wqz75i4uz5\nm6q6vkIRYP1g4Fd520LATZx/Lh/sGNEOf2E7mhE91p0CF6vEy+mpB32OVCjM\nFYFEqQJpFkr9vigjptrc4kTDeTadivUZ6J0gePA7Zv/a9NYh7WOl70T0jW0Y\nScYJScQfRaDn91NCcBYqOIZP1sdG3Zr+NRU+h9iwOVZFCpFuDYx3YuZlZAvL\n+tvleXy3IQUVGvh31TJQwYNX5c1FujY8CPdL8WmG4uC2VrOijdHI2E0KfQut\nEsqDpw3j3Get+pQQ7V5ooYxkHuVeOoWKNWp/yDAxcs05KR9YGh62FKkIRc8E\nwX7c9PoK8G4QqQcDC+L522JHQlzt/0Px5nxfZixKCzqNRCLSXW+vEeUb96OP\n3QE+\r\n=mJ9N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3b94d02f75df256cd0543dbdf5062823ee527d4f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e4180d07b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e4180d07b.0_1630654265093_0.7830464886930795","host":"s3://npm-registry-packages"}},"13.0.0-canary.42d175efc.0":{"name":"@material/auto-init","version":"13.0.0-canary.42d175efc.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.42d175efc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"91a978afb848eddf7ce4df7fb0622d00b9bc8366","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.42d175efc.0.tgz","fileCount":13,"integrity":"sha512-55O/m/AeMPGi1nNOSmf9e1ufi7rlvLecsBHwkxhuPZGOa7XVviu2LhPZcg94D/UHbQlDQdskREvqseADBIppFA==","signatures":[{"sig":"MEUCIQDc2L/OHtX0f+8xYoQw/eyL18PhftQuo/T5swDG3qF5HAIgNSRnyRkWceCSfimeywwXe9T3dpTKCi5Co1WIyazsDHE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMkJOCRA9TVsSAnZWagAAIB8P/iLhT0p4PtYS+p0O5/dU\njrQicH0K3ZkHdaTfYP9CDxEg2SVHJXXuRi4tZZW3XtWuF2F/lobu6Qla/Gws\nE9q1Wbql7kc/bjm0iQgnEVvYCEz/5U3iyyxEs9glJ9Yj3l+d8nehZ9JiJEyy\nGA7ySE6G5T9Uuq5A7vJyBzr/CSYbdy/V2eSsP45/MD3P96K6raCuiuNUo3ad\n+V7Qes1/nThyCnE2AZ28L+A/5yNLhTioXZ5YxxAyOMp7/xCNxvaQYUpjKKzc\n1P3gnafT5d8PK1sJOP5DLakalnuzZbpbyXO+7+1tHVv0CRuTeSsoyzWFToVI\nyteYPmW34JyO6ICI5+an1i7xqJX13JWqmqrQnV2to/WUfEz3NFwA2wbBJUMc\ny0vsLtvtZx1S0tqNpRkatdY0+/HVtfLCQNcRxjMZ97bgYL61RKQpDAn4HsGu\nzboWDA7LxoPSEUVXlgEsDC9NoS18WpXQxA32Lx2OajL4ejGzk5un67waNjjQ\nYN6H/nA/xhuUMwpsyz14jIsh713JRMabSyXo9/kP6BNe1FZg0x50CUH21/Vh\njQ4Zcd0DvrN1vDapKu612yGCOd2IvSCD6V/vHyKVUUrl6VniOj2H9yyth5M0\na0Ws9Qb/+pA8XXJ3AOpxlbwRKoFqb71T0cXr5qzhMd86du5ic7hNRfYWHzj6\nDK55\r\n=py3A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"64e749d9e76a60e5559d8b19e4b57da1f44ebf0d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.42d175efc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.42d175efc.0_1630683726199_0.6311048348760799","host":"s3://npm-registry-packages"}},"13.0.0-canary.72464476c.0":{"name":"@material/auto-init","version":"13.0.0-canary.72464476c.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.72464476c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57e24765fc7719cd2c8319f7bc4d6564cfb89741","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.72464476c.0.tgz","fileCount":13,"integrity":"sha512-0vItVA0jrjE03Zl6CmdBUB4pOVNgt9oXJX83Pfc2lZIpIQw0Ft6fkvFhVVQNAldSF2OmPUfjrRbEA0hxFonXyg==","signatures":[{"sig":"MEYCIQDhdiVwWLp8qJDzKeHRkW5diqV6xJptpd24FFTnvsEeAwIhAJj4ycDPW5HfLv1sfJILkKq+xYXl4pwdZCrNYMeWxqpZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN4ZBCRA9TVsSAnZWagAAKTQP/3L/mPIb5flq8ID7UfzB\nSHKcseI35foUTo4jEmGyslFY3IzcxmPqPAWBc9STVyCGBqS2vrhxq1X0ppmi\nQn72SVNCLVvpTaPBe54AbwFOM0dUXiNfzin7XNtHywldUuyQi8ZfBOJhaZ/d\nFUw65gABrzxcXZ0YsxJg7it6EtntfXbG1A84AcdId2P2R95x+uyxh7/L5oTr\n/BnIbLae307KkNJ0VlkuWwR6bxVuoo9BFsUJhLZ3VTn0ICpjHSRX4gp+TJZx\nRvbFBgPWhd+tuuZuGR8/a3OOG1/BvnXOUzzIG3GX4qRQxjIUj7BqNTCk1jio\nsH52y4146wIZUq62KmEOe2dktbnznXA5j1VJNxWIVsEgH7qMSFlHsJFBGALm\nzTphi+TMZNGWq+apJ7qE0qqxqlHKQ5zjSNm7ApTB9S/VcnYEQqfj8eyRJXh4\ner5aGXMbYgkzxRxBcAC1qnpEynJ9mibM5lkXTvy9VbcZTRtb60OPX63FI4cE\nAQsJiNpWpqgvi3EZ4oL50sW4SW4sPdWXYGLdLfe4Mc0jMbHVGjuE/UuSAqkA\noJUueOyAMZfFm5IZ8KH5cNGBXpEGweh3XyIpBS9lf68FYE361NgrCGqPo5MY\nMR725E4mJftUqoVoe6BJMMkCOtHuCRhxwgzH6oYxn37qnodR4wwfLDu7nbs6\n/ALb\r\n=AEgm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4c409a18f3ef0a7ee6f9b223a514471c0515b639","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.72464476c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.72464476c.0_1631028801227_0.79485833495589","host":"s3://npm-registry-packages"}},"13.0.0-canary.37d4db866.0":{"name":"@material/auto-init","version":"13.0.0-canary.37d4db866.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.37d4db866.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e934bee1a34fa59c8354c5f696a7d9d635ef8c5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.37d4db866.0.tgz","fileCount":13,"integrity":"sha512-XdUEf3V5gTWpQeVpLbG17c+ORgnsZn2nEhDRjFAGeu1AE942lnceA2h3jc5jQrN93EGS7NtI4c4EWCW/gfvllA==","signatures":[{"sig":"MEUCIGQA0iku7llNGyKN8ngJZeW6/Zqp8AXJ3fZ6brURf9s5AiEAtQOeOMR1MqbkNrBnFzugr+oMrch7eDLNWPGsQMlrwKU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOhsDCRA9TVsSAnZWagAAUx8P/jXeEXjaaTNWVdop0hgh\ncTHz4dvZ0pwP/SPIE08QD9twPYffTkNI1EKX63V23Xr9FCyYOSdeIW6uWKYj\nz17VzLmc4ihgNXEemaYusKABquWm+ODnz+6AaA0yvaaX2d1bsOjFgaFtOJZw\n5hUwQ1x57qoQF2T7sYZwrW9UiCtFTtitsV0fv0RNEXGeXo2s7V6AXm6BIb2E\nPODWevVz5wiaCTUtxITToF+EIfHK6sN723O8/rPYNJMLlK6UdtQTN9SOMoaF\ns8cGRvZ0P6/D4f6LF4Mb7nS3SQjpeadOaoAWbR8MX3yv7DRImyPvUGeZhlva\nQ0zyuLvPVdDYI0DF7i5/WZLEz+QxAN5Ne12imSL2BFKkjk6DebtZjzHRgvCw\np3vgAxvEFGqxP+A1jLfWl74dvFnY+kLSkVpEOCxvPDEsyFoZ6AR1b2oKr9Ca\n99WH2S4ka2YGzMRSwM6zL+Vc/3NTWiq3ipXjoOv0mS1kfz0UmBmD9/EkPzVT\n8yDipPbh4cJrrRQ92BaqQXj6VRjyb15aerwDRDsQDgpazFGGR7gjSVSBS035\nsjJOa2NvC1z6BIKtBEGVrH1i+Fw5AZk5udhbR2dDCzaGXNK97u1xEPSE8NEw\nLpsLRuvlmUVbuABUOidSh1vyKeTp4X1XiS2CceWzn/GVED7y5F+d0pO64XDC\n03p4\r\n=7Z7O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"25270b452713f831fa1adf302fa3f2c357ba759a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.37d4db866.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.37d4db866.0_1631197955729_0.3335046511209825","host":"s3://npm-registry-packages"}},"13.0.0-canary.6df682e74.0":{"name":"@material/auto-init","version":"13.0.0-canary.6df682e74.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.6df682e74.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8fa9621d44a5adf169b0713b9e20b48b37aaa7a7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.6df682e74.0.tgz","fileCount":13,"integrity":"sha512-cwhplWWAzSzA82WevbTqzQE2Kx1x7yk3i8cJHPPVDmD3LBiIeFRKJ/Bi8ZqqQ0ZxCHAvPKpj7vGuQLTk26cZEA==","signatures":[{"sig":"MEUCIBlAXg7vmSq3ftWT3Scx3RQmfNSWigCqxhB9zMr675X8AiEAtmSvemr1KiAk2bv5L+nSGSTH51cDuB8t4ZNUpLcTth0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOitgCRA9TVsSAnZWagAA2IEP/3egFT+K4F/Sw1lLnfDd\nJUYyrq+e01vR79dc+3D3kmTbd37/HCIciCQcH4nKFVVPGGzNHZWb1xGBhD2d\nPsfkQeOOJxRpHBhRQ0+BgDcrGnd8QZskezoEW2ByFIq+OZi1yWlTVIf9q8Up\ntbB9m/DsYdIjDvQg3J7H1MioVgtA5lc642pvu1xdZWgHbFysdT7JrkZyM/Qh\n2H6go7pFWvuX7j7NuB4DKMCQvOtMkm2H6kwn2C5PTuOMhmnRgfriPJYwirZO\nixheC7FRS5Xqp3SRHSeughjCJCFmV4IhrJzevvcVFucuGWrTqlhDnwo9Wz4f\nYoureuBkOh+09J/XFXdm1qOhLUl+5gHFkg2cmN0bRv+AO+jbzk3xkxsu5+3Y\nuwW6FM0oth9+SgOWLT7+uGIuhRpksj3VxbnQ5kEia0FkrTJ00hzLizci8n4b\nAmUDMpNr2YFPPKCjPhNTjNrUvtd8dxMyW9TDpUBjdDE+o4n5uijYkGDRQr8D\nh38BwcCyicPNYh8Nch7umNRsym4Z3AIazZoZR5LIwpxXWMgd6JGsVWyAx8Kc\nbJWJ1OAPBVrDNPC2rzpyYLLV1c9D1koAKmIoD/k91IQzTGwF5YSdEP9/ulW8\nci3TSEuUkKVkDM5z6Danv3HcqtLPP7OJTXoYMtO0S9jIWyaO3eZvJISEuhYw\nmOOO\r\n=OSP9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f8640926b088e6e6fd8688e2bf177fbb60e83f2f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.6df682e74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.6df682e74.0_1631202144732_0.3531997413743624","host":"s3://npm-registry-packages"}},"13.0.0-canary.b49359c35.0":{"name":"@material/auto-init","version":"13.0.0-canary.b49359c35.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.b49359c35.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2360d5368bdb89f5001cf3b4ffbbf41fd5e8cb59","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.b49359c35.0.tgz","fileCount":13,"integrity":"sha512-utMszk/QDJA9nXD9usAFBKE7pY+nIxK+mmHJ5mxXHB9w4OrGZCZwoIt+0pvW+N+1CTL776HmKj+rSIhltbZYdA==","signatures":[{"sig":"MEQCIDnF3Gm4jL62cImJi1rZxzsiIDNCuSxDm93Iq24c7S7XAiAD4YDQ9z4w5hZH8ItkMVfdQ8vvuZpGsuTfg8/1WFW+BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOkW0CRA9TVsSAnZWagAA0FMP/2L3DutoSl9+CRW9+Xck\nOg/yol4sQuP/po7FZhuQ9ep/EMPZVDhSjvC3vvJwm77ikdsYrmVg5XphGCrR\nhMyi0NYD5PmQA4lL21s+6RJgNqgGjaUxAteRLvok+cFqzmXdaJw6IpbplNkz\nlOBJAzSBHQL/ZcM6mQ0P4N47Ghb5FMLcjrx9GuKhuDSCxNBQDunUogh8MgHV\nbiHBOIQ2hUzhebgg6hPg+K+wZEBGp4Si5b+5ceEFS70pA7FLsStbAuENbpXv\ndBCmAHqXwfOIxLfgYLy2rt6TxKJ4KaB8xAx1rtq0Qbs5FOvZLEGLQL7NXvXl\nghVoDtUdqNIuLZiMwNY5o+iTOjyZFAnCb5keJiKK0yj55fJQI5vGfXYwSVny\nU+EFhowRQvV7GRZxLrLNsegA5HVfbASFMpOop7Ywp79K3E51rpl0QIMS6mgD\nT45N19njcJcTBD5QfhZrod5e0tz2BmPUlWFYSfkEAhUtfQ4cdLSwPAXmuW+F\nideWCMW6fA4Q43NDvp4YMNzQ4nFQI5ZxkqDAH2K+IwZk4QoPhJUtUE20arqF\n5ja6S62LERafrT0FWG6orR17FUmN4vdHKkmhj7qoiEiKeUgZOaBhOPmd/2AM\n0PPJXOOSHb/DtS8tj5fbEwwNgJ6C2x8j38GCuXub0CwFD1ilGM/gjA4shtD1\n5l2Z\r\n=y0el\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"817b18da85c93007b9b038927a1ae036f98f686e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.b49359c35.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.b49359c35.0_1631208883927_0.5345657861700681","host":"s3://npm-registry-packages"}},"13.0.0-canary.470bd34e8.0":{"name":"@material/auto-init","version":"13.0.0-canary.470bd34e8.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.470bd34e8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a89e9c4da385b487a30500f1f1b209bc69cfba13","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.470bd34e8.0.tgz","fileCount":13,"integrity":"sha512-eVsO1SZduOBxsHNhSmU0pK//tgD26dDj2+b8FXu3v07SmBOq+EWMxDliIuhYMhpC/LWZVqCbfucSy63a9OlcnA==","signatures":[{"sig":"MEQCIG1oS63DHv/ZnF3EpwvPFzfpA2sa4mi3gQdqwnHPRH9RAiAdh42+GvKzFSxpLzNTFPe0BmFrvItks4Rld2QrIYg06w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOkupCRA9TVsSAnZWagAA4m4P/i6pCam8YNb3Wz7GePlP\nyEpaY07+PoEbsciOLuKYsL1tHH3w9zTbumDQlA+Vf0lTghPc5kxQQN93cMMj\niqlmue0ho8NxxcHwPDUyAcxY0kUFDnDBTrIAdjWyOidC0K2rHnNQ/L93BkaX\n8DasKUWCde1jfCOh5CtaGGW4O8n/q8MvqYyO/TcnlJ1EUHaK4l/BGrGuD6w+\nZC7COWHjV9/5fCEvhDEzv9GqOG7SMzbTHtYg2Urbu7nerbKxVtQpzaw79lCY\nAywuEtJpHI/ZguSWuCDhzFCTbwFagAzb8rDqiur0GIVB2bKKnwyt1o13TdWA\n6ffSNqNrCnqmNHhuS8TLZGdNw/t072V4XBb7xEZaLJCcRKYMdoSVZFPvAzmO\nArwlIWdrn3F+XSQNqzPLu+5sWM4tTAoUd30SM96tFqSgGmH013jc77VgNwVx\np2FnW3bgZNsQoomH43QYTS6N/n3HomXPVBtANqfPRuv/W7GCEU8EnBIcDPT6\nau3h6Z9JoxoCODFNShH5JSYjswHWUh1VgQQXZ9S3PytPhi3YNzGKdK2tW45d\nulY/kyUysuVW7mSq+yrsOAA5Kq7MebAvmxRgQVJQjjss+V5DOLs0VoYdjgkq\nrJPkv8goqtrC060xqLAVZk90oCkkxuPSCdo2N054zXmJz1qninyoR2Da2Cgd\n2t7o\r\n=yjDa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f249b00e3cc067fbfdf722d71dd85392d031ca0c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.470bd34e8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.470bd34e8.0_1631210409656_0.3856028715135411","host":"s3://npm-registry-packages"}},"13.0.0-canary.d48a01771.0":{"name":"@material/auto-init","version":"13.0.0-canary.d48a01771.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d48a01771.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cb80942ed236f3f28229efc49584b3371eb576b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d48a01771.0.tgz","fileCount":13,"integrity":"sha512-Of+fuvZMvmfTd1i+x6kRheD63pBDfjeH8mQwWUZgYIYtUIL537QcpZnTILClrSIosJzsqJEzCot0A8Zb35GKMw==","signatures":[{"sig":"MEUCIQD1yQlCCCJIpU6ksA589zGC9V1uxilrNsaobpqi/rTQqQIgf9I07Px44pueLjx3gMxPGA8XdYL7M20qH43kJ6UT6mU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOk3bCRA9TVsSAnZWagAAzUIP/RaoAg1a13dFlEWk6UqG\nAuPdq8BZLIMegXYufj57Bs/tdo4da0GoHjTdhw2gOABPsjU9SN+aSX5o4wKj\nuG+/8l/GtfBLyqfk7Zf2XZrXKzt7cZeY2BXBjtgTFW9bTd69oczIA6Ak2Byq\nTdyuT9ajx+l+VJHAaL0UHJcF5BDqCpOIli8E3oFAaFkRro4l5TwhbyFbi3z4\nZu+3WpKDdAQ7vzCti8mjdoyN4GNlUXp4rDa+7pmmmN9exsA/bIr2HYpkcyJT\n0sp1swXAZ4hclZYeFJV58dpjtAU1BliQZjuuWqb/zWZm2AozIWFLVDam/V41\nfTPOBPy/4a13I4kO4/ea4hqAxcR575gNGBdgVEB+R8xhfIhWz7VLb8xo4Fli\njQrNyo5Be/5ewkPOiQcNuOyx3ajJ3lUaxoWRy5Ndbj+31CxBKCrfUnLpiFNv\nZX/Iss0gTzGx2HgqXZI+8B8y2cztZ6vhJNmYPiEgaVeDEDnRiznkmOBUgdBn\nGqYu+rBXokwYMijKfYPcsb6OaNnH92Ujexy4jA8k2FmzboY+aYMwnbC+6RhU\nlxslKV7Ao2yn/AllL9+Xc7RM0LKvt6SmI8qOjCcYaD4pUOZnIQhGcRE4bbtE\nguINNPFRVghfqiJzE0otVEQVLPC82oxb67G13HxAVYHTvAOuPM/aH7uGiomQ\n5Pw0\r\n=RXcj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6796441e86b583e99919b207640bd02efef6fdeb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d48a01771.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d48a01771.0_1631210971747_0.9383987123940645","host":"s3://npm-registry-packages"}},"13.0.0-canary.13db34b34.0":{"name":"@material/auto-init","version":"13.0.0-canary.13db34b34.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.13db34b34.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ef459f2cc16420f4191ee9473cd5deef28f03aee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.13db34b34.0.tgz","fileCount":13,"integrity":"sha512-uce0YoYX84Ao+LNt8q7boRJgfZ6/8P3UVV9VrG2r+eQToxwoK0RCLtCgai6ArPF63G85vVJGV6j6r6qKj8Xb5Q==","signatures":[{"sig":"MEYCIQDeJeFPXIZtCQV+x2noCrDEzqGYPt1Vs9AmbsBM8kk9LgIhAJH0X9C7Liq1rxufutbkQ525scXTpG6cVzjqdNaOZ/aR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOlFeCRA9TVsSAnZWagAA6MMP/RzYYCL6ZpUZeKj2b+4c\nQM5e3OuKPf1kDDIlZ8R0eg4nTaTzgRnGc9LYTGikGQbGigUw+EyfO0N7/AO5\nsEmOxkt/q5+BIqHDDN9Mh/+5EYQhQ8kRfa/+PTdCHrJDuEYGT9xYj45P8TCZ\nB0l6YJR5dNWu6r+ghd6XZb3DUq1gKcss5Biz/w9vWpFU5LZ27PV1AEzVUldw\n3idfaHhuug+N3cnN1NZ82O031E3K1WA3RKcIOXoTIE/YDMphYetrn836uawr\n4CHeyswK0G1qqvqOW8HO0z6I7DZpPMSiCa0+1lDm7VhES1hhrWUWLElj95Ez\nhPimziptaaePwhoFPgS2zSE45Gt9hj/SW8j0lLtz7dDXJbzci0Yqc0kifZKX\nZVXiwT6uIO42re+GLhQcMl5VWgN+amLhUNpXAFFF3hXPEUE0Zt+DyHwJzzzV\nLUSedkhKhyJ7aL8SXB0GdQQS727io4gnqzGEek2SWIgOyqzYWnN4qKHFnGnG\nSCds4mtUyv5tknFrABnQI2liAe7mwpz9ACZIjlstoZvZCLPSrHcKrAnxD3I1\nKhjlyrmqYdSXSIb2QmKXonY0lsSV6bPA0voq6bDVhtQBQL3etX2VmpPmwJpA\nRTH1aW+TYYIulIHcOVQmY0HtqZsI2+w04oJkd7pu8XqLLBvptoQ0NK/liW8j\nalos\r\n=RT4V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7883b32c9c6a3280e801925b874df667e1055809","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.13db34b34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.13db34b34.0_1631211870783_0.020887823608077838","host":"s3://npm-registry-packages"}},"13.0.0-canary.864798678.0":{"name":"@material/auto-init","version":"13.0.0-canary.864798678.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.864798678.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"56ccdbb94841e995b877a9660e5174e1887d901f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.864798678.0.tgz","fileCount":13,"integrity":"sha512-4lVSsChtxJjoD+ct01BM3lVFkKWxHH/dsqFS0oByTr/sE1aQQFFz9UJ2XvdBKYNF9uv56uv0kvv1Ia2T7m+zmw==","signatures":[{"sig":"MEQCIBeRLW4s2wvdYN+gINrSgPU5+Qr/RLHLZW/0NUJg3QMtAiAzpbWPJJPuXTdowbUPEnSkoMBICmToexz3fdTyamRwbQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOlQOCRA9TVsSAnZWagAAEAUP/1baKoaKntjExjsh1ibS\nKHGh9AsTWtZajnJGE3sZEdHEsdRZU+r6FnzaOISSD5NlqAz/kjFw1tcKDzg/\nUhDh8Yzw5EoF1wWAxLyHDz32aQh+mafZXb0ZRSea7EEyEw++uC86ss3m9X74\n4ATzqxVTS/BTkpbVZab3LvDEgUAG/J1hbT9W4iQYZ5hOdfjN5VTmv1/hYB1Z\nT7SQQcUPy7ab5GOlon4QzvDc8jO7nZ/EgyUBztTVh2wcUEUsTrngf9n6/NeQ\nlyjxLr5lCVqXgImA7Ce/lCVZbZjtmz2rHu0KornmcG+KDAv63GKRj2evojf2\nfwvRO8TK5ba07URxRqqI7dcQRUQ6mLvvMRD09y4UXQ/QjhIJ3yYG/Rcc2362\n8GADzj4ffB+vbk21c4LkWjourFJTqOHzTCZK5tKTK84y96WaMiuM0nFTwNQz\nzgx0ngjDSZJOXjr0sm9OF2qaXIyfT+IL6WUngvyipZ2+DyzUndRsYetnN1Hn\nG5bdquCgACjm8aRNYL/iTXZGd9UBRgxzx6CqIo1Y2OP67ZWUeFxaPNgW/zgx\nhPO+LLRA3jMbvMjwQe7S6rLfuVhmyS3LSvxOZLFVKAJTkJUcBnLPxdQobXEw\nIukheXFQtod8Gj7lGF9/YvJkrw9zoXBrM1HzQiddtfiK/4eRwuJVOUYZ8el3\n5s4B\r\n=y1YQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"08d2ae683a56b5e86f7a54eaf5a2090fd4288df1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.864798678.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.864798678.0_1631212558550_0.3860496001086495","host":"s3://npm-registry-packages"}},"13.0.0-canary.d04bda3fb.0":{"name":"@material/auto-init","version":"13.0.0-canary.d04bda3fb.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d04bda3fb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1a7664cb2925e4fffc85eb455b1ee59c56c5060b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d04bda3fb.0.tgz","fileCount":13,"integrity":"sha512-ua+6VbjsedQ68Ddfs/86YPMytUqopHwGiSN4ml5uqSH4A0bBUx4uq1NqjbZmHWVwsmBrYbzXf2QcFT0Yyx6U2A==","signatures":[{"sig":"MEQCIGl3pidR3nW8U4XQJhuXunRvdwT3R+cBRpxa+OyDGxXgAiB41WsPmbcN5/RJim0dLuM17AxPSeHIh/paKHLLCwZTvw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhO3fJCRA9TVsSAnZWagAAPIQP/2es2+XYSFlp5Q/Si98G\nO2mtnY2mdx6rJuC8O/n59AYlKoq+cpZyARAN0mIqnceznmc3QUlHgwCxMg7E\nIQ6QrPTnOrALUwclOAu0G4BHSGMe1Ci18+Z8qKsRrjUcY0qH2b7RvjW6RTmJ\ncZaIx2VvGwp6wYs8wgUEnjVKEmmPTt0DDlTJmIhWWQf2Sn+JmBuYwmhPq8/c\nFGFWdkFVGt23TMFzYUHzWwp9lJoPaN9SjvB14SFGNIT1c0M7cDah4IlRntWN\nHiBhywgVk8hUiGnWGFl87d1px0eFEm7/tSOct98/zpNuRegYBm31+1lX9aWg\nDVSPLF8RykKYeNwohRMddEIxbz9n+TpJoY2z9S1c6wSjHL4TtTr2WrSRO6mp\np6XiOb41LiWbKyyz4237PEn+fDK9O+SfFeiwt2XIUjsJCOShHtwoWu5cDTJu\nCmRYXXgMByvmRhFb0LvvMNnrb8iBoHNTEMFftEKcM1B/DABquCu5B28sptxa\nEWfyFtvhDI4jKmQLmjoLclwPZV4uEwXy8cTxUZeYUGm8mhsHg8LWkYuA9hX/\nie8Z8RoGc6dCysgGGN7sMpLIMVMcdjQSuALiJo/dVCwxZs3i6T6WCwX+K2pI\nLXN0CFfpJyluXFqorHJxvRrBUvwdME2W35hZlqs+tlpjsd7uTTS0V7eutE3Y\n7Tr+\r\n=bCOQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7dcba6a47b77f0011a1f0e22b3540e2a70b285cd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d04bda3fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d04bda3fb.0_1631287241057_0.9026593335114523","host":"s3://npm-registry-packages"}},"13.0.0-canary.5533f73d3.0":{"name":"@material/auto-init","version":"13.0.0-canary.5533f73d3.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.5533f73d3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9a06ef599526e5e1ee77614808c1169a9d82bb95","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.5533f73d3.0.tgz","fileCount":13,"integrity":"sha512-UQKXqMfLQJQ+83OSfkC1wiAOMM09KBDOeRI29IUhB7GSc4B925ILMuLPO02GxhI6b9Ip9NjJhys+Ri+HENAqIw==","signatures":[{"sig":"MEQCIC1Mp2+XgWlHFZk8cq0Dc6tCxvbtgXDRksrOEnWH7Ge3AiB8wMG7fuzx88M8LGcXc20CjvKyOiqc1fzwdxyPx36B7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP9ibCRA9TVsSAnZWagAAGyEQAIXz+W7sCI956eAwXeNM\nabsWzTnLaXT8/JsugYLpFODCWz+gGMtNLU6OVOKZ/0CKOxJexNxvdQlUzufL\n6PHFvsGLqVBo6XftvvTfW9mTb2ZlvxShbQ9QwOMJoHpNOmUvCVACDVIhsLwH\n/tdDPtP/lYqBjfEKSS2aEJXjWeXnnqKfCrlnOAHy+O9Hvq8P7QIDJkCzzAiJ\nfeSNjeEPg/WqnJVurrq1xHq5zvkUdqLPfwBzrJo++IXgafpi2lYTWsaPbfor\nKpdTiC5Kh4tk1ixP2CsqgzsyySTVbV5nku/DosGrstXtSnaJI37ujc7WzCka\n3/C+aIE9JGFzN3Se7WmzM1A0vc4ib2R7qI/fuvyVOB8alNLYpF1onxvEfhqE\na5b7LDHHvGvKAf+XfCM9tI2XyK97j4sYFc7KYQvPCxHq3IJ2uFiq4UPrI0A+\niZnAeTg+BYHCzoC2faByQw42SnYXN3U1UQySOsmq8XtpR2yd3iGjC2XlybW9\n/fqsKn9LvDZBTtcxJzj+H2i26T48lDoOEoIa6SiWF8gLDgALBXJ8/fiesvfE\nwnhtECX5sldn9wA5uzXTECHH5ECBkEogTImAnkhRkrkSTFomB4FedByea80D\nQGaRwsP82S3cvpshZdD+cKLATR1sNNsUq3lnNjsaehDmpdBgtrPZWG3lwcFd\nAddC\r\n=4/ny\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20bf1d151f241eb77dfa3233eb61f4e35d5b2838","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.5533f73d3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.5533f73d3.0_1631574171001_0.43997446054139333","host":"s3://npm-registry-packages"}},"13.0.0-canary.08398f880.0":{"name":"@material/auto-init","version":"13.0.0-canary.08398f880.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.08398f880.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dfd2422afd037f9b001f5ca808f915e8b67abc1a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.08398f880.0.tgz","fileCount":13,"integrity":"sha512-gNBtO5Dxkzhn38ajHYgmE3uJsNKoUvt9/SVLviEFUhA3uVA8NdJBN42bOzA71c3CUN6508QSJelOhYQ5xVtHjw==","signatures":[{"sig":"MEYCIQCe4S5v6b8R9byfJFtIXgwr3dXwkZ+4v8esjuiD0zCzKAIhANAv8qjyg9K2LgVuJcDSUUDkxgd9stCsYrA1BXCrq0v7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP9/NCRA9TVsSAnZWagAA3MMP/RNMrn8LHcNcAWMy+f5r\n9JH2y330tPP/Jt3hUZiYSSf4OaVId0y2NEWZK3Kg0YuNXnUaYGs4l6FRBTvn\nelUcucQdkiBVNTJ5CHJDcQ6dvSdhxtZPbAVQexWdpnIP5psbcLY2Gb9MW7GW\nNONin8QQ7pI/GMoUPxc71oqpP+Nby7VbchsR/8DKk2bkSgKLB7qIabAtFULk\napvn0zM6f3yBpBN5WCapF6P55DKo3Ia5EUnDKstjN8kyP3gQI+5swWE3CKhz\nH2LierFXVJsOc9+r3l2gghKSVcfrquBOoombAyUJbkE990pElG4PL8u59D+a\nDF9RjlxJW3AHGSimL0/sjhSbj6OW8fdHxC9J87e9CHbbVfcubudT4IyNt7pI\nY3J6ZUk+3sPvRDf6xr6r96+NfuFFarpL3Fz0Z5pB09UeS8yz37mQRR1+m5hB\nDsjFWxlXRWoEKWupWcG5UVuv8JpAj0Yb7VnBqkaCQEYoTnW+zAyQMVJv9lDA\nXJcmep5J5u0FPi1xi4cZFfuzGps9YWH4pozng8MtRonbhhpNsG0RIlvicSTN\n4F096Th4d3t071EaQK64ihmMio/pt8OZefJTmA1fBHWgdSwzUTQqHRRjxWQW\n67M7rjoLtg/8bQRPirIs7iO0SmstYT8/figr0rNrctKMd3o+jAFMDDG7xn0/\nfJn/\r\n=/poj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a993a7d6bd4a018cc4ae230bf1cc3fecfc16d1b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.08398f880.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.08398f880.0_1631576012970_0.428954592501515","host":"s3://npm-registry-packages"}},"13.0.0-canary.818f4ee93.0":{"name":"@material/auto-init","version":"13.0.0-canary.818f4ee93.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.818f4ee93.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1caa2a4f933901382fb70850e635b709a5f3c2c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.818f4ee93.0.tgz","fileCount":13,"integrity":"sha512-wiKNbY9UWf8lGbUwvoofpJaphKV+zZRBQV3FeHec0/fK2ZwyooRgFOd2TOecNFliA4gakTz4vqOImZgsTwzheA==","signatures":[{"sig":"MEUCIQC79eQ/8pPQMzrmkEOn/hmK87fFAA7WmlKT0rJud+52ogIgCSPvtCx8uSubOzu1uT8g6KaIeltqgbl3UPAluIg/LOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQjIoCRA9TVsSAnZWagAAGzgP/3g8r2Xns0Ibf8ENyj7a\nwf1Xu4WN29BNMBisO7VlKjQ59/UtD0e7TmH+xnI9pfLuLOwRMd/W6RisNF4h\n4tERXUrgbbtM7OmOdFC2fgWv6JlJCocLiokteZFlXaE4oVl9b+aV7J0/wqRx\nFBYE/GBUQ8Qg5Bx4HSoQjXP0J7RCylCPJNg57Fae+8eNwD9XlW6PCr6ybIqU\nxOwtdutZWllwJ2Xd07z7tZxDLcx6Fm4WCJ+yJ5p642rpgrd9nri/I04VJ9lH\nDFLbu3DWwvQfpceGvGLQe8cSGIdPd44UQwXlpUZudjQJr1/0SnaSAnEPJo9k\nYN6Rx6bDoDfckZVwYTT0qrv4zOLscBhdiUBD/3wrg8AzuOknfG/Wr7eKw1do\nZilnQ6q2XVWK0WPqP1Uc33ohiE12tPtFAp9ilGTWY9uE74K7GRLSLfugqTZY\nZkcEgzeqWF9GBN4lDk3fHY5IL1nYwCPtT5D9vGUfjtAJtQ88H+am9OkZkljv\nNke++55/YDQMMHg53cdT2T0Zy33DyT5FcqaL7A326XmHFcNgbjBU2fFslWGN\nVKAcUolLlfQzHkNLBuqzhl0faVyFJcgt/aog+Bj4Dii9WfVwXnzv01UaSy6f\nbeC9KvW68OMci5xNlus8BzhXChrj8Plj7OZYCA8NRQiUWDNUQGw+8Bqgbi7t\ndAr5\r\n=bXDQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d88a726d331a878c9a8721e3237e8cf6df49f1a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.818f4ee93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.818f4ee93.0_1631728167853_0.6475788399206399","host":"s3://npm-registry-packages"}},"13.0.0-canary.8355e14dc.0":{"name":"@material/auto-init","version":"13.0.0-canary.8355e14dc.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.8355e14dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e56d551174ca68b5e25f8f08a809ca10f65bcdcd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.8355e14dc.0.tgz","fileCount":13,"integrity":"sha512-+mTz4C1wNjCY/+RqS5DfTzGps2Vod2bo9DVqumShUSPzUVW9Skv7CzuY0BlVbqtyCtmIOcDxXiPzLZHOHJ8SoA==","signatures":[{"sig":"MEYCIQDm9emfOHUpmF+vmsLJThx4QFMzDRZxT5b6zbR/BUa/1AIhAMJYX5+2LvQvSqF0NLQeHKZXGA3uYJYXPVmlTWgaEu7r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQkVdCRA9TVsSAnZWagAArm0P/0oVD9WAhOwNUpKOTVCl\n7Y6pvVRAToxQXxQmXan6RsDXSgi9rnnDXIil+cGf1+OfBOfHvyGkw9WDkIXK\nM14ZmUA6YfweGPpVHWf653i9gl/UCmnYWTpRfUxJQNQEZcJ3zfe2vJyGsAcq\nOeay/1BCEZhAU5q7VeIdQzLkK/bAFLdB+ZPf8eB6CNHsDX4zj976BW47WggU\nEOOlMRmwRQnsxKqxC6JSE9x7k6lWaRlGAGS2Za/bg8QGoiFLETQ+B3diB0pX\nqxfsw7vKW//vTfXbbUmd5USkNEugYwsPHUNnd0AQ4n790yBZXBQ9SFGgtXPS\n63QQcPNKsxOrsjojNrAm0FEFtIKK/0V4AkaByBFf1dfInoCnxxeSNUtMgxJr\njO9K+aWDTbJh/efsf3kdgn5vFVyaaOeR/32ncVQpf03m95BL7nr0ambqiUPr\nnYiikfNYadfPCJXaFsAx0oJ8NmK2XdD9I08qArtOAazc47+5kiwISTjE7PVa\ndWEkxGbqD7WQNAV1ScyHaewv8Ic7HN76/wobTc0Rf8oWXCcl9IGcmc+1Lvbe\nGsTt0qtgj57H8I6dr5FZNf8KSbLxfbOY+/wfNhjzUOyFCIqih+xIOFDXjvGu\njw4tcVsvgwnhPsEBjDsar4Gnnji+u5Tym+bo/+qHugwITfEBuFBgiWfvlBQ9\nbxNt\r\n=j7uO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"065f64e5cbd54d86f092d8d1406bbd0852b2a6a7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.8355e14dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.8355e14dc.0_1631733085703_0.19872091561584826","host":"s3://npm-registry-packages"}},"13.0.0-canary.d4e16a6c4.0":{"name":"@material/auto-init","version":"13.0.0-canary.d4e16a6c4.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.d4e16a6c4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a87151c7ff64873684546452189058e3ffb6bb09","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.d4e16a6c4.0.tgz","fileCount":13,"integrity":"sha512-PvNiWBnus1HiexADNDP0SAFGdXE7pKyh+5HvB12bODx56xUwcRJKlpfBrZG1N7nVRLQTN/Rn9JU3905bz6/5Rw==","signatures":[{"sig":"MEQCIEGBG2uRPTWUzYzTh+kN+gvyWdPTO2l7cCP1t3cZDTbGAiBCbNHdbcPvnbzkIwH076R8r0yktQw6iPWu84Ul6VfuBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQmx1CRA9TVsSAnZWagAAMP0P/1GdR6Gmm7C4sH4BS9rF\n0smpUO19BTgDE8LKGCBverzBJ/iT6W+YFpG1gn+sVjnFJG1bkXDRBYCycMAp\ntigy+ENI0c3fZci4Yqxtlj45lAWB7byNxtXGaWLbLtjS7Bg0WDVQeZ9UQ0+b\nz0Mj/jlGofqBbatvba802E2mJ1l2SV++v1+HJqgQSXbywnxBa3XudvrBQYqa\nJS/HD0KB3x2bxmEYwFyBhlSM5qCoG+MMO0P3Uk5xkkG20wLZp2cBc7uQoEG5\ntn1xPGSv0VfJLV+E9lplXpJI/aV5uHc+nSSRJ/7YwV2699KOvB4bARms1qA9\nnd7thR2gvwzNAHMLeT7Zs7xYf7VI+8IHMKbKH6nyKO1vGKE/xgtNYDh4v7QI\n1MWEVIL+g9t38Vo/TtfOJd7XpEs6zriF3q52i5UmNlGNuP/5LzHw+r6/HiTb\nyXpA4NM2G7IomokS38mpZTJFSKwrgQVSAj4Ytnrc2YpbROuSHVhEDWFZE2MT\nIPAjx3QE9wZswnCX4zuTEnvHLSl5yqeOP5aqIpnpP/Tib3d0S396qi2i37f8\nvByplRCgUoZzZiWfJhNfjXEaQQ37HsbwpDCN+dK02qH6HnKriT5GETMe5ImL\nMhr/WI+H7OPXv7QR42IeOlwBnSWmytndjLjJI+ekeSdQPMgoIvo1SlbkDOYa\nzqXt\r\n=t7VI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2c2d0c3f7c18e3a2b581679df71df5e7a0e2fcb3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.d4e16a6c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.d4e16a6c4.0_1631743093298_0.6998462782460633","host":"s3://npm-registry-packages"}},"13.0.0-canary.65125b3a6.0":{"name":"@material/auto-init","version":"13.0.0-canary.65125b3a6.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.65125b3a6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"827bcf0d9e85d158eb2ddc4b9f723b67d1213e08","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.65125b3a6.0.tgz","fileCount":13,"integrity":"sha512-gsVU0W/zPBT1rQYJ8y9R/8nQnosGA+SRgthw9HPVelNfZkxF36+EIkK7uKIUe9Mih49vfnPlXKbbKjm5U5gwEw==","signatures":[{"sig":"MEUCIQCgsf6mC9en+Px8jmbahxM/vzLGqtGFtliWxvfgh2D0JgIgEitnqR0/zfvodWGQFav78wXZB6gx5rSLY6BspxGRSOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQ7QvCRA9TVsSAnZWagAAY+8P/1WKnvkDGOlJQzbYFNMZ\nm0OA6v+fYJlpTgZ+YOu3nHz30SbrSAeSC4R3Po+YR1IvDTZwCGlqs5GirvOx\nLAWrHiWSRRglMczuazvb7mfp4QyfPTenx0nXIEd4iY3BlnWEi3YdsE2kwkb3\nAsdtlkrqYNHg+S7eAoR9FqL/C6BcHGiUdhqnoJlDW+TPWRF/wPav0TVlqqRu\nxHWE/5GVSHmur40RLsUviCKSVVFULwHmHC3ooqstshElm0k0osud7sIGOC8E\n/+//5X11qAO3BDFUXnfz9d8A6qsrYCAGfNVrGain8/a+4eDoDYmdyv9JpByd\neMdY/AvoBnCQbfUVx7YcuvXtYSZDOElCkhp7owCOjqGTpqCJyKBpaZuTIfxf\n1C5HD9vTY4ixAX8eRcl0XhNOR8lvSY+yMgfGtL8EG+Et4evogJ3Hb/PTZWhR\nkX/AE69QK/oXCPt9ESMH+F14DLiz/QJBQkA7gVp4rJsH17PSu14Rsw5xAOH9\nPgAgyMFT0ymsJ9q7CHAsj4UYiQ0Pp9X35OJFDGaZpcIfsS5O33kHnuKiK0Si\n++23eiPoJV5G3qd+XcAm9G9toKLMG13KMlItbacoad4/EVeIXs9nSZn2Xp2V\n76uxWMK3MY98HLIveA3WlyMwE7gzjsW+1rbA5U/G/WyCTEg6T2AKP/ELIM0a\n0sc1\r\n=ZRRY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7f141fcd82e6061ac62fb457dad40c0ad70e52d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"10.24.1","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.65125b3a6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.65125b3a6.0_1631826991255_0.6962088758793532","host":"s3://npm-registry-packages"}},"13.0.0-canary.80a583365.0":{"name":"@material/auto-init","version":"13.0.0-canary.80a583365.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.80a583365.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ee2a9ade9eda48127ea155348c3826e6bbbb30e2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.80a583365.0.tgz","fileCount":13,"integrity":"sha512-2C/aH9FpyseebdhM0TykpCD55CuYwUII4ZNxDCAoh1zLy29Pcs6b6FswBUzG+gtYIgVJOsY8v5f/52MWU9VqPw==","signatures":[{"sig":"MEUCIBkb8Yv9+7PPNeZ+NXbjhwrD8p64/w8FA6IaXrp+8ZAuAiEAvd/yiE2W8HLyAfMALZaR6wpnr6xgB4NGFICcNOBV5EI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c174baf193216601da7fe07831dd2152585c6beb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.80a583365.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.80a583365.0_1631910901572_0.6657666765470187","host":"s3://npm-registry-packages"}},"13.0.0-canary.83900936a.0":{"name":"@material/auto-init","version":"13.0.0-canary.83900936a.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.83900936a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06f94f05d297bd47228edd49c6d9ee7b1e8645aa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.83900936a.0.tgz","fileCount":13,"integrity":"sha512-G+RGLXd/+CCCoLgnBf8FE5N+opx1GoPAEH0hq85qyHcWpz6ygPvMhxXcke6i5aj93o2hmCPS/nRVlUlLVp98Lg==","signatures":[{"sig":"MEUCIQCeVgRAZU4LIwfYOMVNLXq3f7E0MPC5BnBcXrZvT341zAIgR88FBSe3+N/CcKUGDMTY1nLAdiPQZ4NW2Gi62EWAx78=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ca6026fb6b378ac9a4f14997612369fe29f31093","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.83900936a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.83900936a.0_1631921015908_0.9438664458662489","host":"s3://npm-registry-packages"}},"13.0.0-canary.860ad06a1.0":{"name":"@material/auto-init","version":"13.0.0-canary.860ad06a1.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.860ad06a1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5040019dfc777900f294528e1cf7d433ec200984","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.860ad06a1.0.tgz","fileCount":13,"integrity":"sha512-iHmiRAz/kWaand2iwq6neHr2th5zKvcszMRND0iIbsMCbljYYfptWVObl8neVE1FpQ9vcj/JPPDZ1htPpjHckg==","signatures":[{"sig":"MEYCIQCKNUVVF1HXXhU/Qo4qLdk3CjS6aFfDeofLjAKb0BqIOwIhANZwwOtBG2mdN+JWOIKBVy73oO0EATjiUSbQwWIbsyMb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f156ac018a526d53d5f5077762518483bfa7dc7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.860ad06a1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.860ad06a1.0_1631921714336_0.37134268088447775","host":"s3://npm-registry-packages"}},"13.0.0-canary.3b8d4429e.0":{"name":"@material/auto-init","version":"13.0.0-canary.3b8d4429e.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.3b8d4429e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"45c2aba52a71533d311c16dc5f5c79d2df3f1c9a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.3b8d4429e.0.tgz","fileCount":13,"integrity":"sha512-oK0hDC538i/44OB1+Qn/xieCsOURuXILHBvYu3Tt+PpjLCnW3qWMal+kWvz7a8jCAnVcHTb6MgyNR7D+bEnqqA==","signatures":[{"sig":"MEUCIQCtldGKoBScd8fJKQOXysjnuytWk6mlO9w/7z6M+DBEqgIgat6QAEBKwu1YAzgO8zvWya1GuSDOgJ8U5preZtcgb3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c548d2fdb2731631683bc92955d6701cd0c2bd14","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.3b8d4429e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.3b8d4429e.0_1632160007331_0.009618959292194695","host":"s3://npm-registry-packages"}},"13.0.0-canary.2da3606b9.0":{"name":"@material/auto-init","version":"13.0.0-canary.2da3606b9.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.2da3606b9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dea9387dd220e8b1320f5933054088de19ab160a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.2da3606b9.0.tgz","fileCount":13,"integrity":"sha512-SHCgRwP+Et9eiRj0Op8hdVVmV4egsTt2k67oCPDUWtRiueyheKLeFBoaahtSUdEHUY79L8iKDz3fz+IPcyAPlA==","signatures":[{"sig":"MEQCIHlRyaoVgaLvvUavveE4hVLltyS5ITTb4BYGbCmy4PShAiAQVDOXLi1gztQa7o+EE8sejj4bozaRMko9UZFycF+LXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c452408cf52d900869313ad573c1b84c9d6a3105","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.2da3606b9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.2da3606b9.0_1632166619327_0.8520312011559235","host":"s3://npm-registry-packages"}},"13.0.0-canary.e8c598d1e.0":{"name":"@material/auto-init","version":"13.0.0-canary.e8c598d1e.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.e8c598d1e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a58853e71d033be3bb9e28f7fb3e6241fd93bef0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.e8c598d1e.0.tgz","fileCount":13,"integrity":"sha512-3e1ta/ZPFeVqlFxtnKVb+7t5eResDdj7Yx+/pV6engRmtwaKpb5jMvCEFpE1uANep5PlYjKADBShBIXSE7OVMg==","signatures":[{"sig":"MEUCIQDuHkDIJMQcp4cj6chUCY9R+vVa6LJKedVNElLIX4i7pQIgQCghYI66xECGobycjpAlDlOxK+Mv4auEoA+KjUxujmU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"11ab5557b275cc7f950ff2123684083e6245eafe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.e8c598d1e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.e8c598d1e.0_1632172267928_0.861970782569428","host":"s3://npm-registry-packages"}},"13.0.0-canary.1340ee9f7.0":{"name":"@material/auto-init","version":"13.0.0-canary.1340ee9f7.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.1340ee9f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"861501b1d2dadf8c1641e57aedae73e8935bcd14","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.1340ee9f7.0.tgz","fileCount":13,"integrity":"sha512-78TPBk1aQYD9P0NssyJmdaRLEPPIpmHW73+x6zrw4/bA3SS5wtUiEScuXV2OgSlox0jOjNwaOTrulc6LhPIQsQ==","signatures":[{"sig":"MEUCIQDRYem4p19Niy+ZrZ+yutCPiw/bEkpROQGfYERHgWzW+QIgNf+gNP38vJ32y7iT/78XRWVUHDCC8ycUmCikyPfu+6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9cbdc93fd9954f12cb74ebaf2cfa5806d078879","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.1340ee9f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.1340ee9f7.0_1632333430221_0.01386677717289797","host":"s3://npm-registry-packages"}},"13.0.0-canary.65084baff.0":{"name":"@material/auto-init","version":"13.0.0-canary.65084baff.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.65084baff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6e918f4f3af5602f30198b72305392623c07ed70","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.65084baff.0.tgz","fileCount":13,"integrity":"sha512-oMKnradrY8Wwa6ZswyMAx05fyQWlz3KymTti0HD9pYVkG5LyCu/MT/qRYr2YElni0BfeVfQzpLWcl7FC6HujIQ==","signatures":[{"sig":"MEQCIEAyP8X2xE8tygQafiS7ZAnit5R5kNIC7FdEVt7KBylgAiALdD26FEVwCNkF1pn3Dlc0yxwS2wFNsNZMiL6oY/T4EA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"afe4cce0d8c7e5038058ea8198ffd72e99e1c941","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.65084baff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.65084baff.0_1632432280778_0.9133910073538114","host":"s3://npm-registry-packages"}},"13.0.0-canary.c79aa0cdd.0":{"name":"@material/auto-init","version":"13.0.0-canary.c79aa0cdd.0","license":"MIT","_id":"@material/auto-init@13.0.0-canary.c79aa0cdd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d8bddcd9c55b9fd1fbd038c100c52223d7aefdc4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0-canary.c79aa0cdd.0.tgz","fileCount":13,"integrity":"sha512-7C60FONANtvsjdO+7dQKcCGJwsDt8+SUQRIhMmDOagTtGmlktbfjeRyrraGNTXASDiasLufc9heuOffZkOoBqA==","signatures":[{"sig":"MEUCIGWBcWcvRIOAyfr8BLHYOfJmpJrjEs/+eTpV/s05pqJ4AiEAtED6DBUREnSWWMHpvzFwYdBUHuJa+fIzWQsCSeVgidE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2caa02d38f883966fd5f78948743dabdced9b689","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"13.0.0-canary.c79aa0cdd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0-canary.c79aa0cdd.0_1632490855988_0.6006131143814315","host":"s3://npm-registry-packages"}},"13.0.0":{"name":"@material/auto-init","version":"13.0.0","license":"MIT","_id":"@material/auto-init@13.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"892e4856ab630a5c9fea3a5fe3fb7205861a4d52","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-13.0.0.tgz","fileCount":12,"integrity":"sha512-9ayedaqg7dixjRjmLZWZgQmB1RDtxCUTPjnttdgdZQ0/sUKtmqvTzEW4ZNjJsr42XaXR4atlkjjvMIT5LCnw6g==","signatures":[{"sig":"MEYCIQDIblGpb+8614XvT/NpZ15dwS+TTP0t+vD+nkE52rEjOwIhAOKKUkTY5kJjvxe/4WUJ0Wx4zfDiqa2l/Bmx4HWvR01X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48542},"main":"dist/mdc.autoInit.js","module":"index.js","gitHead":"198431fcd8ff3028934d2cf3a5b292f8482a4570","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"^13.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_13.0.0_1632512706426_0.3859350270581283","host":"s3://npm-registry-packages"}},"14.0.0-canary.198431fcd.0":{"name":"@material/auto-init","version":"14.0.0-canary.198431fcd.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.198431fcd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b81579f08870e737f45c54de677d0c260d5080b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.198431fcd.0.tgz","fileCount":13,"integrity":"sha512-3XNLcxCjg6uESAO34xHs5/7Nk2uO557KTIf/eFdTq9PNZFMfWMHF4Zbt6q/MUkpGyAF3+3yhybzgkL2TikC4fA==","signatures":[{"sig":"MEUCIGFLngr27CDMuT4K+sRMpBZbtzuUVWdlp+g4YsTDBAQOAiEA8Dg071RqQjDs37K0oPklGnphswb6n9hsWKrBEbjpGsE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34242e3354729334618dc12d6bc959e0a8f14dd4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.198431fcd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.198431fcd.0_1632512750632_0.5728753230921497","host":"s3://npm-registry-packages"}},"14.0.0-canary.9a02b6ef8.0":{"name":"@material/auto-init","version":"14.0.0-canary.9a02b6ef8.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.9a02b6ef8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9eddbc8e0b2e225223e97ba5ec9f12d7ab4f8eb2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.9a02b6ef8.0.tgz","fileCount":13,"integrity":"sha512-n/NXKN3MueWT3OuMzPSxaLvGG+G95vqjwFegrDCR+O+/CE/OZuOXGXJatsKjCffLsvWqSMBwJEiHS21H9ULEEA==","signatures":[{"sig":"MEUCIQD87rUGyHm2ojvLQU70zyucfzR0JWIk7LylUtmXBDLlGwIgZHaSHCkqscMF5xsCw8lqKRm+bVzvYa0JRmWU7STW2K8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"13e91b1150d6339b15d71c44c8743eb9e2026eaf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.9a02b6ef8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.9a02b6ef8.0_1632575418027_0.5743297130191101","host":"s3://npm-registry-packages"}},"14.0.0-canary.758ce31d9.0":{"name":"@material/auto-init","version":"14.0.0-canary.758ce31d9.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.758ce31d9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b483ebd2892fd9f54167d7c140c2bc8d4681ca00","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.758ce31d9.0.tgz","fileCount":13,"integrity":"sha512-rhnBzRiDPJjNnK/qmoJfLsyitxmLInWuq+kJDnEK6YPLBGLpAKat8lxZDVQWyGA6punmp0rmWpoqnU6h28qZbg==","signatures":[{"sig":"MEUCIQCTgI+cEdaWsvxVJ4LuJchdnpAK1oH2WDfBxhjhCN9VVwIgdBr1hZVVwD24mADD4oFK7xiojmvaUwftVVR6hkLXigg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"09083795b738aece76a37f8a1dcc8daf958204b1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.758ce31d9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.758ce31d9.0_1632763711426_0.22173146008670175","host":"s3://npm-registry-packages"}},"14.0.0-canary.86b50ef74.0":{"name":"@material/auto-init","version":"14.0.0-canary.86b50ef74.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.86b50ef74.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c521a67c937c7cb52514718a6ed461afb42a1c18","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.86b50ef74.0.tgz","fileCount":13,"integrity":"sha512-6jct2HYIZNRF88r48n/eeWQRpuGobPbw3k15CoLKT1Yt1dNUV1A0IVxuOSD92db1L781hsu9jhsARLsQ1FXXDA==","signatures":[{"sig":"MEQCIFdpubsQull1IT9IgNTNxudKxTArTgL1cDdTtXjTllckAiA/Qhvw/gVXwpaeWKMRjLlPvjU4h6TDk0EXMNYaMESOJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5941ece7c1e494e720865be940d098a5556de149","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.86b50ef74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.86b50ef74.0_1632850933214_0.6139636323479316","host":"s3://npm-registry-packages"}},"14.0.0-canary.b2fe3528b.0":{"name":"@material/auto-init","version":"14.0.0-canary.b2fe3528b.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.b2fe3528b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0a1215e392d1f2563de86554ca86396e14bbce78","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.b2fe3528b.0.tgz","fileCount":13,"integrity":"sha512-XtO+oVjTKVep/BjCcLhkxOAPT3/iq52R+lVvmzReI3G/y7kJYtUmUMmiKBfWJ5USoJxRDdEZcJipzR+sTIZLYg==","signatures":[{"sig":"MEQCIA3GbZj230mx4cOe8XesH/BZo21idRDNfC0b1FrBUBwGAiBA5EVLXu6KC9vb4yVWD6Y4mu4ZYKAv/lgzkaZeYi+eFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cce11b1c181ea84c0bfdbef26112377518afa98b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.17.6+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.b2fe3528b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.b2fe3528b.0_1632956167233_0.15198435081438588","host":"s3://npm-registry-packages"}},"14.0.0-canary.586e740dd.0":{"name":"@material/auto-init","version":"14.0.0-canary.586e740dd.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.586e740dd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7bd74197eaffb774502db82a9a4b8d1495c7726a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.586e740dd.0.tgz","fileCount":13,"integrity":"sha512-IcDLHMhyzdzqWq4lPuGko2cGYTN6cQrr6DVV0r8jgoxRK7ImRreGe8e3CN9u/27nCv0+q5npuWqbUOYkQA1hKw==","signatures":[{"sig":"MEUCIBfSsSAg7UzhjvlG1wVDwDE/9gOx8YW5VRC9EPLa+NsTAiEApudwKb8phx716u7Mj4+UYBG4xJsHjt82CZDUrCbj5wA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c765889db11456de00c45d7bb289b6c7cf3ec27","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.586e740dd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.586e740dd.0_1633019429745_0.9363956504940207","host":"s3://npm-registry-packages"}},"14.0.0-canary.2ac92d766.0":{"name":"@material/auto-init","version":"14.0.0-canary.2ac92d766.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.2ac92d766.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6ace3c419c075b02894bcf833025501f310ea0a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.2ac92d766.0.tgz","fileCount":13,"integrity":"sha512-GCWqQrg4XPCW1ydIEkGBwYHTvr+UGmFHyizfRL6vsSbY8U4ih9vwoF1hIa7VlOZGiyXLxK7EZ0W+Dh3PjpG6Iw==","signatures":[{"sig":"MEQCIDWqE+63Sb2cpXXo0vQ/inkiSqMe3iGM8JWciTaKet5zAiAUdRf44EgP5Czqpt+Yp/qvobLCOGXb0EYrw5I+5pPDKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3a797e3a01110aeaf8270a13c2cc32d0871a8bd2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.2ac92d766.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.2ac92d766.0_1633462063640_0.07286305993463427","host":"s3://npm-registry-packages"}},"14.0.0-canary.353ca7e9f.0":{"name":"@material/auto-init","version":"14.0.0-canary.353ca7e9f.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.353ca7e9f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d44544e51880331d282829bb073a9609629e860e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.353ca7e9f.0.tgz","fileCount":13,"integrity":"sha512-hNdXcKmtkAsey975nTUA8kzD3xR6GDmxsWRrEbsKJkhLfiPPQzG/3Vvoxa9ZGKWl54JchKEnQAoAgxiy9IE1vQ==","signatures":[{"sig":"MEUCIBc9vtzHTHe4WNDf1Jhhnc7JDi1jUlFDXVOQ7O7ewW12AiEA/tPH28cELdpNVpRu2BC/35GjXHZARwSdAC8BZ0fQ/7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4f091efbfcb52d523712f9b99808d737b06a60af","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.353ca7e9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.353ca7e9f.0_1633718770050_0.6441847269275736","host":"s3://npm-registry-packages"}},"14.0.0-canary.c78ff0429.0":{"name":"@material/auto-init","version":"14.0.0-canary.c78ff0429.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.c78ff0429.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a2e141b992354cc6f76c73eedf3a59713942cf99","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.c78ff0429.0.tgz","fileCount":13,"integrity":"sha512-kBnCwZ+B3PnvQ/Ic9iCqDX7oGF6qXiZBMjFI+AGJ9w2fBhTeO0r3nbHzsnJ2kn8lIBeVrkTA4hklKn07Nhn3zg==","signatures":[{"sig":"MEQCIH+StaDuHFRXfZafiJ8fsMT4gWIMtttpu71Vj+iiLCtyAiAtbZyJlEJYgKgw2aoYpVrCOjT8qtdsm9aknLoXn/6PzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"55d918ee5ce9842b93075fa0d0ffd2b64b5f3ed3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.c78ff0429.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.c78ff0429.0_1633972878643_0.8538036462968686","host":"s3://npm-registry-packages"}},"14.0.0-canary.261f2db59.0":{"name":"@material/auto-init","version":"14.0.0-canary.261f2db59.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.261f2db59.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a62390962e98d56c00405b281e7e02f3b008179f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.261f2db59.0.tgz","fileCount":13,"integrity":"sha512-66KU1/nRCEOTBUtDKxBHffEFD5WPnnAs2OGeXrhzaWee4uSCIF/75VRajkZaKlxKNrSOCk6UqCJ9dgknwd1hxw==","signatures":[{"sig":"MEUCIH3a4yRKCJHbFUl8nRbp6TEpeAAAB+JmAIbJA5MByi6SAiEA63VhaC5k5erFa1xkAQreAV8EheiNhZ4SR4DYi1lOjtk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"22c1cb4091a589b9a53b844da4e8d98309c75acd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.261f2db59.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.261f2db59.0_1634749133239_0.5207086466017641","host":"s3://npm-registry-packages"}},"14.0.0-canary.9803d2dc1.0":{"name":"@material/auto-init","version":"14.0.0-canary.9803d2dc1.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.9803d2dc1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"de43855cf4b089d422d95f2ede4339763fcc158a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.9803d2dc1.0.tgz","fileCount":13,"integrity":"sha512-n2rgJ4XlRiePlf1cM8o5sKNXRH7Kki5Rd3Ok6cMxtMf7nD/YzAAVySBQjNeGbgpB6XV+1uizT4gtmHuDdI+KoQ==","signatures":[{"sig":"MEYCIQCwdSlawK+P2nNLwjQA5Tco0Q9jHCt3923OrcIhOQGoLQIhAPVu2e1G3EXXbCUjzUw7Z5y/qrxpw9/auwe5r6EjJ+pf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4ef0574fd4b362b2609f5dc9bc002ef96f07fcc9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.9803d2dc1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.9803d2dc1.0_1634757667526_0.21196642106814179","host":"s3://npm-registry-packages"}},"14.0.0-canary.348665978.0":{"name":"@material/auto-init","version":"14.0.0-canary.348665978.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.348665978.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49dbf01cb3f5a3649a478e2b4774ff2a82ad8e8e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.348665978.0.tgz","fileCount":13,"integrity":"sha512-Yy9HnbO525v+DgdBtKk2fpaLObxukwvpHbVgEIPw2XqMuFCRzuvQAEpz15ULqL/kwZlAa4HNjIE3aByPRVaaUQ==","signatures":[{"sig":"MEUCIGyQwqxqj4+Paf/lzl8HJ7JujQ9/HUhuGwFBpL40z9cgAiEAzQmKc9b7cTZut/LudFMWcuxmGp0UDQttzn64XuTdPmE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bf16d95c07dcfc371fc864fe30028299a2d5d0d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.348665978.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.348665978.0_1634827792011_0.836414243436552","host":"s3://npm-registry-packages"}},"14.0.0-canary.b2b979a8a.0":{"name":"@material/auto-init","version":"14.0.0-canary.b2b979a8a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.b2b979a8a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5dce0087683d1d44d9e6b4412d2424a37a304676","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.b2b979a8a.0.tgz","fileCount":13,"integrity":"sha512-wqbWE1cw/OMHWozzzZr2z8Jl5PrEONEbdJPaU9XWyxES1qmNA1eFMFRyjDAeMzCw90wE6JP5T4YXGYCPUvFTiw==","signatures":[{"sig":"MEQCICXBsHOlCCUsfEdCir1ixMWENgAL7dQZoYpzncVaa8YVAiAiZ4nJEDyf6HN3hW/j53o5mtXKHEPWz8nyi0pXUIENgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"08377359fe2dfa41ac960f776df2ba00e50e9819","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.b2b979a8a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.b2b979a8a.0_1635433884576_0.7585922552825475","host":"s3://npm-registry-packages"}},"14.0.0-canary.1af7c1c4a.0":{"name":"@material/auto-init","version":"14.0.0-canary.1af7c1c4a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.1af7c1c4a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5c4c8d3fbb53b879205be398c7427a31962489e8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.1af7c1c4a.0.tgz","fileCount":13,"integrity":"sha512-jQUT2F354Z/z0XM7kP1d3ijxohZJW1H0ZzPVlFAo1A898hRxVRLFLtiCtMcw96ws6yQFpj1y6GefWx4VosU6Bg==","signatures":[{"sig":"MEYCIQDBHJ+lKokHnBBKPYzncAybsPCKV6ssBWHqAJsKlN/YzgIhAJNdEUpqJ1iT2qfj0vgGFo+z1GF4wASxUny9Q8fUAIx5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3673ef3144cd47c5faba873a239454e11e3d72eb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.1af7c1c4a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.1af7c1c4a.0_1635443522074_0.7162436465823712","host":"s3://npm-registry-packages"}},"14.0.0-canary.4afd353cd.0":{"name":"@material/auto-init","version":"14.0.0-canary.4afd353cd.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.4afd353cd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1f83bc6b56f8842fcb76b96e4c58e24b212a2210","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.4afd353cd.0.tgz","fileCount":13,"integrity":"sha512-RO4jIeaHjwkpzPWz3hrfwROBtH5z9M+23pqR/V3QHQPOlOPQcO92BhtsGl48VlbAMZn5EE+nrEyWxIgrgsImBg==","signatures":[{"sig":"MEUCIQD9/MZo5zCGTbA+T4xE9qg7kmZAtgJNDJtpcviStojfLwIgBsv/Ax2oPOXNYgYyJjJuR+9L46XLrc+h8SnHhEdbs4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"491d940b4e97c65f274b1b4d42b3842e9bd3a4f9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.4afd353cd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.4afd353cd.0_1635519649247_0.11424610644914757","host":"s3://npm-registry-packages"}},"14.0.0-canary.a986df922.0":{"name":"@material/auto-init","version":"14.0.0-canary.a986df922.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.a986df922.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ceff01cd70b218e63434c5d91556ea77c0201e7b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.a986df922.0.tgz","fileCount":13,"integrity":"sha512-t00xYxOigPHWiCP17o550ZLAE5LbzuG+hvw2U8697bv8UdkIxP5NoZLb3Em73gUEJN9ab0k5Ya63choGi620SQ==","signatures":[{"sig":"MEQCIFkwNR8Wli/u0L5BqYqWb632L9xBDzYXve9/7nN4pYw9AiBgd0MGKsO8wbdTWYkLxfgNJ6hQjMvkrx/SQ7d1zt+QEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6fd5c666012fea37f8a5a820b4979cc66e59fe9f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.a986df922.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.a986df922.0_1635543258869_0.6037894937852217","host":"s3://npm-registry-packages"}},"14.0.0-canary.c3cdff07b.0":{"name":"@material/auto-init","version":"14.0.0-canary.c3cdff07b.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.c3cdff07b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"83f9a947c96cb8fbe4ef054baad356b0369b022a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.c3cdff07b.0.tgz","fileCount":13,"integrity":"sha512-FXqf1DJlkC9gz1CtdSmuObPh4RTwjBVkPYs/Sh5EzKvh6U01wPLTfr56N7hjM0f9hJcJ+vS6XjnBwPkSJwWcdg==","signatures":[{"sig":"MEQCIE3m3sz1dQ3S6yIpCo9KiKKLFjpMw57p3yJSibt5rKgWAiAIZVXIWho3i5kpJRAnDiPw1oAHGFAEhlkL4NDQgPP8Pg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"078c19c333e3161ad6b51a3fdc993d883bdc19c8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.c3cdff07b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.c3cdff07b.0_1636484711184_0.4766694216404541","host":"s3://npm-registry-packages"}},"14.0.0-canary.468392606.0":{"name":"@material/auto-init","version":"14.0.0-canary.468392606.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.468392606.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db0c365a726c715ba5ea274ababb14de72ec74c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.468392606.0.tgz","fileCount":13,"integrity":"sha512-pWrIyg6bPq69jZcrqbl7ZgzGj3BxOIV3er7MWV3zGv/BRh096wmOqtI8RpaE3zo0Rl/yxXTP1LuYKgeKxRhlcg==","signatures":[{"sig":"MEUCIDa+9NzdQvxn+JYKmPkd2meMqSsLCpjOZwGgFXJd4OhMAiEArPzmSaPvAKeecpDgjtSvt7Mn+FAnBAne2abMpEDgGSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ac451ce035a924184caaae0df5252896a7392e33","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.468392606.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.468392606.0_1636659561935_0.5303170342323509","host":"s3://npm-registry-packages"}},"14.0.0-canary.828f9803b.0":{"name":"@material/auto-init","version":"14.0.0-canary.828f9803b.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.828f9803b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e67f1cfd0588088c9a3ae02b98c8b13266825a99","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.828f9803b.0.tgz","fileCount":13,"integrity":"sha512-LxWjss1CqTOnfs5SPJOtKvQkdd/I3p7/BUWyZEcU2rW9OUr0Rp5qyen1kPEXrxkH+YwgTd8BCkdD5l2MuF99Uw==","signatures":[{"sig":"MEUCIQDNI7Azf7ttMaeMmbwEWmsATNENgIOrZg9GLvND5QbkIQIgAxCw7CZBow2JP7qGybnGWCoUZmGPYqnIRsi8ego8kEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c64e9f941d45dc823621c068481be90a0eaa0f39","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.828f9803b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.828f9803b.0_1636660206735_0.6343887882025092","host":"s3://npm-registry-packages"}},"14.0.0-canary.8795cba87.0":{"name":"@material/auto-init","version":"14.0.0-canary.8795cba87.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.8795cba87.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1894a1b263197705333564bd20aff975456f21bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.8795cba87.0.tgz","fileCount":13,"integrity":"sha512-Cpg5sqY5a9USI+YAlH+33JdrtVkJ8Ob2Fi6GbNwwMriUWGEmMFPo0xdhfwi3GEdQNfWBCtDCBFZahdA/8yfH4Q==","signatures":[{"sig":"MEQCIDkbLyx5Ffx6iB1ziIAByUH7nwEbZnMdcKEgAgUWFuDvAiASp/enzeh2SrcvV736zw9UQCZbinelbIP50LmuhrkX/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"12c2e8ee797434819828bade998610af66a528ac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.8795cba87.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.8795cba87.0_1636660563346_0.1867243112535062","host":"s3://npm-registry-packages"}},"14.0.0-canary.cd7f8cace.0":{"name":"@material/auto-init","version":"14.0.0-canary.cd7f8cace.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.cd7f8cace.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"64b142cda1ffa29b3ac1b60fa84f0a731984e51e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.cd7f8cace.0.tgz","fileCount":13,"integrity":"sha512-cT2UKqaMNm227PogAM5g1nIosyrdaHPvxCkvp9vqaHb+jYeX9XCoUqHCOK7KrU2tdKpHAiO95Tru21M1hnC/7A==","signatures":[{"sig":"MEUCIAPLq6eDuvZCmgE58wPegQOad6GzxhSGYhdjv/eRPaonAiEAn3v36MdB2M4AVpM3rlkhhH5xkeYuxnmaquKxGl2vU1I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f1e9f39fe9a43e01e67b849cc2a96a5a31be67c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.cd7f8cace.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.cd7f8cace.0_1636660660833_0.6957192457855286","host":"s3://npm-registry-packages"}},"14.0.0-canary.207230eb8.0":{"name":"@material/auto-init","version":"14.0.0-canary.207230eb8.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.207230eb8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a7adc7e8ec39215c6ab43e6c7dbf96b1f76ead0d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.207230eb8.0.tgz","fileCount":13,"integrity":"sha512-ommYVZNgx0B7h/9SGVcC+JvhBBAnvVbAefqT7i67+cQODjJKQxGPPNRzhgZbf7hyWb5oFk/7ZPYU089JNfe+Ug==","signatures":[{"sig":"MEQCIDavSSckPctsHYDrDUKAtUWYEWA2G6y6wbrslnONZCQZAiB/0FH37qlYAg4WY6Zk4P5sUN6hJLvf+4r8cZCgYArvjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"de1b12d24234ecfbfbf5a665f46c26b71016be2e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.207230eb8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.207230eb8.0_1636669415562_0.2581356053840447","host":"s3://npm-registry-packages"}},"14.0.0-canary.991fb99f7.0":{"name":"@material/auto-init","version":"14.0.0-canary.991fb99f7.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.991fb99f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"334366f4834c80ce95460696a7da44e4fdd57da8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.991fb99f7.0.tgz","fileCount":13,"integrity":"sha512-hZJQgP2z4/DRhmIkdC2W8Mh38O7ehBSMDIWcoKET0ZekNXGlX/gr+ybCJ0EWFfeHshZviYPx0ACTOHboozw2MA==","signatures":[{"sig":"MEYCIQDE3QtQ33wEk7yJs7yX682wOqojG5MQn63b3ZGI3gAqeQIhALvvwHqYnP3H9qExdi0vLhLe7ZznQHD+vbwE9WmKgRl1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d13dee60c11cfef5bdcac33da4fff6f13626c05b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.991fb99f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.991fb99f7.0_1636670141720_0.09744127776045985","host":"s3://npm-registry-packages"}},"14.0.0-canary.15db4f164.0":{"name":"@material/auto-init","version":"14.0.0-canary.15db4f164.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.15db4f164.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca67cda5fae98d48a820e489a4179d96882bfbb0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.15db4f164.0.tgz","fileCount":13,"integrity":"sha512-NJRhi7rPETMCn6DnclTVnwySSeS79EemzAqaGDT2UKfzTqnBwDemYkXy2SljHFN/xVCqlDR+76FDnT6gn49dXg==","signatures":[{"sig":"MEUCIQDQWz+mCyPpZd/PBPozsm4LvXL5iWtLLl7QO1mrheRF6gIgXFzgBQF2PATCqQbinhJayCosf/7D7NPJwheO94+NrU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"562e11bb445a0e51783e848adc61b690a7a1ba3a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.15db4f164.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.15db4f164.0_1636738143881_0.18433656695317024","host":"s3://npm-registry-packages"}},"14.0.0-canary.8fcad5a3c.0":{"name":"@material/auto-init","version":"14.0.0-canary.8fcad5a3c.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.8fcad5a3c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c45317f50a91d609632df33c48e3a43ccfc2b9ac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.8fcad5a3c.0.tgz","fileCount":13,"integrity":"sha512-ebYZsj0EVQJVpkdP2b6gyrygKhAORQyBUupAOAR/IYelNx2kpD+ZUFp0pvSXsjrU6I87htYvI/Keku8wmKId9g==","signatures":[{"sig":"MEUCIEqukM7GKlGuIOryqax8yZHe70uuGld52W8C3zGjkBMyAiEA4PxQQpTMQwdPGx9h3rvyYC48EZFpeePa/dAe/hE8AJk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"14b654013dacdda833d34b73c1a94811202298d0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.8fcad5a3c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.8fcad5a3c.0_1636744384554_0.3123904022380597","host":"s3://npm-registry-packages"}},"14.0.0-canary.f81fb1d23.0":{"name":"@material/auto-init","version":"14.0.0-canary.f81fb1d23.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.f81fb1d23.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8674b77b270636dcdeb0bb0ad145609d0cf610ff","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.f81fb1d23.0.tgz","fileCount":13,"integrity":"sha512-zG5yW/l5xLIYnAX6xW/hV1mkH8URqwdxDXi+/qYFbyHTcL4krRLOtTagAtcTtu0Lp97TwU71mLFyRyNGW7tO/g==","signatures":[{"sig":"MEUCIQDws3qR+EaknBmMcvCn5Ac+DHjEdYwu49hfyZIkQDUEHgIgFRgLzL7oaM8ANR68w7vsnHjjjlnApUdjp+EgdYSeOok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"60600a1b8cf651dddedd6881a54b20db7b75cdc6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.f81fb1d23.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.f81fb1d23.0_1636756771608_0.816600852304791","host":"s3://npm-registry-packages"}},"14.0.0-canary.783f6fd5a.0":{"name":"@material/auto-init","version":"14.0.0-canary.783f6fd5a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.783f6fd5a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"901b5587708d8adfdc0184636c6d1aa6cd119bca","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.783f6fd5a.0.tgz","fileCount":13,"integrity":"sha512-iF9nxqhkOsdx/QASRMpH/bUdNai+FeCeOtnsMSt6YynOnSGu33L0ZyeGer6ADvAZLhk1KQPLS78EyLlG/2zdwQ==","signatures":[{"sig":"MEUCIQC0hvKNut/94RMV0QSW+kRyGUXVOB2E7+5kO95HPVoirgIgd1SQaAYsZEVcA2f0u0Wex5P12RCjey6OLYQI6qjrG4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk0ZPCRA9TVsSAnZWagAAhQwP/jMqlhleX/QJah0J7R7A\nwWpXTbtrEb1JbG1NhkXB62PUSv0+kqgpLep2VnB/0g1vCNLx46mOuDzuLZJl\nsht6m3/wmK+1VVB1R28OxlJRlmsTOG9RJqjzgpO5HAv3HiwleanNWT+g23rp\nMueZZlPWq7Cebuo1DRHjl04MIWJi6mR/LvC4KojrryOLv2qnjSvGt8TD8jqM\nWk4FyntJRHCdv1gm06lYdMYLZM5gATvbkz889GQHS//0eQTavIWGPO5tjuhf\nG2SpI5MJtPdYBAc5jbHiNMuE5s5X7qkWXvqFHdN4i+HkLZpE/5NbLNGjg82o\nJHI4iBvdccJ+N49wVUwzTxUZ6jrTvvyE3gEPDiYZG0CvxkPej0TUtxG8xAgu\n5Sk7SwjZHU1xc+WDaYpSOxanZp6h1FrVy383cipNm11xWzucJEZTD6U/yLUt\nwWcot6MJLAKA9lCcKHPTuYzTWENEfFpvyej6vdOlKzA1e0PnNTD3D8EVV5Ou\npgc6GH7J/08iVDffyfrt0feDPsbUyoMuVKyMiD1nBMmZk08Pskzk+bgfyxDJ\nLFg/moVotuu1/AYXPS8TPp6ip8b4fzuvyZFBchHnuCilCAmGQb2ROwLJT2Q6\nCZd9HGStNC0k9+DC+/xJ4R5aTponcz1FQvnH5sNMKGjdyU7nCoGk7v0p+lNY\nhugj\r\n=jD+o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"29ba9297d5424f35d235c8ff87e393874c1b0a25","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.783f6fd5a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.783f6fd5a.0_1637041742912_0.5726446905616336","host":"s3://npm-registry-packages"}},"14.0.0-canary.d57ec74c7.0":{"name":"@material/auto-init","version":"14.0.0-canary.d57ec74c7.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.d57ec74c7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a499e2276a8b563c3484a61923bc7115064a1c70","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.d57ec74c7.0.tgz","fileCount":13,"integrity":"sha512-riB2Vetz7ITDvEXRcvJMjFfrCORXelLMPhbxA7s/BhdlIPwuwr0XxcCZfcPR/n2aqCAh6GNfijAl/PRnFsFBtQ==","signatures":[{"sig":"MEQCICjOmavpOGTdX26awLG8X2Qdc79hAG6SzuXG3EioUtZdAiBo0r8mmeXWPWso4avhbnPfBbMNtMHqcMoieZmC2djlVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk9kbCRA9TVsSAnZWagAANLEP/0/+QeKJn69ZOLqwjoL9\n9fKEB6JotOSNpFhSASm0PmAHaJS4pVCr8+6Qr3Tub2Iz6aZs5sO6gAilQhUB\noqdBC3LCr2GDFM+5jBqkjAVz45z9q9jnT5AOkoY709JHO+S1ZqLIFRtNxeZo\nXxiDK7YjFsKWtYpx59e3o/b0oDCjiO5pP+fqLWVIPrxyFv2UrVXwzftqQu4p\nJ2seU0xkNvZmzgXYQHBBsV7cgrVYnfsi7CBdoAKIlZUPlmkUdt6I8CHvk5UO\nJmBSaOBUv9Mx2OAK2sIUk7c0M85FpxZm+CaCEKPpQJrwsdJyYiuHNlbthxo+\nijJfGzg4nqqcMwbkWdaZe6vVJH7lymUxV3RchiIx8DNK/dabAIaN1SCOw8DY\nUZouzcBBYVexWP3SVvlDMBDfzQR9Dl+mDp6cO/UJ5Y4CtneLN7YJCEe8FdTu\nu90TDr9uo7t/b3uEMkM91tH8ouLkqzW8TbtKQRgRpM4Gccs48HjwTau0aHkt\nsBQHe7SR7hWOOyuuw9UldyQbGcZ0i/58zzj4P6HQbAXeYBlkj5xJuKE7lMkN\nQlFj4B7Hjn4kpX2qfeL/KLbKs/SvnslsbwuT8+O/3bbhL8wbd5s99TeavPZl\n6my6f5AxI6SsMUsut43rtw65pJEdDMS2wOxwVrkb/ZiTLSSOV8OFXM5IpjXZ\nhpv4\r\n=7dJJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dbbd8db21de66e88b3e713faa99419e6b2f53c68","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.d57ec74c7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.d57ec74c7.0_1637079323802_0.61787017302201","host":"s3://npm-registry-packages"}},"14.0.0-canary.554c71829.0":{"name":"@material/auto-init","version":"14.0.0-canary.554c71829.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.554c71829.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f6448136c74a49758a366ad8d6a3098f892ccdee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.554c71829.0.tgz","fileCount":13,"integrity":"sha512-K0DVRyikIMF1lmsVONO3aBmLVo4AJwrsv6a+PZTiyC666HZODpByN8ytjl7gg7rVfKHWlX5r96RuXDektvJE6A==","signatures":[{"sig":"MEUCIQDuC42+ysB1Ynpznd/7/wVDBfTTHOeaNKWl1Gj+yui7IAIgdk6/IXpH5zThGagAqRJRhlsKUbbuIuhjFqg9Ojmof08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk9nICRA9TVsSAnZWagAAlRMQAJzVRs/GVPxPR2rAGuvz\n5f5DPGxhUX4elXStxnHQRTvkuslu849Y89IoY39lTWAiTkZeH99I+hYc6Nvu\nnzYWuC0EdFDke5OaFyx2JKzZK+yzo4L1qDaeB8bAEMHXaKpw2RBWLRABcD/b\nPs/xJoMpL0hL/g/9ZiZcK/YBxkaJpzN+3mQ2IGgxd91qboa+UIC34CFZbfdU\noLcB9dGwXcVE977gS3U37UOZGqY/7vUNE2g6SqJukZ2NOlgXd/01c/qFRS8R\nvFOK0SeWoZUr3QEHGZhQzEPv/SPYxGe/RPXPEmfMbxbm01iOxOYJZ2qNhejv\n0+tQu4VnloTTgy0ugYi5vUfc07+xuEoQM9imsdXd/tdU7JDlNC3Frxm1gKos\neIiP/DPAbMGAtmqwvDWKgqMqbrpBggHx4f2jIA0k4mG6ALjMSNG3Zpfaj+++\n66JxYMsrYPGU2Cya/Z2z/TENfav2fkvbdrJzo+jtazGZfq4XsSVJtWXjno5Z\nt3PxRUGt2eq+GlkaWfYGsYC7oXzP4Ah8CaZTtQkP4rZbefB7occYgi21zNie\nEnTPsmmFFNwLeWkcwr+SSQaxmGuXQ+e/F3Y2YQzwk1zzwd9Ukd9byUvjPLpp\n+x3mFUIxVIFHr/JQmH0ytzy7ZKEAirGFoqS/an1aqLbHSGfGTdXnSQh3f9xo\nH0KV\r\n=RKoO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"be0799ddf10fc34b46ab20d754f7ef73d9efbefa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.554c71829.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.554c71829.0_1637079496554_0.6278461915247959","host":"s3://npm-registry-packages"}},"14.0.0-canary.3ef470efe.0":{"name":"@material/auto-init","version":"14.0.0-canary.3ef470efe.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3ef470efe.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bac4b1f9b52ebb412cfa84f540b8ee62e80ff97e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3ef470efe.0.tgz","fileCount":13,"integrity":"sha512-awy3Rq17mNlwGhG2DB6KuTsnd9/zz7mgqpcJ31Gw2XSqRFiLS+PdTfMLOsKeD8NRqaA3ercf4RUAvMh1KORuaw==","signatures":[{"sig":"MEUCIQDt9Nf4HiD77Hr9u6Ya7pURqtsNMoqth1kOJ1HSLsLwSwIgCQmxutryb5NPnjXslntaUeQKyBbBoKaPWDSbSCZ4LDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk9ruCRA9TVsSAnZWagAAPJoQAJDvzz4udGF9U9RjtFAN\nABUeAAcZBoiRk95k2MZFSrzIbS72Gnr5TS51DK9oLDOitvrR4gtN7mGcfksj\neZkHVVLZ9ruw+1SOwc01myHOm29BBo0eqnjkZBjIbRCcxBIZJpYTWHuF3OCh\nEdOihXleAQ2+PO4pVt5ziGZU2j+i/pe2fZ50UfZrNjpLj2ThNYjqQJNy8sE/\n6zdFf9m6SlJK/CTs1bhTNgWc0keiRDAuxXOL5Kwyb0GRU+Hm87vSsM2Jk3Zo\n03V6fh5EBJgpMh3FLJqKrpuPA1iA7hKyYLXAEqZ7rsNVXPG3WIAjdx5EPF1i\nW8S+mALqRSMKupUOi4OTvkwQ3erE/Us7NijjPzrSx0ykH3yytjw3PvsTCWJV\nQq9b0/6l3oDDtW3YZQMftKH7Z9Pu1umO8WCm42jVSHLu1svzzrJk1hDK1Cn1\nx2rA4xwo5hiq/lb2fE22FUUnE5p/uPTJv74294KIUfAhXLKmaMehyTY/hS8m\nIRTB+ATz5j268QCTpavegNlFEYziu3N4i7R+/ZoHm6RgA08JSGsYoX6a249p\nYdt2P4FbY/LTpzPlHNLhNQi8kaC5eklBJRYRpoAFboAr19Su5dunRdGkRJvJ\n9wIQ6CEWJ578i8eemQknX2k6DbjAR73QhisSCtaQs0xrgd2kf8youC2gL6vw\nsv2g\r\n=fj2X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"49429a109e0c13bb4f9d8fce0142cc5f142a6afd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3ef470efe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3ef470efe.0_1637079790654_0.05372890881667236","host":"s3://npm-registry-packages"}},"14.0.0-canary.61a28b2b5.0":{"name":"@material/auto-init","version":"14.0.0-canary.61a28b2b5.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.61a28b2b5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3e47759e907c201710c1fbe04a048006efe9b5f5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.61a28b2b5.0.tgz","fileCount":13,"integrity":"sha512-PFC92ybzeoSeXdsGoFLyPCnrGCAHb37VbhHosiU4lB9+Ww6LdbbT6ut2/Cyfq6cu3hDQpFf99K+0YObLhS3f6A==","signatures":[{"sig":"MEYCIQDsu6gfDB5QQC+M0VhxAGJZvlar+HwtzGeMm0SyIxV3QgIhAKAtKRQA/QqXhKKq3Y0TV5ZUSbdzfXQ+UlmVU3LpTfpS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlVDLCRA9TVsSAnZWagAADzUP/3g/URaWVDomZEE0qaGw\neH/htmA0+24AECNxiScREa75oIkJ5FScRgp5pPFUBii3RWP4KBrcL6wb/H9Z\nb5CtLY+eFH0l2GoMxKERkYjo1ogypHFxnWMuFwNar3r+YLux6fy4kghj1dEV\nVLjg37DJ1qnFRU7/nYEa9On/zfW+S5Z1djx9v1LZFNdvn75VHEyd/dRz/8JE\nfCTm/ScVEqZpOgSfHRjT65pMre2OX/I0ao732nXIvRKvgkUjSQEyN6xmfOjU\nlrrnHGdQ125S0fx6Vov3YFCCNHsZgYnv0xFz04j/vF9zM8myRE2s5o/10Xob\nvBzK8ksaw28MUnDfFebbL8wIovlmfPQKHzpv80BF+tfqpYrwA5f/gE0dWzLs\naj8olCEBs5vRjMfhkztrWjOfEr6ADSWbSybu9wGKaRzJDKiKHKFYSSkOvcFe\nMOc7Ug0XCIhHeQ9QArto8tm+s34Zz4CPv15994zKSVBV53Pm5f2ehYXeLCaJ\nOMaahoX2s5QVOOc/K0jk8QxnDHIsokUBkx4nfRjcp9m/tuwFFjZMbWWiwi8P\nerOkO7t5OrinKSQ/LXkRo4n2eQPqcZBZizwX+ydbDq32xa1hYlUfXJWM83MG\ni7lnmxKSCwPVVE8nsxixzhthYVAcip4V8/+0BzPcQTmjh6F6YfTc6BsaKrSv\nEguv\r\n=nNdT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"314b98aa8ec5a35ba8a45706765f4cd7496dd803","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.61a28b2b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.61a28b2b5.0_1637175499554_0.05727808935189005","host":"s3://npm-registry-packages"}},"14.0.0-canary.fae6c652d.0":{"name":"@material/auto-init","version":"14.0.0-canary.fae6c652d.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.fae6c652d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dd4e4f509f9ae0a17d92921927f37ca19a8611c4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.fae6c652d.0.tgz","fileCount":13,"integrity":"sha512-Sz8vac2J46Qo9KDRg3Pnw+JfGr7nB2+n/QjppC4CsJzXblFWm5Ls3wysdCvQwzGklkXL73WudarvkfyuzqDpbw==","signatures":[{"sig":"MEUCIQC1Bxffa8XJEppU63Qtvc41Gw11nV4Rt3tUG/Ai5be5tgIgWr4LnFBzBumqYSbYTMRZiTN99HT/uKE4LcNWsfEAvKM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhln4jCRA9TVsSAnZWagAALYMP/1wXYQl7XGUAdXDa0ZB6\nRb82d7eOEKqLHpBpCQzSTmyaoXZLD0R+rLHW3cIE7OmBGrs2P1hhZEIKkfLa\nL5JGDQyUHDCPrZSsfsMLoISrnPBUu6Rn8WG733z5d/sOIEhJptufteHVzoM0\nu791VySKVeCfhEV9bNalL1MEqOJE8eozL9MZvcHT27iGK9Ooxkw549RjCWKD\nSZqjQLBZnEEbrIh2q7Cu0FucgM+QQgQoXEfE9ssn1mV/4NyNRWKhmCTM+ir6\nBMS/lNzJFgBQnWmF/kdYYNju3UXiraJp7/E56DEIvU42kSCL8jfl+s/Ig6oa\nQoanSRjAY45TJJ2h6dIJWRWikZZC4R9iqCvLiI7BBWEa/Dvi3LBuivHSd/Fw\nTDV4sY4z8ES8d+KBFEoyyFc9wkEbF2aS3LGdXub2TlQ27kiTYpDCn8SzrRC0\nIieo05+9kqeNjxvIH9mkYUb1rlkhUMyU7liw8v7/wxANILcOPYi9nwU5mO/m\nYho5YQ10Y8eNNLSx9t/bekIkXu8N4Sj5rx/DUp4M8eQrc2fXlm9BXJxiy10p\n6OQOVj7lzv+Cx6L66yE6V2F0ncfvIfIMZeW5VUQziJX2Ma91F3ToEb0mdA7l\np6nrWwhBVv998Twv9wh90O61R58rL6N43/Gbq60vtcqi5Y6UXpKe4L14T3jE\nlFnt\r\n=NST2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d27c4bc9db002b9009b70cb7437b393ce59b9992","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.fae6c652d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.fae6c652d.0_1637252642835_0.2325283629938233","host":"s3://npm-registry-packages"}},"14.0.0-canary.978a3b5bb.0":{"name":"@material/auto-init","version":"14.0.0-canary.978a3b5bb.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.978a3b5bb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f5c2b82dd9934ed09b164e236dc275ca331ccd1c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.978a3b5bb.0.tgz","fileCount":13,"integrity":"sha512-oDuropkhVm3b56wJkH/93ejrSNxCVuv26UZH5KdAsf2t1t4FUcReSGSD6zzHJwnvjSIKY79IZ0n5P8ezkqFeFg==","signatures":[{"sig":"MEUCIQDKzCfEzG7gymFbm7CW1kBNzzcmsdezPtUdeVSmpDFhUgIgKil1uxCitrMzwW8e4KVzaHxEFrmtDxdZGhYxjrRv49U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl/0eCRA9TVsSAnZWagAA6I4QAJlc3WjACRmdk6N77Zjl\nvqpCE70338FTp3hhQGh3xInVeQf0ARYTdwvlWivRkfq7W0UQX7gwDdheuQIg\nvH16sqGt2WcnZ1mUbBga2jKKKSygE/AkPMbmpEkHH7/2N9k6TbkKfaJG09Mf\nakWXFjVSl2eLohRtqBETGcwNz7X6cJIEfSBoEGXPoTu1SPmr4COdOPWtWgaC\nFHhcwtsPGBXSBqJWWSf64+GxGuvVtn5vyI0bgVEjddCAkDeGmd7RIeK7HqCd\nspwY1bL24vcXQv9nQuJfEkp9w7nxc0TCOO33neIn2+oOWLl/Ixml2UcKo/D0\ntGmptNwPGinFluPY2/U7/4E5cbC97Ig8cjgEYXR388mKFBouDX4D28k8ZprD\nQtrSuQk3nGYykXsndkSLTAYCCHAvPwbszUI7nhaoeGF8YMTUcqWLARysYUjG\nod2wWRO6yMz7I3xjQRMqdrZeKpJxiAfmAmJb1SH9+lfwXyG7XxmNw5vES5DN\nzteI97BEGq6LNmauhg29/7l0bEKOFXCxW3KJfFUqF37Nx0vsZAKxbhcBSa58\nLlEXsah6jukW4qJt6tMwUCfDyYxOP8SV4n+m8enPcAgiOEepgFEtwepA46C+\nrNWWAc1upJwFghfC6E3+YAfsR0OFtD0W2imcNASbzng6uPUo1oExdvv0osBK\nv8bn\r\n=5utW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0d21a3472967f5ff791662e03961fb034a9227d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.978a3b5bb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.978a3b5bb.0_1637350686112_0.6434076323724773","host":"s3://npm-registry-packages"}},"14.0.0-canary.e6f43cf44.0":{"name":"@material/auto-init","version":"14.0.0-canary.e6f43cf44.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e6f43cf44.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"713331cdef7f3cdd533834bbdb0ab5d1052acccf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e6f43cf44.0.tgz","fileCount":13,"integrity":"sha512-RPMPjt3C7fK6S65e/PWMLl+tucEwPYxXrxC87c1ooH+qKAHf4qPNxIlEvJl4PI7XriTd6drIE/qgp3ggRDt4hQ==","signatures":[{"sig":"MEUCICv62OIdGajGZuKhHskvhIR8rinpQUGpfR4+VyVRW7m/AiEAqOM52nAP9CXQSsyPSKjc/BOfVh7gfcPuyMb5bRj79eI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm9STCRA9TVsSAnZWagAAxv4P/jZ0d7GhT78z0kE5nBTl\nuA3ULKWvQtcdSJ53DD1N2rE6pp3Ler7NOmotMgHyWVChszu/t7uoeKqAcGr3\nE6Dlp8ubh9V71iNnSkfLBGHxMqLIlexWeAgaW6Gdj83p64MOPVDJgTuT0YA6\nWBLO2LlyuopcjGwoY4bLoQzbpTX+KevSt7t1WXb5980b6IfdV+fhMOCuPDWQ\nm7cLmAmFsSly7ADvkTldxK5Z5wcmPQTyYlfJCw70xLqhWVCnjfSDPrfsip0l\n1wt12Opl4jVoJdhchYlLq7eHZBTc2e3mk1xgG7T0lGElgvvZY4H8j+vO9n1c\nrXfNd6rD/GFjKdqctw1J93Q0pqFy+cYiiS+GW1OF+VHyMXS2o9VP1oTYMjpj\n24LGXW0BuNkeFz6npRq9pWpK8P4g0ps1q2I454pgMYIZ3Q4WjvS0D0wMhfaG\nniP/kfgTiZx5ZRAZakXwVMPQp9IZwlIz6SsG3z6V/qg07b4/RrF2GC2TIhBl\nla8bS051FLytZmgH4nbVOq/Dh0nrnf2hModNL3znQjDOLoBMBLOxoZ8E9fqm\nFLz1K7sh0TDSa6BjE6CM8o/n6aZhUGB90FILV7GU90H0tdT8FhynwqZIt15U\n6P+4qOgb00NnK/ZkitjxX6/Gcem6YaIPQnYC5E0QkEv2oEZCTSW6SBAs41US\n4zQZ\r\n=zxA6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36200e7acad50905888cd5fbe17075663a96ef91","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e6f43cf44.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e6f43cf44.0_1637602451376_0.5121380474472801","host":"s3://npm-registry-packages"}},"14.0.0-canary.39cf14bc3.0":{"name":"@material/auto-init","version":"14.0.0-canary.39cf14bc3.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.39cf14bc3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ea2709e2664df82ddbfccbeacb6205c842f031d6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.39cf14bc3.0.tgz","fileCount":13,"integrity":"sha512-xSUL9jQq7l/dGJhY/1M69IHvffTcbxrLlAPGjIbICXoNb3CNZZzYzTd98wd8gU2msIArS5tfakTvUidsasmbBg==","signatures":[{"sig":"MEUCIDW2NxbxumJE6wRB2PFzWmO6P3WUWvIMteGT6WV0183PAiEA1dZmN30KR3EPoyogRSUpmISGGCvimNz4BN8vTFXKXe0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnCHECRA9TVsSAnZWagAAG4kQAImStyTOFM7uVLDK274W\ncPTy3Lo9J/v63si4GL45FGCi0yfWY9YXJyeltbQ1UeKW1q1h34QN2Z3rLGZB\nnRutSGWK/08tt+rZPckDIGCXnBzAG4jooiuDKO3Z7Oe8C7fuY8eMRQ8mwTbj\nBeBXW9LwqBpV/5xuFh/Xnt3wsg5IO91l9gvgGQjE9AhkbZhS2Dbhk7dain6o\nmmj5SQR6iJLnuzzaByOY4iPGZ03XyOVLgIKDzm/N4FT1brBPrTaKlvPq8EEW\nAJdMR424G+PgJziUrBRI8FwjxJ8fe83+5KQQo3jjoO8D+JIz6mV1HmiTBK8r\nvJqm8sTm36tWi/gMDyitzfAH3d3JS8LPnXyj1muASqLplM3Iq3zwE8y8i+1g\n01hfP1LG3O+bpEN3bl+7ntxXB0QZmnQbUY8kzOhQzfVtHTr46EHTi5Wc1onU\nPWwX4vT5+RWTyDDDogEHNrxOIHVqnIMBJPhz/eDWplrBwz2chJozGDiWCS83\neaD6D7sFIEB3Q1esor85XDSbcMrcsP/MKaNYLHHAyAzCOB7xl5Biw22lYjCz\n9iwhbvn4R3KdPuwVprkuzdoFzozB9HxVJ+LGlRUl1N0AMnPWVw96V5RRlw5P\nJu8FXjoGKNhbvZD+s2nK8KMLwVsPRcEUFM/FOMcUjiBCm0J8evOs/NYyyceQ\naba7\r\n=tPU2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a4dadfef1095fc344517a394b0286ecb59751dc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.39cf14bc3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.39cf14bc3.0_1637622212257_0.43470503829691953","host":"s3://npm-registry-packages"}},"14.0.0-canary.93134d453.0":{"name":"@material/auto-init","version":"14.0.0-canary.93134d453.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.93134d453.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"665d58d80e3708add0c9abe1692d6a4a056cfe1a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.93134d453.0.tgz","fileCount":13,"integrity":"sha512-ZOv5+HkxbBzriXN1tPJCCjKM9+mst29qXdJlFrpiUFfCD1T540cPd+/f4678Qzz5QTn1vo6oVdNw64TMr6lZ3g==","signatures":[{"sig":"MEQCIGT13MOCkooXTFZi7Ep5BFGF145qlZoi7uTtlZ54pAAFAiByF2DZgts60FKOWO2+TIChNjl9+tclZ2y6vUVQ7QPelQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnQrNCRA9TVsSAnZWagAA6tYP/RL/a59tVB+PG4wYKzaJ\n9sxLlWoDgZxVL+iypG1Mvrf7PoWivT/WVT4dW0pBA9I3NpPIxpO3GsZHZvem\nVmifQlY9VkRUVENoTmAp8JI56riieIbHFMhnoSOv5zCCEQT3mpXAqqodPHeQ\naiqgeaIKBDwnRyYLA0esx5eg0OduXjOp+zqcSaxwTWeJU7w+WsZtbTDFNIoY\nL8HnvcXS52zYBa8LzthP/UD901Lfp/DyGRqSvPPL3o5/0aTci5z9yPSQK7OQ\nwNGMnPUp+wxSOvvbni+elv/hwjA1xt3rH00XbjGvgwx3potBorlixFXr6/Lf\npyu2TtQD5UX3z9x5kmY20zLwNnhaKyiJFbmEu+iSeFlnKpOU+x8Wh73wliqn\nvMc9f9pOslmprzQuBSGYILqGvf5keElJZtiUM/FZ53Tw20WJZ5nTJHBXl2hT\nlxsyn9LlM9tqoaBuENhrmBcRycTvcfohvOQslMZ8e7YMM6XWOWVkYVOEcuAH\naknJd6JSWoNWch9zUxeogpvA7DG1CF0JZaI1SJuKL4uCfG+5z2uCpnWGYoBr\nkiWGLesmnErrNgK0pn/v+rfAMU76uhPVtXs6RKvxgwiwEZRUU6b//GKg4hlT\nWl1ji5aJGVCqFktawWeipBEG1OvUyDoaPqXrGCylrBgyWac0b6CbJWbV927+\nIIKU\r\n=jKck\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f37d4e46e027a3258621f6950e12796013661afc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.93134d453.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.93134d453.0_1637681869182_0.7227760269438035","host":"s3://npm-registry-packages"}},"14.0.0-canary.bbd11268f.0":{"name":"@material/auto-init","version":"14.0.0-canary.bbd11268f.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.bbd11268f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0af5decfd06ef35f2486d92ca0179b7111985d7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.bbd11268f.0.tgz","fileCount":13,"integrity":"sha512-v/tUbHcJnRi6xKUG0ytJbAx+mGmGoosVjBp0NDLtF5qD0fwar5Pf50tCGZSQE7hFbpPj5WTgTM1hEygA7I90Jw==","signatures":[{"sig":"MEYCIQDtNeMtpXWivemZ02Z4wrDUvpQRUHw5v9oOAVrg9lKqvwIhAN6zPJMYpqzlX6RGvebU3LlQVdIst48mH+PvHI5CsXmH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnWu0CRA9TVsSAnZWagAADEUP/RfUGTYcRqh7lwYKLYOn\nqVI0+GwTcGswjVfnxTRZ4y1/O3zvNsrK4M7EhfVypEwkBYgUOSqYYZX1lvuk\nrOirQB38yNtL13ra7Hsdb5BTXj6yls/bjwC0+H+aOSzt3Ezmd89XXhaegep+\n3E/WngKWOs8P03gCB6V6tAgWwa83rkHPEaDUqFPkqqrRikp12Tc4aZ3OsJ21\nNIdZSVg2YSJrmLGpYgHAG26SzWHRHQmQqQzn8aqdQ5TFFPxqOGC27bcmT0Y7\nucK44XElKWUibguCb/j6dmRKrqi6gtjBD75JdC/8mvHNzxsasyV5YSEO/8Ta\ntRdEc3gQsUnWHBdilximhrwH1BkPiHSXq46+oUOPJTcabwdfEj3Kvhq39zFk\njziufrcC73Y3WkLRFAiOsdS/O3NYnPwF8zLVQZehhqw6F7HxSSxbUR8jjx6H\ntgDbG798+NHMjOoc4qx2+DUg0JZuAzyKWTBN2kMJ2APY8Uh95gRaJqhaXSFF\n2ei3o5f6AGfAfcfuMCNGLvvSZb0iH9ZotKIzA4m1x/A4i1A/JJmElRq8N5LA\n/BvLjywEUloH4g6ArVhqlMUlUZ5K0sZ4fabwu+Nf2uG3u1KbC2+/CkVkOTnt\n9MrjUU3B3AXKm1G3d4bHdS8BFbj2Rklav/QurwZ6+5YnXlTXY2JEZNX99H5m\np/th\r\n=muDh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"46484a77ecd0c6d7b548301f4e92325ffc4f8010","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.bbd11268f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.bbd11268f.0_1637706675968_0.327248160007352","host":"s3://npm-registry-packages"}},"14.0.0-canary.3db9c4d3d.0":{"name":"@material/auto-init","version":"14.0.0-canary.3db9c4d3d.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3db9c4d3d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7c99944a4de3b5a3459838d2d83ea3d13c6a5487","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3db9c4d3d.0.tgz","fileCount":13,"integrity":"sha512-o3JrtbiLDUEp11LPGVuZjj/XuVV1KfiNC3OdL/DXQAKtVZMUNo0posjCl4ptyBfip+RFOTmD0RCWGLG1Uw/rjg==","signatures":[{"sig":"MEQCIALVxhCvIRuRo9VsV4Snhm+KeeJdyBZPRiZEWZeRYqhrAiBaGe/rdM+rUuTL9EqhhAaWL9tElPxItxQaDoDqqBONxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnlv2CRA9TVsSAnZWagAA5M4QAIxkZ/FDmiRJQLtAdRyp\nmVvFjPCU4vQG8byzOccoHo04DtyBPaNIzBV8UzLec4PIeKk3MYGoSPhbwnwd\nx40O2KpmyoyPXTJSe3Vn7DoAtYjm5cM60s3hQS+e8viPOruXRLo5JcFZwlkf\nocuFF7K83qk0qlw6UcPU+rFkzdUmbUIh3bpghoceiYtnhYYYzoV5LkJFtZMD\ngYCN2xFtnA32vJDC/+By6yXev24btV3KUEKrPrL6J2Yx0C3fgEAiaVoIIsqw\n0dbHSFRD7FMzFuXZPuCT81Do4w//6DumnsixisokExxS4CzXuG1yU8m8UPjP\nTBw50TM+J/8EG2rnKZqRmBnI5KXHBCohWJS7IGPULJvrb/lSjc/1NY3M8aE+\nHjwJNl01CJL9fGykKDicUWIm55lsmAZrQa9okP24WchAjKekDjHI9hRy5gC2\ngYw7W3gm25XFuMKGQPoYTwiKk6qHaQCuYZVzaa44Buwfwx4t+xYNrUFfIJiK\n1C7yOhYhsTgM+VAdo2MamkFZRBeQsUDvlM1rc9ii3BR+7QdVCAy3liiAkVHf\naD8w/DYugZ2CUYwn35uMj4GdGjqt4Al2pdjp/6vOmXA8YMxC+7SixNRnIBRA\nt9pxARXrFB5LoNzkrPL+NfOVxt1ae/1rbgSZNx5hn1O0kuLqmjhr2xIyEq+6\n+M7T\r\n=1MaH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61e9de8c9bd6ef83a5f0949cf53ce4a8b689f158","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3db9c4d3d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3db9c4d3d.0_1637768182588_0.1816933060221395","host":"s3://npm-registry-packages"}},"14.0.0-canary.78305b6d5.0":{"name":"@material/auto-init","version":"14.0.0-canary.78305b6d5.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.78305b6d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bffb79da4b42d77e424bdc604e025b6db214f5dc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.78305b6d5.0.tgz","fileCount":13,"integrity":"sha512-rCPjHLmHhddgkniEN9q5XLcszouH6gEJaxVd7cW+1HYM2y8tW8j6//DTAjBQKcHpd3eE2EvPJKn1hAKmZySh9A==","signatures":[{"sig":"MEUCIAOx/l9RVMI4vULLYMfy5D0B3cz18x3LuCNmNOu/+L50AiEAygF5UaDkGPs4mSxF057r6zq2YcKTqYnC3QEG7IX2/R0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnpdWCRA9TVsSAnZWagAA1YcP/jMgQIauvp4mSA4KiOHh\nxsalbfuSjnVTS5yh6BpTgL1pr4eDTAhvi/UbzkaXwZ+Q74hcbTcEcdtUMVhS\n9+BIeet5Yp0y619t90Fpdz9sw1ZpKxdMK18xCDjn+8V1x+cH/iYibPxQWC7q\ngU83JBeyWu74iOr5+RDfp8WKDCC2Tr1ugfli5O5QyQVSwlLlFmBuUm5rm0dd\nsJmmIyEyVOLRqKYORaViiqcbhodeUYy2VFHm+Om1+DZWfgcp12wAi2iqQrns\njXNGkuBKplXuXGfu7fI0RKEfOMvia+Ncj/ocEuo77q09YHGesYGtBFwyMiGa\n/CuykR1Bw05ec8JfonJnJcLQzP0m1pZ87OUpDNISsJXPrVga9UiphtpqElHN\nCLLLxQX9UjvVCa4WNYob4PVfnn3dMMoKF66uQehzYL0cH1yOiq+0qrH1mqRi\n1VrV2qPJwKUyPp8iJKLWI6/JEyICThFVQWcF/R+cWV1z7tpdhgw6MhqM88oO\nI4WlY4ANHmRyBnZyt9WeaV1rSpsYnPsokH3Uv6qfFoPataOlTj+yseSa1dJV\nhU+2KKFkELbZERoDgcHcDGe/tfcEz+bqckd3gKjSOWv4tReIoJt3NjNQGi6X\nc4lBSfVl7kgWpfvRIhupQcpJI7/F273XT6qPad35Cby8u/1SxP4E7E3oFJe5\nTy1W\r\n=wEM3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2885de69eab36903fec52b85e7001eb561624eff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.78305b6d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.78305b6d5.0_1637783382186_0.03310300505143693","host":"s3://npm-registry-packages"}},"14.0.0-canary.43d08ba77.0":{"name":"@material/auto-init","version":"14.0.0-canary.43d08ba77.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.43d08ba77.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"541a11247c899afa0f96823f0a03763233216436","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.43d08ba77.0.tgz","fileCount":13,"integrity":"sha512-Lo90JVG+CRKReq/qR8wY+hnN6ooah7WvmbvHKCxopyBJUxJtkZf2r4xOku2ItlGWDmZzsYeaYLwSIFKCCLQoag==","signatures":[{"sig":"MEYCIQCP/eun/PtXnCZYIxeHnXAjFASvkQ3MoZE6KbQ9A1xvMAIhAL2KKtEHSolmjcUj0ZbQ9+kQ9cRZg7qqXvpgGMe42pQm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpqvMCRA9TVsSAnZWagAAQIYP/0PYX8hyEsxeCh76kZCE\nqFo6yplR1fGOg6Pvid3cufe1mK5PdtGBpTgSeQPWGzw7cBr2ChligcHKriEV\nLoTVHhsNfZGzeQmB4o97SytTUX66xfgemflTuttCvgoMTuQyvE4PQCt/QCjJ\nTPrUFgqsQiNQxolgN+AFE2v/YySTHERieEVoc1S2XL2ocvN/t2MmBq2Hu4Lp\nWp3yHLO/BFfW4o2+0zFWylkns/2BjpBdWLMEh+HFWiPxnN+QOteSToXX0yW3\nroRmgZjsuI5RpSKYQSq9KhTbNpWvz8QaV0bqy0alyS4GzxufIi7oCGoMlamA\nInY+xMYEYuXRhppbYoQA75osYjJCaTpWQh3X2EoIrwXHVsKND+Z6T+N1KQwb\n3+4P0FAmZ5dAbSvaEKMuCX+KfoUfzJL6cpEgwMBWihUyYHN53Jv9wYvTxi0j\noUWNeZGlwpuw/6N1r2YqXxyYa6zQnuGuzCl7ZmjnDKjy8WnmW1EBGgZ9PvMR\n0VErKW8tUQ1R4jwB7zsOFCiMnT6L7ENzamuQzYgclOUen9Y+HYX29ouzkOuc\nVYs3W1iCZur/MLfVw+huzQg2gCPnOJHfeRT525FJVtX+1zNBEvpJNkZIq6xM\nAmsdvlQzmwCDSzIhLPJTChhQwh5neJ5R0YBnxzrlg0eqeOGLUwVdWLb+0SKX\nckap\r\n=I2qt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d1929fe60ad2c7ba249562f1c1702898df8f04d2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.43d08ba77.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.43d08ba77.0_1638312907906_0.5886601197463122","host":"s3://npm-registry-packages"}},"14.0.0-canary.17a072535.0":{"name":"@material/auto-init","version":"14.0.0-canary.17a072535.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.17a072535.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"019b30d8673443fcb88dea11fd592ca0caad09ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.17a072535.0.tgz","fileCount":13,"integrity":"sha512-qh1rCopBqrX+Zv/NOSjPFTetBqxbearfNL26sfgi8DKf51i442YAo9tjxNJYdWn7kMtsulVANaOX20hlx2Adrg==","signatures":[{"sig":"MEUCIQDQlGSHGJ/8jPXdwbrkkrS3dwBNZy8cGGb0vNB31Bx0egIgDS9YWWWalZve9pXAUUp787uOXgSY28aFYgDtss2GJeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqQqhCRA9TVsSAnZWagAAPYUQAI/JiZ+6dyMl9LNaTlEn\nsjm+awjONA5ubp3ryzqxh/U7P7TM4d/H9CK0dUTRUME1CytEjM2y3MM+MF3x\nn0gjXtrWiEq0zMEpqYH5zRVZKJIMjIHpeApBBwm/UmzXqa+OyTpFhbKfgPkm\nDyZqWRVI1OIC6HJ280aRlxPrmbBz+46HalzK/hS26uWGEEcFXRZtb7/ZTV/G\nKSuZ02ErsZDbdZ5rZq22hheKU3v+Th4e5A5HuEwUL02QFZadgI+C5+CWHoed\naCXfp3u4C2IWt2tnw2UKUZh5/IfrqDzkbiVoumT/Etb9+ocf4CxHQlKaJc3T\nrqF515PVygAFHv8NbjxwROJorFdYcAtoy5DxV6cXuJyWXCCVsrdYlXnOxPh5\ncyDjc/BofTc349OrBrEDZ66r8+DiHW0zj8Aty1BB3b8B8/sDVjecwpBLQnN4\n8tooznJ0m9Antlpz3TPMLA28ut2rIjRQ8ZHf0iBzNpcXlkwFWWFLmE9m0D2d\nDqZF7LTtT9aIfqE6LIuCg/tnVMUR2uSgj8i2l+yhm+AQod+V6CZLMk09s98n\nKPTst4Xvb147DU2awiEic+A/8LIGf5Y1l5QluBZtdPeJAKo+h7YVZhVgtel7\nkzTpeMkbqRNhO6R0Kr1RxDHUktdULT14VGQswWbS0jLQKlr4VFfCDOTdc6ZC\nhPrG\r\n=YqiT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"317cda93b55159038a12575fec5c35e9ff5460a6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.17a072535.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.17a072535.0_1638468257073_0.3502163250486321","host":"s3://npm-registry-packages"}},"14.0.0-canary.5d809696c.0":{"name":"@material/auto-init","version":"14.0.0-canary.5d809696c.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.5d809696c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1025fa062e9f8aa361a0172913d7ce4226783437","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.5d809696c.0.tgz","fileCount":13,"integrity":"sha512-F+Qcoiug3Du3puxeBXzmqm2TT5H08Y3BRrDfQro1ySL0LI5/gnjhOmIHtYgOKd+QIY0qUG8JvswKB/07bAL9qA==","signatures":[{"sig":"MEYCIQD/3HgMML6wMPcHc/XZjqyd/LM3Vo4Ol/1yH1QmHGizxwIhAPlZABagcA9uvQsBuIzpR59eCPa03/gBUmRI4UkkTWNH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsO64CRA9TVsSAnZWagAABjQP/iLVVzdtin/ccT6FDHYa\nRrLrkKk6doHyjpBxKWLDnSPqm7PupEn8eLCW9cbC8/BqZuKvTE8YCTDgb4vA\nSkgdvpxQR0EG2R26qZ6xEepgrvCD1WF3wKSk6Fx39/N6ceg3iHhSMtzrKhqD\nylNYXqpaLMJDMAuEmev5e/G+0o9Ho990ItQK+70Sp0Np9fkX2INlmTIJp/zS\na/dTOuNwrHJ7P5PCyyV1SyvYC5rciW8EtsNiA5Ec8NgHyXHnQ2srt3WzVF1b\nHAn54OI17CiZJbJkKgWKWjumUJZck63TVat+J7pFlV/T0NgVmz+lnk5hZhDb\nbN4d/u8rI9RQxmegcGmEoGyabCi/W2/wazyLn6pS/gdbbqta30IB/qFzjaqX\nh7qt9gkmV8qGxSzQ28LBhLYtYKg6RL3K2ju6RhTZZ3Qvh3fWi+jIPFM9YwPV\nGCuqzcNqM23UlztEQsNXOIiHrcO/iKmmq6ZbhZNFdZ7aQ3nDtzAydYp0nvT3\nsA7mDagJFzRa5o917P24hxMAxkUw7J5cQGSE3jrM82ZOkomNZi1952vrjNtW\nuDQXAk+EQuw5FmCSSFbqbKzQGWmtHGTOJ+JLlXXQzdEVvRSoPSSE1CCRCOQx\n0QA4PS47VMTXlK3qwlh4cQjVw8gAsIk5Zdd59aaY5fvr45BRJLuDxt/WvoC+\nh0jC\r\n=UOid\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"955aa3e4252f722f096ceef387b285a197760b82","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.5d809696c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.5d809696c.0_1638985400544_0.5035768740192301","host":"s3://npm-registry-packages"}},"14.0.0-canary.b6510c8c1.0":{"name":"@material/auto-init","version":"14.0.0-canary.b6510c8c1.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.b6510c8c1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"24eac060948bd701dbc72e6920b52422e4158079","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.b6510c8c1.0.tgz","fileCount":13,"integrity":"sha512-9c8iVO1kkMRIbthdv/Fukas7WRiEyjOusPawjg/B9YAIDjRiZN6dJCUphYUVVFdKe+336wlmj9KUtEZJpMN0pQ==","signatures":[{"sig":"MEYCIQDB3uN0HB+fujhEFWGYyVJMYTVYQQG3hoAOgKtqWpydLgIhAPsgbWnSpFpP4Aw6iJi4lURgcUrHLhwM6QbAPln7D5dV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsPPiCRA9TVsSAnZWagAAFn4P/1rm3vXvAU/utElHb4Cw\n5eBbFqIbCeI+xyOudJOV2NQoMqTEPZVc8g0VukpuTg1XWU9hND/6fUoOdUpV\n5cRXL7iEFu1n0OVo9meiJiKYFCp3JRDtHWoBiYEGWDjG8JsEE2wwBogW+X7S\nnEMwgbjgxlYxD0W4OxwBFX0oAm1zMDsIkkja6+DSyznJPyW3oHo1I7OB6l0R\nOTlFqdi3dNM4tVJrOiHr+bmzAcYNwdWS3lb4fTnC0xtsOAPw5Vm1uYR+sZLv\nqBiFVW5g2EVPO9hsL6+bJo5jW6nMLwWBjD4TbMdi0T9m/uxvu3MBofEQlaUn\nN3n4JSZ33fsx2e4HfpW8jgmNX1ZhR2RkHs9JKCI2drhmDoQqKwyMaCqE2jhy\nsJ6qZPzEtZE5j3KPUx3B0iCQuu2Dc07AsLO1BNaSMim8ybVoKFDCLjneAreZ\n9bbBO6q34nbSB5jLeJj/XgfoxJu7hFTsENPwJzlOSRiMe8sqIsIl1Xr4xPZW\nvxk73hpsZsKR7fhNbJsl1KlameBsb5bbri1U5epjYDDFJMXUUuV57xubhm1Q\nkozlOp3dYSrxMBhcq022RNWJzpE8D1ZH7B87MDQewCXonARGdDZqT0BlSCz3\nAfgQvCwYs5GJP54DHcfwxAtgSYH1sBpQw4y4PlTJj9gN9/pL3P+ZSu4NB+nD\nz0GM\r\n=gSh5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7b9b6695d55be857206c67de94ea9741aa48bb38","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.b6510c8c1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.b6510c8c1.0_1638986722364_0.16910766214332118","host":"s3://npm-registry-packages"}},"14.0.0-canary.f460e23da.0":{"name":"@material/auto-init","version":"14.0.0-canary.f460e23da.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.f460e23da.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b99dea5d5946509352b4962f1686ad43452ae2f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.f460e23da.0.tgz","fileCount":13,"integrity":"sha512-xwVbB3H0N2MSiKQZvJyDTi8YFdKy971LDd42SY9sSDbpHNiP43L3BftmqMy+h5ffqSXiLROavzTcFxrkH8Kr9Q==","signatures":[{"sig":"MEYCIQC17VjQ9hq3CI03X6pNecYIAY0ZCgOeWfoahE2YkkxNAQIhAP4bBovVWxhy2GAALGuoi/6fXEShE0+Gexd9hHILV+/x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs3ElCRA9TVsSAnZWagAAAxQP/RaAiQbb6bJvOJbVDVcI\nYqr8dMs71K7QDKx66wWTP6czMtnYh2rhkSI54OYMSh/1rAScgoKMyFJjKPKg\nYrSYGvkzCcdJAI1ylpVnV5v/TS+o6psJf2Z8spLZ1Z5fTxzJO48K1oU2p6m6\nGn2TSCSehsGfp4BxhRcki2dRhJGTz88IpH3wyY61ycKOO6UNrOs5XD45WRgx\ncbD8gQ77TMnUzV/7E84tswHFZ1Um3Bgd9Ypy/uiHmZpqVjTosH8uaS9gJpB/\ngIXGLR9QywY4n6EZlQ0e7OOgSsRbGKbTeccWisrNiE4J81TQwk2YewEpxc61\nFVXBgbApEr7GGkbv58DMCOcY0rthiDnV5Dk0/7QEzvv5ZTT8thhyNNdDoNil\nS0dxFvT52iOQhXhC2ZHE+EZ2wpMabd41FJ4YPjoBtdweV4w7B8W73kz/5R2U\nxYVPo5gFijkYUd3VprZV0C0uP+PEA+qMhgxo2e4L3OGSAwyvohLSlDKOsMEJ\noeeg/q0IkbISPdqg7cucz3w0dVkiXnIQMkN8ZHuUgcwV3OWJnqIQPu2oGFKH\njG8LH7ybUlv73bilkoOIJ9qANRAkr0p1+AtbQagmD7H7LAzL+sjVUmFpyzo1\nuo3rxt+Dzz/NWRxgwV2bSGUlQrQGQ6d5zASR6NI9iIQgPBZZRxImsV2fQ5Il\nL/+y\r\n=/FF9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6d994090cf732fc4f1fb93f91d64e265cada1b1c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.f460e23da.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.f460e23da.0_1639149860824_0.35379033825126527","host":"s3://npm-registry-packages"}},"14.0.0-canary.7d8ea4624.0":{"name":"@material/auto-init","version":"14.0.0-canary.7d8ea4624.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.7d8ea4624.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b664748ae0f360cfce0933526125899092e29a99","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.7d8ea4624.0.tgz","fileCount":13,"integrity":"sha512-SoSDBCHgsb4qg1Z6X48kFlpvlaM46H+aa61bsXp25cc8ADehINHgsd3aKQU/UiSNZq/hCeFxyMFykKgeoVLyUw==","signatures":[{"sig":"MEYCIQDd/LnNbJt5gJ8Jnloqcg0Q34WKkeq+fM3naWF0zigsEQIhAKgXgB5u88GW3XuysbV4fJvBGvPnPQfrwZ5r7RbgHUgK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs6pQCRA9TVsSAnZWagAAkQgP/iDMgC7Y99xPoU7Pnp7I\nkjFec7HDLm6pBHor4fJBoo3RhVsatqUC61TXVfTf2Zse/EcexmG+ekSjLZAl\nzZ2KNqBMwkTRD9qJdnVDoOQ8QDEeg4N2WPwbJr4dt0inTWKWxcG4+iKf7DPV\nt+Ve7SJ248K8yyGgTtdsGVxzyRtpquCoL16n+0mqvDF1sFMdD0CWg/IFHALa\n1QuSUEaCCucLCGaFIj7FQA4SvrGOI4j9ym4B6zYCDkxtThtCwRsUZORnNxKd\nsFJnDpaOoUkjN/THv9pc/uNNcSG+Bdapenz05vJKnvB+RvWmutDvmIl2warF\npPAUPUM9MvNbGKAxke9MCMQfuzP6Fg3iplQXMyuBzurpdyDYsRTiM4N182P5\n7GrtCtiYstmmohnobwUGQCQGklw2JHiYj65JNjVBSMOhvP1BnElUXr+bgN2p\nCGhclwiHknYG44ZnViWUixrUn5SAAd6DEh8pGQ8Zlbz5qjHGTaD4e4Ty/Hzt\noVe4Bqvqiy5wjaatmQv3qo0ZAEzzN4boNvx/83NSsw3rJapw8Om6edVjdQFz\nDQB2RrIDcq8eBJZwPKdP91i0tAws5AEhBRq//Tjn6H+tXTgu2gPaSqLlzYHe\neh6UknwkKXBBL6cztl7yBZiHv456cSfU5xZaDAQESaQrehhd+sB+0HTocCvf\nEFeb\r\n=oW1n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c5733baaefa11aaca3bd6f32fb2ac29c20894738","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.7d8ea4624.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.7d8ea4624.0_1639164496047_0.6825619781924748","host":"s3://npm-registry-packages"}},"14.0.0-canary.8fffcb5dd.0":{"name":"@material/auto-init","version":"14.0.0-canary.8fffcb5dd.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.8fffcb5dd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae12e6a796682c33589fc7c513cf3ec392671991","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.8fffcb5dd.0.tgz","fileCount":13,"integrity":"sha512-n7Suz/ytvphbFu/jcJ1L2KptIhqJRBaDUs/c5K+tYwcEGI3ZGeyZSYxmSod75kqd4lkzd1rohFFhFSBqA+H0kQ==","signatures":[{"sig":"MEYCIQCrEBsyx1nFlHJbAq0mHLc3QzXIxvIIemhRu0E5cvuZzAIhAKqG3E1WLN2fPcRO36ysw/km3SNE8053iDZfTg+reDZl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuFuoCRA9TVsSAnZWagAAfq4P/1iKeH9L0/2C4bIIXGg9\niNqazByIPZgBBkyOEiDI/jxOBTlO9ZCiACA8WbN4nC/dKozV8fDzaIu+oesM\nogRWtBZeKQ+7CqeVssrQ1e/9n3DW1JLxBxtsQmPjxs8JAT+4MBXjBmSF1LTW\nAiwp1YrTi2u3yNxPYFxoTCdgFPocx2h3NkHuaxn3igJXwcjKq/lba29IXUKP\nHM1KFGGzZWZYUWORjw7AuQiFE0d32BcYl2+3PNPyU4VuHmTuYhFNOLHXvZEa\n7b3tdCZ3tsE8wOCtyaqQC2jO0WM6ZzBWALwoIGdirrmMnWqYUc5FwXlViY3p\nFNRqgD97D+QhzqyaL/KZGodNDeYXIfZq6++u23GQYUQsGaj9fjI6BU7b676R\nKxUzQsOnccTwHic4kjH2Cy8WxEYgA68k64fMrKDM475XuuxDoXlixkySvrkr\nJVR+LFAmFFblPSQ11EEghyIlCkMCoIrE9iEDZ2OFELlUoX3QuYZggroTtDpS\naEIS0Ce9cK08Ou3H8qrFaT6UndisrdAdf1LiaCnP5b+ujf10Iwj0MdZC+5Rb\ntEczVp7y2FUMVo8Z4dLtU0HURLBVC+MawdCLBhLW82/j8dxBDtK+frsa71P+\n4TiIgS0mQ0mPs7VNgxu2u07NknueuUJljVOHJcYbvn31/tuvNZMQlRidqL6U\n0oIq\r\n=Z8gv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed22e4daefd7bb5e95668ab484a3a4a65793437f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.8fffcb5dd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.8fffcb5dd.0_1639472040164_0.7356619503019559","host":"s3://npm-registry-packages"}},"14.0.0-canary.21e1cb9be.0":{"name":"@material/auto-init","version":"14.0.0-canary.21e1cb9be.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.21e1cb9be.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e26bc066d5b270783a33c18cd0f69465d2b26229","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.21e1cb9be.0.tgz","fileCount":13,"integrity":"sha512-MYLKCAjykfKT5aZBg4nlOEa9aSMzlSWaXceR6LY/JJTxqL3WPmxVkLWxeMls2YnpYnDrT1/WDRyiRBCV1JEN+A==","signatures":[{"sig":"MEUCIGeRdrWzv5108TLHSuhxDeFuAUQFuHl+CPDMF3kkpA/xAiEA1Ib7Z2ZsgNOJiVVfY1ywpzYBVF+CQPtrVwveD8gCzNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuPLOCRA9TVsSAnZWagAAK/YP/jr4eQaXW9sOegUagcSw\nxqMIdnNIlfIwi7z29Rd8kFLdus950bff66E68HRSF3FsVBECC2C8H8IkJCyM\ncamyPHvLE0/UMtGsB8xkXO66E8EZa2NsUIoiHmq6n/ZiGRlS69eq2/RzZPE9\nAWwGmImQZxqoSVQnYo1jycWSv1s1/TjDpP+2aeFxCZ4h2AJ97usmI2gUvaGG\nwjbPcKtElDUG8dIvwKQHy2CaKsMslXUYhYNlZyVAXgefAhLrFACFJd1oq8qv\n4LOBRWkVJQxNqjMhguT/L784DdlM2XjBWxTlmwE2EsLpWTDnMmeUR9Cms33O\nZN4NhbneK7WIJW40g7J3TM3tJmjwnzEGf3AgO0nI7lXvEBpNYJDcWpXrzFcu\n9FHFL7gVDWywsoVLYIZAalB5P8lcz6slrrfJQ2Me7fDWu86cVSH1lK5pbnZF\nCaJFhiSWzkHZkwRMBF4u7YL9XcpUg1E3mTAke0dPVz7VURv0CIGMvBd2BPLz\nD6CSnbFSEScQoeUO929yw7PQfmDs+ht7StFEcjhf1AxNhdtpBgDRziigXP1a\n+JbqKmxJLXphhNjyVFnAAdPTHyPGHIb4Kj2N42IY8+5wI7Gj1n/5J8FiLKng\nsDnSTVdFn213fbX1zQoyj0B6nD1q5emT54GCnzsdSa3/4fZiCOrUDb2IkO/N\noJKs\r\n=egw3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"091bafb203d13305d394af0cb6817b1bf05c64af","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.21e1cb9be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.21e1cb9be.0_1639510734016_0.7071608366563411","host":"s3://npm-registry-packages"}},"14.0.0-canary.ba78e8724.0":{"name":"@material/auto-init","version":"14.0.0-canary.ba78e8724.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.ba78e8724.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad0a8a2f4bb55cac7cb9b0e3ffc0d388c0844f63","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.ba78e8724.0.tgz","fileCount":13,"integrity":"sha512-jehJw0RV3dpCx6Cg1EbwOPLY5t332SjakEfJMpRP7f6Rcw0DOyuZVu0DqMn/7yzmV0chqM/YkfdItKuiiEW4SA==","signatures":[{"sig":"MEQCIAdlQ7/pUQ1d0pvgIrfGuPeZl6AakVxSdD9ovVsHKq5tAiBitzhr4Z9HwWINbcVUgZ17izARVt7PmvbiUyNWxUmJDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhumgtCRA9TVsSAnZWagAAn+0P/jzZqPuraoDd16APZ6bE\naP107XWbB4j5XDec7jZVE6pbXb+fsu8OfuqPi5LDZGUgtgBhDy4UGii60Qnm\nKR7fXnq+oWLzOvaYsouEtnxxL8/F+pN5QTDcNUH40fHS3ebsgsXaDnYfxbjv\nCAWUrNh0ITnVNP3ynwCRK02hOI5XdZFQDIWSn1kMj8SC0kv5W8kOMRN1wqU7\nYcF2hKfS+y79eRiRBptHES5T79a8weOm5Hnm1ALu6Kc50i8YFdf5mTP1JFv0\nAzlzojmV3hMLF//LYnN/1K0+UsYviIKgtZTS1CESGD3EvBIcwf6W3Q+s2wPQ\nVjyg/1+hPRvMzFiDDrAX8tl1l/7oOLwN6CtdsDZUBMYT14SpCvD3f+oUiQmG\nxHnU1SlEqLG2TOIVJCspYQGvabZ89Q7oNzt9sWmLRE/p3s1a07bhzHxN1lcr\nhmMaCdBMfLH5fyUybP8RB1WuFXIGLlqp5KO9ws1bXU7cbt1Cbo7rHS3rAHmT\nJIXY1TKwRvRWep9tFY1tssLUr3ylghIKStKuo5C3r/ikan/byBtsI67AOx/g\na+XjX0kMTIAPuRJ97J1MOALouJe0jeamV6LqK3OKvCTlnWU3D8P2Y2jmk4XJ\nLt0hGvYKvuSFboHhpLnMbImi3MVFMhBdh9Sv+vaKOm7FCpx1rVDAN18PKk/p\ngPGv\r\n=gg42\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"396b66ccff73478ac662f95bc36087e71ae8d980","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.ba78e8724.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.ba78e8724.0_1639606317162_0.5876791995802246","host":"s3://npm-registry-packages"}},"14.0.0-canary.e3e073c00.0":{"name":"@material/auto-init","version":"14.0.0-canary.e3e073c00.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e3e073c00.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dd98b56f61621a8cfb8bfef4c754ce77b687fadd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e3e073c00.0.tgz","fileCount":13,"integrity":"sha512-P7CLMalTe6dSgbY53U2jsbqWuBepVOjWhiwplkG+0w6pL1b8UZkXk7EE1za0BhYtnv7/mLvZ6Oej4MEBFJMd2w==","signatures":[{"sig":"MEUCIQCQHCQHqSQvqaitGvyLFXaY6VxZThIv5X8U7mV/DFJemQIgP8xoGJc8io6bFbQzi917ChFQxz5fiERZPoNW2wCyzts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwPDeCRA9TVsSAnZWagAAQasP/14ZfccAazCcln4gXTJ0\nF20qHDER7qqNXxHeUyR6xj/tO7chxsrz3Yhb8iqY/KP/f3Z8Hudz0bO3a6SX\nUTEXTJbCgHeX7x36/1f5kfa/QdqQ6oIh2g6CByJM5lkVn66qZIxLqnjfNhrb\nPAvFzOCsMt04YC+J9Q3VYAIpOeoJw4z2Qwvw51v7jo+fln6gTHlR2DYvA3iW\n/7REzs9IDKNIXOXvYhkMdcjx9xjNOPRq3oh3j5+xCW9vG4zbYIlO2KSQSePS\nZhHDfi504XufrPpLUjgxcUSKlGRm7IU6X5P0nwUFvqp5DoHa5kIofx51SIzb\ny+m78uXA0ZrDfDVD74lgJex4TMgv29tdpUNgp+qstBefdljD+8zC+dWH41Ev\nLOFZRfrPYC/WlMivVecuashCfQuUZAn14F6TiHdUWB89PgmBqqjNa8iPGmFE\nhEkPyL1+b1l/vibLb3+cnNqQcTJYm17g+Cjxjy5Giw/wDGimcmvI4uIaGcXr\nU5Psa836mVP39XFsvcKMeIgG9yznAV7BdDOu3tV4p6FpGyFyD7yH84LnkQYx\nOi3+a55AvAvkZWERWbh941VERYamT9vxAPdS+6m3nNsMRcJB8Jifw9NbMWHP\nHG1fMgPYt5EVl4E3WiteVoxhlTFtEHeyHZy7POSZUpaL5g0EwHCAHP3/iVeB\nC8iJ\r\n=CcDb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6ed0d4833cc10e9b5406989bcd66b072aaa259d3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e3e073c00.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e3e073c00.0_1640034526755_0.6027112279687867","host":"s3://npm-registry-packages"}},"14.0.0-canary.3366a71d7.0":{"name":"@material/auto-init","version":"14.0.0-canary.3366a71d7.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3366a71d7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d22dd1fecb7e753d73916b9f670bbbefa72a9263","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3366a71d7.0.tgz","fileCount":13,"integrity":"sha512-RRrFUIB3yuvGkDCgXmPIsF8ZxYKYwVpkJAZj/mvWMqjE/URvICKsPtEPxs6hhGOftv/dez9fCJxzPohLtOst7Q==","signatures":[{"sig":"MEUCIGlHCPIzDuFhVorE0Bz/HwgqxNbZ+zr85iibaiqoHF7yAiEA7AWHhQBpiY+U3aSsE5pu6BFuh82iWGqdbJ4xM57nONQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwxqdCRA9TVsSAnZWagAAiAoP/jycIsWmoRV73We6QVok\nakJtnVQ+NtZCSHOi+uaedNr69GTd8proh9Z8iN+iUkTHMSO5srsKKNg+1Tcn\nAZOUFxOVL+y2LMKjztrwTNSPFrkM+1C3z9XJ0t1cASGXRnTL3RbeKuUfvfGH\nryzUq3Af5ALLgSd/pRLYYUcfpC6YiA4kk+mz/PNP1z+G36mnOjwtfAoIHoBA\ndZ0HNmQbDHO3RjKKWeAQZX5ZBxJ99m5CMf+JqIF0neyPqyW21CVDAlSUC13I\nJZvycisjDBXe5bhDBQcJVgA1ID3b/T1Y85pc0NYJWdU2+oGJeA9DeRmHy4Di\nroORkZ8dywqOKEL/DYb1WKWWIASChVs+ThBlDXDWWYxkOUdUXxTs5MWV6J/t\ndux3psWj4kuC/2IKJfBGMPL7DCLMPyEH0FWxEGlPMQjkm26rPtH2Wc6eEV9i\njbkuGXvFREbI4M7qxaRmixhz33Q+JpiwDSSlAj32f/6rjop5AC2E6R6fP00I\nF9f/VrnDzCHq/kjy15QOoh+xY9O290cxM/jVL/k1cChXwucw0QIW+UuSurlX\ndE11vKyBfB+yLNeWUPKUDMvozRu9a08I8NIsgkUQtYTspNicMEb5cBYTL0YY\nfmpwvd14ikDDVuyoTttQ23UePVAU1wJ/wMILy8gOhMNfmJ+fFr2HuCV+yxlW\n/ctk\r\n=Zrp0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36f8040c2829cecee06f5c8f52e08e9cabc9004c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3366a71d7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3366a71d7.0_1640176285115_0.4515063972941151","host":"s3://npm-registry-packages"}},"14.0.0-canary.c047f7c19.0":{"name":"@material/auto-init","version":"14.0.0-canary.c047f7c19.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.c047f7c19.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"91993367a6be8a56a253c98d234dbac53cfa87ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.c047f7c19.0.tgz","fileCount":13,"integrity":"sha512-2ImvG16VoDLtzQPw/dHp7k4l/rNwNalfwpmhQJMOw0waxQrBYEyHTM0LK4DROedk0iLsSz56f4BpCTekY1H5fg==","signatures":[{"sig":"MEQCIF0DE2bMv1xNVuWQFPTtEtoF18MH8fgCxX6ngBdXMaWcAiAjZOYfqzUJ7Ayh8jEpuyXMEVzYKKgT6r1VMbM37CwUkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1cr9CRA9TVsSAnZWagAAgSMP/j2FDzYj+FYJUxgx2iCg\nKu56Z4Dl2Kzx9sIrmpr6d/kCW1xOb1l7bENrJzKuwjOiHf9ltk/TFUKFB+Fj\nifQhX7shF2WtGhlwX7H+BJWFm8S7v5qz83yQnqj0xT9HT8qmN8GBA/olNTdY\na5jVdRRF4xjqUxvhhGxeK25P6lXh++NeSwqtu2iBchz6Vyd/tpK3wq3iw3Ef\nkmnGuM7wx4g3IFsRRq41+co1qJwvhJAdLfVBW1qQa7Lm/LC3YzQaxR1wFhzl\njXakZAdhtgi5Tt9tjzrZsQOxd4FiGH0vpgetutrSaXuD6XnAGrSrT9l3wrNe\nf5dBJT5vWPSvZ2mZsxvymB3y+dNchuTPqrfcivGi4vhoFuVZ2x2omc7dN9kh\nPuyic2FcY3Q6i0LEKkJuBDbA8eRTiksImowb5qOx1agJjbxUlDYLG7Ibpu2X\nF15SdHsEfTrmgo/aQK2xYTmsFSYGh2Kops7zFnD53D/6fWMQh9ECuOJ+FVo1\nw+us6+3Hk8vhcI2oQ65KQ4eziYGDqnm0fXL5wldjwRXP6zRuMqezEHy2aOsN\nkaWrHInFznKC61gw6S5QB7aKdj2UQKtiz3+3ABIxGILwkz516Lt0q8KyfnY+\nbfGEo87FiMXszvI/r1gqBNSPpYKeNWTo6NuxOVQYgHeZ4ki13v97Av5vgM/d\n2AV1\r\n=YGh8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f89c0e152ba1bb64d7b262b279d38cf5d93dd788","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.c047f7c19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.c047f7c19.0_1641401085718_0.2983058963348526","host":"s3://npm-registry-packages"}},"14.0.0-canary.05db65ec0.0":{"name":"@material/auto-init","version":"14.0.0-canary.05db65ec0.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.05db65ec0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c9ba9ed7f852c160dd5402b0782e0537bc17b846","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.05db65ec0.0.tgz","fileCount":13,"integrity":"sha512-6TvMVWbgH/zp89sXkym2RyUEK/2rGzgomv1hOQtr6+4UjepbMTOfb+Ij4Q3ewgYyORCAtT48QcBMzCtHd+YgxA==","signatures":[{"sig":"MEYCIQDLAlhKEP52IR3K9noH1CjQVgjLkYoQQuBX1yzyn4gzPAIhANVJFagtEsQOWEV2lVSxEBC2JCDvXcYgxPRYqqxQz0GJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1yMnCRA9TVsSAnZWagAAO10QAJY3K1wUyXUE/isKXf62\nTIAM9hnEv4HYnizbBFBqpsAI8p2J1E81fuLO3FPTkmIxpZ044ipWsoRvLd8R\nrajnMLhYb5KifWnpPh3F7SqTRG4v7VplR5/k1UfF2mrJh4gLQgsF7K4h4qli\nyQeUX21pbEla3wPM90mtb9V8rFArYQOhuZPXwfvUdZcSWRznvH/84b1hxE1F\n+80gFu6By1BbLLS4zJR2N6MqeFliGuSNTwtAQsTKRLnoB6s/YVoHFXxXe9Wz\nbUBGRyT4NeBN6IE9QxnLA3fy91uc0L9jhDjkEgbG1+kx2++oJ58F4O2DrKtY\n6asEYRraN1ucbEMCi4BeXv4VBXc99ikBs4Hv+jhoZXvougDIUBOGAUAZCIJ/\nVDVXoglO5APvI3vpRxsnKaM56SIrab/0JMqFsWT46Gb3c3n6vK+x2wHJ8i/z\nAUlwCtnCVxVmNk8ZPQ5QYzZpOmyLEkAk3OQeXbhXuJ9f21UKa05VolEiPax8\n0RL22YAyEXrxeeujN0HkGrSEdwh2UI3OeKz3vPksW/ZNOZCnULBlb7gCqFZs\ngl04f2K+DXQGtQ8+YvMl5031fJZzWk8W1cQhbwdtpv5xo5qmZW1FVbhUoe70\nm6EmwV7hX3zmWOkv1VJiBPmgiu2XEmgh+Y2WcMcoCu+LCRd/XbAlvgrp4FuV\nDrA9\r\n=ybb5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4ee3c4fadb795ccabc127e2a968744c5bed23d38","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.05db65ec0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.05db65ec0.0_1641489191591_0.3105957283166818","host":"s3://npm-registry-packages"}},"14.0.0-canary.6ca8b8f85.0":{"name":"@material/auto-init","version":"14.0.0-canary.6ca8b8f85.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.6ca8b8f85.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4dfaf745753fe8b8fc0df819b813ffe9319c6084","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.6ca8b8f85.0.tgz","fileCount":13,"integrity":"sha512-7trmo6wXIE0F9Tp+W4gGz/1/uWTzLeHVJq4xYRCEW22YHROQdUbIq1VP0pNpJBwZu7baMSXqG3LkyInVjCdfYA==","signatures":[{"sig":"MEUCIDUXm+MuI869xY4hMDXgoVPYmZ5gIoogon7oojGsXUHwAiEA0tcvwQFf5f8QxAixAyGiPEfDsVNmTQR82isy4ApQ0Mw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2GN6CRA9TVsSAnZWagAAU5QP/iSjzCChvhiwJY+319sO\nsxs91Hc6iaeCz8Ue87/05Ozq5X2Gk3ltaFzwcsRAtA5sBPBmN3zkv4UK+uom\noFxgYbIygSOollaczUr6sXao6qBVzO3jLcqN9D1zYbLb1jMO2oKSwGDclYd6\n0SB1Evrm+7T6REeqaepp10JXagFcYqH3Mo86C7G6BhY6vylu5X0F8q4r22P2\nBFfSk9E1byyPQcKourSyQRg1CQ/ZqhDlF9f40yw1yFF2KvdF/mZpaS2q33eO\n2vP8xgmL5ZPYaItrZ/eFCcCj6Wvia2Z+tSPB6wfUf9L5A1192nnkEhPDeeKD\nSlF/VQE4c3UJ8NBYiMvt/agLTWDcSie6hVW1eUcw5Lc9Jx01m6cYbcabwYlX\n8M73wcA2r/x98XsTb5eNAY7ldyvSukbFgq1RuH6pJhPF87BDk7nS8dCvyISi\ndZxk6/hU0PR4EKQwZR6G+qYmtot2ZyCUdQAwM51s4UlpqALYqMcCSByk49jL\nduxb2DW4q+g9R1UIRljWmVxUEQWuwCMXSEnNm1ozGj1CkzO0Aia+GJXknaOW\nI0GUIxC2Uen3jjH+SS6rnyE7omwlpWBMm0MMfxz3O/DWKMVWNj6xLznPVhFP\ncw5UEb9wfD2y2c7jr/n2QNrGmLssJHE3bClDyN1AHICBbeBhAiVSmk4g7CEy\nw8IZ\r\n=FQvX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b3237bcea052016fff824f201904a358e2cbeeaa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.6ca8b8f85.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.6ca8b8f85.0_1641571193989_0.6047993356740085","host":"s3://npm-registry-packages"}},"14.0.0-canary.173ee7a7a.0":{"name":"@material/auto-init","version":"14.0.0-canary.173ee7a7a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.173ee7a7a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d45a10d13b622d975fdc530ad90184fad2732068","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.173ee7a7a.0.tgz","fileCount":13,"integrity":"sha512-BiHVGWAkNQmTmBG4ZIGnfD8jZipS4e+ZZwwjY4rHMo1YHBer3USUOQPAAaEeCPUM+ccImnCT8kNJCiI3tu85Lg==","signatures":[{"sig":"MEQCID7npdI4Hk4TmI7Yr/RqgZtAXIrSIc90WB4o94xacPZ5AiAkimyFKgC/BACYK+jcS0ADDkpLI4SFlRrfNKWPtoDSLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3GR2CRA9TVsSAnZWagAAK9QP/jTihHYTmnUMqzImE8ur\nxCZF4QdG1JepJmPpQdmRnKF2iuZxSh2xFfEGt63Tye8+29iSr32FBtZeDB+/\nWblsnW++jQ8r2VxeYE5jtTx+CwqV1ixdkBiyRcWjhNA1esviSycgSu0nYx9F\nE2uUIs22Wpy1nhbCdLS84Px9eGIHdIUJgs1BfugKqcMFBkxZgoggEIgcHY5P\nVFhUeMReQsopS9OdE+IgVs6+/acDDj+B/aazdFIR389ePvzqwDX08ugSQPAo\nxYjvlQoFiEvr2dufjYeW0+CgZ/Z/oSShlmhvYIizfpyB4D1L3uCG7Wv54hd6\nJmgo35jR94uFkcMbq5DdD4rVfO6mD/KJbHD3Q+CnClBD5q4hhUBsFQy7uqiQ\nPIb7111RYEMAvc9lH4SFRVZu2+ljWkFrnt5Lxx+UPK8CL/Z/Fq8tjbMZFrr5\n7FAW8uhkLTGlC9vBdi4tSH61ZOOijnUlkxDaBnX0/U2aqXOxhNYL8A5EhhM5\nQVq/zY84eIGcwwKhYnXnKefDtJIwn/i0bSfTY/Kl+nRnh5SBh+iAyDCmwmte\nyq3r8KhdvMFhsVadc9VsxhfQKN71CPnSqs7GSw/CSEz3QpQGYg9M+vkfqj1O\nLsrDWesCh+VA3fCw7N+a7Ggo3Nd1JHqSlsNIHhK9oYmozbfgOfPH2Y2ohr4D\narS2\r\n=Zq5Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f034f9d63d29784b9608c7c25ea586070efbd27a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.173ee7a7a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.173ee7a7a.0_1641833590304_0.7742005248763677","host":"s3://npm-registry-packages"}},"14.0.0-canary.b704e4dfc.0":{"name":"@material/auto-init","version":"14.0.0-canary.b704e4dfc.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.b704e4dfc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e72f773f67ab1087f01e58ed5ad09beb5c749107","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.b704e4dfc.0.tgz","fileCount":13,"integrity":"sha512-d2RbUG+7wzKb4IsFoUyAYwWofLd5yu22wHbdNpTwza9l0upwKRfQ5YLLuzKpcs1/7NqgEKdeTYg3eDE2WiuGQA==","signatures":[{"sig":"MEUCIFvBm42UDG0jIqj+mex4vL7Np5nD0arH/AHKL/RuVS78AiEAjfbV34QTfcf1y0AU/01QDwxebh3WyDfXTJJQl9KAqh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3HudCRA9TVsSAnZWagAAHLAP/jQhXQKYwFZD/LiPpoLh\n0mkqzLMV9+vKZgGwjuAY1uWErfM7qKGkGOEJJ9RNrVmiCI/gOjKLnzqBJ+tJ\nydWIsYTH9psw3RhCwJX29bQuSBfFJkX1SSPSsmvyUeMTW8jBE/I3xrA4nVri\n5PTafOfS5QwWXEGdMKLSlCBVYN035+v7KiGOiPpU8fUWCtffmZqtXUZOldHH\nkrOLw20G+07aGa5M5FBKRIemdg6hZMY8tijoDaE+3slCQpB9C4yJedbRhsHQ\nadqr2D/X2FEtFXlct7iAsU7nr2gBH/Uyc+Zu5EP9AGDO+IjRJ27ynkf9e+jf\nqCIUafLa+rZIcgDBCz8cyuuT3qo5M66cS556exyVVPW0U2MapTGAHw1ZPxrf\ncjfiEkE7w97yIyP5w6UZ4EUtjkEQRTZe7c3OcvBw5F3t8re/RSO+7s/AdG5x\nqW1E+keZjn4diQGXb2fnTuovzwiCXiSqcw0Ol+HpJxZA/UlUWayWhTUvNDuH\nCx1L+VZGy1c+ZQ1uZZBaxksm5Lkfm0WIw7vH4O8k2afrcJBQ9H6Ou997TaF5\nScv8u9Rv6HDFDDYAhkn9o7n8fvt685FbEZYOscccLcr7CAO4fPuYXRkn1f0K\nZ/yyoHD1FUsRqWmbp52amVHXSgz8RZagNTwHnbtn29ukSz1XbHBK01bKn6+6\nZf5X\r\n=Qmmg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7aa8626c10b7e0fe9826c55e7f08c4ab0aa493bd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.b704e4dfc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.b704e4dfc.0_1641839517832_0.9416719529899231","host":"s3://npm-registry-packages"}},"14.0.0-canary.c14e977ee.0":{"name":"@material/auto-init","version":"14.0.0-canary.c14e977ee.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.c14e977ee.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ad904dc259ed40cf53b873980e3c72c6bb37a00a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.c14e977ee.0.tgz","fileCount":13,"integrity":"sha512-89jLjQAgfF437xSY2c9HJJlKUNiNpl4GokwmtoOe1eCkWYz8VgAeW2C1ghyXlEmOJeNfasnNlsKaMY6LyuDE3Q==","signatures":[{"sig":"MEYCIQD33SHlZ/YnK2lHYdASO+4N8vzHCSwuWVAjBHOOid2vZQIhALXWxBisKsSYshXWYAQOVZxr5uwpLq0HhykpdRUg2VCV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3abMCRA9TVsSAnZWagAAcRAP/RXpXC3TrXeJnIxAfkJW\nTIqGDpdih+Cy53pudQx1nmoKgRRVagiJYF6o+UhNYKKxfBR4jvPMoXA36Z5I\nKJ0gY5YWjnyAavdkNGfZllJHCfHgCdNbD9AKSAv2pWTLKhPjuWiu7PHlexcU\naNA2omgIREBMz8nWfsbNM55fLLhOHy4UGpluPNJwgrMJDGdewvotajQ1jewH\n+C8emQnadXl9Zw+Fc3IKzGgDUkKX6j29OL3Ez16I3ORqw3mVWBitmzYXbsD4\n7Mg4hYWvRa3Mt+QM1xcjuBIqHgUqEFg1QnonI3b5hRqbix+XEN0YcUECJhUG\nT/3egRYU+Tj0hZFZB78JvOPV49Uwx66WaNIfYihbklRTLMjqiBkIY3dpOFH2\nZzT5fFVz0IhJE8jDrnboeSDl/wJZoSwUqHG5vz3ifc18ViUBuvC2f06DmVD3\nM1NebigVtPrPQHBxqeJhhkg1B9qjPuwg41R2+Re5pOUhQOz/TjKPdSkZNzah\niojY+sz6EYBLsqH8ahhYqPthI+K8ECRdvwZw0Vs/hciLMgttTknJot4fFuGp\nM9kXUgEzsyxODiQaMcUVn33v+3TIVm27yTP2m4/Pj0REMD4ojPQLuPvsJQvd\n4hCjWPVLbPwTzb2z+3sR8iOn5e4Hp/bKlCI2AG7XqoEw8WUqmD9JjkIUmpxQ\nhtcB\r\n=8kpJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f7e1b7371c604a5d4692bdbe25aecc578fb16f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.c14e977ee.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.c14e977ee.0_1641916108074_0.6734267204916122","host":"s3://npm-registry-packages"}},"14.0.0-canary.b094eaa4e.0":{"name":"@material/auto-init","version":"14.0.0-canary.b094eaa4e.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.b094eaa4e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b0f892f759a05b0720d00dd6f2ded9f0c212c3c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.b094eaa4e.0.tgz","fileCount":13,"integrity":"sha512-JxhloSa1LoizWk+7VXxPp5XUTytFLtZQoiNAveto/Kvk2h9/7grkG9m2RXYuN8x2uqoGBThBQmcd9g+6++yJkQ==","signatures":[{"sig":"MEQCIGp3N0o4fsHvbxFgo/LDSd+qVeIgUHh6JwL9w7jDiCZvAiABxhC1ay6UX4am6fTdsTa5rtXCHhi5o+jhzMK/bj2X8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4cPSCRA9TVsSAnZWagAAm4YP/ir+mqOjyEzK2kcq6fY9\nIbeRtR+4st4/BDJyg3Y6/iSHHfJkb4aKjfYAQwEc42PWm5j2YBlh2KK+vbIx\nQLWInXoAsOik9velJew18ig5lXPQtGnLXQk+B44ng0/PzHqvEEOVJoPyCPVJ\nJf+vmK0pKne1CEZTaU0XQ+72S4PtQsz5nvtES5QohwmWQaKcWwlDq5aN2MjG\nHr/dPeKaSn/s44W7om8x7MHisM0NnTJbEVVq/8S+BIcRkvLIVme1YdfFalzo\nVHDoUP23vEXY/Nf8wyD00W1TnkUoDUZr5p0C0LzmKz/wN5a4Ev4w/SId/HYU\nz5XMiN9lxIgAw0IuAiNY9w4UxwGnMK+CAbxL8EM4tsCGbBihRlC4At31G8u1\nd4ADzBwFlYYNk9AELNwK7lmafJTMSwwN/MOP/IVMMgmhxJUnwjzIbgoLbKZg\nBov4/e1dz4n6qlUj1ddIJoKUwPRqu2VUxGXkinF1MFiF0VmpRAZPmKCEIF2C\n0bFQ7ewgVQvCK2TTmwk85XGh4l82EesVbKW/Oci5qrySCBT00vKQbG3fznXw\ntVoqkBIvOSF3Nbq/5o++VCN9Mh4SPX12wXmppTX3uQ55BhNoDpk4ZCagtzgX\n8riI+nHdNS4hRARLSToY2SiaKFHxMLsEGWLaiPFmchUIvAuJO7h/V0FvHC8B\nSoV7\r\n=OvKF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6b11b48b933746de14be90d79974d10e1fd48289","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.b094eaa4e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.b094eaa4e.0_1642185682766_0.23488395703553278","host":"s3://npm-registry-packages"}},"14.0.0-canary.390220e42.0":{"name":"@material/auto-init","version":"14.0.0-canary.390220e42.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.390220e42.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"de0379d859f0cbc76edacdb7cd1aeb117405e501","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.390220e42.0.tgz","fileCount":13,"integrity":"sha512-ZsP3XBTVzvu5FRVoFJjOMOS531zWGm62u4BLeYHI6V1BVbzRQnUxjtRR6DzN0mUtYdB/VY+TE47MkhH1Lzkzhw==","signatures":[{"sig":"MEYCIQDvOpVKXnMP+1RCkZ6zem83eAd0JAIvG8MrcU+IFU8ojwIhAPimrfi0sh+Zm0RKExhvBMZrXwbHVN4bKK3yfEVlTgAC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5Z0OCRA9TVsSAnZWagAARDEQAIwRFD2Zf9CFIJsHTqmi\nkUfVNVhLGavaoyuGSOidHuan4Uz/Ai7OB8CCc8zkbLhA/ZC/PpqxxbDPSqt8\nMIwWiP0jZ7NMgH7D5k9D7rjP7A5zKYRmxNY/2H32cdruMiqFPmetuAeGPNsn\nmqK0Tu2KnRRdZ+xfWgL8GDP/a0GF34YamyhhHO6akO2Oa7kYOLXj04W/47ck\n+3hJCJ1ZA8u6aYYdgKi4iv/iZv4qOFUn6n/GitxQ9Lg9d8bM2TG/c2Sn+Clh\n8kuIyTsUtQQUwW2eoL9e2DdQ5v9+yUyZC/5SPC30AKNLJPRpDzqX6N6Ke4FC\nX83z/cmAnNDwwtc05BtP5jcwnH8GJHtlZMOE/sZl0e/HCqFd1sT92ClOaHGJ\nB/52SyFTocVVpk3v8BYmkhLLIFk7DLqK+BuN+J6CJIattSgWeLmMIHTdv3xr\nd95TKuk0STJoVaeO9A/snT4Jl2IH6FAFV7NLCXaHxjJwOVqvyVvu9PZ7JNDE\np1I4LN0nqfZrzZnQ+Y58NyzAoon50U6gN5x+1oguCvYF+FNiAwHQoL8HzVX/\nTZajqpYfWihx8bFGt3FBZC5jHWP6XgHTHJB3Cu7j3BjrUZ2ork+loMd7/BdQ\neDquzNHo9PAc9Mc/9a1vK4XBfZe4G0yJEHB5CyLRN6CFFlS7h8uur9H5/loA\nwAML\r\n=pai0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dd9f4e499bf257838f40df3957ee3c321500fe37","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.390220e42.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.390220e42.0_1642437901851_0.1082144173630164","host":"s3://npm-registry-packages"}},"14.0.0-canary.4b5391f8b.0":{"name":"@material/auto-init","version":"14.0.0-canary.4b5391f8b.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.4b5391f8b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2bf1c2aaec24c06aa7ca65a630c3243251766619","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.4b5391f8b.0.tgz","fileCount":13,"integrity":"sha512-DYPPNtCGU+37UZI6JltfHncvstwZSrXbxTphUfA1lnbsJr8evqeJDTGFiVI0pkj/nwROvQ3fIeZon9iYWpGi0w==","signatures":[{"sig":"MEYCIQCgDIwv/ylhjM1TH+a286nQlncVKG4uI789KEXZJlCrrwIhAMJnpZ7hPmiTWI/GgV2/naAiyYNMRrnobjdX0XtIqpEp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6KQVCRA9TVsSAnZWagAAc0wP/AmL16qZKWF/lVTJUURI\nbYlRz4FYd0okQLaF0puSJMn5PGmF9lgZjZ5zHxg6DHgfSLtWofNRFKr2OA+j\nPxmVQUMMGHOmVeUGRmVpu3T3gi/hBd2/ODkM9ycVNflbs8zXUosYRzw2dtSr\nnBit56RR/p6aHIkHM7Z7UaAbOmXuryajvLyrBUjGcsZTl/sZTpl1q9MJ55ar\nF0NEXaDZo2xAf78FkktdGG2+Sm5NaBeSkCZeNqTBqxJaTwPTWqV6m/hKSGE7\nsheM6igyfu2/hwHGNOC9nwp6NTGTUI/Xm+P51AHnMwqUJ1Ewrr4gkuX1eCNc\nEDbMUUjXnsZStlL4f0o/CW5ZMtHBByg0uqZHHxHlLSeSa8zBaYNm13BRQXJd\nUN5U5C0mD1b2oFdhyXtsWELjfVSGuvQAgtQYLqqLCHkxXkKjChuja0b9hI10\nOQJ/9fd7mejY4EqJF7E/IP2M2hdx3ZjBksRO6b1dNKzERnvvF9ryODuZwyeP\ngjJYXHtfjIXVz06XmqLz91zsmzMrKdSOZJsku6khukCXASM2MvF6usfEsEnc\nu21UqDM/3Hy1gPvHElGLyhsWAOonhMFEQkd8nBTVsESeneNTX8MsjBwxxj6q\ngW1g+sN8yEiWfz3OwDH6G7kZGnlfTzQxVt7UFs9rkyDN9Dasps7O9cpVnlvU\n81uF\r\n=79F1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"09410b4524a4005be30dd18c47d4214d6eeffca0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.4b5391f8b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.4b5391f8b.0_1642636309138_0.722320899376693","host":"s3://npm-registry-packages"}},"14.0.0-canary.cef6bc623.0":{"name":"@material/auto-init","version":"14.0.0-canary.cef6bc623.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.cef6bc623.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ee808279ff9032f73d5c7aabdb17ec7953e1ff52","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.cef6bc623.0.tgz","fileCount":13,"integrity":"sha512-BjfJ69b2WUYnEXj6d7rDD36KWNFP+gcCAmBMRW4jcGjHGXI8Jtf396Fo3Ob4LGJQd4j0iKJrH9B6ikIsAsN0QQ==","signatures":[{"sig":"MEUCIQC88j96I3KufXk47B1NbOiL/VaenLWqbZfWrqwzsHnMvgIgPrvTF0Cw3wgMPymaOwvsnF7o1hEhLHAPhHdzC3fwRqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6KnYCRA9TVsSAnZWagAAC08P/iUmFnIpEGKgvTN1KcHa\nOiCHk6cexcyU5WX4LwoFFu+ucTTog/5ujwwKWA6WxoDKP/8PY/mPWtQu4UcH\ns35BGmgW5wCJvpxAYErnJi+ylxju2GZeRx9K7QFi4SawNYzrLQRFC7dj5grr\n99cJqkSBwoLbTxAKW+oSB5bYVAy894PJiXgAEbFQF8djDlvugGucoHji04zK\nta9P+4QOLS5szXVrqng9382/q1jYSbFGwNR4PThKOobwqDLCFZ/viYEHlddn\nfjVz06xt469DyLENHCoxilAvO43cVCuZF9aGhHybLY2hh7l56DAEjCjnV2oW\nAmpaeaukDLiTe/omzYvEZjqhd1r2LWR69IysfrE1E1p3gnRMyGYUDjkEpPhn\nVnzkJqLFvLi2lx5CvvvR5gTIxR2b14vDSPIT4KhG3mozfOqIqtxQAZSLbW8a\nFtUDTCmfa88DZSh0mU2Uz1WGy+6tN2AelyZQ713kWfgQssH6yJg5+hIchuF1\nNG7gzxKIPh809aP8EkHNSBUKe6AkPlWSzQYV6V7N/EQ7KDI5jcFZRrBoT/Tz\n91Yf7T64yyIwf0gfJKKPzkBxt2OugVMwuScttYRGrr+Kg2f58JSl7pzsYIcw\nVfPXLbG1soJAlPo9JTUgXC028jA8k5z7DKHXKkS80sP/H0209OzImV1yGWxk\nskl6\r\n=4Sgg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6bfb214d1f6768cd968026313c7de32009b2da1c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.cef6bc623.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.cef6bc623.0_1642637784680_0.8824131540767333","host":"s3://npm-registry-packages"}},"14.0.0-canary.0379179c4.0":{"name":"@material/auto-init","version":"14.0.0-canary.0379179c4.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.0379179c4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6293006d00f854868ad12741a326bdf75d40c90e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.0379179c4.0.tgz","fileCount":13,"integrity":"sha512-iTK4UGRk/eVggP8frjInL1+Hld7ZN+6EwTlxxK2c55V9AZXixxplM5zzGT8YkWDsKRzL1X3+MSfmxkp9x9WqnA==","signatures":[{"sig":"MEQCHw9iuAS/TG1kwO8Ww+oUvldB+pgnJrL9EPmXHWp5RQ4CIQDIYlZfzLlOHPpm/Los7dOYgeXOmMvCwyd75JCVnp5O/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6a+mCRA9TVsSAnZWagAAb4kP/2sl4ZKLlOhsdKQTZYDg\nfaJxgdB2bVLqraU2MgxogyvVk4w1ZvdnsOkLLps8NvWjJINEBDKc5QfbeE+F\nJGVFghN6+wmewdkbPgb0mVCQu/VfZzQbdjR6Bv+laxOQj9Pn+P83z6nTgBW+\noV84CFNR2KIQZPfkx5RFdmifxRh7xSD6p1Rbf6u/miwTLmVXeUoDXs6zrZy0\nIrFc0u25EUo2uslm/G9pHuWQCoKqLw/5sidQDNin9p8sWieXNB69SzpB0kYT\n8U6gA4RWNMY5klK3OrmktLTTyFWxPb06nitpttqccv3RS7bQcOFmxm48Y3tO\nPqXJxLScOIvze4p+JLFJy5PKFwN5ZIRmy66rgC7562gfkeyPEit+pUyMzLQJ\nAG4A/vEomJ2meAbcyR22I3jFJCC/MzWWKknQwrfho3peVGqqKxbSzJsVi8Ky\n2MO2YSvUcauPbsh20Ajg/HK9pP4X5LdT34rp7x9dG0Vo7Tw3UIFuAob4reyh\nP9t1tEVNcC44JCf6N8FBQunNFm2BC64+PpZfhpZn3lUX+9YUkbccQEBW1VDB\nvCv5H6hJPNiyForph9+yyVRGUlP+DDoJRiAGHntwc5zDGkwQEMFKzu3F1gHJ\nXUyH46z+gREiNdp5A5FZWTiifx9xBJN11uEHeVnagY0HnP820a20jlzK8wrY\nfcDc\r\n=v0t/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fd62b4e352900f807c8308b282906b51227baeac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.0379179c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.0379179c4.0_1642704806462_0.16652410441320442","host":"s3://npm-registry-packages"}},"14.0.0-canary.e62f3dabf.0":{"name":"@material/auto-init","version":"14.0.0-canary.e62f3dabf.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e62f3dabf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8efaf706fb6850f599ba99bb24baf57229c352a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e62f3dabf.0.tgz","fileCount":13,"integrity":"sha512-AZZ7MY/ICXTyozeTiCXH/JeJLvpJXdgNsLUzEDExDgnT1ioPPO11OtNZ87o7MSF9D1i/CMDFFsc+YXs6si/O6w==","signatures":[{"sig":"MEYCIQCu9BLy9fH7pPITkkpkWEBcKB5KULW7t406zBMiyFidsgIhAKKKLq543uRFgzUuTuDQ8KnOczR+L4gD5VVDDn3GXer+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6zuACRA9TVsSAnZWagAAKQcP/3q234m9vxk7nURIVIN8\nB083NhZqY0pV6RZhPVe9X3hOXA/g8kw95UCkl722CMXm+n7Kzj9KKmsu3twr\neYujLX9LhXkkkTJMtWq/ySUlVDxPlkESF+BiZR0owZRE8Iw5IDHrIv7PLA/x\nKTpJoUnMzMwDOEEyhc1XX/+oTzcqPE92oLeRFLECHVeh9lcoyYDto7jWS1Xb\nNvH6Jk8zI1ev7azHRgzS9XFOn4Akb6QVuGLYZepKJ50WgEAiYxw1CiOBWjsk\nhULqClWy88Xigm9WYmeu0RXq8LDEx0ZOUQVVcXRmP8n3/udUe0shHwUJ1zWs\npGBRrSLvr/AXFOekVrEIO09GyCz6MEYPkOocMXTpF6BnFZ2e598avxUE/+Qf\naWtvVrGKLLumjdEHisG/+vnhURrcmRwvGwV36W9HEISe2X9DnHub3H1l2Izf\ndAkWZ4OCU5KV0zA5C9t8hCjLhIKKj+fnjlr8tJv4FUUfD1aXvb5CA0f+aKgH\n5S5ks7mS0hAnn4P6Hryx0tW+OTQew0qWnF4QS5IJiWsIbnD7Wruh/AWtovOf\nxylLhi8J8LHMT8K0SuCzgm6axsnN9CCEv6R4471dBouX4AZojYgkOg1KqH4M\nFfdGW0RWKGBAjI+Nh2FZxjNv81O/4FmVXNR6v8zRsxovZssj6IRkSVEyFe0k\n1qt3\r\n=GSP2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7f7d12458af5eaac6bd913db605b5afc3753906d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e62f3dabf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e62f3dabf.0_1642806144249_0.2460455030312243","host":"s3://npm-registry-packages"}},"14.0.0-canary.3e20c1de8.0":{"name":"@material/auto-init","version":"14.0.0-canary.3e20c1de8.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3e20c1de8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9da6ac5e2dd30e55de968100096b38c8365c6869","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3e20c1de8.0.tgz","fileCount":13,"integrity":"sha512-g48cTDLtv+gB6caFbi05sGO/wHu59uKtwNEDlG3bLb1aMVDKQebh1+i1RmOEuuQJTLcUF5fLf99b8ilMUHXIhQ==","signatures":[{"sig":"MEUCIC2WqSJOSZ15GOucTAOeGKCbopkAJ0xXNwHbT91Zhd9SAiEA0w2eoZGAyTRO5MGtTR3RF5reGQUeGQCTQHMIj/SkBQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8BebCRA9TVsSAnZWagAAVD0P/08XEmCdWSqxGAs7l8hZ\nUuUq0xAH/RGxtDyW8dzCkskfVZDDQ4+N4aTpajoe9bQGP2Za1bctp0eU1cNo\nllMQGZo0vDmipShx2mkxpwSLeVDB3exyySE/Bg0T1oKKWiiuMAn1fPAH4gaV\n6ULU2uDp3VzCRavFfSp9vACgkZrQFUY/hA+GD3eezelCRz1LEzxGcTbg5BWv\nle7Ppxpk9HFxzvSblFZqIsKwgYJ7e3JR9/YNhw1uvdfwks7q1IKQM83T5S5n\n3sAqVtgKGzsh1iQfMwl0se1aOYX816mbd1ngmxO8ZVhUX8ak72s9dGAn0lPF\nojusSSXP7TYCkLTUtv+54R1zQl2fzpOxCqjMycmFDgd/atS7hOhrFIDWIQGv\n887Xg799w7P88YUo9FILNsurowQJuxLOjCJ6KKlfAEwYxIg2NJxdv1rzeo/u\nn0iHp+y5+OuefNiM1spVXo212U7kcW/+xFYtsoE0Ey+pKLd9n7bBcaUGp5j9\nTsCq8FpOjYXRc2NaYWlFFIqbpyEyKzM1FyGfG/6Hn/v3XP2+qWPwZr+EoZoB\nT6Zxmpqxqsnag7t/G/9jSX/h1wUyL41ZI2lwdfRpPekrAbsBBL2n3yz4Ov7f\nfTSR0mx6BXznarNUK97a0AJnAvhliw4rKUpuj/gEGS7vKis2kXP83LlolYZA\nU+rJ\r\n=+J5x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"29fe61f3aef5a85c7a462638b6c2b809a3be57c3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3e20c1de8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3e20c1de8.0_1643124635156_0.3857997315188322","host":"s3://npm-registry-packages"}},"14.0.0-canary.9f9d928b2.0":{"name":"@material/auto-init","version":"14.0.0-canary.9f9d928b2.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.9f9d928b2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4ae2b2160d856b8e22ce76cbc69d401c83dcd3ed","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.9f9d928b2.0.tgz","fileCount":13,"integrity":"sha512-KARPiJe4ifOniU/rkTqO9Mo1UfNDK3BtD2St02vJFYguCIB2fjtaLhmUtv1soKDI17B3319p4JCTd1ZhqD/xYQ==","signatures":[{"sig":"MEUCIQDiH4VyoGgQJKC8Gw7TnRYN2foOeKwQe61sZYD4pwTlZgIgRdiiBPS3zB97PX3Ww5DwTpzaSQuWacawt/FF4UH4KzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8uB5CRA9TVsSAnZWagAAW/EP/0qYSeP4ZSY26T0iLsq3\nJiC72tD9svbHGSotUtvG5ohrTpvedI4tbh9ICDFcXXt1FfV6dLUDq5trYU0g\nU/y0HQWuguznXam/HlCX+rwr4BqtQ8LlAncKs5bX44laI8gAQywpdpsQ4RYk\nJwzn3hggezkwiHMRBzjB4xSjMlnQUoSs/35TL4GdZzIglErmpH6pJzOJBU6x\nDtxaIHaqLztl77NcmpL7JcG0e9zIvNiLGTDgUGUSi6HIv1EqYC1AiilXDhVT\nmLRqetbburzdHrq8hVlJdfK1PYrWE74YNb8WMoYY6jzARJr7fCV4GEdu0xou\n6DflSVJgQ/s4dh+4CLz3++nJ+FhfFBFEpnLmkFaEmXmeyLSsLHFFHQ9RYgxq\nbWdUiyMAmsO7zTbXclWaywrtDjpOicV4dfevAkXHQCtWakfVtSsECRQSJHph\nJM7sI4jbLaHaFd1t8ZbqFhnPW1qv6d4I4i+KCrUIC57/qcsKTKJTsWdBQVOU\nxcCxoihZVrJQUAN0gYd29GH8f9ce8hvrTF+dRKzKRYgy/4+ozhKSoEpJ1guY\nt2Nt20FhvCAlPANT/IouhTxtwB1mPnwXqyY4CoC4rGuAeQzi863C1DvvP/6C\n3yi8agn/S2XYwP4pn9biMal5gy/JiPPa2hCccgn4y0yxkjf+lpxrOrguANGE\n/QKI\r\n=jbCF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2983c7f2f01e1912809d6004e47ff0c7c27de38b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.9f9d928b2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.9f9d928b2.0_1643307129486_0.22186116616247253","host":"s3://npm-registry-packages"}},"14.0.0-canary.a2bcb065c.0":{"name":"@material/auto-init","version":"14.0.0-canary.a2bcb065c.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.a2bcb065c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ce54e14ba0a7b401dfda19d39f2fd7fcb55d0228","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.a2bcb065c.0.tgz","fileCount":13,"integrity":"sha512-HxoB0j6mDJQqO8f/jptcXfvRKqkdQDc2KhH+M8U9XAkwPG1LuBXUlQypeCuhUexIVRHvDM7VkOR/wSgAaIAdAw==","signatures":[{"sig":"MEYCIQCHaqlLFx617g67V7V6vrhTgcm2NtyNcOVYO+j+2DOKaQIhAOcugoa7e5SqbLhtO6qRPoyfWnYntQ2hoHSF2zUruPtU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9EWoCRA9TVsSAnZWagAAmcUP/j5n2vWPLxp/TsIKyLy6\nWjCpydPyQ1IcqnhoqnIfoRIRUknKHlU+vSkEh//xtANG/mzl0lEdeMW+o/W1\nGYvecC2iVjCrwk+zhTsTDYS6iZB+MigynNeHvyVIpjAvstajsjcUZMDWK4Ge\n6R43iJintKxYeiB2SYMY6FtCtU9CsqmsohUJ1jRhAfUWI2UFUM+YE+de5jOd\nhgk/GN83xXDA2aToRCMTpG1c6eNBFRaNiS/E0uJzLjUXgHAAEnd9l4otn6IR\nC7Pzn2zjhB0meiSGzc10G4IrYlV7jcBIDtfvDDM5LG89brk2eRuw/SZXSB1b\nWlxCLD5GGZu8HH2Ih/Mx6xF7KeRpLP/NooDhxSMnRZz0sZSfF04Hcg0a571d\nXa5t1zoGU0PnjNRgS6/9F72dqm9x+WE3w/Wnb3vM5CmLbGP4/8L2QXM/LAKk\nc7gg0N3vB64iWwzV1MrF/CN09zbYXWVQLvsEkLyyx20B5kglszEPS0tYY0ks\n95sHmJlDL6Gm0fkez5h0QjWXrnFpZiC3TMZuQXiF7Xn4KaR5V4t+JGxLQ0+i\nc7L3REQELRKsfxn3SlBPfqqeBzkGPLLV52MJ4lC7pnnSwVIOfR0wh2rpKzAO\nmuWQDFeWyKKpTObExEXrmAgpsgszX3EgyKOg3gLyWRlGnBbxMo+9iwlFEpit\ncCWv\r\n=mdMo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7f175ca37545bf0bacc2b94f7a18a2a3fbd5eec5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.a2bcb065c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.a2bcb065c.0_1643398567816_0.4140029094553257","host":"s3://npm-registry-packages"}},"14.0.0-canary.4e66fb2e1.0":{"name":"@material/auto-init","version":"14.0.0-canary.4e66fb2e1.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.4e66fb2e1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4503bb30641bb318ab1e4bd61bef86b94b0e5383","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.4e66fb2e1.0.tgz","fileCount":13,"integrity":"sha512-qQPbHBAQoHCZ7Q4otrCj3crWXkdvwmzmaKRR1iBg7HrKAVhcjQTZzwU17D0tmfqpy18klTbJxowq0eAcFhkYyA==","signatures":[{"sig":"MEQCICFJYTTy6D0otMj2R0VVg9/hsHTSY1xOs4++ZkqepURnAiBqu1/OXaOVm8f5CAx7eDdcTRxFJzEKuUdAlsSF8eLftg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9EasCRA9TVsSAnZWagAATgQQAIH4z9Ym2ogrgf2aVoNa\nbIXho0PPgvUY1F0LHH1mGW26RyDDOZ9Rn7BRUY9rHiysyg9DNbzcvvNOkijh\nmMcZLrAUTA9ZOB71nk7IlF+F2lqA5HiACJdyDyGrWZS6svutiA8ylkbcTYT6\nya7pw7WuNIWDCDb0H66Yx2HR6KV+KpwrvG9I9AUh80jucYK63l7qbcfmAmbE\n3Jwg5PsJDfR20J3bnJM1ca7s/3pkOtn9NCoZdmEae31Qz16U5J8qJ913bHix\nBWVTjB7ria5pQNV7Mu6wYfR93KpVcFtRXLbQA5niXS9n51dpoR0MnCnwFAB9\n2+T9Nk2wMi/Mk5XZbKsoBPx+YO3jTyw/feZwdnCNTgrkhgBrDZ2HFWN8b16X\nLRvxQ2Vj8u0vPafe58OZ9XzTxNyNVn1FA9bZb+RXnolQUVOZY594vnKPecU/\n6JYDwFiCVuD+PQsk1o7pBLiD+HT8rxXix/MeI3/3EaX0Ejyoh0JWdJhfnDs0\nz2JrMtaI22aASe07fcmTiZ+Wacp1phfagoMZ1x9YgrIdsRnsSMyd4Za0OR8i\n7JEwWHmdAJoretCd/IdvB2YUZooVyu9QqBlAwogVTWLRDWSl2VgpUUtjVLEk\nFXsTrZVSnfXUM2CwKYxsTPfR/xDvUzc0I/8IGCj6k1ww5RHQi78VmZuA4U5B\nE2Ld\r\n=es2p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"edee6a64c210815507bd8460fea3df2591cf0d65","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.4e66fb2e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.4e66fb2e1.0_1643398827965_0.5544378633904419","host":"s3://npm-registry-packages"}},"14.0.0-canary.9736ddce9.0":{"name":"@material/auto-init","version":"14.0.0-canary.9736ddce9.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.9736ddce9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7d54bb16de1f238ef72a6fdb240f23b096b35c59","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.9736ddce9.0.tgz","fileCount":13,"integrity":"sha512-u/sZojj4KwXsIFROh8RKov/52wMVPBK8Ag7UgykfQV7pbeta0MqGa3rtSZF41CVMcYCHx4nmyyfdSt5evLX90g==","signatures":[{"sig":"MEUCIHxhtiWZHZoAID9fP64je+P0q9VgfUmgUuiXh0MCJgz3AiEApncH5tV0+dhAEzd4gFUsE6a+VtLVH9EYSrNaS8nuwkQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9Q2HCRA9TVsSAnZWagAAz0cP/0FlsV9oPTuofdG5ijjb\nS7m6eXX+03tg6H5/kdPF1guzc7C7VJxvnMiSyjAlyDEo+cjpnHO8wOuUvYIa\nJFv2ZoaRCL2yPKKq7mfJOfzwy5FZPGPNbXvmEQRjZBI8csNkq8A1I/v3i2DQ\netshPFJnKHCEU3egIwG6ALfejA+cjRo0k4e8xN1IkAidWKHPnVSjnVz68+6F\nmTfvYP8u+FXeIUhhLJRSAwqeSmjctUYoipwRBpzMi/fbQCYr3dTq/+9XUM0W\ny2gvSG+uNpospk5V3ySxj4kU54PEeUoMTUD1WWXYeFaxg44h4cskzNvsWQJI\no8QBf8/OLmYibQJtaJCUs1oztTpzIBMmzeJWhuQbRsmeCiB7uJnjWknQQFQV\nAyj5MwopDrWfAyx3UwzXwTx4MHsIjon5Ij0QfG8tKHEduMSLtDvNIhZXrMwM\ndR7bknyGBUcUXTsccBNMkhHukJN2nBG2GS/sjBbzUL7xqE1Ktl7YA+YcJWBD\nxJeZhxLiZJ5Qq1MKu02Q+SHtldjihFQVDkycaf7sX3UqbCSrP6xlbnKajT8p\nGhmdyQK73p6+oBVbXhBH/y3jfonshnUGjI4YW4X44rPFOKdSaJ/QSidrp3/a\nWSB2Ezmxh1uhvRGSmZpRsd6SaMGhOOhjfzwUppGFZk+V9vGQ6otBFNmz0e+I\nDArv\r\n=DyqL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d76de36ce796a981bf5e48388104bdb581d17529","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.9736ddce9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.9736ddce9.0_1643449735674_0.9727933715246293","host":"s3://npm-registry-packages"}},"14.0.0-canary.cc4ed13cc.0":{"name":"@material/auto-init","version":"14.0.0-canary.cc4ed13cc.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.cc4ed13cc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0731f53c7576d5dc7fd295e2b02c66c00d87fc36","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.cc4ed13cc.0.tgz","fileCount":13,"integrity":"sha512-WzMWXMVk85LfSi/fgyZOVvBI5vQGtytWPKQ6lmm45CClDV3hNqS3XyndQbB8hULuk7QyGmH1y61Er/q2hkjlJw==","signatures":[{"sig":"MEQCIA4kKBlf9p3dXr3S5PoBnpw+uo8Kh5VEpRRCHGhAsmXLAiBJEfGEIUvShgQ+oJCWrxY3bgDQr92iEJmX80Vg2DZlaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/W62CRA9TVsSAnZWagAArvgP/RJg+Cgdc1X2yYMyTskB\nhib05H5oPTmI8KeQ9ZPyUdv8IpF8BAx48czNvj8W24Gsn0GDSv5qP+noo/2d\nFRzdqGbpJ/vZOInIwADnC/2Zg7HyLtlFDbubWc+Ea1VL46Ew/R2/BIOXifRW\nbJyAmJfQL0+Pogwb51MyE1hDLB/Ysu+bXb39S4bTL4OLNWIk4nQMH+m0X4ra\nMCAnhtbI5B6Xph/KjYUMFuPi4iEVDHIOJB4H8jJ6o3+7W95Wjda25LditG1E\nnlf4ExheDdp9EkS4GnXIEMU1G805VmUMLCYaHaDREhsuI9Rwopv4UuHiacVz\nfS5B85wCzp2IhOXwcHBi98XB7dkLk+ufrJkt8Q+JTq5/KkQuj0Jpqe22aLFf\n/f4vMYPfHvYIg52wdK/6yGn2Yr6BHuIbPmOepVA3El9Ar3lIblRhAQfccz1I\n7jipfZpYDtN0BLA/a9ecLaKBPu35vReFGJxxm92K8X3YSTGWvdJPOgnc4wtg\ngsgjQHMYRezfM6jZTEG0imP2d7nVilIswkQuzEbV7FFtBhS9ToDjo+BC3fwz\nUfJBlaxmTXUamPH5YsCRD4mdOxgROdmXa6cXJk5+BFEuwrDSElJzm5dR6MZO\nXhS8vlUbSiwoLyV5LQ7M6+tA8eFsBQ0rgfoIKS5gPSArJAYCbdOm1O3Eo5bX\n1DFh\r\n=p3lp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"15c769412cb0230363c372a7d45bc6bc10eff8e7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.cc4ed13cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.cc4ed13cc.0_1643998902328_0.2627659009148595","host":"s3://npm-registry-packages"}},"14.0.0-canary.dcba26fe1.0":{"name":"@material/auto-init","version":"14.0.0-canary.dcba26fe1.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.dcba26fe1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"875cc76fd581dffbc1102e2cd0401d7afcf35b34","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.dcba26fe1.0.tgz","fileCount":13,"integrity":"sha512-22Zi2UB/X765DLyQSVaicRjveA1dw5StMqKFxYzx+dStKP6h8nQtmMKJDV+cFW7bDVPoWv43ly0xOChaN4vbwQ==","signatures":[{"sig":"MEQCIFKDNKrJs1x+wkg3IepXlyesAc9NOArp7Y27k1wPQ1BQAiAgJ7RGJeMAGvKblcyVMXg+4QKs5IwWC9EN/1fZ7xupaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/aD6CRA9TVsSAnZWagAAZooP/R253OYvVYehm3+hTYRi\n5lWo99lZSgyX1YWovqlGvhREjMw2qykk2sLfD2MMh8k63sApdDOGxOYXUfOK\nKrnDVE6Zj61EzamenHBKDpmJDq2Pr1DLLROvR/C3uEdQDxCloVN+DOepQ+ym\n0oq3ch5doZsznn3cpAShGlokcRqFjU9M76GY5/Ep0skvL8o0nz30V23Z+1gC\n16oubMUjLCVLRBhDt9ZVrggteeeuc7AOa4oETTvZn9ShKGGg98jf/T7epKS3\nAjEXKOKTCmXuWd6xr3us1cyddDkNbHvQsIWbh4/GJnvCy8vTwAomtgguu7if\nDrqN9osPA8XdLjEvkElAd7sHKAc/mFeeXNIHrnBwyNdRSiseyHBvrW6qwevm\nQumv8JthDuC5IPY6dg14285doCt9rmPvwLCWlGyb2KrvL0gS7lALYn+MM43m\nQaWocbUTX6bc7j6RvqgF9OEH1ViOoygXfcZ059RPWSgPeE0ZzDjmaFom6iMg\nP7X19rlpEZo91e1K9iOcjKSrr9cK4Si2imu/25AZc2dnn/Ss26qGTbKKiES2\nRc82AJqEQLpIOXicJCDz5EcvjhN9WgRZz2AwIMc/2CNTxlz5h7bB85OPX00E\nCEID8YITOrgM2UoCPN0ly18LRa2YGE/8gK7WbTKcz6IOzoYkO53vc2u7ipjf\nYb0B\r\n=FCMQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ced7dd56d5d3b017288f0575d6e773c03f01d0ef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.dcba26fe1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.dcba26fe1.0_1644011770781_0.577118944463793","host":"s3://npm-registry-packages"}},"14.0.0-canary.ec54d9046.0":{"name":"@material/auto-init","version":"14.0.0-canary.ec54d9046.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.ec54d9046.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e36650aacc5a533313cc96fdf1d65c48a537d483","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.ec54d9046.0.tgz","fileCount":13,"integrity":"sha512-ynzR4+PofISgUCnwRih4M5RL/cTZ5zeUVKExRebiMZboQCKlzWYFe+2Msb2gCSnjwM1AA/90rly/ecJqukhjLw==","signatures":[{"sig":"MEYCIQDttXjaqYuKVujhLds+pfY1VSdhLi4UJIHjg/gO0ZJk8gIhALB5f17WqaVWAzwVuxL5/7SH8d2eHKF0YFKVLwwxdS/e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAT6ZCRA9TVsSAnZWagAAoWoQAIx9F+Hnir25k6E5KUhH\npGXlogWX+5bWWI3zCuxbMTSFObdaSdbBHd0OUBmF12wfU1e5nRODJS4WBBJT\nA/41YiUR4zOu38VabaU2fdfq75hifFfHnMKZxbD+4VvT+VbOB8uNWFOmcAAr\nkNHTX+kDIvXKxSJDKQDpK+miBg5lOyUh8gAaqJMd6b3fJTJiFBbG2Wo6ij98\nywhlMRWNibpW8EBXZGTBUOuOS5eHEnnGMIfMyUOgWHpfFRzHt/I3urdDEwxb\nljwCYXvCG1CQT4ElutPrbEqoUYdaZe+BGxQZgxrotiQiP3nrCVoXxqTT6nRj\nyn0xudW0mf6dIGAlKYmMaXbdjgr64Nvc0PxtdHUk5yrg6l97VfztHyOAvpDs\nArwMgWMcaA7c2IdKNd0S5vU+D3SK8t81fgIgL8Vsb0+bzQyy7tweJMLxVZvn\nKNxSqg3ssgOagRXs3Gf6GIBvYc2OVe6BRqswIV3sC6tWMkfwhAAEpeosVuip\nxYqVP/cZ24Lqf+rPlOmexalQ6TVD9/83vABt9ECZrW4+1gbTB3U8nuceFi7D\nWveuPgsB80P1J+Q+kq7bYWZs/D8puWxGgqMUBXPWDTLKlpaJjBPzdFZert9W\n6pMI6tdf4ntyvnUrV1nUJ/kSXTwLayvuy5Z/BFC/B4QKnzCtxzuPSkXXRJpO\nMh0s\r\n=PQOu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"68f6bb151595e8790d7092842d6c137ef93ed770","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.ec54d9046.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.ec54d9046.0_1644248729758_0.7895947000594394","host":"s3://npm-registry-packages"}},"14.0.0-canary.ea9b5b463.0":{"name":"@material/auto-init","version":"14.0.0-canary.ea9b5b463.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.ea9b5b463.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2af1821cf2942291e8353be1c055b5a16be3d539","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.ea9b5b463.0.tgz","fileCount":13,"integrity":"sha512-8u8c2fcUiGrwsp22dgx2SJ2ldUMM2NbC+bje3WZzBsP0kv60Ey7TE9+1kggLRFpTIhCK8w0OgH84TQBb27e3nQ==","signatures":[{"sig":"MEQCIBFjezPsgzqKisGKEbiSN4Amgn+qL8Wuc5HLtMn/M8BpAiAfevm63h9zTPvzpEdUylFfXIFSFI/dZfRduFvGVxXPsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA/9jCRA9TVsSAnZWagAAFCMP+gJjflCho0tUShMiKCE5\nn4rrtXhWbd48SGak0QGofH9evo9nqTOOVvYfEc9NHGvtdQtLhxAwXU3OxOaq\nBxzDlQmdxYGKTgkUN5b/NkrKz0xYvA/byTl0SMHJS7CriOls9leM9eSvFckA\n3DrzZB1ieXoi76b+TwQ+6FD0wixO7wm9R9NcPC0WHnci92tDadnZrcntWtdP\nqbOwzXfbWs0e1sFOt5eCTEhomNap8X1v0xKtqFot5qF/APWmMxa3Qs2RJKi5\nE/9/zGjo3ySlgQKIXZraYW91SVqrk7WAUwLefTAUmfDNt4hMJrc1UN0uS9w0\n75HmkhSa9I67R/Xvbmo0qgD/FuL59d0M2da5BsHqpNd0C7SuDICd/KDVA6zp\nNXJ8bVwJZ9C0Da2YFqBgII/JtvK7k6w15vAaRBTcXynX12ZNxkn7Nx07zAsb\n45egIrqAjL5BEp9oTOKaziyzNkgPgTdsotR80595TPJeVBJSeSxC/3ivBAvx\nw0jAzyQRkSKa+joex6cl8ijXPTzvfKMuidlBHc1w/NZ1PN2RhO9ySUi9gVl8\nr4JkljJIExTDgZy1uNRFAwDGJNIjAOj9ycpZNjtpy9QtI94U3bzWyRrBm+TE\n9LdAjOc147sgMTo7Zi21vmUkn2EZI6b/DipxS0CvmZm1kMMIH07UKhU/s+jy\nwtYQ\r\n=4ADh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ee827dceb9fd1c47516461b8ddc28b66702f2c04","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.ea9b5b463.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.ea9b5b463.0_1644429155407_0.36649326954797057","host":"s3://npm-registry-packages"}},"14.0.0-canary.96ea061c1.0":{"name":"@material/auto-init","version":"14.0.0-canary.96ea061c1.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.96ea061c1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0bbac50ad37b6ace0cb8202b16bb9c989254d85d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.96ea061c1.0.tgz","fileCount":13,"integrity":"sha512-96wmfKyaIc5IYjayfe0rsveu2HSK7RQkK+GUQuG8AMYoaF5gcg1gijqFBZIck2WQWFp1Z6L4IOHiJKpffmPrAQ==","signatures":[{"sig":"MEYCIQD6LQHtfEGizoR2Jh1tg1vpyiSdJB7WenVMgYK2PDnK3wIhALaKlST15XIuNv6kmrePFJ7Vv4ZOV/Z+6n8bFhQKUrl/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBA7JCRA9TVsSAnZWagAAj78QAJMKEdwO42hxZSzVN0ug\nuCXdfHq9iRDW/7nURAVrtdv3Q3oZdCUwlT1qC5F7+PIb/OELnlp04u/PvECQ\nXwO/7bB2rd44CuSscjivhvwdVaczwRhTy/Hg+nNquUeFXWjZv9Htrf0UULGe\npbp06BN0GpYFEeRth9E0CGFVsYrnnRNii9NN9W129ZLGOJXzLH4ejAjJksx6\niOfbZn17AvtR7dlLb2eCEELJUt7Sy02VnQVgwnD/Fc12WfVlmHlOoCwNQ4B+\nNixTwUP+HDivmvGPN0jTr19YQwAwJtmWlL3eAzPiSKe04LzZrsX9AhJzKh3P\nhp4q73eSnSpNTtbKLM7sjwtJeQT+dFoi/ZpyaSc5pwCLxugbEIVNa89ze+5z\nYgICjKVODHG2U+ASDWWnSw+CsRJpKIG/2wbrfaUrlMt2zKhVuPc0bNKnEi8c\npm0hRz+e6cCEcug3eWKK6UcmtrVx2s0pnk0OQwNYApBdkn4cpCH9KV+Og3TJ\npuv1DO45oe+kA4H//3+vSN0yg5FYTRHxZMrJ2FJu1M9EPq9N6WRDPNY/ECc8\nHWKuFtaQ0Lz7qlDmT/U4LIPLcQJEd/pXcvsTHbcqUvd+EFfTvqJ6Izk43HEo\nr3g6B3HBobKG1brx8ezmtP2tcCRE7XGblrq0M8Rg+ye7rIcvZ5vTPWo5658X\n2A3a\r\n=uUW8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1a410c21f8ac6405b364e437b5af7eec06a2020","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.18.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.96ea061c1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.96ea061c1.0_1644433097818_0.10522968000308741","host":"s3://npm-registry-packages"}},"14.0.0-canary.e00181e59.0":{"name":"@material/auto-init","version":"14.0.0-canary.e00181e59.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e00181e59.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bc8ed3f5c1b0a31fb93c3707db7045a99800f32d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e00181e59.0.tgz","fileCount":13,"integrity":"sha512-5K6ioSsV1zl9DAGlYy7UaG6SNDtgQEpLzlWJ0T40lQMDKAi2oLTBdKkF4l7tBRl/dVT5XkoU3IuFHQMKjrKhlA==","signatures":[{"sig":"MEYCIQD/eB7ZOMWtbip+5i9E2XH+pe1qeuMCpCiYeq9K44SsBgIhAKHzqa69TxDjQXH6bMsUf6zsv1K7/5d9Ifh0rXIA+WAE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBXAPCRA9TVsSAnZWagAAhnUP/0Q4ULjS4jPPtI9VA4ed\n5F2sVlPxaY/jBKumd+1hIFmKWj9Nd+qQgqz35cvxzeBCk1YOdG7opWgYvVMk\nEzrvY1OIVPTRTXlb+nkUNkJqMWetGHNMvWRDdcnqpxnpKxLoTZb7jIMdoZ3S\nmIqkyXI+pc6xyI4UMCK3VRqXFpvC/Pp/7ATagWENiDjuUaw+E/iN+rCom673\n1jz+3qkPu0k3Jw46UpMCz1W4JwcJf7dyW3OReXC7usec49PwbjggPcf0pHLd\na9ySJ7Mb1lEbdwWlJPe7X16y3rHA55ICEZn1+MsV0DfMHzupF/1GGnCp6pPL\nukguUfkqCgjig2x/T7Jzht5VYU6g+chhb7A5A083pkCl1IwpqfwGWWd+alNS\nbxgVQD2GPf0kuBU57eDFeWBnmDe9agBUl527cQgiBBVh1/4oIjua3O1HEPML\nWIlrU1xmDs8h9L+AN/ejp2OwXFreQs22AUT/MNK3Iu3KRl7fyLrDHWIz2Ano\nX7ByXk1zZhst7bzcMX/TYawyupMrLokH2sQHuZPAIPQTyYkVAjd+yCTdCuT/\nzjbZZE5aYwQNHMZ4pCVYs0OLZBMGClkr15Vwo3xSDicfME0EWayco/wDC4Hl\nUJ7Yp7fPLOZWbMHKSqQ5/nzxJlNlR7yVSNBW55K+AeM6CPHwlO9jvTEijQ7l\nx0zA\r\n=yo1e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7e9ce072e9ec1ce5820d347b59d99209542a2bfa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e00181e59.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e00181e59.0_1644523535759_0.533497926402529","host":"s3://npm-registry-packages"}},"14.0.0-canary.037285f9b.0":{"name":"@material/auto-init","version":"14.0.0-canary.037285f9b.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.037285f9b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f7bc5568141784a643676e6552633d5f60192884","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.037285f9b.0.tgz","fileCount":13,"integrity":"sha512-SqP532LkHzSRCfbXwnDqZhLleGrkurtnFbrCw+EGbIxOpot1KBoMAo+T4zFQiinpKPPKu2ruGKy/z/9J1n+ocg==","signatures":[{"sig":"MEQCIAMCyF770VYfrr6u+OzdPWQfkKFiDKVXHd5z3UTbZo02AiACgp/k+liL0yRHAr0qGPFi3v+1Ry0kgAmgJq4BgIVrPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBqrLCRA9TVsSAnZWagAAP8IP/ijuE3udes/WVhdzT+k6\nW89RSxGURPG/bOXt920BNY+ZPYsNqh5lQdvPIbtIH7940SiY3QtdTeQEPa6A\n6+wpbpWblb1o0v1UfOEPwqvvFEVT2lBYkYht1Q2dLKCDSWuvFw7Hpzkg+d+d\nrO2Oi+Y0HRngYc2bCiPdOnyVrKp6c1pr++G8dlDppEwfm8ngx8nQnccPHTrT\nnFDesLC4uw58dEzpixfNNqMe3neI4WN5MI31qdOd/P3cLRtvVklD9p7vYXVE\nVRWBCCSVorh6Tev7wk151+qhsI1zowfNMDeVqmI885Wsf0Bcc5pVWyfc5Chm\nTSIH4e2dnE4pAc8kqVnfnLtln00JUES9uS2e46Y8lkY3wCPssQyzi8mVkxel\nwdpMTxTIE4iV461hypeNyLRCb9a6Aj8RoGNH1zFeKSzejQ7Z+OUmLDt2Mb1X\nCf2551W9W2ASlJBITo0qbzj28ypBi/OMTBNQAk3pph7gaRNmxj/5hhXOgs1G\nmVAgNsl+9B+ayWRG4qOvnOopbJqdhOR8m3XzxKKdtI8O6sOJ+2BW9Wmj4xrX\npNc9PfLsgCnlllANCPQ7tfrulQJPKyaCN5BpVSx8LqwpENQZ67u1mAga8heQ\nkYb7uOSYpliVotJQvPHSfHSDcaJfu9NiGtA17VeeyFRcRNJfk2jQZH2Qaxdf\n0MoE\r\n=OJUi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a9bca201560da3f96e435e6e070baee148bcabe2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.037285f9b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.037285f9b.0_1644604107116_0.8489462548301627","host":"s3://npm-registry-packages"}},"14.0.0-canary.1aaa68dda.0":{"name":"@material/auto-init","version":"14.0.0-canary.1aaa68dda.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.1aaa68dda.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"78d1f348bb5d06c5e789a90b73178ec1ce8c52f8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.1aaa68dda.0.tgz","fileCount":13,"integrity":"sha512-XKEG78ln7rydpXiqQLhQZmy2jE+SaYvA/8EbBLbocbWa6LmSC6ebnIihiZClccx5RtLlKzh1zvOAJckCpvYYjA==","signatures":[{"sig":"MEQCICpZPuGiIxae9oDOUY+XBa+NYhcGLRhlvhK4qs/SNei2AiAbXwH1z/Rq6MZC8zOWakjQw0oYMJtU4/cyf8bNzE8zXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDVTvCRA9TVsSAnZWagAAVMMP/3cdsz8oU+JchzElmepp\n0f63YTsRmGEavHJXACFg4N+D+yTZZxUk1IXsImL1vycVDw5ZYGhLuxEGo+nn\n1oYGXNNbeJomz7CJmennaBC56GdyyHU47xbeEGcOXwHIHDShi2iSx1G4kDfw\n3IN8q0pBP4YTukW/TYzq3s5T+0AWz8fR6gKQHhN5l0dTIPwLp8TrGkSGOdmS\ntBOziPqMG6MhoH7i/HGpuGXPrbABcN/85vo6/syJ8radnV+sybemYKg1JMmt\nzV70Cu3LktjipqFdfjByo7ZduAKSWUjVj0Jj4Ha/vJXalXJcbObxkHjhdmUf\nkpTWRhySMVUNgoz4fjsPIZJpbP/TChuTb6p4zK27yaU8qHhNhXfOyqfgI9jI\n2XurQxf1ooklmK0SUf2PiPP0AOrdCfn45ICEk1Xlnes6//DZYnCOEaySmiqO\nKedpshUDC2ltt/u8ATlToKwla+ajZfYHn5laMRKuAWuiCVwSU3s+IYPGDQF9\nXJTPTCX20fv+KUele4ORjdlPwxSXBnFpHzQYabt1xXK29gIvB8WzJlg1Za13\nBSs/RiZHVGGbqNATADGbGbHHAv5UZavJGsAVoj1bY6AR25Y9aGsw0JdeMBpb\nax537Nz6ZBScfKzxcT1oaVL385Jq9cAI0wy1lIldcur5uvIEAa7rdrdobPcp\nCOwu\r\n=4mck\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"49eaedc3ce6f1f8db6a6929143c077e8f65694f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.1aaa68dda.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.1aaa68dda.0_1645040879457_0.3663522447772649","host":"s3://npm-registry-packages"}},"14.0.0-canary.ab4aba1af.0":{"name":"@material/auto-init","version":"14.0.0-canary.ab4aba1af.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.ab4aba1af.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"244660575b38af2fd037884364844e07241e02bc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.ab4aba1af.0.tgz","fileCount":13,"integrity":"sha512-NcTRmfaadeTShNIu6h62qII9QUwz6TOtZkc9EHZD+9sjOICQGdqJnYUAHiFfbKj/yMldmnViz9HWVvw5jEuvEw==","signatures":[{"sig":"MEQCICQYWoGWSMHBCiaoset2bc9yN7TwLs+k5kffHhbddmi8AiBfFD212/1iOTMTjiNp+1lhhr4N2H2d2cmue8Lhz30lWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDpDEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqK4g//dTrRi4jL7K+y1qC4IpFZtdx267ssAR8yKNjyvyb4hzYYaFXj\r\n+KnDsqHgdfu4GHOjqi1pQKVRxQH/L8L6vC522XVk+Ei/BueOtrPI56kCsS3K\r\nYMUSoQeGL16zmc3qgHiLYjfoUVGHS6E6iLdJqvoSgmigUayrZSYpACFcILwn\r\nIGvNEiqbkoM5nz/HeDd7cx8rxUhCfT+s4YsSFF1EWmh/ojV1xOAQ+WS3tlJh\r\nNN8BqVDBMzoLoTeIvgfMGuqm6KgfZhdgtM0IAHVGHp4WDXTnI+sh37LYy0kg\r\n62ZB+jAxgZ1I/euUsZvPZDOE3ppimbS8ax0YzTFjRoiCkz+NDY9+d5E203n/\r\n4jMskRlPMPzRSVkw3Oy5SoigaZ3ntjdlbVi2uVNUV1GUgo8PyM90yoy3SHC+\r\n4T1RqS1IzfewnVMt/LYT4uL4abyuXUfCNWBys3EWVu+sC81UfviskxNlHdjK\r\n89LKTRv/WrvkfxesX5uvs7KAPcD6tInPwoHReGp1neT74rnR06JfDd9XbPow\r\nlRJ4sjrCU93RzW+z4LUa/+3w1LKdE7NfLlpNydjKRcIGPQWulG3SlmqEFHrV\r\nOt0DgiENwet/U5h8oSyS8J/qqL195CeamSuaY5UDtyKcqTky4fZeGK3hXtFk\r\n4pN/InHC6EY/kUbyg0BprS3qVFWQhjiauBY=\r\n=ikMD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"89aa095a35d4a006012f1de893cf181c5725f676","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.ab4aba1af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.ab4aba1af.0_1645121732241_0.8449045646089457","host":"s3://npm-registry-packages"}},"14.0.0-canary.e58552c6e.0":{"name":"@material/auto-init","version":"14.0.0-canary.e58552c6e.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e58552c6e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b448a7b6e727b452ebe405ab2f5c625db2e972f1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e58552c6e.0.tgz","fileCount":13,"integrity":"sha512-IoGlLDPCB12VxcatOWAtveZ2J2dtWILuzJWknRGJLunzx6no8Q+N9M7BKCAszGGzwDz+LqeeqAutIOX1GzZd3w==","signatures":[{"sig":"MEYCIQDWG9xLWvWZwWh/CWKxDmaMsPK2HpcOwGw8BjvjTJeyQwIhALZtRJqwFivw4iVZDWTjwhoM1gFRO6K1msIT+bZWZMPx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD99pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJshAAkqQ7B5htmOsTnGbi46XByZIKIG/1RJ/GAfQkZAFH1ylt4Yor\r\n+TKgGZGHffsaCKD4ILjFh2059EF7wzMhI+c4RNpI7ywbJt8wzvAtoxEUHyC6\r\nQkInS46m9UJ2RaeKRIeRqOGAudcfVeg7y9alJ2WQaJhLHhTHDrw9U+0DBtK/\r\nF/A/aMj0Ke785Umdngu5VqgmD225q8RdNDP6+O8ZLH/vfQP1EG0mCYnPaq3K\r\n9Mqp/AVeLglwsJIT66olHBndtlQpcRkyDvsB1978tX79hG4aB1f+75fxA6JV\r\nVt86LC8r+DDZ5e6ayg6P6xZ1FgRUC7KUFFlJY6/aeRKnXBnS3Jd9Xa9YM/SX\r\n7qEaMlpwCPzDKbW+a51AY/69F0xMLxldvPwjyWajGCAuqJin06Oak83DzxIu\r\nooc78nyGT9vIim3LWWgIpiqrMPdjwNfJMmrh98NvTeD+bAPjAWV1JZ/c5xw3\r\n3VZ2vJcwuLgmfbzFP1mgEoIDgKVNUrxunmBnUwmcNFheAIsgp+KKX33CWnSH\r\n26eHLAqq8Er7pzs30kVhxoAPXgVajz/eUaQKlBNvMrCjlM9z9FKM/bjpLI5f\r\n6IjT7h/4SUwzQnCA8CCTy1QTitZHj6JDiUgtaufAvJy6LMYXH/gzSxwxzMoi\r\nvuyWf6RXJKxMGFrzSk933+cCQRF6EE0WKVQ=\r\n=fNGt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6d5c1a026de93c3896f05529594e5b025f79a060","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e58552c6e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e58552c6e.0_1645207401591_0.9800818931242086","host":"s3://npm-registry-packages"}},"14.0.0-canary.868793776.0":{"name":"@material/auto-init","version":"14.0.0-canary.868793776.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.868793776.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0f1134c9b8849dffc21e835093037e377475276","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.868793776.0.tgz","fileCount":13,"integrity":"sha512-rT7fohOmxNRXN0l1UG/VvYNcic7X8tasrZiXDCSsxPxwC19UDgWKb57zr3+/ATLgTV/WjCbp4HlaMTHUOgzDWg==","signatures":[{"sig":"MEYCIQDh9jBSXTyjWNkSb9V6XpFPA44Pcuf6fDbNLKsfyurICQIhAJh46AVOobb3a9/z3JPSPCcFP/UwAubdhnUcVi4dlVAw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFTrFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqfA//YkK8e5tXybGkPt8c2U0sXvdF1skk/2tGMS0HAmX1pJX1HSf/\r\nH0IIB8lzr0ES7Zs96r0/xerkXbtM2A+Z/U7SHWaFGDCBDn5GbQr2pC4pmC3N\r\nwyPaOMyiwfH2AyEJ1qJx+qSNHiH11KY6qG3oQgIJvMS6saFY3oLoZbaG4CPZ\r\nBilc85EreU66M16Fk/j+UCrTjFrP2/ZEjr+0MM4CtBCIs3vkr9OR34lG4tfS\r\ndAQNkOYYadj0W1CByrkrLK9U9cehDhQ79qJi2aSZDi4TqFqjrxKePN+1PCkC\r\np1bSqChfgPWYgZ/htaTvEzT6QcNkFH2oFc0Nj3HUwhr1+jQC8YBz/P+XbeuO\r\nsZnsX7//ZB48JWqpbWXKry+KRUU4Hym5jISngjW735ti54pwY/LuqAMB+LzY\r\nAObT5awmoHjttA6NGXWGbNpfJkOJIMkkmndxMbhIpVAZfrXy0ujqC4dkE7pw\r\nIWpnS9W3MssklAzjtseSRrVMHZrS3G/tTo4xIgsoEgnjvy062wc5gRRXZrKG\r\n5w2mNHIqpYJIRV58C7bUo5mbt8aX4wUSDgZYOLtLeUGyvExLxHi8eUhAKGbl\r\nsKIgxKgzc0Fa6/B3WDolx4OX6mFjhQCuIrvnirfrQfCn8MH6cGODmMlpfj47\r\nPGsV5xkwYcC6bkTXKmNgCvdeujkpbyjFvGc=\r\n=VlOU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"78272b55e375cfc80b8f288ad4bcd4bba3d8493c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.868793776.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.868793776.0_1645558469428_0.0319152183666942","host":"s3://npm-registry-packages"}},"14.0.0-canary.fdc37a445.0":{"name":"@material/auto-init","version":"14.0.0-canary.fdc37a445.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.fdc37a445.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5a4515692d5c74d046d6b12cc5d66a81c597960e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.fdc37a445.0.tgz","fileCount":13,"integrity":"sha512-AFMo2Dwh2kAlbjhimx4nMqOmaP6PyDnH72+NwNywQjZGsSa9lwu5/Kz4cigPPYtmjqoRyx2njDuMFAj8LTZSkQ==","signatures":[{"sig":"MEYCIQDXWnlrSlbA8SGgozoaT1GC3F+D5oR7FmkYGOGBZ6LDqgIhANuU2eG4dgoqD3Ouxey/CWNHQ5C7ma/uGHnUeZ51lcr1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHRhEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcEg/+OWLdtn9yCIMz7HPhkGgFimQbOSSjcsTfV1uDWUn/SxdNmAsW\r\nVpp2q271pm3MMGdRRjJc79xjCA33mpBhi8dgb0v7yWwQQVc6SFNdKgcF/EUV\r\nCT/6+2coTgcaC9k2F94EYrUkyCfUOmqEenipqg6W+9UQKn3j84vnncuMRliF\r\nAzViabSv9ajrNOuAKfDaIulhb6EVbSWjwHqeVxEsBlwkTsUMsgWeVDev3IjC\r\nbwOCGsOe+8CyCetzN6hvluz6IP0gjUfLLHy8xNH8UzSyzL40pglexwnKIvM2\r\nu0dEt3E4MXZu2yhTKdDKcEoZH3Qoi5yBlJ16zfqEMf2Xt/o8kB1wWMAhh2WB\r\nbWzIbtqwvP4248PgqSC/Vez0Pr6G8buc42mOjGzo1/SHtDspySCnnQTk3g08\r\nawMxBiV7A+6LL50F4RynULX8W+RLFmYfBmJbRztvsB37NG5EZRTDsR2sX/P2\r\nAqDv8+sHXQPe8jCKS2tfaXXdbKZKHeelJ7IizI3snbOe08iv+l7JKdL2nsuu\r\nhYd7pse53tAikqFQxmyWqRIOdiDt1cvhiIpVE27gguVFMh73mMHb8o7SQbwF\r\nIBJyA3SVnrWyMTDC4lOYzhyicCWYE7NPXMsWuSE7i4ETfEJb65srWPUFG5PV\r\noEr3i29Hq2Wie5xWyQaLpy2hRa2PemWOwr0=\r\n=YLnR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5a8fd2fd927d036e44b0b22f48d858fb848e504d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.fdc37a445.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.fdc37a445.0_1646073923934_0.23220153140876154","host":"s3://npm-registry-packages"}},"14.0.0-canary.43c7d87dc.0":{"name":"@material/auto-init","version":"14.0.0-canary.43c7d87dc.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.43c7d87dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d25a9f623a398a12a3c7c78ef6331bd1169c53bd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.43c7d87dc.0.tgz","fileCount":13,"integrity":"sha512-JszWDwW/uUdcyV18ROBQWiXNK6E26cJ2Gez1gG8J+XbcFvAAYf76ldc6MPxDBdU8D7Jobhp3dKU1ofELPX+yMQ==","signatures":[{"sig":"MEYCIQC0S+MHnkH8F3NWbFB4VMLkkSTDKV2Gogx2/JjUzuBi9wIhAPP0vleBvWBF8ESzJRsopEVYil4wh9kRBPyU9GJt9UnC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHjyGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKHA/7BXNGGF7fNd8IyKDyI4pg9y+cG7IoeD1O3aI/6bqaEpKecNEB\r\ni2/Wkvl72j9dcF+EifSa1X0xY0ogG0fsAuNS7jQ6ZZhTFCcWZ13T4a4UwdSx\r\nIs4EmsHO8yU/cLOZ46A7/wgKejO/fIJvGksvzuZS9o69dE6kMFt3jr267CDx\r\n2N6Gc4PTdDfCj4SSRZ1wHVEEHOHt1DkTLwpTKINj+WY1TS5VQIn4qR0XHeUQ\r\nT5tvF5lkJ/b4W6EJG3weultbnelm1Dqe13dAA0qkBzkNzTOIH5v+m+bsy1VM\r\nbxH/lh9zButph6SxY7s2EqcpKWflLkUdsZymYiQCyon0BJr4tlWol0DX308t\r\nZdEvYRlsxnTZdL5+9J6eF6hXlE2AeMW4EU5w8oQqkUT4nTFeyd2rm1GHyrl+\r\nqh3oStUJIWCY8lPiL/dDaW1kkRYMWqI+L4U0VrG1J4Ng9+BtrG9pKewzF81I\r\nrrYjjb02I7rJgdGuiqWLrnQi2qfB5rGKaoAn/XBtj8i1VefI1uQLggvZj8XL\r\nX2HozeAbWx19ZFO7UExzVmiGvBFXmOZTLcfnbN7XM7mAHtphiqfHpOGPAgwe\r\ntR/n41z4oGsjqpR2bZIae8HZ1lY5n2BkmKqeUk2MNQhFI2xNGiAkIK26AFi4\r\nlufLwZm3ICROn5KZxaJSHiL4jDBLIxkBfEw=\r\n=U0Z7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c03dfa84e200bc6d570c73762d7ce507d0659e76","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.43c7d87dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.43c7d87dc.0_1646148742489_0.5396098820331043","host":"s3://npm-registry-packages"}},"14.0.0-canary.23043acd0.0":{"name":"@material/auto-init","version":"14.0.0-canary.23043acd0.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.23043acd0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2203f8df72022d7f11509401269e7e525b9eeb97","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.23043acd0.0.tgz","fileCount":13,"integrity":"sha512-RvjcPsqOxGYrCcp84J/ECIQe1d3EbMMwzjZdASO9UdqkUdorYpc4nbpw5Lnda1l2ULpOd4NaxyFE/i3WoKyBOg==","signatures":[{"sig":"MEUCIB/D9BeHqQ0cvna2C+0qhypo6pzPDk+AOKUebs4xMzD7AiEAgtYz9lasFGc+Nwvwoe1dv6h2RY6FxSSBCamGTJU3UBc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiH9MDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmof1w//cEM73UJeTRxZwGWF7DyQHo1Sr2j9dR+EveyRLb8LtMBJ72VE\r\ndg1X5mIyw4V3Y9R6TwjNs+EHfOruBo9taV7t+GPdJcCMQie98X95Lsbn5oM+\r\nrtRDzxd6Ktr1u73CmX66ZRSQO1j3sxD6AP1EPYstvnqbC0QYD2wN9SOMOPe9\r\ndoG+im4r1NQCQwsM2bPpfO6DeQWfQ7JieRmp9ivi6TYZRmn4U57dkfTj8roB\r\n2yOJ/OBYILAgcP4XD1h0eietpGw85FLV05hxEDN5Qv1mETpypHUvgpz7Mnet\r\nidqTlbBXYzXrypgoTief+FpC/7NwTUDnkehIUtYEkuB1AJJSapfpUqD8MV/g\r\nXpb/OsO66o8rmHHlVmwumdjU21N5+fSbFiYSB5tw3mVylagwkU4Vry7pIft5\r\niQ8mPiKFWQyOnWJRLiSq0iIxYcF6oyCNGv7lHSx1nAD+CSZ+rx5qU//in2AI\r\nhKHbPHxfwfMx6i83C5OhLhOIIaR1N2BLUkKmb7sG7oTuSsX/VkJBj9Zbh0vP\r\ndLcvYuBlbY2DskdsSASyBsbPLJBx/w4Hs0xqUE6zs0D0FHTnafswEBfF5eOo\r\nj7JKBJ5GprZuRMj30DfMbxzOYXT0kG4CwGAyekb/OkWQ72GZf6RlW9eupfP3\r\n6fpzJxHTF1s/+E6l1bLGR/Pxo+uBkkUy5+Q=\r\n=1s98\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1cfc3908c111a04a69dbaa90966642093f79e86","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.23043acd0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.23043acd0.0_1646252803439_0.13807032499412442","host":"s3://npm-registry-packages"}},"14.0.0-canary.6505e61c5.0":{"name":"@material/auto-init","version":"14.0.0-canary.6505e61c5.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.6505e61c5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"baff4472d78b34f986526dab4486802d536bd391","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.6505e61c5.0.tgz","fileCount":13,"integrity":"sha512-h51auKrnzOdM8HtLbUL1TvgBwu85TrDLzxO8ngIurfmEuOzX+Kw/fo9RV/8kdxYSDYof1KnYhWXb+DHbqfYwwA==","signatures":[{"sig":"MEUCIQDqJBmoVlMPMQptdZuRJUngIvdo42OiXU//a+PbX/vcdwIgROYuDfU9Au3Nc5Ce2gk2OAZE5EUABLLBtDJ0M2axcG0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIR4iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRYQ//RHKsRwkVH0ag9pRmMZIAPuVfPHK0U/3q+uXQiLCF4P3Oo/Gf\r\nsbaE6K6NCUX1xgScqDKa9pnI7dkyHFKH/c+agF5UWDIZDvKuZT09HsBemtiS\r\nGKjf5rYLhuI0VJl1NBYigIp6kS69CpUp7574BGej+Got1JgY0q2ee9tumdLD\r\npr3NPb2VBh0B3ep7pBU8+wiOLN7sf5iEemN6ToEpWBd+90ca6r7gTjNn82/H\r\nZAJ40rHaU51Q1f+UYxQGAdGzEdS/jzrfLXg3xaoT3NkefZl+u7DZ7ky7KagB\r\nY2ocDWgIK6cJDKDlnyph7wfKStpI6VQa3zTBxA56OTrVK4POUhLLgU4MeA0j\r\nDu622NTxNRhkIIMqb5V/jviJFa2toNKO/XB82srkDAc/oRdIecRhN0PYrrTz\r\nj9FoMVpPOqBrcINkvn7P3YsqGCLgsWtiqRx6abBatueyTdkjvV/VsyTyg7OJ\r\nlAKHJlKeZNforTXQp6t9JUfdQT2W8fLgV4HgLykbwBreYqFmrylQ9cMCvpX0\r\nRE8fM4tXs42cSSHRVYjRs6GzvD9F2bj5d/HRyMHaHYw1JSUtKk/eGh5JDp3B\r\noQEPPZHWa9DYubJ4HobaihCYJwWUXk0ufdI9CzRtVLhk7iJDdS0FDMdoZK02\r\nUjKt8bnumaOpP73Thxev6oAuxmrsXOICsRM=\r\n=sKG1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9070f0099aa35dc2460994d2d83a8330b996c5c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.6505e61c5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.6505e61c5.0_1646337569924_0.6823895563688491","host":"s3://npm-registry-packages"}},"14.0.0-canary.16c166154.0":{"name":"@material/auto-init","version":"14.0.0-canary.16c166154.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.16c166154.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"abb16d370f0fcea6597dfedfb3fdf688f3aa57de","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.16c166154.0.tgz","fileCount":13,"integrity":"sha512-Q6R5BJn/VQBfadqZqSxQwXgz7ETnHMtoFNNDWvRf+ck5KdQrSiJVps4ilY8k0htrNEo+9Mhw8+ALQ89Do6Qfyg==","signatures":[{"sig":"MEYCIQCR42Szc8mmRF+sxW152QKd4vvQz7Iol7fw/TJ3rqb0+wIhAIapnwU+359ndnP5qM084zOM33oDEcTDclKEd+sbrv98","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJ+UAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0wA/8DKH72Y0MviSHkjXS0OQTF2gRlHvu5GoHyfTibPtxG1QnImv8\r\nRvKaQ7G0INRqZ4fHi3MN8VzalCYhp1kHbfMw0OeoTTVMMBo6hnxXlSTBIYHJ\r\n3Ym3YwBC0g2qSAORjBtd/7dxcQMIYkmAqskkPjtMQw6mwkDif0A3sF7Xi2VN\r\n0pLOP7xvbKk7zZqY2uzb8/faNCaBL0tOZbPQPYvrfbw1OA4Hi67+X8DHh6Wk\r\nxz/M7/CDxupjY4fb07xyak62B2M7IUe7gknqg+pqn9xbeogcPMsPzc/A0x42\r\nz4zq5hfAHp6DbP6WwUbAaCa5hLvrLIrbbfcEvV6CUNva0w4AbDa6usMF6P/H\r\niSdAH2s6vfGf7i/kmn06Omz3loH6/2yEXJGwVh8QxMvBxR9xu+X9uNgc80Y7\r\nKAcOcLSJR+k0WChGSrsfFg5aQdDR8+F1LXazXpkF+FmxMRA9LhqXod4yLS/a\r\n9clGZdUj5JHYGS4ui+k7nGdawGTnRK8fhp7Gk6Hl2VeYosAMFPrSYYyRoNOY\r\nGCSi9K5cC1hflgnx5U3jNYy4SP15wawEoqoedWXGj3KrNQG9TlYXe9RIwYRb\r\n0TR+HRLhfyOGth6OlwbyBgk9D9j5pVZVvtUORlIYgnnU5l4PsPgrCL5PPLcl\r\nJg6YdR3ri2SR9D0fN7nRZ9rfRWkfoNvVvn8=\r\n=pJ09\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dd1bb8b4a67220dc0120ba2dbdac900e51002949","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.16c166154.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.16c166154.0_1646781696001_0.07237911233699523","host":"s3://npm-registry-packages"}},"14.0.0-canary.bdf1d3771.0":{"name":"@material/auto-init","version":"14.0.0-canary.bdf1d3771.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.bdf1d3771.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"978564e6144a3ed8a7eb0f57928a640b27a90fb0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.bdf1d3771.0.tgz","fileCount":13,"integrity":"sha512-7kuOPSLDm7ek2ti66BvhfYy5sffOsRo4ArkOQvrc3Xf+hCg+jtACgUhBeJdlG6wMwuNi+WP3ZmIWRfoLtFFM/g==","signatures":[{"sig":"MEUCIQDLy77HZ8JBhsqjjok+pCy5KiS9gzlQ71PyaoIqbVTzCAIgNRHkMvClCNDYrkYKyg5sJKlsiQ6U/K84K8D5LMN+Gik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiL1DaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWiw//fG6r8QCM4lKpO5fETCeNq2/tCVgbmEQrQzA4+qWoeLaJwJ9e\r\nK97OMSMkk9UpFX6bH3IR45tA4C4bK2pwLDtMTjkRm663JFcGi2PpAF08Xy0L\r\nzyNFGTokN2AFix5VtvBm4CLHoyP6At+Qq65K+R54jFMXT53k4wza03SufUww\r\nbCZ6O2wqH42wkn28Okg3xp7pxYt0l3yNakdTadMaTksEoCAFXBtS3YQNMcmj\r\nObWmryU0cfDU1bMKY1oSAUIRnyfuAj8EIkft3HcDoaLERkeqEKLeFpAOkEbf\r\nq5KOY+zLTpOMPRTwQBsj5xuJuA27KchSPi2fozh3nlEUiRoDl7jPSLfhniI8\r\n13hiBYhTIdm6M1NzibVY1pQQWNDa3JDi8a+V5nBmKmg87w+gJLoEmUgl3R5u\r\n0qELER7qcjtbbK3VYvWjlBWVWVs+DRCbbek9EE5OtdQ6xCQ1yvucJJCSjktZ\r\nlH4F1WvKINayTbShphRodBmAhMteJNtyvpgIn0Gf4s7siL9iPNHGJ9K6UuI7\r\nbEC9JnPxhBqgXf+LpAp35O1LiFmPaF0rE2QSfAvHZ8EiogGTLLQbvW7lYtLi\r\nMJt94WSfDskGzReyylnTRfpgDEEjV2a5Z9VR3o1V6tqIsNycItU70NosXNOg\r\nSoelASRlEGrCXJSQdg9XvRxvBXjwLEZLYIs=\r\n=Gwz2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bf598649c7389f49207c410e58144f75a67cc4f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.bdf1d3771.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.bdf1d3771.0_1647268058422_0.19606042877631702","host":"s3://npm-registry-packages"}},"14.0.0-canary.cf4292778.0":{"name":"@material/auto-init","version":"14.0.0-canary.cf4292778.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.cf4292778.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e63ef41af6cad6f61945e2394830056ff16128b6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.cf4292778.0.tgz","fileCount":13,"integrity":"sha512-1lGNxuOm/nImP+OdBhyFjOoP2ITtoWn1bvWWe2U+KUEhhwm7EnIsg4IV96YlkVAQA7w+mo0WoUJFZoYQusNU3A==","signatures":[{"sig":"MEYCIQCDrdslMeWoCQmiSnP2BpUGtcNNtG5UXqzCjgb/FfgZKQIhAMRTgkDiFPCx/iGiQFNaJxZQG8hHC5J5v8FQUOLTv6W+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiL93DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKxw//Sf+CjVy1uWDHO+4juVd3uQNrZTKbRR2FICFMcVmd69S8aXLG\r\nbyzy5A1kZS6//1RSz2ATNNTbpcudS2HfcZDCYe9jBRvaGBV8DLntkuCf0Rrg\r\npTTrUsBAAaXgnBiybPJMUlo/osVWGU2oScBim08iGD5DSJRuLwwjlAVfRzFz\r\nueqfCBkPJG96PVUXKHE5riwWikcW/vmA8OJUxh+0d/Gj7wOVfshf757AGaAE\r\ntYoc2qhjqvnOzvufs9018C+AdS0YKC1TYnX/Z5ouhvM1Ybi3UfE/ZJgyplIS\r\nbsP2dS/cPx+HrJ5/vVnf/P2n1ViWu+MV0ZXQVO3iCeJM9PxBKjCAlUcibR9l\r\nJE2xb16A8BsAmudzJ8qPq56GVt8LRoCNbK1feDbs21L1DR3rlKhZGDQ5hrzz\r\nMnicra+N0/vxLJsERJq+mof51Xrq3w0wMCCc2VUrxjv5gmiQHSdRXWz0Olrg\r\nhUORrn5ohfaEb9vMjqSEkjl1+R+SFt8hmWvLky27EkT7hxqfM0AiHImXozC0\r\nXiLNbeC2WyqVZq6Za3RquC0zADLEapOIUr1hnOnwQpC4zkv0hnFOnFf2zJ37\r\nVqqkB26G+w1ff2lzB2BuWDxAhC1oaW3JGH2EwunZrpQ1cUPSwK/eDHXNJc8f\r\nbyIdBnJJ3PW1agwXscuJfd6YwhSX+12dD7U=\r\n=HsxA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85b1d5db9650586ff51d999fc12531d07489d13b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.cf4292778.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.cf4292778.0_1647304131361_0.6204581589818494","host":"s3://npm-registry-packages"}},"14.0.0-canary.bbd43e0e0.0":{"name":"@material/auto-init","version":"14.0.0-canary.bbd43e0e0.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.bbd43e0e0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8af043fd620c63c0b82dc12007228abea58460b0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.bbd43e0e0.0.tgz","fileCount":13,"integrity":"sha512-L95qzkYoRukdpCWae9IbLcGKq2Ctp3Mr0o8onrZ6jkgd7qL2Px1NWksZhYbW8D4j6lOMbqnuraplkuZI5OlMmg==","signatures":[{"sig":"MEQCICUpzDMXhh8bMLXWMMXZ/LH93j7WgFJ1RjoHVknBXPGKAiAV3i8D9cBwKTTujX8vcXyLxhCOOI+VuLLqgjRfeHHBEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMk1RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/Rw//Z4uFyBG/uAKUKfRIMgNJVjEsZpYBl7WEV3l+atnGJdi/51F6\r\nkPKGlryT0Jb4BE4lr7ZM55ytQibyjiP5gfo06vrnfBFYBzQ58QHaLBpC8cVh\r\n9T/NmF66iV93ZYqWe5aLQzelGdKhj/OXyza2vi9ryUWMjLl/CKdwzseq37fH\r\nRNGmX6Uof05jJnk5Ehyk9A/lArHGNjAKwsstL6A6+QMj7h7cTyjmadV+IxP6\r\n77dR3hx3/bmPTBLZXaq6v1BugcxXxijrqmq4mn/80KJE2PB5uA1SK/+05aiF\r\nb4ktx6CfmcIksYr7qDmTJT0ThhXeaj1gwNygST4p7O32j4z73mMmAU2N99Sx\r\njAxouIUx0PoSbb3AwXhhkkOy72v4BF1wUzFlCityuh51/Zc1md7LZVOzL7sS\r\nbp1F5UeV3zhhezUplPTkPMgwsMSk6WHruZSiwLPT8zNV0ts3yq68v84O6myH\r\nv5UWuyih4/pAwD9oF9FgVDWElcZDYWevlqnfLcgFtNqHdWMdmao9T45GyP/v\r\nAiomd2ANL3fMTs1E/W1oPbF+BCa9NZbviAYbz+KUeRb46lXukn1cwLzrkmvl\r\no9G9j3rkJxvTN3pVJHjzGKtwPxHX/87npCdZJP7/BKNXGFFSl3K90uuIhQID\r\njD/WWltG8oQFPsB8iWMbqcb0Z7yj01FFCiI=\r\n=Z/Ih\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bd60ebc6c6267688058726d6f98421b0e815336d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.bbd43e0e0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.bbd43e0e0.0_1647463761070_0.24908361326320372","host":"s3://npm-registry-packages"}},"14.0.0-canary.1b6afad86.0":{"name":"@material/auto-init","version":"14.0.0-canary.1b6afad86.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.1b6afad86.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"717e2f312f301e9f866194a2a007c9cbbc41ff89","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.1b6afad86.0.tgz","fileCount":13,"integrity":"sha512-7tx7r6sXu9gUgcq0RD8VRGh2Tv1AkHI/YTx85ewkceQsFYzcyvz6tacLXJ7D0oWHKKNcZuDdmLjZ2rGMF76g1g==","signatures":[{"sig":"MEUCIQDJCTChXzxy1pkAHEQaZLMCyJfbImKg/NO5ZOLt9RK7LgIgfDOYbOveJn/cIggUDk5nHZyZ66n1rfH78W4ARTvDXBA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMlB9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWfBAAgpO///itWAmGkDC0zj+uUlsj4K5Rzp2ZQmMzC0LQjVbX9n9o\r\nb5WgLNuw/HefV7e3vluzAHl5u9m5UXWms36seNxLRdrCwHcdjEQpc5iBRlYo\r\nJlBkvEr2CtQwF4O/gBEU8mSmfkYN46Z21X7sIBV6T2cGqHOlMi/QQtEsQDRk\r\nbgGW4FQyfmnC7SdTpaUUggs4eo8lUGG4msPpsnb8w4NEFeynH12HoCIrre9J\r\n81OGPGIITbZLP8Fl7LvlcJPc/hSvEgf/SDYHDLmUZOEXklqb90TxPoEyLn91\r\nFJ6nS6btoJCE/XwSAs284KobL+WqGAu/qgP2wlYq+ljN47hg16nPybKuOVQg\r\nNajHUju2/ZX7DhFcWK+Wjx8cFNzFRB6npJTsUcHgzXHkrxdWColgYxL3N2ML\r\n7PDXB02WYT27ARUsR7D2a+McoFU9jNwXrcrTPW/8UpscdhwK2ZCqn22lnzQB\r\n/3xCrbuC7t8UmaLMGtdSb56TDYlu+0c+Z84ZV5stJLaH6XpnlgkRZDxlF0B/\r\nKPwPy/xAdRCpEgmZY9l+xZQOw6/Qaa8R/CStZf92JkMxfzGN5Vra21R3xYCY\r\n2D+lM+RjXu50p5ILQmOJTpEKri43lsU1Ti52iDlQW3CrKw7rnbSxhv2PEbGq\r\nLWK163+IkLvf+qPvrMGywwJbm2mie78k6Y4=\r\n=Sy5s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5e32cc72145fa47fd2155c83c81cfa7ba5e27db8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.1b6afad86.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.1b6afad86.0_1647464573233_0.5800341726021774","host":"s3://npm-registry-packages"}},"14.0.0-canary.bdf9d4af9.0":{"name":"@material/auto-init","version":"14.0.0-canary.bdf9d4af9.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.bdf9d4af9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"319990958bdbf6449ecb597680dda03e38d2941a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.bdf9d4af9.0.tgz","fileCount":13,"integrity":"sha512-RmaKLLAn7u+RkEYR2OopDPhoW5U1oEKmBynt8Vnb0UHDyZKtz0ECK9J7ozV5ygPr5IJq6sGRQzDphduUKmKUwg==","signatures":[{"sig":"MEQCIEzSM0mnGljaK6lB+B9hJC6DyZ6Lk4UvrzBs0wcOdSptAiBjbsUTynGJ7/Htd0U50kWQmFyjnunfzFemPo+hH1r8fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMlPVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGAw//ac4LqRg+d375vfOU+wlEOyng5q2bezexn/H2+im9jbZplZTQ\r\njTYr9udI5zz+KJgFEEL5P/ZzuYuMx9cwXsNF3BalXnzkFaWInHisrgOlpRoC\r\n2xUYT0BtQEZaFkB74uFY2Q67/z0wXTnGIfg84szxPUzMt0SaczVWjeMZShED\r\nw7BEMFMLnpooCI9FRnSDgfyWs1SsyY00DkGo4XmCGixeNDAVIHI6jpcNmuzT\r\n9pnJSZjxDBzQZVRsMiY5ZBlJ8D8P1R5L5/AhQKlzA9It90MN/uWM9QAA6yWi\r\nXzK3Uow3J6NDHyLAQbBn/3S64ErqeLmMFiwW02Wi7t+0JXL4ECb3lbv0mLeh\r\n/kaKo5CTgq1KphpyxLxwbzWKpvd7PADjLr7sLaRvjrKoeCdtJvdJ/MeLWsDJ\r\nlj9ZL7ChtZ9ms2KAPQSGA16mWA5V0hyuMUHWAI7vBx7Sv1Eam7aiEpdZpArw\r\nQJLYPiIVJvgTgtnE8jZwXHVDz4Lr1WZyqy8AA3BnoUgGXrJZcsWpNczwqFGN\r\nnsGTN6vHRTVsRk66xxzRjYFI1/X9s+RoLQG7q8IYVGkb8k+VQ1KUMwRBLZd1\r\nHsQNsVauaxM+ptx+51YP3cM0uGnidECuYXSnf/bSOHkDNAfJSIxJGrhhX7VG\r\n1ozYXGBy2R6guSFaRSDL59kKXvLcIi7SnwU=\r\n=gnsQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"413f4cd271111f1b118401821eb4bb38e7fcbad9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.bdf9d4af9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.bdf9d4af9.0_1647465428909_0.2492007234314373","host":"s3://npm-registry-packages"}},"14.0.0-canary.32b391398.0":{"name":"@material/auto-init","version":"14.0.0-canary.32b391398.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.32b391398.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ace56e92ae8dc4de29eef9fbed4a9580851e5d8f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.32b391398.0.tgz","fileCount":13,"integrity":"sha512-Y9d/PtYAasrW9b0nAZUJ5Ry+tLGpD/Bewjli6LaiwSFoE+qIJJvsfrzTCu31OOrLKfxNrExQZ6/9DdBeGqmm8w==","signatures":[{"sig":"MEUCICBZvXMpR7uC3me4enbSb547zfK++RqCoNY9qXVNClIYAiEAiU14IS7oqDUnTo705TP5lh3Ad85V8AQSRmVh565amG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiM3bCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo67A//dGBjqVXFUCoHOzipSH+R4pXgMd/WVy9IZkzRcS8xXEzZyZRC\r\nk/Vb1J7Oikd3OJNPtAAg+2cn3asXO+K9lD0O0tYiUah6m33GcqSx4624/hr4\r\nfjbkRE4F/ldO+0WXwzp3mU5O6gO8OMWM2oho2CcW/3OSOuGpWvQ66DHr+GKz\r\n5L1aAND9xI6pMw4sdEeqQF3bCRPeJFoLm+k4RajwyHEnM4y9xHuALGiXTXLJ\r\nnZMQcf4Yh6ViIN1LJ2RzDVaPY9hNwKK0xyq11pCRlRtR+0AU/dPJk1v7qdj9\r\n4GKyDyhOHThISmBfZH5V8rHOyvXp/q8YICo340sRoI8xW8/BxtFxfwn3NqQ9\r\n7ti5vXTmduJ/FDeK9IEp/+xjzCjo8lLeGrE1ahA6Y7ix2QhTAZUy85JlExz6\r\nJSq2p/Z4dHbPkYBrOGpsie9J9Cz1e6kgbPnXjSHClP4p7KcVcEq7RhcUOYoR\r\n6hb/5R8bJE+jm5Yzt5B4T5MHfKe6U0Rx+3WliZA0JF9Dm1JaLl1b7IXhqZCB\r\nL8PhZvliCmsphSxwCJI1ZJ8ZgDwHWH2Jz0Fmvq75/oZemJVNFpNMhcMbnXH+\r\nLIWZoKQ/iYcqzOg0MuVdMRAHneNNXaCl3PAIVdwNAP4rJk/N7WRXnROrMFgZ\r\nL/Yyl6ZeqtX79vZezFoPiSoZzVwXfC17gHk=\r\n=OCWz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a457bda7a5cedbfaee9da752ba2dbc093b45ac6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.32b391398.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.32b391398.0_1647539906445_0.5430420461421439","host":"s3://npm-registry-packages"}},"14.0.0-canary.ae8a6a3a3.0":{"name":"@material/auto-init","version":"14.0.0-canary.ae8a6a3a3.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.ae8a6a3a3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eb040e863e8b13aa435335428c7b35b26ced7dc9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.ae8a6a3a3.0.tgz","fileCount":13,"integrity":"sha512-4nqZo58e+FBCyLGbzV+8SIl1h0WakJzfV2bVCPU++i1izDr3mLrfc5qveZ2QBSxf1IviGxUcshZ9eIJhaqMzug==","signatures":[{"sig":"MEUCIQDCcFh6pBiuMt13000+OxO4HnhCGuwvVfdskRT1mDeWcQIgIE0cCqy4aOS1PCDotbkNZo+yDEVYfG2Jhe4LvnxwQ24=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNLWEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAGw//TQUs27Nv/oo4gG019UycJ+Lv3YtR6qowL/xqkefF154BRCMm\r\ne56GJDRsiid2GwKIC1OHy4xRoIYsTH0sNb6PGxvb8ZDacRIeCkaXGIvOEV28\r\nMxRj3NGl999fuFATRA674NDmZ38i8CoXN8po9ZRcmH7j2GF76tZjSMm8Yu3N\r\n2gjkqGiU1SgIBOXGoUAuMTzwNmSIXePj7MJGar3Q54GPLWOpqgrCdIynMpFl\r\nefzuM90WLYi6kIb7ID5CZ4rQhKfMlp3S1Q64xjfgKGpjyqGSvGymLJwLRHMG\r\nOQywsfZDi8Cvmzh96ajl9gGOsO4Xgmm+F3vMwvSMcNct23lGI+Z8mk1AjCl5\r\nOXUIm0pOqPMBAPjhVAf9rBH/NnbytCeg/tV7oqUuPrzXbPZxU4Y07Byqrnng\r\nksHDAOqI5dI+Qj+VYxio+HpamW5Lfra5uXWigb1iAQMl+0MjCgyhGi1ZKQiq\r\nNXzSLXGdJWU9FG3j9c59W4exJ76XwgOmJIESRclRGnSHocRhCQhFl84ONX29\r\nYp15k5uFe7hJwkOy7/SazJNQFTeXhUux3tf5EJlGUHGBGudyLzMRuNRTu3nJ\r\ntTAMQCkiR6Vjc9bwcXFSC40UOn/Y78XlYP40tjPPF6heO4FB1yQiwPhw0lkw\r\nXUb5FleYzY+/MxA9gyS7kbW/skOCgp9YfLo=\r\n=ROU+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"783283a1304f941e05b3ef25b9a589158368c595","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.ae8a6a3a3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.ae8a6a3a3.0_1647621508679_0.47466431004269505","host":"s3://npm-registry-packages"}},"14.0.0-canary.cbd9358a6.0":{"name":"@material/auto-init","version":"14.0.0-canary.cbd9358a6.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.cbd9358a6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15952bd223a70c3342d1ba6faaf1dbbda67f9fb9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.cbd9358a6.0.tgz","fileCount":13,"integrity":"sha512-dFtCoEN79UmogTSHylzg7SXdFknPVrCbyJ1ggnBtKI390zGRSxYuWHJ1aA+lDn+o0o2Qce4STL2LWTll5qpjOg==","signatures":[{"sig":"MEYCIQD9nSIEvzdXfrM+hZ3nxjixl9WQWUliCxeUW/yjCINtLAIhAOgdlM2Uf1MOgiuqE5yYWEXeUREAaqjPV4qHgwzYUEoz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNQzlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmohbw/+ONA02w3GLGWeNfz5ADPO9YLdAqFopXkh1N8VY2uYMFgkJCCv\r\nkB3hmEqngp4lru7NATH71kf8A3x8zQEqjf8qqUAB7Gox6IFwFmtLcxDiCZ7a\r\nATph7RvtX8fEam1Y9lvzHH2SGSpMXF4Cm6YA+KFY5t27ZyxzbowVTr5SnR6O\r\nHJFqMkAY9+LwOMhkCk2ue5FzL606rlVQFHqFuE0TBguAYTtL40wcTlqxsXxR\r\nlUCxdO6QEMHZSWT7mc3WkkBhgfZoqawmtNVCJGN/bPjutyo0CBUhT9toBpPZ\r\n3J6kvw63+idvRNZN161ySWy6/GaTPs3HMcHlniJIRvNJX+kL47kjpub9+AnS\r\nHvLl+/6CedohyI9QfQxzX8OlvlxiiiAh7I2Phh1qocUDVRz9nw+ZbGJZf+Me\r\nwCsaBCRV65sO4vHv5wNJ/C0GjTr9IjPVLlZm8utfZZ82VMfZ8b6ZZYgDi1/O\r\nIeAjNFRp5CabQX6VWQW3jvu3rv9ukYcoBLFabsV43Pea5X+ITxTWq8xkswtO\r\n8FBgsG9dEUqMYFVCtQWmYAc9KJ6uETm2FRgfLhuGMhqrqAw9//yUaGQge5qq\r\nqKq+WJC95r3tOzL+fUS8CswjTKoiWfcOzQ5rJSD1ajg3+n3Sq3lfqjUhgGzD\r\nZK0OmK5ON0r1CUFjP+6mcE5d/UoPU0jL/f8=\r\n=2ZqU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4296a048e6aa0c1ab8e8d2cc6cb8321c24dab9f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.cbd9358a6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.cbd9358a6.0_1647643877050_0.3461663895667486","host":"s3://npm-registry-packages"}},"14.0.0-canary.dcfe49c98.0":{"name":"@material/auto-init","version":"14.0.0-canary.dcfe49c98.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.dcfe49c98.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f561b6707955cd2340d42c81f65aa1c8d024a9e0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.dcfe49c98.0.tgz","fileCount":13,"integrity":"sha512-/rsj7aBOTLiCdsZQOfgPnS9N2EEsrpNG8IIVyM4yglINUBGRlAmLw0ITiemX2KXuV8oebGGFp4Yho3rm8Ex/Eg==","signatures":[{"sig":"MEUCIBNLLmW/GOuSSauuXn7c8qIB6GTy8KRcYCHe2boNxeW4AiEA/5ewC3dtfWE6mbeCAAmmcuP0I3AVkIiFZE68Av7qRTQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOMdIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogJxAAmCwoPx6x6F1Wno9G+fhB6bqQBxCgXFMTAVOAzfIk/J0GFarl\r\n/0TDRYmlp60K8omJvoSPs+29AVIT/KIvCDI/T3LUmGjoPde2quTx0ePDd4Q5\r\nR65lKKfKmmxsG6xD8dmF0tCMQ0/yZU4xtVba/MnJJQbUKRlPXZETSEmPbLiR\r\n2rDtqzRz3666uxZGYiKOSbXgmpBzUifuhKV274OVV/lUNU505ps8r1BTSR9x\r\ntUfP2+SHiBQcUSWEMCBKVhsRZ9Jv33Wi8zYEPXkqq4Gk+3PHAHEnyNCJNGkr\r\nxKx27Z2nztySswkxhVH9PxUtuvzDiVFYjhLoGjVgNG91G/auuaNGP5ZD6hzs\r\ngPwPK0mZbAcZrdzizQYSpMiADWX+L0+TcaFqgct4tQHa/Qv4dKYu71j0qGzG\r\n1hlzNzTqJubEi+xo2VmHdBlLWQjA0fNQT9T0nyyqYV6X2hVQ3yHa+1J3TE6k\r\n3eJvrj6kE2ljR0NCf4iChYSnaAUmDgANnfDHzFIVuLHwx9SCMF0/DNBBtM7k\r\niEqjEGykLrwlLPtgUccTPSjPSaOSQeE30vGBVBKvK/op0sLgIY77ZLuwegHp\r\nvJKPLmQKBT78lBM/XHVz8TwNUpxRVSmo3tXp+4yWiIl95oudkrzzTvZ6WPsB\r\nuSDw9jIuvO8MKjYY4bbk4HRHy4LViGBeH7k=\r\n=ildD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5b68455eaf6aaf2f571eb64a1d8a5edaba58d37e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.dcfe49c98.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.dcfe49c98.0_1647888200053_0.9760040796660943","host":"s3://npm-registry-packages"}},"14.0.0-canary.f31a833fa.0":{"name":"@material/auto-init","version":"14.0.0-canary.f31a833fa.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.f31a833fa.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0e0489c58504fb6ac042814022fb5b8100a5216","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.f31a833fa.0.tgz","fileCount":13,"integrity":"sha512-BB52LplhTfh9J0teb6BbX0/Gp/sotvbXZ+esHR+L8Jo5RnFbiZOvZXq7w/PL8ChqdKRA/1DQiSyK3K3f+Y9sxA==","signatures":[{"sig":"MEUCIQDyKr/wQeaRdPdnyuXWUSQwOTM3t3yR1mu9jteT2kTLBwIgErFf00eOSDK7MeaCiftwX3aD4OeaNlRu+b4dVxkXzw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOm60ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqLQ/8Di8Vo3kBsq3Ns/1/HEzcl8a7+94B6rNYMfYJng8xeggAVItv\r\nGXUB4ZqpGlLxVfmR4+7n7ebV/Xr1v//09a7oayIzzeVQkE7H1pHxqaw8IHQz\r\n3QoFhJZ31IdVaLRkekV2VGFQr1FPKuiPcPwlW72zE0f4+1Nrecc5YMaouFbu\r\n1koXnqmwj+0GlWk5v0zaoRvfllsFEeVXH+EKgyo4PO2O+afXZE+DLY9y+rHQ\r\n7/7HWAHqy9gN4e1+UmiFjNr3uQFrxBwyfqfiS8HuBlQPrT0KzK/dpNwxalCd\r\n67S07eOsXvWRJKzKNUzG0Zsl41dzls3+4jB65CfeGF6pdFFAm9CK4nAEjAOS\r\nMFwElGXfzjHmLxwsZf5zYRsq/OHH8bFId9m7wCbf8GdXCuVLl+/GaPWXmaSn\r\nDZu1kixWw9R8wHvHe/pV5Q2WAN1jPRx2gi3gV8seYwLqSYuB/+vIovQTra1C\r\nVQo5K7FrlUfEdq4nsFQJGkZXJx6WbYiTHgFY+syJ1W4wYhF4A7v7eFtu4r70\r\nSPSw/oZI2zONpuI37CGLXV7ZvXp85pqTF8/TeBMUHb1PArCjRmOHfa0QdHP9\r\nbZgWAdEVUw1kpoyKI8145ZySONFvH5gHe0dQU7m7JWMiW/aLLAyBNaxUppuy\r\nkKhVbtdeXsrA60XHTQ7rYLDdFVxDXShtMPM=\r\n=Y7tq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"28572f217366c634964a133bbf0ee0b8e88b8126","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.f31a833fa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.f31a833fa.0_1647996596454_0.7854115854293113","host":"s3://npm-registry-packages"}},"14.0.0-canary.4b92e210a.0":{"name":"@material/auto-init","version":"14.0.0-canary.4b92e210a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.4b92e210a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bb16a893a1e7c075f2ba77a8bcd139151c5df76f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.4b92e210a.0.tgz","fileCount":13,"integrity":"sha512-cvb84sDG8uOEvuoGxuuHXjl/baVJCFi82UgLZSSnHFGXcA/AwpVyFylbmQq5f7U+rcFFl6nDjGapi2MgHD7vww==","signatures":[{"sig":"MEYCIQCJFXbVRyYjeIx/6oJyoq3M5yFkDFX0Rs2aQ1NWdeMj9QIhAOfnmuRS1KHSmxP3XesdHDfRyiK5z85C0i6E8TcpxLTN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPNHtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrfaw//Q5QkE902wj3I+lksw5BCpaf9ymP547L50MMQjl00PrqWBSh/\r\nXCCnYqGXs79tUZf2WBQihMLgi03jerZuMCbQ/caBNYnLmFqdVGmFH7fs0Y+V\r\nXmZbiTscAQdVP8QpXD4Ev4qn2eajIWr3eI/nwP+0SNUyzPlNvaNwQFJumXdE\r\nmhoKCNmGJYtHa9ZyyV7nasL2b7Dk89sOpgqgBdVOxlM/hrYGeUHu4CnBspJZ\r\njSXwxkua3CNFQO8MxCBsLCsl92UOYQh13utEwwkMGsLatWmmW2VwPGnSErob\r\niZ9pN/Leo8rM2Sp6UkJ/+qv8QH1DnyJP7x1v8agaOMsW+nl67b9fG5Ulc4fG\r\n/Wue2ClEe5FKAmBeKNy6zmDUI++76CK44pztMqg2FQfh8HoWbVCbUdRdzcR0\r\nXP+3KBce7RBuZGnYkOmeWnSAp/FWd5Krgqs50OhOud2qpzdT2JskEhD5so/i\r\no3rUwMN6LyLTAmIe4RZe4nmGNyt8KzWdKvTeh8kysZv+PZ2NMEb8iCeodNE+\r\nY4CK0KvOJm6Agc71ni4uuXXOgJHWYp5DS3MyZZsPMekR9gocYSRsXfzy2bzy\r\ndvHbnzzkS6dLlXnBooS5eqxY1tqMKQ2w5CInYeUBokrvz0jEB35PvhKMI8PH\r\nn9aeeTAOxA8x6qq8oKSyASwqO79lfoTIO4c=\r\n=H6Nq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9fc48f242a1815183c2b4c74ea1f8bb9967004b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.4b92e210a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.4b92e210a.0_1648153069620_0.8309065055178313","host":"s3://npm-registry-packages"}},"14.0.0-canary.a657abb61.0":{"name":"@material/auto-init","version":"14.0.0-canary.a657abb61.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.a657abb61.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4983ac55ae1652e79e1cf3685a7b38622a2e5cfe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.a657abb61.0.tgz","fileCount":13,"integrity":"sha512-W7PXU3uqLNywauoXW/ZvA4iKGTWT3KepU2n1ez6LxifT+yXdOkNDJVDr9Rps0BtjdINM0eK4vvK+m7xYwfZ/+A==","signatures":[{"sig":"MEQCIBllsvt5INzjL4IaGixSBdqZwjMLqc90aSzrrBnmW/2aAiBKPSibhidg4KXuvP6oCc63qgkZ64F284pbScZuJLU7hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPNbxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXBBAAla3ymHAC5Hx9jljCUWRsRMQIwu0q7RsiPAtzRKer5AOCiS9l\r\nQajX6M7rMQg5iH+9eURrwxo84q4mCqxMp0NlRMKyYAfA42mFjkeodV6qX5X6\r\nEES/YyErspYJ6NReAgVVtJH7/d4lBP9R/m6Sj8AHpDYlPcLBH2T0Y5WcoSM5\r\nWXg4x6J46Dp08wVcqStBpK2I8MxGJ/EKnOLcDuoUty0AceoyVSGDG5cMUP2Q\r\nBouTgresHujXWREPd3TrgjO1AFsPVaFiJuqNnbhBYiUxXYwvmUrtiFrWT3do\r\nkHn0X+4YhsDU3nNjW5BZ5NF+aHFwVh24bMhlrhJNh/yi/yR4NBjzoY5b2Eg2\r\nBlcRuo6Irf94wYZbdzUHLtGpMy+hQOhSaJPtnOU5iVZL+FiEguMCNnL5S+68\r\nBcaUlAGsFbVKWvecyA96XxoRsClucopJFclpvw5g4vhDovky5Z+e0KnmHmyO\r\nkWfecHqX9IXYTrDZF7srQBDh8oaWIOxqxKJVitRJ2a/992sHfGk/VZq6gvz8\r\nqYs2l8OC0GLvyAZr2q0C6hoZ95dHcbdcwNTXN/uiinwSVFh76Lw7ySr/TX/2\r\n4/JDfROinYdVtBcRR/jgfd9612p5PN1AfHBg7klGasrQIaJPyWk9zEr5hq8j\r\njmf9KULkw+BZNmCGCZfL67W7xeRlm6AuP5k=\r\n=5+DF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b17ff714094456afc14ac1ac896e38f85e300743","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.a657abb61.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.a657abb61.0_1648154353394_0.22564560991008742","host":"s3://npm-registry-packages"}},"14.0.0-canary.443f63f50.0":{"name":"@material/auto-init","version":"14.0.0-canary.443f63f50.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.443f63f50.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50663498b0783b56630e5d6a308c87986287f291","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.443f63f50.0.tgz","fileCount":13,"integrity":"sha512-dSz72+WSvu+XdWJK9yah20oAYpgAVFgdrov7Gg80VZmr9gI4dZ/8IUnqoFUEtIO+9RYio/K50xkENDIhP1DLxg==","signatures":[{"sig":"MEQCIAIuatbi8vm0qjtJK4WpyQROQt0h4WnhYfE83TNDRwfXAiB1bu83FpTm9X4pDgfEbq68roSE4NJNAnKXNnE+UyFXSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPkpXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRsRAAnLvlW4a0adZ20FSwKQCV2z/ZvD3+/fXxZ1zkMxyXcusF54/6\r\n2pSAN/IKzsMq1G9Pyf3WWvodiDATQkEfaqnKZoLvHRGS47Kp9dYXfYpB7xlo\r\ntIdxIkFs8ibdspp7p1vPphE668NE0fA0mQi7huTsJAcaDythw0IOYfR5/IIf\r\nBv10p6arClJCKqppCLg3sr7KY+FEIktZq1ODuoPhKWsw4u6lfOS5wiQUfJPU\r\ng7QgvTPL7I95rEu9yyykW5b266h1DHx79ACYRyoKmNLr1trDO79EQ4QPJv9h\r\n//LFkd28bxajpJalXDQfnBxyP17F+TCqmi3iZkiHAJ2zOvFM27vjFnpGbePZ\r\nRG33q+UQ4Yo3Ptw8A9DPVGJHSrw3NDua6NiRNz/XRP4jRcGxkB8UAFBTwaVa\r\nOxKf1Bfh1yuAWdZn5bLDocUOW56W8P3Wq+VvDo2QVjHiKyZ+qa7jSENtjnvs\r\nLSJsLjGG7z6gfAw4EyoIc1j4wrHytOLhpxRGYbbHhGQyiwB6V2NvndW48kzE\r\nz0ogmUCC/c00k94t/AL2oUuuzLEUSezpx1s+8D3anKXALeH6qg+ZU20ccFBF\r\n+imvCp/MXpXwNls+5Uk8j12JMrW1yBwRbhb+/OUzyzfLThDpfdts9VIqoxbX\r\nNf1IZljXbVEuKyoLL81ez+PjpCZz4OcAM7o=\r\n=ymvV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a9e4a4d027bc972dd036582cbc94abd30d3cd60","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.443f63f50.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.443f63f50.0_1648249431828_0.9408010790508405","host":"s3://npm-registry-packages"}},"14.0.0-canary.eb382f318.0":{"name":"@material/auto-init","version":"14.0.0-canary.eb382f318.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.eb382f318.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"61533e7e616cb19265c6b8ee1ca189df1d8f3e74","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.eb382f318.0.tgz","fileCount":13,"integrity":"sha512-e0ygqgAwQ8/6drPWMAh48j9JuUENvIrYJ7fQGifMr6xocwjbCud0Gy/bcTYmigShEsKwwBS+ha01rlOU9ptYDQ==","signatures":[{"sig":"MEYCIQDJVdvA5ReUKc7AlLKXB5/3JLBhFKTQFw5VNx7cdfjUXQIhAKoK0VipELL3kjs03B1v/aPDBKVxIwYscNXgcBsYN4ah","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ0MUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrY/Q/+PnN2i15SpF00QLqJP5PoMS6BxcjTcpS4xOcv2SQ2WYP0ZSPp\r\n/+7KwI5qOkdzr4DdN0MuhzcWliKRkj0E2MbRGBJD8XzxrBF2HigkJacbA6pD\r\neFqCw9TFjYx9YasH9rVofZpQR4hHx7t5Glu7NTgdVbYjrIOXiwoedt50jU/E\r\nw2gMyFDtPV3+5rq2yQhWbD9v0mASAQI42Xnvh083sc+VkLcxOKnCcBGqTEIQ\r\njYaaW4m/FEZjZwAgc0FT/MAfDqphFRXCpeZS/cMkrasLw4S7I1Zl+18j6MZA\r\ninFGJlgrkUgFigC3ppjBOfFzrq5M9pnmPeXjbjbKTk0mh6qHPMszdR0REVAu\r\nv0rAJnsAtVY6AtU8bPF5POrzYe+0aqBTDEWiJGrmcg2MNu9jOOEoaGL06YDk\r\nGe4yYsA2+yhxbd3f50rVmop6VXD5Y3o6G1UvYagw1IwON9WfPNwBkueLzAj6\r\n/Bter/2xYnI8eda0BEonYU6HAT4QWC0oxKWpS/aXA0PUPmrTULL+r9IWtOhY\r\n2mZmZDVuoW/azAvXnnvtA9aKFZ7Hy29Cyc+Kgs2aamCcJEbv42XsiSIdQKon\r\nntFx46u8+b6oN2rRla6NIW7nrudHaWf2i9qBy901Icar6EwLIfCvbGl6+oCw\r\n5Q0xP5ULTNt4cJiZzL22lI24YV9fn+baSLo=\r\n=GjIJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9aaa59e82abd1f56fdb3d963213242fe4f989c89","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.eb382f318.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.eb382f318.0_1648575252110_0.7683702123145624","host":"s3://npm-registry-packages"}},"14.0.0-canary.344d52823.0":{"name":"@material/auto-init","version":"14.0.0-canary.344d52823.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.344d52823.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3a38613bc21fcadf4ea598a08dcf8e6916d68b0d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.344d52823.0.tgz","fileCount":13,"integrity":"sha512-fDFGXimpulQbFdP4WFCXWfu+VSypGWWnd22zRQw+Zj89IWKTayGpvJOangVzE65kNNHLhUH+2KuCwfJ78ihklA==","signatures":[{"sig":"MEUCIQDuFajiV62OLJaxMh/D/Xax21cDBCN6eWcxFyTEVYps0wIgYo2/5HyK3/Erg51jQOBH69z5CcyeiK8FScI59wH5YT4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ1MWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5OxAAmjfvm3rgzY9i55DUjbcS2MwQombUt0OA+2fDxmQbfxCS2Or3\r\nabQlLy/MwKu7i8hwJuoVv1uU7+KoVNbZ/ZlSGI5ApELjJKiPdFNQOSi94Ivh\r\nZPo3u+U7/NcaISGhWF5JvyWrquuJ0hgoSP5rJmZHiN7MMaYxZG7/CyByrVEa\r\nf5y4b3pj2FDfgQljJaC+fr5EPWIHTJGIjw2JpVw7UYqFKrcZJM41fxO/w2WF\r\na842UMVegKptfDJnpBWepeQg0Gk7WBq9Zgb+DKQ/k6OhZCxnPce3JIyf9TuA\r\nyJgcvfY3F0AX9SdwsWULOyJZjX0c9qmIAGKucd4O2Qpg1O+kk2tzPe0sx8ei\r\npRD8M5Jcyk+XDffTtQcyDDF69hS8K4K/TxM5qqnSDMuXjN27AYw7NAbKh0Cp\r\nljLMvsD+nN22QnmjZ0JzVkccOZIb0LMzEv1H+aCt9iciGVSS4GUOvIWbJe4e\r\n/iA3ZGpQE61Rcg9IABkcURnXx9yEN2dHcBVQfJZch94jAqbiIsKoZaLAJYCW\r\nyqvfNFW4xfttG9j6/1l3WXlTaMn3hBJeBRHEXQl8BmNALM+ka/YeV8iD+9yz\r\n10gxYjLADUBN1iyau7MQIjA2uJKC4b9xB3n9JAijzH8QwuZ2nmETmPZ/gVN+\r\nkNE3BwqFw/fpgMEb9fzsuDRTNtLxs75mHDg=\r\n=XSxX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d0b3e3b77ca281daab88499a03131363e8ce97f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.344d52823.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.344d52823.0_1648579350509_0.7053021941137181","host":"s3://npm-registry-packages"}},"14.0.0-canary.4e372fb49.0":{"name":"@material/auto-init","version":"14.0.0-canary.4e372fb49.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.4e372fb49.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f59a78da45256ea42c14745783af0ebf00685578","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.4e372fb49.0.tgz","fileCount":13,"integrity":"sha512-Dt3DXML7pg9dDWbWowAz3rswSS5cgmF+0vdtHtEY2T0X57K/ZkJ9FMw4pC5qLfmsduDD/WtzpR8+oSI0T/eJig==","signatures":[{"sig":"MEQCIG2IS+b08Rk7JEs01aKKAEXfujiEtJRrVmzUnQQKqL0rAiA8YYmTgiyaKUa7dClj8w9L/iSWG46V0vXjjEnfm2+EWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT0pIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyLw//WfKsdutHLwMZiNOZWJvmQWfGNeMnLRquGXQcdAwyzKnTjZRI\r\nugd1XlLYmX3baONKgzJbzNjkyLc/ziHQ/JqXqcLQwuZM9pHTJR0e6rPWTz/z\r\nbisgyPWcycua6OFzCmqQ/HurRSbT+O9Wc9LTT7K2SB5dGNUjU1GKKxqPVY7/\r\n+XqUDc+WGXHD4rn/cjk3R+CpetSkfQXK+KIUdMMyDGj4DNNZz6P3lPAxdsAW\r\nFVoeMVLAywy3svwX3GKSWyuXDv7NgAYZGHVkEKLHOXd+WLRUQ76howSrmp3F\r\nUogSM/GfNM3o4LH54p0/PHiaO5P5wdOaVgMYohbF5dR0+DcvLMV1ZOOPK24P\r\nJ8zBGVyypDpHYzKK0qwuaPGty9bJXEooefw+yDWAPSQBR+PpnjNfBhNNISZE\r\nJGQ3vchNF6aleMJ7kKPCDy/HiKoi9gDYrr634LE4vDB5U0LLqJKJHpk2XnZg\r\nb7SzP16fOxib5Pi+7N8qGkpWGoZdsAOOCQIuP1sA/Cs8RBUKCJYqqF/qWF4d\r\n/U3Syl95rPq4OSXZTTEFztTQZDAWHDzajAAsIhCSQg4tBgWlvOwSc2qryK+r\r\nezPPteWnbg8D91Tg6ZCj27bSCxjCw1+8TyjKFoj0B99LXZ49Fc+sT/Lux4PW\r\n+SCmq4cIlGL1FPUhXXmGpTNktx+khQpvxMk=\r\n=Yb6w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"013d3cd7cc6d83c59581f40ea832529343f43047","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.4e372fb49.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.4e372fb49.0_1649363528693_0.9794363116204152","host":"s3://npm-registry-packages"}},"14.0.0-canary.3e30054fb.0":{"name":"@material/auto-init","version":"14.0.0-canary.3e30054fb.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3e30054fb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0dff000cfc649b4e952ffcbca71c7fcb8feb7a23","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3e30054fb.0.tgz","fileCount":13,"integrity":"sha512-kvAAc5IoQ76qwzwDcgnqSMg54cFdLmtYWSlvyu4ln9r94SMBkv8zYyfZWlvHHyYVU/e3xBkacYUjySearoXtyQ==","signatures":[{"sig":"MEUCIQCI+ktupFiohtihsA6jW27DL3DpZ0B7B3H5LqPtOwZsTAIgd+h4I0WfuMFgAPaQJng+p725bhgsD8zNC0zGvrGKAyA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiV0sGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqrpg/+JWE2syFwaFdEiOX4+V+nhWtp/GRIDsTem1mfaKPVNd7nyQ4i\r\nKF0Ub68JZGKKUfSg87H5D6EQmWPh0d5/bRpwUxXPtMBWMKqOKFb7Jy+goa6L\r\nf7LDKhx/SphXI9u6CNvK4Xxl0rHkHapn8imhPOOBdk2snM0rjy1tOK5VxsfX\r\nYkoXpk+Yj071SKGhg1THCDXKMCLAckl5lQCskd3iSJqGCX4FvAGY2HXwd/rW\r\nsEzvxYoOGuU2lmAGDNPw8aeFxDMzd+g+8wTiv/sChv41GacJMxzRemltS8lB\r\nSq3chT+PKGHsd42wP7igCN5XNSgV2awRZP2B4s2pYorrIaqAFgKF4mzvlf0M\r\nSN3Y7EL80OPLZ3oi5iZs/SQKNzs295SuJ81GlSpq3ZR8CvI9+O/Nlyks2vir\r\nNIU08THAjRrTJCD8w/TEaOiitxQayySEDzrYYgdREqdERSCjTRyE4iIT3h2I\r\ncBK4VlEu2/XfL3snQ/JnfvsdE5TkXtgHk3SnlIkiKKRT6tyL50i5/Y9bwJU1\r\nwfrPRCNRg69eJ6ODDa32dQB6PA0DItzovkMWDkbmVRFYoviqUxui2cO8Bcz3\r\nARgaXG6L59z1itcI1eLO7xSN+7ZkypJQHAb4fjplxmgsQ6auQ2VmttOoQsmI\r\ndjAlPuz9wiPaUoy2TVSWWMHNWAuMrKIbfSM=\r\n=3VPI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"04d79139861b90bf3488ab3f74e4bc33e6af1c8d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3e30054fb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3e30054fb.0_1649888006151_0.6883029912134198","host":"s3://npm-registry-packages"}},"14.0.0-canary.8c4da223a.0":{"name":"@material/auto-init","version":"14.0.0-canary.8c4da223a.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.8c4da223a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d67540605fc22d74172570b9d0b130d2d4523c4a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.8c4da223a.0.tgz","fileCount":13,"integrity":"sha512-l80hz2gyUTGlTSSnG8mBR4J6yFXUezaR7u/tf+42Vw8ELfcMw/jcSs9OXsJYtqbgfE4i2lS68EyBWeRFyPhpeQ==","signatures":[{"sig":"MEUCIEXZyw+ZdoRlsYumAj5ugbEGZM1bU17PRo7VCU4NM7v/AiEAw7uYTyLVm2Gn7VK9AgxcjNtRiGsEiUFs6qID2R34IQA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXtPtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmro3xAAkzUb8xqgQGCe6V6qvXALekqzd4xI+uLISRyMgrm48nuCnRo/\r\nbAEk3daQL9ivi8xlsYM9ggraBb/5Slv+NuFD6QEQoGCIdMnfiJ4jkHCGKZFL\r\n2j4J3WEJBKvNejKv7ncHHGnG2u+qc0n5ckEJIKWFtnvgpySDlEXUDswwqtzR\r\n3T+h+s/Y8HB2/7KISYEI0Mr30Ys5TJj6XO6KTLy7JDhAwfLy/3V1kFouSHqz\r\nTtHpR/+cP7eJ0RAfAaLBhrRjTX9duLLgQFLX0MvdUK+xMLwIVPCOMUxpon/q\r\nqUdsUZrfcJIYiNkEOrvmyKCqRVKAWa7rmMi4MFrcUx6NyLcsifomiav13SeY\r\nd3EA1GGUpVcmrxU0vsjPqrcjIu6vka+8vcyRBDJ8tgEzILukMPxyFS4hz27d\r\nr1J8UQluNn/Ve6PaK/+BLUKr/zU6/RTaDOZa2TNZTb+wfyWoaq0h486Mo1d1\r\nuoVGHmT8FUigJvLI0mAlFvxGqFHTH75VGIh9NrRhDfLyJirsSYiFNx62lg+O\r\nTnF5klsJYWl89Z1WvJANTxV1Mv7t0UVE6S1SY65qAOHVItZ+Sruo/3Q+XIBJ\r\nPR4tJtvFe61tLvtxexIpCAK0RrJFbL9imfDufFf9NrMuVCTWulwDdAuTWcUx\r\nVDQ8wSPfnhOM7ydnrQdNAxHXDEaNT+1j7ik=\r\n=FVGd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a5f798a752de150dd0a004bdfc90979ab4185d1d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.8c4da223a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.8c4da223a.0_1650381805604_0.8194126692426318","host":"s3://npm-registry-packages"}},"14.0.0-canary.7de8965cc.0":{"name":"@material/auto-init","version":"14.0.0-canary.7de8965cc.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.7de8965cc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ee05f90647a3dd922a9bbe1db617374bf6a4cc7b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.7de8965cc.0.tgz","fileCount":13,"integrity":"sha512-thNkhiY0ZymeM5Qo8fivfwcHfU71kADSTUJBZrFJQql0q4EzTK2zoDsuIKdoV7d14mDpdozxWDHqS7nyjtw+Zg==","signatures":[{"sig":"MEQCICX3iug2j3fz5dGSYcvFRx4pvCe+xN08smrVMgBLFchTAiAQseAGmLbLl+E1qJMVFHL33VNpwfyHP41+wSchGtfu7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXxoPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq70xAAimEpZQYA1yOpylZnvqugnVPJunUhdDCHuSLwezMQVGvoWAd8\r\ngYPK5EhVNe7g8nVofOrhTbAw4tSG+j2ywduezIec2pxXLIyQMgSPuTchMaOU\r\nA9cBEEwKJE5rfxf3oXhTGjPb07kSokouQ32Pr8Hrr+xFfXLeLB57AMEDG4/Z\r\nfL+hXUBwsGH20a3dbR8c4adL3g4wMjFk3f7EOBFI0Ig7mKR7wIZhOaWcjyYL\r\nevT9bWVdeFgOOwIWySYq9TYVd+/ZvgyC+TxoT7VZe26EFsbiymFWB6nNYR0D\r\np1VyvIzGNHSDb9aS2jBdjs5ia7ZlSCYWwuBB7mqlDaTEk6a/BdNnSRh2lCD9\r\n9NVQeaFMsvBZTg3+4K9dfae7YR8rNyhJRhTPPOBTfo7PmvNPqAbcOJ93uiIF\r\n4Fif0InxF7gIPInR3F9ZuSPOfnbZYyH9AyI4YI1oYTPm/uVRHkc6nYNZ0VZ7\r\n1QcImWl9EpnYv4hkk2P+pkmzLacV6B+KQEJLmXwirBjTWs8uCwklQnN6yHVV\r\nc4PMWKIq9cl1NhHBIUpplGbvFo0LkJ6rS+p409ilaaXKL4z5AO2WNocKSmqs\r\nGM/k5adQ/ecxcUZUz6tzYEnHK2jNZ5Yz83sEbMACPf/LcsSY66TallQ0LFn3\r\nZ+CmEc8M4NamG7N2PU87BDKzxRqeixHazzU=\r\n=nb1U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"538ae755c197f0d9a1fd3a2cab5000c498987584","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.7de8965cc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.7de8965cc.0_1650399758833_0.2964205454277957","host":"s3://npm-registry-packages"}},"14.0.0-canary.641ed0851.0":{"name":"@material/auto-init","version":"14.0.0-canary.641ed0851.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.641ed0851.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b88c07bdfdd6b4c1569fa11205fdf928a0a7906","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.641ed0851.0.tgz","fileCount":13,"integrity":"sha512-ogkNVBWXIWorEPOGmmkW+Jftna91o9eSNtVlB4Pp8TNhJr9NrRBV9KjAuqVaRFcHPS3h+4RP42JPwiRk2mXS8A==","signatures":[{"sig":"MEYCIQCEojXPTn3/kDcD8MK0ViY+Hd5IpQDEcXjBbO++bZjfYwIhAM0vzR2Vwl34PuRbjoKsyIOXOi+pMzS9Ju9oPvojxoEW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYC8hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplJQ/+IyC2b8IwW9L/GfKKiuMZrV6j7QmrfzjRn2mCY9JJfN2JCXgw\r\nSBc5jLdWdJdUkG4Tdaj0TMJTc/+uW1XMGYTo7aAmbOJE9VhyfGYu9ZO065nZ\r\n47+xsFpzdIj3gp3CVh4Lv4HuMeOezAcb+u1rbEVamlMY+vyo2XBssGR/u5zf\r\n1RypLvYcG9RGPbeCfA8WkWu9Gud6FkHq4MhbSXWHWNxz1AAmrETziDQg9Zk7\r\npAn6627lPqHoMPSQNiIVxCaJAszG/MUyjCmchbs9RHeCPbaa7/lKkC0SYK2G\r\n/OEcenG5iig39qBaY7Aq/l+1VVkrBOpuuQ0lDuTaEhuhBz1JNqTDOZG4ztpT\r\n2ftkzjP/jOkfzr03t9uELsSTAO2Eb2SrEGSj/D+OWSFpgu009UZpAhMruspk\r\nXsrA/qp4zQ6MTqkvHP0OryeUnIbYTZWwgcvQyLKED7moqzMgYcwaUBfvSMHR\r\nfqGTzBea1cE13Tc5qfDWUap4fPvQuxmKmZsk0hTN103RBMMezUaN2GS9bs/K\r\nRurpa8nlGnIHkmNyN73PUfBuNpf43majetg33ZxjAE2eSYtIQ7yx98G9FBNm\r\nVPb2/cbYuf+LXsw2h4tlsILaSdNIwkdYGXK85SqjaM8oSdZ0p85VJmQ/qEVG\r\n5ItlATgvaVV/QGjtutKGThT3T7lAgkIqbC0=\r\n=A3Jl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b45ef0f6764b2048f5027d4990cd48d6bdce11ec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.641ed0851.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.641ed0851.0_1650470689592_0.6149996557447017","host":"s3://npm-registry-packages"}},"14.0.0-canary.e88f83024.0":{"name":"@material/auto-init","version":"14.0.0-canary.e88f83024.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.e88f83024.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4fc3d4a8d55bedca615872d307c927dcba49c788","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.e88f83024.0.tgz","fileCount":13,"integrity":"sha512-8s9EX/J6DXRfOgFfaPnwXYYxYpkyaecUC4N1S7kAjHWdyVfNgxLg/IVV8TgUwO1+BL559C0opRUN8x7LmtL4Fg==","signatures":[{"sig":"MEUCIDfJqGLeQOFeDE5ccFN1NU0yVstetlNY8gNu00pJh6QnAiEAzs7/JHBAcionMIVhVj3olwtyG4xLhbFuQNS7e7u9Aoc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYEcPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVtQ/9Hoh7m/JIY47cwq07UDimOutR19NKPWRiSs2J0W+NwCc23UkJ\r\nuFXPweG3B7IHDG7MFL0D3oOpOQ5eaIwgiWP0PvvbpWruwcPNrvpoHKgGjZjU\r\n5QyDa9U1jREECvqQntGyZ8QKnB8B/e9YXydSqDAmd7flOkfgK7dKZ5miY0Ms\r\nfQYtWwx9Xv1/mC/D5deQ1c8Mdph1EVNBnBXkPnywMMTq+u3dAKr+8MDiZidy\r\nhvaTuuAUYLMxogPNiF+64ovwbaQjkknMYBxLV4VeXfIrNdbnV+BUTJdk7rUi\r\nE/87SGfrbnCPBmZuWskwNhuXsgJSRITmNIf2i1bfwhW6dpmZbfkXHRAzfhsV\r\nf5DugE2M1VlRAAu1Q8TSk+llbIekwPVzSd5J63mmJR9RiDeIn+ZVQpsGhSAf\r\neSdg+uildTgIg5NYZ6o/hhqp4EJu2Gaupzoik0a5g6L/uR12G8Sd4inKxa2E\r\n1LTyxlvpn0CeOC5spRY2xhpgntrHNwO6Jc1k6AMyBKmdDQy8LJW39AVe8CTC\r\njooIELgjNAW2KCVFUBS2SzzC6cxSJFa3rSzq+SZaeJoF3Z9aTJDh0mzatk1s\r\nG+DGHHd5/7aaOVwMV36Pm7cdv6eVEYv+EvFUkXs+hxmdUpQ+fsa0F+lXOz9H\r\nIY/mi8yqRTVSf42cfxuQAZsLvM/q0Cn3NLU=\r\n=rhCJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9fdf51ad2ddd3dba754b98348bc356126b5640e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.e88f83024.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.e88f83024.0_1650476814800_0.11952603187836153","host":"s3://npm-registry-packages"}},"14.0.0-canary.7321d6254.0":{"name":"@material/auto-init","version":"14.0.0-canary.7321d6254.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.7321d6254.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"49c4afe192186fdd73546edb4dc5c645ed07f2f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.7321d6254.0.tgz","fileCount":13,"integrity":"sha512-V3+WoIM/fEhUkHTqWesioPyNy5DUJvUyPqrHimo5+rJQmzGUk+AWtv5folz6EekaklJmqYRsoboWYMP3qBy8BQ==","signatures":[{"sig":"MEUCIQDUweJ89FdSHmWN7fi7IMKMGXaxzpImBjoYEYOJ4SSyDwIga5aLtFkRZXVwHUQvhtBb5XkpakC3DoFeXGngbwPrMS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYGizACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYIw//ZVjEgmdfgK49519VIS/VL50geaxF6POBtiJdM9l8j4854Pvv\r\nY9anvmpTkta8NzSIkaSXQZXrxXq7TmrBbPFzrN913XyzbvIH31UXADXnuv8L\r\nuKyLRhCvzJZZyRd2xRvKK1huq+ofv1zsz9kPGS9ylmpL5ew/S6GvJUG+4dYr\r\nxAyA6So31kvXLuVaeh8opRCDN2VpO5N9sfcmYB1+G+xCSsrrGBk77Ptu/94z\r\nv2m2ufSwwGTuYosgjEh6OybcESJ/66RZFDwKfdZku8ABNzUMuPeGjeDIQzmW\r\n4k+HImJ0GAdJwtgwigrup/k/XgclIhCSgYRqZltzTpo6UqAwALV4Bi+VDm+0\r\na+EHDNq/SUNDPERR1GlSpw5qNuAvR914HGSqY7UM95skFqeQ12X825eIslGy\r\nZkAXa6FRVozXUmZbxQthH74neSZBKggWFHtDFQRRL6GQm5mLjoJULFSSaNt7\r\nu0ebYx2kH5waj8O7ogI935G8UeYOrAExk8Tg46LGx/+HdKIQrA4ULe2iUjmc\r\nRnH0y84L7AAcHsHGSJJJL+m3WnNYeI2l0Thg1b29365pYiMGJNHzAPmnOlP6\r\nZvpX1pev5TNekwzS0o7OiaWUlk0WODoZ7FSCkijwFaZHLZS1q0F9XxFwk0Y2\r\nVWtCf5a4ZfPzNSIe3Bfm9kVK3W78qG7qTrY=\r\n=Ft4N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"981be270463043c4b45845cdc3efce353eb53b30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.7321d6254.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.7321d6254.0_1650485426992_0.07370703465394879","host":"s3://npm-registry-packages"}},"14.0.0-canary.3ab956515.0":{"name":"@material/auto-init","version":"14.0.0-canary.3ab956515.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.3ab956515.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3998c9a311d0e227431b0acf3ea434dbb5049117","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.3ab956515.0.tgz","fileCount":13,"integrity":"sha512-beh/RKDZPLnnylEXEuJ2Rwuhu4eGCoApFxSGewqjIVi/oVQZ1PKcrXn+LENt8VGNk52UnJSOl3MhOvzxbxozhA==","signatures":[{"sig":"MEUCIQC/YH2NFuE5EnCdimDBOzDwqt+dOOMIVyilT205cu9T0QIgPQuB6Mj7EAkP25gcPiccA7Hl4bzuXOVU8M5ZcAwKfqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZrewACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcLhAAgLAJ+zs9VlkDvA9QqVyq2BSZh9WinxqcTTrhgWMujIzaGRba\r\nxeFZemYfV39yufmGNen381eqT4w9HpKE7WmzhxznUzmPV1lKa6e6bpA1Hn7j\r\n9GtkYAmwKbJw0FtgJuS2VHsnMsw6R3AGN/uckbRe2CDDs60WY5cR5t6ILeC7\r\n6nj8jcsIuKpnE5cHzWfLXUm/O5ex5HII5fp7aKrbBYDIlnLB+dCDSu/gglG/\r\ndxZlFrx1cVKpr0YAYC+CF/vCStzsAWDX0jS7px3nKkEvkmipUIwXvqCRZvvs\r\nxsVgbZqHyWRxwFLxYPhQTHU52FSMdC0Et0m6js09n0bsCRUgmizfze+usflH\r\ngHuk9SZmlOyO4MOgG6MDfbXbFP2IUZJFhSKHxLAGe97iFyLmOZv3r8S1TP9N\r\nNdqG/ojEpF5sRfA6Z8tAeGA0ddvqv77sFa33qt7L5cxKEH/giEJ1/+fHUNa7\r\n45MW1CHtQBQ/cKs3SK1WUGmySQugp73vPi2lGA28y/hXFO3vBlLKXWNG4s7z\r\nnR+besS/BtkMdgR/cLp9D1skrczcFYen8SdI0YQr0OW+0d9VuxG3HbrUX9qQ\r\n9fstu2XQ74HUx4bA9E98Yb6xdezJj3NKMn1UjFaYkAfLJJO0Cl4BRdJcXH4X\r\nmKyU3nQP7QSEKQ6+CH++R+FzyCeZQc8bPpw=\r\n=APob\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a09484c5e8d50e8b042d5367972a9111e0432c38","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.3ab956515.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.3ab956515.0_1650898864483_0.3718934922240187","host":"s3://npm-registry-packages"}},"14.0.0-canary.53b3cad2f.0":{"name":"@material/auto-init","version":"14.0.0-canary.53b3cad2f.0","license":"MIT","_id":"@material/auto-init@14.0.0-canary.53b3cad2f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"234ae3f5ebbcd8d7861d4d4359fd8487cfcd6a3d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0-canary.53b3cad2f.0.tgz","fileCount":13,"integrity":"sha512-WmIMEekgQJyiwvfsb4SpKOttWmCuw3Q4C/R7OMMYu+/B8F/gxCIgp7OlAuYB5CLz97pWKGq5EsAQ6+e9U2wa9A==","signatures":[{"sig":"MEQCIEGL9rRfvSpUKz/ObBT6323CDBi1eh3cYxisShmKmw8OAiBxUqtFS52IjcKJxKo8Kc4HvPyRgvBWzj9HIF6mxJB/0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaTquACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWoBAAhk73gB1tJEuczjx0pOSLVFAalchX+yS5wIMFC/AR5zZVTyIQ\r\n1mfGjDjBk04+JwxGhftbOJjcjf/KKNijOiTlflzTlQrx7LbjmtqkBFUoRmHS\r\nbPa+OFmHS4l6Fmtarax54qaTI6QklBJvVn25SXHimEM54MrN4dxACqH+4yxN\r\nHXmL4x84K1WaD6EHjPdXycxGg5o+C+pDsngmAR12XEm33krlA+Kxz6fJo2Eu\r\nxJToo68bNJxDI2oYKf0gyK7vLPrRONsQ6SVE7VK3bC4ORiQ9OmslX2SWughK\r\ndR0OT1GXSczYLySW48c6JVMjlGCTN/CINcBOIKUZaFZxwARrT4SMUIx58A8K\r\nPSF58aTjuvGTaiy4o95k91zsmmc8FxeCaees9kF5uGXpk2nOpqQzvhhCi3fe\r\n5GIRu5I+WIdv3Kh1t50B7Xhhk0/VkAbrQUsjFvCCFu72zrn/qv9gK2z2FOmf\r\nNxAGacPsosFQ2VXNTQjHfQj0Ym/FOcMpay0oL13lNsPXBu6DiTIpxplggbzG\r\nfSGgyfAOnPw7+LgysnkXqFxDEvhhwgbWKF21F12tu2/bwtL8O06r1gELg6RV\r\n0wlslhiUZ261D4SNh1Ei9c9dSJhSprKuX4gcT83aKJ+s0VUdk2xBxtqP+I0X\r\nwAq2wJ4uhGdJ82108W+EDSVcRV/B6qcwftE=\r\n=1JpV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ebeda2e23436103241b0e82afd57b60f74599133","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"14.0.0-canary.53b3cad2f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0-canary.53b3cad2f.0_1651063470007_0.562960271617474","host":"s3://npm-registry-packages"}},"14.0.0":{"name":"@material/auto-init","version":"14.0.0","license":"MIT","_id":"@material/auto-init@14.0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f8eeab940b5e4d2fafecf7de2a0bf8b748273b00","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-14.0.0.tgz","fileCount":12,"integrity":"sha512-RtrHVRTRtUvOd5PC5EZkwYrab11n4sVroYL5g9lH0+cvK6PDXv1M/wVdwOSWHYgzBUU1aSf9ZTMkKdrvharU+A==","signatures":[{"sig":"MEYCIQDP4CWWj8Xm4T9aidm/TOegiDrGzgCT//OnXZMKfRS7JgIhAINYPOc5zlCy4ls+y6M6dZeFFE7WXPNCMympM3NrJsZo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiasbmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhHxAAlGV/pibjS5eqtaA1OlKKmZsbH18degRUTDjfKy0rvqvWcSo+\r\nYU/qpadn8Dngwc+t93yS5UnXwrFQhyQ8O7K1aqoLZB6Mk9wq2oQ8NXSynDhs\r\n2jBRyDJx5kSe0ZDD0zKBsMsVuCsqwXgAZwug3jJwK1LD953SDZD1O3kov3YV\r\naq48dNJeWjerDJfk7LSSO0ZgphPQ1wyuBgCTSI9PandjamHX/cvE6rMHf2ht\r\nAKoySsU1mZeLhNfQ5Cged+UaNg73USJ9bEFbW2ozhBBobrGAj/tJX50XpZ/1\r\nRZ83FYSeIXhviWwOl/lKLc7/FI7V59Wsr+VbiXkqzwin6repurC63X5NLZ2M\r\nXD98pcJU622NSIp4UmQCDmMwOhupS9S5zM4/kPhLhwVkVw1olgC3UmkzLX+/\r\nsDjp3BUMpc6CjImMTOevdN3Q+yH7/g1raRcW05y+BDE1wRtgAYoSEMlu/tqt\r\nRYRxZ0oW1+bzwz7IcGhO7eE8nNweOaDa9t5zTjPuDCcQmtXZcLjSDZ9Ef5bB\r\n0+IeanoEj1EkMQF5V9K5B7o12XqpA9Gqh/Fzs9pYODQVvYgTEwphAfK/izrf\r\n8Ue4RW2bEJ8wsEA/0MC2MGVhjZRtAVdBbEOCVXXVV0UQ96gsDATLQK9J3VxM\r\ni6Fzp5Mhq1T/S1mOeDFHtryCzREvvx3xhcM=\r\n=g6P1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","gitHead":"432c815e58d61a257742836f816cf95e271e6ea1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"^14.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-init_14.0.0_1651164902095_0.5297812580058066","host":"s3://npm-registry-packages"}},"15.0.0-canary.432c815e5.0":{"name":"@material/auto-init","version":"15.0.0-canary.432c815e5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.432c815e5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c4fe1818bb4f4386a4ad72751cc3e8a86eecc276","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.432c815e5.0.tgz","fileCount":13,"integrity":"sha512-wr2UYJphKCyFvBWrPevnGbK7vPzYbJewj1GqQf7oYyIT9axo1y3hwnAf29RZ10miC3G1kyydV1GkcyA1aQh2qw==","signatures":[{"sig":"MEUCIQCFnHVd9BAvvo1xiV5zzoJyW3GMSjGU2l8ydRxaKjsoQgIgNtRmygu/GQvptEzDR2jOunBvzlnoa9Lxeb+RtJOpoXM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiascpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYkQ/+LWZQaAE+I7vDZ4JHAiSIkJNrJy+y+PzQL1y4lkMZD7D2/eIE\r\nMx0RynPH6uR0uozpNPYGQKui7xAJ/wNNL9zzHibG4VgD50okQhV5w1F20qo1\r\n8S6JfPSUiaUOs0Gb3HvXBz2pHSYTsjjt5ZU33SgnVOvb0kYbFEFCNa/ChIhk\r\nIfDhNTX7InJS1dxmU/ibSHymk/iUpBWofc2trJDZHBiGhZZ0P2PXg0vuwFqi\r\nFqq0nhdAjcRY8AZkiQlhmspAtiR67KV8UBybiHfsCmr3L8LnZ5NlU7lydye6\r\nEyXqhqCsTeRxAz0ax9HSERqWAoBf64cVlWI4zm3L/30m9EAtXrvXlvvODdF+\r\nN+k4cIuDP/6GJm1iAKk5Q3jO3IXw2SP7U6jSM7OEKTjNOazNq5eDglgGDAl8\r\nIHig/DC5r+zvuo4TSqhigdgw0rfSRJXiYPW0skGmPoWNoONCw+uZqDRaoAQm\r\nK7yPH0Q3VT2EnPakdjlbuWMQptFXNFc/jD2iySNokh7nLSYsjAiZOnJ8eBhi\r\nP95dLiDG7jhu+NvN9waWHFZSGxKcRYUc6u1CQlVYBY78gEWZHquh0B5RypaJ\r\nZIxb7HQS0qYcaBnWs6FyDDzkE+LfZJM5y1Tx+PlMvfzaNQ//YCSrE866iPTF\r\nyE4AkvGycqor97ZhEHvCXfiDAa/BvVERyok=\r\n=Zl/c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"df8af7a4f190284cd9f3bb1756b2f443509424df","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.432c815e5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.432c815e5.0_1651164969725_0.5070270969898325","host":"s3://npm-registry-packages"}},"15.0.0-canary.a0f01f669.0":{"name":"@material/auto-init","version":"15.0.0-canary.a0f01f669.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a0f01f669.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d68244f22091583973c80b84dcd70a1aeb362624","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a0f01f669.0.tgz","fileCount":13,"integrity":"sha512-oDV0phcDgfC65i+a6yjtO34DB42W1EVg8NC/MC4dIouES9hTOTsDf9HFwW3i1y4eVWHnHGKjQHhVzf33rs7hoQ==","signatures":[{"sig":"MEQCIHgA3RPrg0BnZrViilfk9emZ4oVyLOd5TdwxAD8+f+AGAiBEcRqS023Xg1U/cqR4s3nbKuk4dxJ7m4LP2r531NK5FA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidYGAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8IBAAm/TZ13eMXuwaQLYQ3L4qDTFU9MEQK1LzAE/lVzYvRNtD6aR3\r\n0niWjLa5roAKwWLGejpMr0wWRNVC2Xg+bcc6BWLvN8Vwm5WvnIyCDygEJsqV\r\nEb3uwBAW7lo5DPWf6g++/FUx5lgq/ab4+KhVepfmgkIxrBdt9wGSCSqJ9v9k\r\nwSalMmuHSys56omG2aIJsxfWeDkopMUeBhal0VvxWcqyrzwogT10St7SCutr\r\n51LMhyKeL9Z50MYPVXftAGG5RGKLN39tzybvpQ3LusRdlvldLPjnxIO1MBkj\r\njUdTDBkYmjPH1ju7MwCbZKkw1khuTDmOy9QTQzoxcuRZ5nkpopDp3Llwd3tO\r\nxKSGilBUmg1y8S5jmJz9c4lMwim4nqj9XHmzRioIR5VvVjPzBMp6SQOUR5R0\r\n5UDS2jMlSdaWLtCldp+zqHljfHIk6tBPsQYBafo6HYUq5N/CQIMBxStiU9cM\r\nkOHVtm8AN6MP8UXG9lHUdnSMIzlk5OoptVlCzjtqKHmAlODlJ+T4rN/qu2nl\r\n0tiq15Uhd3beMcsOCb3FzF0XUaKWl6CWO8dx6G7sc2TMWKw5VyiID69mFivm\r\nzTTNKIYYUVZO51HWlpItbEyoxvqb9dbpL9EZSXSyhWChW4i1/Fo2BgWnJDKw\r\nhHkROxl6dG2J6m2BMlpoEKSXApBNuaOzPOY=\r\n=LVKR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"51daa70df3212a8d73c545c86ed1c57273d41688","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a0f01f669.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a0f01f669.0_1651868032352_0.03474230809998935","host":"s3://npm-registry-packages"}},"15.0.0-canary.276cb39a4.0":{"name":"@material/auto-init","version":"15.0.0-canary.276cb39a4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.276cb39a4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b9a5bab98e049bad22a4c76a468b7f4436b1e3d9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.276cb39a4.0.tgz","fileCount":13,"integrity":"sha512-U9olvYMj2QnPwLls3eXckvWBShGn7E13FOlC6ks/RgLoaOF2dbrKKXj7KjUaTpTjG3NYZXQC+7coKNGWNo6AZQ==","signatures":[{"sig":"MEYCIQDanpE4J5ZiTQDNKBp3ED+LnnA7iVc9XkY2Ob/N1P78dwIhAKF1UE71tMxUMfFbk9u9PG1vCuThbuD8aifL+prNHpyI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidZOCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrO7Q/+PqDJifuSJnVcw3476l9tFuzdBiZrcSBJ3CDpn9q6HZcechKF\r\nDBDzcFD7qcqwQVOie0QjPgtfDq4kXsphZ6IjMhtZqoz77Ksd563CanUz9npV\r\nwwi3wU5gRdyI4xmZ96n84rxH5pg3xgAmh5maMu8SkCMpdYg//wQeauAlFkrE\r\nZL/y9FybCIxLX1sBr0sVyGmaYLEYVEqnn1IjcrNiE9ObOt9jtYo9ZbWN13wL\r\nNokn2ShyQ6QmTXctR9hs6d0w3yYN//g6rXl3/yh8UUBZ8Qw4YRGlWgibYoOx\r\n2nEvue7YE8O7gpvrD+1564iiT+7DN8v8o+JX7k/ASPMjfRpinujm88G49HFn\r\nytqTPXe2MAHSVkUCpHiJU4F+i0tMTg2dthi6lQYqzzaGSTdJQ9AAoVwKsW7V\r\njbJobPax9Ym9F/AwpEfZ3kgBPMeYR7GnrVFPGAtaj8miEuBXNWj8ezWtmyUF\r\nrwROR5YxdKsWfz7ullmv9kD9qQK61g9grIt2gmmhcx8sYj2KVo1zh1SiGZo4\r\nFW9/iX3EmgYy70spS+6QMB34wY2oz7jarS142Cx1i0TdFLqBzzOIsCEHNMIj\r\nxbhu3OTNELLYV9aCwyvuaifzq7Z42VeEoY8Nb3B8iNl1TbhtvID7HgEPZ9Il\r\nDLr0AIck4qiYOSs5wXUaBsxPXszx5B/M14k=\r\n=ztAC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c57cd64760098925aff1fbf0bc2a73d32dd2bed4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.276cb39a4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.276cb39a4.0_1651872642488_0.6415595957313198","host":"s3://npm-registry-packages"}},"15.0.0-canary.4fe98ed70.0":{"name":"@material/auto-init","version":"15.0.0-canary.4fe98ed70.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4fe98ed70.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e6c6f39ad6087003dfaac73969e21651eaa3ed78","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4fe98ed70.0.tgz","fileCount":13,"integrity":"sha512-OMzXmzKxIsyXXlvk2drelM1RKyo2CYrgr3iBj5Gp3mMZfVngMXa5Lq7q+EYqA4tEMpe+xCvA7bbt8UVCZF52vA==","signatures":[{"sig":"MEUCIGHAQlGyfaI1bjpp25jbe17lLGoFtZjZXRhr/ZrhUOI3AiEAygDU/0W79vPViyvPat2TR91xZrxltnYoh304saJb5pk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidZlFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1MA/9FM1BxWA+0CqVRYKLYeqrZ/CsHyXZXDXQabMOhj9SpUreg6zc\r\nHxrjmq1PWG6g0HfEKum14dD0SNp4B1LVPHAs2Mx2QiiCv9XkrYTGkDuqx1Iz\r\nL15uI62gQYS5lhmCuFqkCyZ9w0dWo2eRWN7AeMqvojj+MbN7oqdpVRMRTVQB\r\nOzOFMRxuAEKTsIAZ7xJ5iGXEC6jn6DtMQ9puF7ozAz1oNMCoZkbD7mEX8aHG\r\nHmwoBaiKVD8dWQ7ULUnIfPWEl8PZlaIMukgpFlXtyhl0/LXFjdWBBi1jWfWa\r\ncQFVqpdZEQsRx+ggQcfUspm/WTde2mYd3iJFvC3OzFXNSZUwbeMYXCHQ+zdF\r\nBzDFJYnswgjlVMgWgD2MMNhkYBPVvA0kn3RfAuGTzyhqXsUFpvK12HdDbSZb\r\np9lQ6T6aKbK/wiuzI+SAFMLKF8PP4nTJudEvk0YzZDJC49hvN8m1a4aciBkJ\r\nK0tRrSoew/DikSBRilXCZka3n5wMpHtSfQPIRlsxwUS5Skez5p3rUmxMP5Wd\r\nsBqb29L93v6wF/TtgIWAS5tToNswbuS9rxpO4oVnEkm3H79F4qNZZq4P2tK0\r\n2olSYcMhFO+AgYFvfNAituFtRkQ+rUN9qaCMS6OFytZgH8bqDUjyx5usxOcz\r\nf/cgwyj805n3I5LHxlyf5dRS5UcsC3eKreY=\r\n=/HqP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"353fde061dd090ede4416fc2477bc050587d6367","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4fe98ed70.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4fe98ed70.0_1651874116981_0.9532582243429388","host":"s3://npm-registry-packages"}},"15.0.0-canary.58b130a3d.0":{"name":"@material/auto-init","version":"15.0.0-canary.58b130a3d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.58b130a3d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ceffe5f557cb73f8a414706e28f4315d6ff79213","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.58b130a3d.0.tgz","fileCount":13,"integrity":"sha512-oIX1kYs5APHcsW5RpNBYsiVpA6Fiq8FpcDOp54NjgwA+lCUnyeOh7As9K2SFKQbeoR1SbDexnt7iZKtzFSNutA==","signatures":[{"sig":"MEUCIGrCnhSKtLMoHF7/Pz79/CO0iJtdFZ1y44c6HcWSMhK3AiEA+LG//w4TxlhdfBg+eI/7ryuB7b9xXjVxg+oEURgb38s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidZnPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3Gg//dCUa2Y0UysrYwIS/MHinilvKYDwoV5sd2yfuhpqKFBWfLHTc\r\n1QkgAZu8w71L6rBUOAzdEgE/1FdJdbI/5sPJnJRO0lnFFPq/+bHloL6QBZYd\r\ncoe35EUhYiTBhox6YvFk+TyDp8sKdETKWZTuYK/yqat1Ejzr7YKg40BLBee+\r\nNuB3XLJS+DObv+gXZDH6VYoX428LpVeuKd9a6VOFQ7V+F5jzjBMuSvn/9ALB\r\ns3/bMTLLAuWahHw0b72s4P+zoenPUKFWA9TaSaMuzIds6+9D7b6dQYIN1crI\r\n9wkogSepVqAb+gvkFXFTPUiwmxST5M9oFAkeuHjxL30mKwRoGhOFpqWb6uas\r\ngbSTqQYv2Ac30IxDBFHEJYtzww5i69bI9dUwhaZxOWm7UvnbYXKv4tSh5HQy\r\n8BX0LbOhCent5wySV0bLfLgMyiUCWvKQRHw0iqg/in0NZJqS/2zKIAijUiVs\r\n1TxPUH14MmnSBx0Ef7yvgowSBykGXXxdChu1UqakwL35z9ZynCclSxgYDoAX\r\nnJW54BAHakQz51XR6nJxlHW+DaRuaoc4k77SkpGMyBa4KWEmJZMHC2yIBjRR\r\nT/UCCqkM51913P2PJnTBVnXq3MU6GBGPdinltjB15pNimAsIZbm87/H1VDY7\r\nSXhg6wQGxjYFnqai3b4Vhj5FOb7HSGVjtb8=\r\n=3yFA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"58c8ada7946689a0a59acd63cbd49b6c987c9853","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.58b130a3d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.58b130a3d.0_1651874254932_0.18062859205207382","host":"s3://npm-registry-packages"}},"15.0.0-canary.ae278a2fe.0":{"name":"@material/auto-init","version":"15.0.0-canary.ae278a2fe.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ae278a2fe.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f924588d92635acba87f7b7148eba3a4165c8a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ae278a2fe.0.tgz","fileCount":13,"integrity":"sha512-c/p8VOcHMc50x0cg17L0lEiavGflW5/Q3nWqQ0ed+SLEe+nR/eYW6QTnHciTmEYfxBraXk8Tbn38aVxfB1YToQ==","signatures":[{"sig":"MEQCIFgiqPcqTps7lRdHAtvAEdYyhvGDMvc3tyqrjemZdltiAiBG1P2ZpGJkXg4hr2yf8DZLuMACf4pnuuS3MD2uu0alTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieTH0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXYQ//ZEq+GfWcBwDyOoefurvhMdLspgadEDXeS7CstVpC8/zqKOVQ\r\nD89f3NVy9d3GUH9R26JLN7T8gjWTMzwa8tdkZ1MVmBxmrTzj9sPwQ09EABDz\r\nvI3opIRLrdj2S+HhtmfRxgxuVzW3BG5/xEBZjW0NiSWEY3XDMG4Fz3LV2fXP\r\ntG2aTbPcap5782zrzjuJZRsrzRERJoG6OKGgokOYnULDh6vaFG1eRgjvELxZ\r\nVEFNLyhXvdundMjegcv34HXPMCSIfJKCI1wPVv/Ks0kQZFAdeML17VlZDwuq\r\n0YiyvuKmcpLRGUi6+UKMiQ3P0xZjEKJt3iowVxmnzp7FvWZVlpCNKHOlrO8/\r\nb/iVRnZqzRmR5ufOnhj8sEbcu9+xlHyUGxsPA/7628GJzSi02hiqL8etwEtl\r\nY9JqDYHUaZTLhRmDS/belZ4AiXHgSwuSYTJYbbf/7xlAMPDX2Pwd9UyL5F1W\r\nhlRL3wu0PNayIPZu0kIt0iTt21XVlClvAE1hvi+Hj1DdHJPmZLQzOuMu4RaK\r\nXXcispaWgJ7BZT+DvLN9byIztHcrD86h+A1+8fPKkroLJsrHCHlU064izXU0\r\nihv+XtilwoFRjCFHbTjXWoPZ7mSKa15b3xEF0ZtZbWmHboyYO2Xss2vDyLIA\r\nApNW8J/IVEIqlF5ThtU2/rAoyMfFYa86ScI=\r\n=WuGj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bfd08e232a3a514dd5a38dcd77d17df365502ece","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ae278a2fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ae278a2fe.0_1652109811285_0.5247420854170322","host":"s3://npm-registry-packages"}},"15.0.0-canary.bebf5bfdf.0":{"name":"@material/auto-init","version":"15.0.0-canary.bebf5bfdf.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bebf5bfdf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0e71581d0943a134efa414286a0aed5a6c2766fe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bebf5bfdf.0.tgz","fileCount":13,"integrity":"sha512-Ire5lJrm2iSsi0OVHOdAebDFaHNIw1DIVXTFShU0aKuIxD2+n869pOQ991AGN34DRTkn5QJh+tGNI4LCiGWokQ==","signatures":[{"sig":"MEYCIQDIgUfaOhh3cI6bIztraunokyBdXYSIce4VVIdYde+++wIhAOwJDZcCdiQAq8VnRsMcjhdySxaMUEZnMY+ZgRbxcsmc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieyHlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolMw/8DuCEUEtEMowpI804BHLwPQ8Mr0ARJ4aifrMHIXxFVz9rbAlM\r\nD64XHr8Llyex0WD0k80vMhBfopqvpRgwklwe2adUHiVcPnH84IBL4W4GEdxz\r\nyVEhn1rOEDhFOwg+85X9eGUe1IVNxFg21VSjzHhMEJPEj1pfFNsWPbUoIDJA\r\n+/924J28rAz0B0gha+SO3rhvaEprQmS2itmp+fT1fPA0cr7LZ9su9aGc19kY\r\nr+TV5MH6cvK3X7cdhP9RtpJfV+cFGU2dPEzRPgbM4030pUaHyFzX/TLINbAl\r\nW83SJU4p1eKupSYLkEpcf1OZncSOoyIncLHIqsYkDpgTAu84/2EtNvwUmaO/\r\nlHpE6hgx77XhKlAUl72I8dBXtQO7zEzR3EIrhyuxZhlIR4Tn1Ucj7vSfAVlp\r\nUEKFeIdF++GtevHgvzMEqg4r0X2MeiathUuxrH4C6ibvjs95uZHonzeH66Zw\r\nrAYPEcTr/BO2wnU+m8P07h71OnnC8NjpwRVGSYLM+PciHqGYZiwDvW2vKMc5\r\nVsvq6k/UwpfN3TtrALCIlTMat/PFqWfyRSw8HJXy5LQ6jYaAySLA6RFH5stU\r\n2Uq7zNLcxFIc+eyvp2g1uEzGC3l+pZiDrbNzNpnRVzXHKIHULM6+eLJilGOP\r\n7pM/zWQRnCvTg2lQ7ucKhEOfsM4QcxkDEmE=\r\n=dWNY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"61d3971a411616375c31cb3fb763fafc120c9570","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bebf5bfdf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bebf5bfdf.0_1652236772969_0.0629804639890228","host":"s3://npm-registry-packages"}},"15.0.0-canary.e6072cd6a.0":{"name":"@material/auto-init","version":"15.0.0-canary.e6072cd6a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e6072cd6a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"888f966c7f47d04fe9da7188c1f896a0841e3320","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e6072cd6a.0.tgz","fileCount":13,"integrity":"sha512-rPJS2TXIKKsKtOvpszxAByZY7HGyHHPMTM59ohNxB3OARxb8yu9z5qr5n9O/g42bEyrUe2GoUyUMLBfGhwJtZg==","signatures":[{"sig":"MEQCIG5yUfTNfy4WmgPfT58GA6Cke/ZnnyvfeLyE6SABUQFhAiA3IKRInaCkEF9am8dYlnx/wK94QU1epWt/0DJGG5CD1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifBnlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrK6A//RCHpYO0EZHk1klI2HERCNsPw7xjRD4xAdfWuZCBGl+7kYKSk\r\nHLePU/t0/52O8BOFGg3P3qke1P5ZfsPZsyyF9y/IIwGR7A376n22no/0+18c\r\nQ38MmbKUX3gimZKqOCzkcFCazNm1wdc/cAJ/EMaEs4YY1X+ffYPHSlXgKlxM\r\nF3V+7Dmk7af8rzUok3T128cLJ9oNRcVngiI65YpHjjkOdBhbcGvrPxCJWxyI\r\nNDzjmaAuarft+Vu8ghR82vYhtcM7F+LSxOB3ncOo5aJdpbof2VbTi1JjAng9\r\nQ12URlIAmOFZ/FROyUnyFwS+vG5Yvt8JZuS2x5TTs7WaxvjJWkKSHOT23+kk\r\nF+E7qmv0n/XfQ6eEJsEsVfHdsJPtnocsZVGTlWQ7FAOYXNPjm3riJ/plDnpG\r\numG3zeRfZwi0srI1+1/Xd/dlWzPp/Vw3+4trHVtHG+B2P2SmQ0XBAeOo2K6z\r\nLhbq8kAmBxgHSm5XSTw3ajkNCDJ1u8ZdWOBvJ+i88SFjeXmZ9/SbFTbRYlmA\r\nJDO0xqbEKz9DYH8T5te27+X14xwB9deYTunRK8slMoELKUxJBoRfuB/2F7Iu\r\nbY0rZPj/iN+SzrPcOEh45oVB0MqzeX9KiC5hdZHdodj5Q2knsyq/icyfURqx\r\n1G3t1KPhLXQU8VRDmagkjg28uLIUz04dGyE=\r\n=GwNs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ef2da678e66576709be19aed16a880b00e73a039","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e6072cd6a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e6072cd6a.0_1652300261543_0.3619555193005237","host":"s3://npm-registry-packages"}},"15.0.0-canary.5b40eb988.0":{"name":"@material/auto-init","version":"15.0.0-canary.5b40eb988.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5b40eb988.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7bdaab7a18de9d3f164957c780d789b6c685c7b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5b40eb988.0.tgz","fileCount":13,"integrity":"sha512-lETDSy7icINuezXOqZbGno86h+KodA/zqMm/nskPSnrqhVPy31C1Eex8fdV3EsnoEiUyfM+gIlU0hkjZPMxYcQ==","signatures":[{"sig":"MEUCIHj7ZiZ2h/9W22Cob+8J/igHZDB9sIVd/tyD0gQOtcokAiEA5fBib5UKx+WEzDDVCJQvr+H4PPmBsy5EzRoPPB6jWhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifHROACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKMg/9FlyvAplCc3P/23bhbYg+CBl19RaEe2uM/a91g9Nx90ZEaWfN\r\naFjiyifOIDqWLVHS4zAfGwdHAZzY0YSluNbXMbMucSdwwsQTDZUy+DHKU+Uv\r\ngI5KJ0AlUhwCZxenb0SDRsV2fo+UvP+hnvc0P4vrXxdL3q1iC5EAeCIe7+X0\r\nIkPr2RxFTVRGFNsOVcWYZPfPI283qRkMrdIJiL0xOJhyoW++CEjX4MuGXFkH\r\n7swygl/rn5/CTOqtpEJcXq9eRFRTYdb0QLle20fCPJror4UANf+Wr+4vrlcQ\r\nFuWprhJeQl9RAOPDYBsrXADFv0DDSps8Q+PUezAb1I6+qTCeMEfoXl+ZZnXT\r\nl9qR95G9IeRBLLUMVXteBbL0gG0An0UmuOf4t9LEmOCQLHb2Dlh1nZy7yQvW\r\nlDLj71xEqTIn0ooeSAv+oqXxVTZTgOLw0tXuU3u9aWg1uQ5b8Zes8/AskDTc\r\ngAdl05gPA4HOT5lLO6YDoW5pdO8NjPyx2dZQkmzadZmI+1mopDH5Na2D/MtV\r\nlv9J4vNK8GJvFK9OkgUBYTn6pRHKmIOmLk5E5Be1BxR3zd32A50nkBtsbdiC\r\nz1KSikJwyYrQXRUkX03RmmqoxAWRxufjsUSH3H/Z/P3IaF6N5S+XXpjpDjEr\r\nfDJaqrJ7VcsqEAn/G+CU+ljBZxd3ZRwq25c=\r\n=d2TV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c30f2a613c97ecb48fd3f9ad7b0677e51a156449","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5b40eb988.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5b40eb988.0_1652323406169_0.07105412724696691","host":"s3://npm-registry-packages"}},"15.0.0-canary.6a61d62f6.0":{"name":"@material/auto-init","version":"15.0.0-canary.6a61d62f6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6a61d62f6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7f2903e14bf521eb10a3640c73baf918466945c1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6a61d62f6.0.tgz","fileCount":13,"integrity":"sha512-U+DRTw4bpiFT2ujXGlP73g2X0uXS3jcLlQgSERmGEyLNpZjY4xz0JvhRJOfTjxXDrUI8GolxD3Z2wf1xxrTU8Q==","signatures":[{"sig":"MEYCIQDYrZ+SMZMEReBcTYnCxmWDKswJ7lvydHDW+eDN0Fd2UQIhAK96ap+S5mBt8nMI+ig2h+T/Uq0qyjXkBxfCyGTteHD0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifW1UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPDg//Qrx01D98nqFUb4Wgh/8hYBAkSaba4lgSUl7FiT/vFbEzwnZ4\r\nQwHgJHSjYULjOAvFczrt1x1aji0VlINZ5O0x8texKN/3m23c7mvV51Jkpp1r\r\nlx7Z4qhXbqVU8RDZJgysHeSlWId8fduy6qoLG4G1YqYQ46gg0Gkoo3/Yrnxa\r\n84CqJCk19gRjVQBl2kSSd/Kvhik1y5SWi3jDvvitIj2YtC0Nij88Izu6NtSm\r\nJxFYju5JYZ9JgFnCVz0NzQjXAD0/JiWyPYSni0raBshIULsfeGgMAuUx/8p2\r\n25sQ3uTdADOnwyxlXSL7CG9j49ax72/CKkDvwHFyDdChJX+2c5yD+JBnCeB7\r\nAPrPoKJHx/Uf3wWGUA59bs+Q49BpuUIVo7ph7aO/93bXhT0MZpB5x6+71nYx\r\n3xWWhDh+eg+HKhQZT3E4iY670kqwgGl6TEyA85O6rUzZo+ji7uzymIEza0eZ\r\nSI5kOmfCHrPggI/LyDK+OQXoizL+XyGW6PG+itVnZ/vzHs0925rxrlXmQKEZ\r\nEnbXwpBc7fzfkeJoSQq7N4sLsxP9KA1Rlg9+/MpXRIjbXfierPe/drUX+9Ed\r\nhzK5FWTM+5aQ8zBLk4WX/BE5VoZoIKedS4D6y9QkGMG4CflMDSXUwlfWAMyN\r\nWp2EYOmBIFGZnwr1VLsgVn5bGbbXrcJieyo=\r\n=Koqf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d46f0951ee9f725b870919613271f00fcb1b521","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6a61d62f6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6a61d62f6.0_1652387156164_0.9376332998838957","host":"s3://npm-registry-packages"}},"15.0.0-canary.05930a453.0":{"name":"@material/auto-init","version":"15.0.0-canary.05930a453.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.05930a453.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4a8bf35c284c9f873f0c71b7aca43f1c555dd010","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.05930a453.0.tgz","fileCount":13,"integrity":"sha512-C7/yMaOCBge0KZ4KOg8doJ1mxCaj8Djd994l2uVCl/NJzEJQTv+a0xnnhMKx59S+n0HtE7ecX58b9ZeYViTJhA==","signatures":[{"sig":"MEUCIEVL1yui5STEHnlrxfKmqJ+QhZqJyVPKtYM84Jz9c0d4AiEAzxlCRRUV7fkYLrIUneATGeSL+Gu2eFYR0hopKQxxS5U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifqeSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpkuw//dhGgUYz+MLibhujiPG56W7ZTsh/YZcZYfZxrNSOeKVGjcTXc\r\n0pcESFWZOlx7krrltRqfGK8DHlywpAadbjx8ZeRChjV5hwcX69d3qGWsmgwi\r\nJDfekCoMBqB/5HWHBk58KkSPQC93Fkap1/u2a1gOUhYsyFM1/5lnjIvgVDHy\r\nHmVVroBPXIpNz8vlzQlWXh1NpDltCo0f+3JDDsUY5P5Bs5OD6yOdGsqiOsSH\r\n/uMHfIks6JgYuwosaPbTw5s9WUigU8RBJkuKLeVQ6/nCfod7c4Mj3PFrogxi\r\nlhpxaTBSmXlP+oqtCxvnBQANDT5zoF2qtQMFKWMIY3030OqLNdvSqO2gOvWb\r\n52Yc0rjvVTuSsNm7ZPKJuUNlmWJ/pfY4eM1poVgH4iViGxAIexsZZDsMxYOy\r\nM92HoNq1YjTgDvzBY85idjxl2+HAteDJeXMeauKlarvEBi8vM82jUQh+XWeG\r\nH8FuENp7tdbvIPFsYwmJmUS4CYSThGRqN8Qmrx7G8NtnbvXMQjXkYORqSeDp\r\nhR/Nis9pC65X6pHF+48GOWbuEdIqhl4ocBly6uRdkxYOXOc4RauxRDjKPZkF\r\nlZdTcRqQaAjMxeWeFcnDmk2pxXiZ2A0i+sa0l1tS9gEyzDgxFG37tlQ5kKO6\r\n1+ANou+fSLqOtWo1EcbL50uAV2S768PlGOY=\r\n=KqKq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e6dfc2d0553321fbe47e71fb414cfc1152b0ef8d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.05930a453.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.05930a453.0_1652467602259_0.4587766390475081","host":"s3://npm-registry-packages"}},"15.0.0-canary.c0a11ef0d.0":{"name":"@material/auto-init","version":"15.0.0-canary.c0a11ef0d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c0a11ef0d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"75e47957e1577910c9d4f03316ef244e63e28991","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c0a11ef0d.0.tgz","fileCount":13,"integrity":"sha512-Vem4bSgDopDm/8OkFQBNWeYNPRLFDKYfRtkjUhEGyYtE19GUq1VWMjkRPCBjV4aCPfDCYU8YTcvAhQvAdhZ7KA==","signatures":[{"sig":"MEYCIQDT448NtfhqsTnwQTHDnPJsC2MacL91cN5mdSiga/1+dgIhAJLj09asZ/ejhp2JHnV70gTnqJ5SNXWTgfdDV0keBMEC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihWxxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Aw//ZX2pVMD04slJoo9aoGL71HojenxfEf4xaozi9VxyD2Jg99Sl\r\net48FpmTuhy8BfsdTY5Hs1sd1x+idJv+cFs/IWweqiggIaCHGyZwBAH0N3SY\r\nsS3yeWLwh5oI/D6LeN2E0Qu6WWFtSS8GfpZfxNSWbTdsE8xYfRKLFyKoKk3X\r\nHgk3IiHvXURs2uzDT2RXNCTFQUW4Y98grKHv+5sB2mifBWKFGO4zCu+jV4LZ\r\nBFId69saavrMn3L5TTjjnz71U5ir29KljwUUC3zdFf2bb2+wwTFG4ZTh5OuQ\r\n05znwl719ocydsgAUhdhQUow5CoHG1SOhm8uNuzpmw85JMODSA38XfhZqiOp\r\nLfVv2TDxYO6D3mZlRhx0ofNwtttP5xRjF8MmrU5+oiQrDVoqCr19+iuTokHr\r\ndArZCnmeEaYLC1wHDyZIAZ0bbLm4YQdyYRAXFfO8enihUAqUmWFcQjjDVri1\r\nuVH2BXPoU7ZVRKE6s2Mh+fN1eK29fJzR8T7Rgd1Z4FRipKL3wXaNGP8pkGlY\r\n86i/QpXoKC88VIBu/3QwQGWJn6lQsVrZr6gj+cifPEcUmIg9viIYXBANSl1K\r\n1oENflWTFWasiY+hvV/ZiL9zHKI8KyfwqA629fjyRfr+jSGq9EYA4p38ZKuN\r\nbQFY36dSOqfRTA+a9p5q/fKktiyaukA0mu8=\r\n=q+5f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a97df68c1dadba0530f5fcda79fb8bc3082d963a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c0a11ef0d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c0a11ef0d.0_1652911217538_0.628607610408146","host":"s3://npm-registry-packages"}},"15.0.0-canary.2f9b268c0.0":{"name":"@material/auto-init","version":"15.0.0-canary.2f9b268c0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2f9b268c0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b6f9246f7f355f0f9b56865735afba6f165f563","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2f9b268c0.0.tgz","fileCount":13,"integrity":"sha512-2TprBkwJC7fRLfXo0wGMra9bVSbAUoS5YI0BMrrcxbrGwPjYKoPlBQd790P7KQCTtHY0QKBqYn0dcegtBQaOdg==","signatures":[{"sig":"MEUCIQCnNe6RyKWsO7CYzyuo5rBhA9M/x4cAkcPkMepY1X64DgIgDjxreB3taG2aCD2KJj31Y6zsKPEUMxZw99L+80MvcVI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih+yqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7uxAAl+GiyHhaMQ5uXR5QjXDrcgoqOc/oBRy6fAEkQ+JMCqKAdPPm\r\nHFTZ4RdadhbMPvrbUlJ85fsdpb2eh3haCvtN49A/mRr4vFoNHPOuuK9bFM7+\r\n/y7jVddQS3DMoDf9XMydjx9XXt28Fk2jyVmDhjgYCOxzEx4Px+SvmeJEDj/L\r\neOkWQ+/I993ITakv5P43X8J9mFkPmWxDQ5r31bOiYVQNtEkcfsAXfIsssTsC\r\nRXYAtKmIMB4+jC+o1LjF0EajGgUydnjMg9KlveVmm1PccG/fSgR47VlojEZV\r\nlIKWwokDNBnpDCJB8/ZzyxUtmibEq+Uz69n8uxHmNVXrzsgDswOCqX/PPSGC\r\n5BSxmmPoYeLuAGTLZThzrjT8znoyNNKo5fsUSmLNwC1rg71Iouet0KjKruN4\r\nblNsXPpJMbwkzJYeojPbyejpVQNo2jjkQKokOTJDjqHhYMaRxJ/1JXQY1Nbe\r\n5jR30EpmattlkudPUyyVe1+ywH+G4njOSWstEEqToozhpY/OveT7Dd2oy03E\r\n648EBnNWxYi1TKr1gFvuvRl4FGdw3cxaWppGFmusOE2wZjT3TwXKjq1FrGqU\r\nFE2gpD+DPB0F+sGxJdcQ3e4aUej4vTQZ5To9gnumYvPalwNhhz8aDVHomJLJ\r\nLe67HUUY9Dp7eOYALF+BX3LHBtp70nWDmCo=\r\n=Xpm8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"29832a4f010df39515e01d98656d2e77ac1e47e0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2f9b268c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2f9b268c0.0_1653075113712_0.40693141599467153","host":"s3://npm-registry-packages"}},"15.0.0-canary.7741345b8.0":{"name":"@material/auto-init","version":"15.0.0-canary.7741345b8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7741345b8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"352a85df43b0cbb049188b3220bb0f6a3513db86","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7741345b8.0.tgz","fileCount":13,"integrity":"sha512-9imgJjzTOhFUKMgCun2QZjiY6kvOI0gc5ZYL1V0xle5xAlVr+/2DdqUj5m1psJ0gEfpKiejajIso1X3+g0BqBw==","signatures":[{"sig":"MEUCIAZRxJPhwyI/RJKzpzMl/i6aCgpm3czDNcxPboz6Y9oTAiEAxH+Ad6uPeSeOxP8OozglWxRru3ook17vWwX72/qLMfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih/O3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoBxAAoUDDz+WhbBaHKG+87ba0/Qt1+oP+zrIy4dZ2dITS/EeQaZNd\r\nH7ZP0JlwXOvkUl7GbqPwut73tv+ko+D7MsLcIh3qNq4j+Uf4u6LcK7grm3z8\r\nmuv2PJ/9aJ+e4POadJrFitxoIyKfoGJSJf8IfVscTqq5VWrYFnmO7PFqF6ND\r\nREvfykAuWUGGW1JaA9XG8X33E+Y7ZfJw+0GETNqQIYtvbUXCvdyQ9R9tTs0B\r\nx8LOXb8PonqUw+GUcK4NJKStFGYa/hfz13OxsSA7fZ6yk6Rjm63M+3PEb3zJ\r\nEgeqymvoskbXwTxotyXGviRvMXvg3yT7n/oitYZAlhKwuh8mOdW9S15Xqj4O\r\nl9YRDMAeXa6Qls3E1+JIrEgprelXBxfoQpiouxsFQYpNEiA0oE1m/nUKtvGl\r\nS/UiWz9E5atDhv/urmG7GlmJF8FDid/JbaK1a3LmlI1734U7AnsMibbqHJgA\r\nqpeaaX74IRjmq6cL2BpkJQY3xfDA2gNp2rozTdVtA2ZJSfvAzYRYgU2rdxiZ\r\nE5I2Om7ffPQ1dmGKcdRVsJ0VbfV9pj8ys4M4SYp+I1RjX+kSgzQBMnJqXz/F\r\nyK+n4Fxdk6iqt0Cauyw4ESRxuIIGyQxPL5Kk6uL7VfwxQIckkkdFa8/6yPv/\r\nNM93uT+Xo8J8t44J8ttdaTUzu1sx37JBPhg=\r\n=XA7e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e61e5e8196d28c1bd4d1c7a12c242276c1d8ec1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7741345b8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7741345b8.0_1653076919595_0.680946278069291","host":"s3://npm-registry-packages"}},"15.0.0-canary.f807e793f.0":{"name":"@material/auto-init","version":"15.0.0-canary.f807e793f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f807e793f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f232cae89da1a6f0f24f3d24ddf8f6e74636011c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f807e793f.0.tgz","fileCount":13,"integrity":"sha512-zau/k74KzqRxWiisHpPTd56Y1vUyMsHR3v9TtkfPXcNeEmb/pKixDCU94MM/Frisgt6cbtIbQ61WXm02FGvsnQ==","signatures":[{"sig":"MEYCIQCHhUybgOs/VKJ0D1R2bPkH4h7SpdfT8tiK2Fm5ZPVOlAIhAJqGfoRP7HgGYwRzYsNTH2sZXCKVG7rXij+0DtYKPMSo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiBRFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonXw/+OyiFvlYpY5DkdR38LMXVTa2vqqO3HjP+eRGbEkLz274ngsk2\r\neKFC3Grd1UkAt1/5Fz86zzJS18spf1kB8jKv26lOWTG4ieqGl2bONufAn8z/\r\n0m+f8hVUK2o1XVRY32FIWvMMV6pOAszQPgZHFlYI83Hnw3urkRQfjDVxxGRy\r\n84jE17ZZVBhzdgOfaNWrMWp9gkvN7P5v9wcb6mZUScfpdrQ4O+tfN9rLQxtK\r\neoOTr+rUK7hfxy3wLIlSuQjgmC6VEcyCO3+m39zFMPXbglHMUnpD410oQdTR\r\nZ4C4Nz1m5q25GreOTxWRi5iTvGV9yCCQZFXUbxBMqKpfPKf6o2sy8gXDDZvC\r\nFl31jBZDQsQnEY+SZPm4pPWVaoRCC0RmJ9R4C6gIP8AbE5Os5djflh4Trpqa\r\n3aG/D9rsT8r6a0sBepbPep/6xGzEjBPCZbW7mG7Hzv8r7SiGpf0KZ0/3nBpf\r\nIOTyQJ0RF930GiUGONAe+xNTXfr5eumxPh6dQdpUnDMf24E1Lv3YHaCB2yWP\r\nK+tHxpwXcw6UCTgSRg+6HCAV5RLea9rJM0r2DbgB5rkiiP1ABXNJkboFkLgx\r\n4sRnNWGgoPBIe9cHNXD1EOD8+xifKnAfH1i6fM9YJxIMprVEXN+QURd1jdZx\r\n+wZr5v28NliJmoPxT8XvKTjmzva8PhN3qyc=\r\n=F6jQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b4ac5ff59e90b4770de9f689d9b09381fe2cacd1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f807e793f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f807e793f.0_1653085252809_0.06661506660302763","host":"s3://npm-registry-packages"}},"15.0.0-canary.9f53d4a8a.0":{"name":"@material/auto-init","version":"15.0.0-canary.9f53d4a8a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9f53d4a8a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b6ccca3f617ab3b2540ff390a96f08cb37e9e19a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9f53d4a8a.0.tgz","fileCount":13,"integrity":"sha512-D131BCh4MwL5FUUb42iw4/dhKy011UEJXf+N4wxLDHBa4umVcFZKiIgc7g+NFxFXdqUQ7issG3JypxvGTtTJ/g==","signatures":[{"sig":"MEUCIQDhhSI2svelFTx7X820rlcLaofdh2MkvkBd/re1eh4+xgIgJ79UrJvAaKdDyYPdoT1aPNTe3ecdjBRmWmZ9vxqRYaM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJii6CxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpb4g//ev9Wzfdz8R6FNQmbLsoK4dFKnUdmvrOVXD+9w57XG5A3C1/x\r\nXMBDv/v96CfbnNdT442UWtMJOQ6CKbxhCAjZOkaZR4esM5SjRQhHyxwDbCCK\r\nF+tuCG5+HzwApUmM8eCnf0RhYmY+Mpi79DFKCV2oQ2hDqmqZal6zs0Bd8te1\r\noxiCCaH+2rRm27yOJfOBP18WFljNe+7dMyndCRjE114WP/OhJ4l4IVDtaNiN\r\nm4PalzxQrN6b8as4YCv5ovdyYY/r0W1c5mT91TZ+a1ZzhfSDuq0vRJ+tUjZT\r\nQIQcdW7Lvi2LcKt2h1+L2I48ynPFuzgw9epRyq7ZR5VWsS4Xp6cHhvoOQTgA\r\nsc4S4HudyytlhIaoaGDQl6dpHtUbzedl5kTYcZ3A5fiX8taP2PBCLBGsw/Vm\r\niVZ7RymjkcSRFm9T7TNcWV42PHIbZeFvUhyCBLLibPIXOmePDghyJkGysEpW\r\ntsLCPQuyQj0FaOUMUZ9elGBAz0tRK8HjeEv7iSBo+BMiEseO7rX2zm5GXCf+\r\nH+tTctApIl/0MvL/oZLwCHKhDSE2R7QFRjCYZCZjwzMtsL81SX6HD69L1ihv\r\njmjCoU3DmRoXXmwXbh8se+/aRBcmp/uSCR40fyiI5U4Mlrj+BYmfIQjBBE9V\r\npUY67PBtxPWYXIQVaHC9CkR3zdzHzTkREL4=\r\n=lcZD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5db1bd7747bde68bc956d054f2e939e62c78df6e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9f53d4a8a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9f53d4a8a.0_1653317809497_0.81317139592943","host":"s3://npm-registry-packages"}},"15.0.0-canary.77cf00e37.0":{"name":"@material/auto-init","version":"15.0.0-canary.77cf00e37.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.77cf00e37.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4b3ad6574d15c298a8d2070b4b29c5c1616cf72b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.77cf00e37.0.tgz","fileCount":13,"integrity":"sha512-jk65XbAOL6yR2y0+Ihvx/fHVTYJOQqijzZ2z3FrdbG83aMQkuoOyAG5dF3XG+L6tnteTURAGQcQ4ijhaC4cERg==","signatures":[{"sig":"MEYCIQD68BlWLBUbWQmw8bNNXT7hzLpbcihh+S4k88iSxlJd5AIhAN9rhMeeg7THpLcLSYCwSlwM0Sg5WBe2gZJPU8EIM/0X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJillKlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo2g/+N4oSdaGe3kxaAx/gV1oUQIVtoRA5/wmQixfGxjdZnkbgE/pc\r\nJhT79TKiZ9Wc3D3mJX9FEYYYv8Zc01Fwz/V7YZbME1ADRApHgMx/1wimZgHj\r\nmCaz6vIUTmG7kKiwZ5Osf6Cj/39CtNXQhezoToumPecm/U0Kn4YUKIC8XwpF\r\nH4DQ0aokFLPPIzogFCFH5KclPhrIhjngfP94SItc3bX0pH/nLkoqReyEfhpN\r\nhD+QOIppPOrNpLUw5nYfiGzNcZKRVIO9GBMYxfMtkZEhVy6cW9tbVnWnfzar\r\ntJAHJIBuKVpyPn6GgTfP5mnHK/sv648F/lU2bDLFKiGQYq4H2WOVXO/KJxQV\r\nuQfFRvqqVDZxy+qtOhEcXtHE/MW9Isfdsg0ynDvdCJlFJ9tAcl0+yjkgTjnd\r\nb+lsFWzi/L5aHnttZ5w3tfjeprJzghtnqYrzDTZ0D9QBZoX8WI84bUjLCE9N\r\nZbsXrTfJ1ADE43xcbyyx8681bsYkgy/gVfmUBi5tYX2rRfpx//dk3u8lVVb1\r\n97E1MlANRqHOqJdRI1R9lghDpuCoS7pYiCKEzwnCvqwkYgXHfcUmHjDuwCYQ\r\n8boBHrFoFzhsFs/0SeFhreE30AZslkngqHonY537o0QPyfnfwm4iSeL+c7Xp\r\nhcVpr9qRLenC3BFYlhWHhIHGbQblVoCjyUg=\r\n=Zatr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a68e64a5e78b8bdc529142c18c028aaf1b15b9d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.77cf00e37.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.77cf00e37.0_1654018725206_0.4382266371860708","host":"s3://npm-registry-packages"}},"15.0.0-canary.3c7b844c2.0":{"name":"@material/auto-init","version":"15.0.0-canary.3c7b844c2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3c7b844c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fff4505ebb6b3b3582b92cd6464606eca870ca6c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3c7b844c2.0.tgz","fileCount":13,"integrity":"sha512-5EXPRnaGmqwy5QHVWcGrwYCGnq68KqONvZFNmI9gGUXCiSyJKYNhJQCBUXsyzi2chziCyKNJGGi2WuPqk1n1Tw==","signatures":[{"sig":"MEYCIQDaBIyKYmlcDF0a20IDZDA1eXwIBkURijuV/KYdoZX4mwIhAJg5qqkWAlWVVYL2v7Urxp4L6WKGYfpvb0nsUp74YOnk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJin88ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMUA/9F9n9HlQc0gMxjPydubwgbLxNR+M8HQmdZnhWT69WsuUdo+Wf\r\nAIDiW8qHRBh8aqhk+hde8CkDaf9jJ96m97U4Ts0CqfEGWP/Lg+j0PQCY4jI+\r\nNy1u+FZwQPt4IRWsuZi3oiL9H9ATGb7miIcm+99VacTt/y1cDThRcgqd62Ei\r\nEwPSc8P7VZL+azTpcFQiB8ClQfOXDbKxtlNXXhrVMJY7GqOEQdIqUcVnqxiF\r\nGBH9+wu2JR3u3qf41GXUNk/v4KiFp2qkwljzD7RCJBHWxEK6ppYMoGzhB4H6\r\nE6NVgWfQ697pC+9TAhLAM7JZICUKSXy1pr1nPpu5E4pLNz/uwpuIWJrX7L1I\r\n7QhcO3le+O/LCQzpnYeiyolp432wigJjAu0m10iCzNy1/otHdxgeOrBYU1W+\r\n37KEmbhBH4hmpRbLluyPRGirUJqovT0HKjImyC4tHE5bmHywYWq74bTFDEhE\r\nYIFRMr2e9NyZyawsIXxN7t6Yqz7KgMX/13e57ptzbhf7vV+opuT3O3bP22+b\r\nF42a3ooP/yCydj5p1lslwMObPKB2ekTe6tnMPaFlnuKhK+E6Al3EAOy10WS9\r\nfgYUf2sLbc8G5P7Q8cgiB0bFr5PvNmSK6hAjdjdGwMRyuvY1BaLb8yG/+l7r\r\nRaQOdCll/zIkjArGgpMn2K4rPO9weF5CVAA=\r\n=slKs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9422b2e6573001fae4c8aeb7cc75741000e0034","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3c7b844c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3c7b844c2.0_1654640408990_0.32826115366559727","host":"s3://npm-registry-packages"}},"15.0.0-canary.df47894db.0":{"name":"@material/auto-init","version":"15.0.0-canary.df47894db.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.df47894db.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"340995f565754bc79c5ac109977b32f373d8b5d8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.df47894db.0.tgz","fileCount":13,"integrity":"sha512-1RylvzsFwkdins5oB4uPMT9brB8obLQMzQH1Znx3m2bv3XMMeJ29XjG9Ljw1oYe1G3fvmkMlQ/Qvyx48LdAmEw==","signatures":[{"sig":"MEUCIQCvpMjyptsQSr83xj7zF5BssvYQi9oy2eQUOX6hWDsTZgIgf0ocCq6eP1b9SKpvrDq7/tdEQo9KN/n8mExvX8ojupc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip27kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqprw//U/pHwraXbrRcFXN5TPsXbALtkdSrTzMAmNBxq5FU16NRxQSc\r\nXEsgdEtVhHUPeOl+l4azDCo25Vwnj/F5vrJFlr4Uji8qBu3EWQ5qeJzx+39Z\r\nA42spJuwQ7PQGJjxpFKUXlLW+NGXkHSkXBn97XxJsnduYG0n6EFB3HsnykFW\r\nL0XLkqd581dzGmX8HGL0XQjpPkTiWkv8hpGlcDo6ZEP7FIzw95T9F/PbsqTC\r\nB7u1M1F6SLQyQhNHmWkZKUB8Spg6ITVuVmg8z60fzgtPm1cW1ZExiuzF/wZk\r\ngTdTwimS37bo7By0K6onQyDJiH2X2WXba2cRSHvEqeSBH9QHxHnFYpfapood\r\nSx+3H2DwI4eC3EkKxHTXk6ez8CKVrwCNqiiV6qu/cDvrJ21gZwnEUgwer+yX\r\noNo1+mrdNKrRiuwh2n9aw/rkXC5+2NBWm1bkol2ONqmDDQc1GIQ9pTFvzKDk\r\nCns5WW5OJ2FTbs+98dxQz/Tv3hdGzuXUElKvAawgM5wVZwjqrJBz0BYKdRFf\r\nqkRC0ZmihK0kdiofKcAadYGyHI9sH9Q9ubsjR4jGkvHwejsWazbQ92W6De6C\r\nU4sr0FPZDyOlC211LqGi/acWji9Snl1MOtx26Ag2Wjel0ZIw0ZmfJKE7WzOF\r\nKHdiYPS8F6vw1/KrtEjlKbTqBSGqC1cpCzc=\r\n=jntl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"42be62e51a7c150444c5b32b2d2acee03d09e6f3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.df47894db.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.df47894db.0_1655140068586_0.2561295868301181","host":"s3://npm-registry-packages"}},"15.0.0-canary.b18a873dc.0":{"name":"@material/auto-init","version":"15.0.0-canary.b18a873dc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b18a873dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3799a8b907ed4b3a7b3df6c9ce017cc778186de7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b18a873dc.0.tgz","fileCount":13,"integrity":"sha512-jBJhwEFqjp1Vgg+f9pH0JAQc8NiM1XOLy0YSi/jxXbc1YmPPyLi7ullXkMMYxRKcVaNWGd0sw29Si7xADiDj7g==","signatures":[{"sig":"MEYCIQD8V5Y1gaqAPSP9dAh4j6YwUYK0GRJvPS335BYX/pGidgIhAO4xPYaYKlnBfCr/I0odV7PA9o9D4DFjoJy4eTWkMJ7R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqCqxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBHw//XbsetWJhCiWGec04lTZHEZdabtTaB292XDodRI3DfpOqzF07\r\nv20LLINJ/V1EFwG/iEYgffTSJlHenZ5NOODy42cVIrHVZ+PbFX3LjH4fOx6Z\r\nA54Y031tnLnDxnKaAKOKITxCcXKUopS7mRL+/k0DUbG/F8VV6bKRCgO0ujhY\r\n4Sg2p7F+zM4Mmm3GJcH7iqFRXO4nV4KrAs8qIri0h9J9/H9UDXLU/bxm1kUg\r\nrIWF7uFIUCw7GzMMNYLW1VHXxjXwOnEU0cFVr2QlSUrcC6/uHV6gvG5tbCzo\r\njMPcMLqhpNrkZj4T75uoEsmdxDhtuLS97fGq9+DLGX0mBtZR///wPDhqhYfF\r\n4l4vJ4ICabzkns+ztnxIf74hbbmXxQSUr3ax/iogsjr6OFxpThGVvCTVNZoC\r\nlp+K1DJ+R9l26r3VccoYoPofyR5I2bG2jCK+vaWYkdI15fUYaAusgCtnfuZv\r\nrJYuUTfkAzB6Yv6/PD/fMDzY8f1CdpOnIgz0atK6nSE3HZ5zDjVA0rVgOKli\r\nZsor1zifdyH7fdHfDpwNi3gNwOup2Nu9mKGg1P0VxatgsYGH/2yiAUn3y4Y5\r\npydG1PQkdg5v1HhMhAjwjyzLTHpHJOqEx1zKit7aE4wKf09MUG4pUTQuKjCx\r\nJm4vtrtNABDw82caiiprt8EYkNRM3r+EhCA=\r\n=31AR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b35dadfc99a3788643d8762f8afda3f2d6e76d5d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b18a873dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b18a873dc.0_1655188144912_0.9961100715767457","host":"s3://npm-registry-packages"}},"15.0.0-canary.ba9c29637.0":{"name":"@material/auto-init","version":"15.0.0-canary.ba9c29637.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ba9c29637.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1f8480bf8c0cd3552e52b4ddabafc21e836c162d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ba9c29637.0.tgz","fileCount":13,"integrity":"sha512-mB/9+/tIt43fLg43L2xn1xl0VfPflwg/+Fx0u1HTCTpzQr5q5l2ZCR5ainz6ZtN5tdWDkhYAowG653Z56gIBFQ==","signatures":[{"sig":"MEYCIQDqmZUFF95RedBgURKYd4x4r67GvU0EC2YoabEuFodDhQIhAJsCgz06TOqJa3fPWiwxdVpPRF1Jj+3JBxrxP/MZrwLW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqNntACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZHRAAh4ZG6CWsJEg3JYZ3dxEPVNk2A4/SH5ZHpVlliptjTa27WHvi\r\nLFIDmmQIc0BMK361iVtt6wM3qtBaVkTQZctLclUOuygl6WYW5MGoNGkeO6uD\r\n/+OZ7O2kiLxzUyYOsoexnP9CkUQrVo5+UTn8mpjShR85Tb+ZOc1ahxrCyfN8\r\ntyMdmhLyCeffieN/LhdS391sEM1sOkXx9iKnqpHdfquITtLyBo1NToqUNTDF\r\n1BFzIZDpepuVSZBivgAciRUgtXwOjt/BNUFGgChSYKIqAQFPWPQUXoqbz7je\r\nNt4T++T92ZLQ/jdKQwygFxANQpVCLTLFmRLQJ5npbeD8BI4TPvBx5vr57PUD\r\nd3oPyVQTf7Gt0CCsHFklWnEAaEwsTpRuSCbcUv7bwSPch9SvflzLA+rLGdHF\r\nv5UmnKrVg22smDazwaw9QMClm66u5Zq1NR9U3fidNzZ0oTvFOJD46tc+z3Ut\r\nfp152LMX8YU2h3+QV+3xspgEWrLKkm4nD4o6RkAhIKtaFz/8AxcIPcnCVnlx\r\nu0x5HkWI9nnmxFWFsSxZ03EkplXniF6kqj2KkmTLHc4FPkMZ9PA92OdGSyrY\r\nvevyXEJUUka4CCWxXwuM82f/JRvysJJ5T0RQVqEvRtNLILgepG8C9fSVJ8DJ\r\nlGFf53Plu2UmVoitmviWp9q68K47rGfQiIw=\r\n=mvvO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2bf89a291dc4aecd82cf7a6432d198374cfea69f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ba9c29637.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ba9c29637.0_1655233004827_0.8704936243377364","host":"s3://npm-registry-packages"}},"15.0.0-canary.9bfd12f01.0":{"name":"@material/auto-init","version":"15.0.0-canary.9bfd12f01.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9bfd12f01.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1f0832bac1a11f66e8d29b1f1b533055f37519c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9bfd12f01.0.tgz","fileCount":13,"integrity":"sha512-nkJI91NMdA8FpySNJw3e62DLQSkueEIE9yVeWLe03A1oBU8J6LcWSpt/gW4wugWj6PM7NhnjbdJ4UtZSsBfukA==","signatures":[{"sig":"MEUCIFx6gVFOgCKH6Qpnu5MPS12CshnyCzYXAlM0XjYt6Rq1AiEA1cuvNHlTrjVJC22XiEi+EdYXlBtxSd6bH4EeDSn1SuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis2vLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpP0Q//X97/r7siqdog3A7Lcu0RLrSNqzoupMbdjuk7zb6J61Mz1sOC\r\nu3HXOiidQOOJNQC85gnMcXsBHeXho5lyZhLL5nnEgu7kpb3xyB8cjbR/BbJX\r\nQaSqt+m8Q3wiWioF9WURi1sP/4hcdz1d8zRa/fI3xJJXQJou8qeINQqda+sT\r\ngJyRpmC6cFn7ldlsR3W9sCcexsdtHG0VY1cCwqlLaKO1T976A++yeKDiDLsk\r\nkMpvb+cW4JJcujtKiFgyyfcm+7ir6lq/PDUDyC2iGz4RfusPV8RHuBjs1X1j\r\nKVqQxLN2m6b9//yarX4ZugeS01Zcz9aWhlsjGzMfezFDP3wMSxgV63moWCIJ\r\nYSxW7mw4J4U31DrC1+SmDIJGp3FAMdcf2ovrVJrN0c4JNJT7uBchnzOich5j\r\nJsfYibI134j/50A+Rwijlv/6pmyhIIzl+7nZkaK/ensd8zO4B66PItqBXo1N\r\nlVQkcBM4DywlTogTI+KG+UcXdZeLshDazp50S94oKqRZdqIaLKpy8N5WjUQb\r\ndz5iK2z/Q7c73vAm3wxOfAKajWry7Npn9B9HBEOzqWf1waIOfDifPhIlzbyn\r\n4alS9CLE4DKZicMoXvg2Xdw8GjfyRgst755Izz9/s97FQa0DEKxL2dQo1gER\r\nxNUOW2EprQk1VCEs+Lkoqdxss+eGcdrmk7w=\r\n=JMqn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ba7b0d01530df70f39142820ab69babfc9cf5b8e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9bfd12f01.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9bfd12f01.0_1655925707683_0.7882921295500493","host":"s3://npm-registry-packages"}},"15.0.0-canary.764de225d.0":{"name":"@material/auto-init","version":"15.0.0-canary.764de225d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.764de225d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f1b0e9b9ca73f28100819195a240a150ccb3a00","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.764de225d.0.tgz","fileCount":13,"integrity":"sha512-APyVOMaFsxLui2DY/JThwn3t+il0xRbVuLJBsjmbIvTpMuBgQc7GH4WvlQ7nA+TZVb0Ol25kCYS6sewVB+Wbpw==","signatures":[{"sig":"MEYCIQCYj1OfbpLC8vt60/DWjilaILQS3Wrx7C7sN5sJdFynowIhAKa92oGORC5TMXaWqw2fuH2YjiNUdZfqAMdpwixYSjzi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivH0vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzJw//S4OQuGu3kkBUTRlWuGdENIhc+xumyxsMq+R3j9hXHbt3a42c\r\nBRYF9z4oJ5t+HV74zAC5cWkZxzo2AYDQVnmrRKKHUxDUn9UAMrpN9np12lDr\r\nL6ASCWYbOr8IcRXJNIxl7reHDA3Z+UTEOxblDvI781XpBQX1LQKbIMSfBMPx\r\nr51ZULAUVm69FNSoHTIP1nZ2FUx8Mm2KXZk5i0pEF/vCkMUb82RhgzXyIY8o\r\n60+QH8nudMcIDoosHqFn/EcLQNhGrfQbOEYkV5mXfvb6l2ZGRWAgu5nwVgQ/\r\nREgy7IATHAQ8EOcTd09MGFPcWwN0dAXvY7eCT+MPFn8q1+kDD+dQ+JorpIHA\r\ng/baVKYooM5G73U8LPLUkygT5+CPF8vW4qxRjnqcK70kCZ9fnbyEBYondb5h\r\nz0/xUqc7p8OA9sDVP7ztiOUchB79B6AMIFXKdsWvckRwGJIVTvQSVIEBvBYt\r\nJ+MglCY4gzuLrWLMzMJ8nP2QHxi3PqGp32ClQDAaaA92QUwAPk6OkC6HMiXD\r\nSYlMwMSyCoa27M51CZOFlns05dORcvl4OzDSPDQHm5Xz0aURC6MZujHNdHQZ\r\n/dMTZlpBDGgPsln0oyKXHqwasg/KFy76PvqqXLKlAlI7iu8Ln2gZ2u83eEJJ\r\nnPshOu5kHJ4yy1fvsQyNyQetc1rEoUeKymk=\r\n=pfTg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"25c0f0a7c9d8dcedfb35f64d0851fc4fb86b8534","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.764de225d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.764de225d.0_1656519983207_0.34470778792796386","host":"s3://npm-registry-packages"}},"15.0.0-canary.31e517cea.0":{"name":"@material/auto-init","version":"15.0.0-canary.31e517cea.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.31e517cea.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f47003bec742df2efdbb501be89e4b2b94f2686","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.31e517cea.0.tgz","fileCount":13,"integrity":"sha512-y76bEj9WRmmUBDhcR43QM0aC4GuJIXNundlSaRYBihwFuPL4AR4R85CubgVjGDEzIdnKQRQCcopuKJqBPtpfzA==","signatures":[{"sig":"MEUCIFcWkAUZYW46+3Lcrh1EtX94p0V9f1wOMNaWA6QXxsR/AiEAjb1L12HkTl7aGRufMInKconPDxCAkM0uIfpszJKss2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivzyhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYoA/5AW5k/PCnZHINgMa0qSBo2psbdZ0yKIsnFVgarLzXUzZDgYjP\r\ny+lmGqeVg5ZKRpKbzE/ZRCSuXJQF1d0zd3HY4Hl6SJZiiehT7cZCiqelg6is\r\nuip/eXvskVV62r8e09izsEqlkRw2FLGFxrxCbetqEhpagxzYfK1++L5+2CL1\r\ncCm95NSzdh/Xyg/m/yYJi7L5kc8ACfNY3ccE+tQzRhLkJPfw9lxFxhEsC4CE\r\nAVG18cdsP+io5pjWYBT9mMGgDWgACGOHePkvx4Tz0t+Zc2HCErYr9gDgmxU1\r\nvenmZ7IkEPZ4hvfV0EueV9kPT0pqmAZW52DzwBq2NgmDEf7zx3mGn9LimBMP\r\nGLKLB19S5Xl4hjcLDq81mvlxsi1XQs6tIKKOi9BBi9mi0CkrIh+Sklj+FFev\r\nGywPhErSTxb8PxdvVp3E/FBP6vxO13NboVnCnQwOrE5O6fm3YVC8dsZlThq2\r\nzddrZsiKY4rj7c1Aw/PQjXcEUhOZbKH1dtAwtJJRK3ZhZTLUzCwhRBhiHNRJ\r\n0m3E+/XZwHf49KiXDphcG/yqUb6UmynXSrhj6hBSYLSXx2hJpvANdN6i0pJl\r\ntbtLVUhtNSLnGsbR3+AnHwptbZnCkhH08ix8fZQL/BqgCiQ5IZo5PtZf3uNR\r\nR5FvYyshkNtKAQ3Xcl3t1dlClYRX317ktr0=\r\n=wVql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8af6d916fdf79ba9e33a883ad56f539f3decd5a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.31e517cea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.31e517cea.0_1656700065127_0.048575322663312326","host":"s3://npm-registry-packages"}},"15.0.0-canary.9ea4e8e9c.0":{"name":"@material/auto-init","version":"15.0.0-canary.9ea4e8e9c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9ea4e8e9c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c47bf2676684d6401822c0fb1257f77d794983ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9ea4e8e9c.0.tgz","fileCount":13,"integrity":"sha512-/g5dXPr8M3Oz+soVeIMNxcyv0lXmfds+PdpSx0ph52nnkK0W8ByxjG/LwEvOIew8is5zmcSQynIltzDsq1RSeA==","signatures":[{"sig":"MEUCIFocNQhw/DBYxw6xeH4QZNl+8UH7DwsGpyGvsWJO72QRAiEA/alJ5qpXJxtIJ9MFyS+ki95uJQvHWaGdy/koX+bfCUI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv3sdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9zw//SQ9cE6Xj9nnC7PDkVVFoKb6cxrGhZDHGBmtKn/404WVpx38+\r\nKTOCqCo9Cq4RXFh1MS/c5dw0Geq9QhoZupFtFgFtUKHG+yV5T+1OYJwuE+Q8\r\n1W6ij9qivJ8vLtnj/53qxmaTJFUeq1C0uP6Qv4bF+OIxmhuQyb0MHQOO2C3q\r\nzIQtOi5vrxk6kvgm61g1onYBJSDzSdke7jDZ7qticGg8ZhtnC/L5r1KQBujX\r\n1G7Vv0XtdgOB7w3pJ1l5DHT7S/0iyC0UH0YBfA6eDOThfpLKo6XKwL93q64R\r\nSEhUiUtDb7LA+QcD2+mekHZvN0sn3vlHfaCAjSXx8bTUWhYTekULay8CJaVP\r\nqwt3g0r/ZCZz3mGrqpcLZ/UGe8h4G5rKauS3iH5RHgZry0oyqA2zCvu/KMYH\r\nuY8AQuthN6Hwhls4XRDy0OqzBtCzNsDwHn4728ok7/S61NCuWlmTKSppRqpN\r\nTeVWpEDkuJm2uzYwk4bwkZ/PrLKazZhkUWzMc/Z3qePGKuHGwwBViNJFDD/d\r\nTfzVcV9OG4BJT/SKf2Hd0HCkmlPjX4LH3aBg2998qK7URHoeztvVaI7+W/bV\r\n5AD1zF6SVpkkOG6FYmnRx6JoMrY5+/+QvJHTwgptMyBrs/u8tL8+4CGzIX/6\r\nCAKcpPl+eBTpG1mzjnb9lhlluE8q5/TKcgU=\r\n=RoQ0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a2b791f6f1e376a53ceef81767514ec18174558","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9ea4e8e9c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9ea4e8e9c.0_1656716061106_0.6881363250482946","host":"s3://npm-registry-packages"}},"15.0.0-canary.cd5bafabb.0":{"name":"@material/auto-init","version":"15.0.0-canary.cd5bafabb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cd5bafabb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0256787c695906906f7ce101feb343ccb26a82f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cd5bafabb.0.tgz","fileCount":13,"integrity":"sha512-VggvcxPWr+Wvj9bTY6afG7zzl6nI4clgYnI5q//rB6vBT+ZMU3azoQs17WQFNt8O7INpVn2WsEj6YKcdp4XrHQ==","signatures":[{"sig":"MEQCICe7B6YnlNbng/KLpubTVyTGwiTB4Mu8mKANB0PrZ6o3AiBhJ5GEBzqAO0N7nBAaXceN28SIoePfEb1qrxLq+NtCRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixcwoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAxw//QF5y1+TeJnCs7E7vZkhITwmJONgElvbS/ZKmA97dPOScBBr0\r\nU4l+yswCGmyDpE/Amj845aD2LiotXiIzZ5cugNIZMU429ABYdEg0yiJhJ79z\r\nOdazdb1PLFCRbD75ySvsg2444HETIT8TDrFeERM58r2lZaLA7B1iNJ79wSYm\r\nZbYNsUDiQrSCnFvFE2G2+FiKC/BzlmMrWmnkJ6qz51XsJFcRw7VC8uPCfktG\r\npGXx3C2l+OmpgtcN56wUcgAxE1MfjW4812l0um34gYd8KcQdnEH6lQbg/qBo\r\n7NnF0rlOEAryiLMpW7/lBC69B7Uusda4Q/5j7PlmLjBnUFCcVScN3Y4MCuiA\r\nJglHbtw7vsY3mnaqO1fje81ISx9DzJ0k7Har9li1ciBknKnEXfHB6OT2Upeh\r\nQ23y4QsT5RYUJaXPifvZHaBIp4ZZiy3A+sekrfnFN+8vaHYEYij4JC7Hiwzg\r\nxWZ1JxeUHSJQyN9RyZStJus9BeqTCOaPKQuRgfdWhvbcN1b44X9t7KShzhSC\r\nnrRs6Zdl+zHDU2kq7uNS6iHnw8UhLtWWkZMgDC+51MFhfatJrMlb1s9AYWQT\r\n5OAWaVH92YlP0eVpry45kD2Id165d4soIrxnliuAnFdHco6UNP6UtiPhl82K\r\nE0LxBKASTPArWiBUSrdWPYEwYbpBfEp6zQ0=\r\n=+f0k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fceb62aaa361c04ae0a30158d529c7e6896b6f9a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cd5bafabb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cd5bafabb.0_1657130024594_0.7341244005981353","host":"s3://npm-registry-packages"}},"15.0.0-canary.a02fe49d3.0":{"name":"@material/auto-init","version":"15.0.0-canary.a02fe49d3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a02fe49d3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"10a5073c467aa37040047936899ab4805d63ab47","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a02fe49d3.0.tgz","fileCount":13,"integrity":"sha512-Q9PtCC1uEIKbL7QXZzje8hTpncbMEOyWJqJzGfjaN+jhr76TXD60p7/t5/wX1upHTQP3s0Bh5CLrWWoygVrtTw==","signatures":[{"sig":"MEUCIG/Zn5bwt1KbeG7JU2dRTMp82zHCLKqalaJQXZH+pki6AiEAiz2MYGQm9SYy+SXiXTdOc7fmSoxj1+zMrfWVP+FMz3g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixdlyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTag//SFJFMgNWw3Ga4aP3ER9ivnI0X3mPGdOekBv3WbklgVNRoRyY\r\nKEwLoSFo0y6XaNEjo+kR8zVGD8RLJwyTyqItvXkY6qVXDM7tCKTqi2URdhYX\r\nc7m5AkB+rYrd9SNAtj/ZQLZlwhjaxxgm0H3wEcejmkI37etNdPY+WO8azBP9\r\ny+iUUlE3AyYun3WCspZIJjIcX5AzvcG2gM9BDgqHKN1gDIjOkQ9+z9NEZ4xP\r\nB6PFebSwvlp3P3tGFrWriRoiaZMw2pAgzZRl9yTa1W7ipuqP0RWssfr1W84u\r\nGVhQ5xdm+wa9HXkfGa3mO/LBao7ZR+RfdAwbixdJ/9j0hxyP5SOrTk7F7cjY\r\ncjp0sKsBMk5T+9kPT6vRE9EKcHs2tyhBaHV/ZHStExc+k73yOurUb+2C6odX\r\n9FDBesrRKQW2htRUAMwYkahXBA3tdZs6NRnI8oG/ChEssumyRi5n0s+oseW/\r\nlcKqKT+7dXrmuWDZcSDbuOfnyyCgtL6SFeb09TFtRajEcdgnd7N8wEjZVUm/\r\nldKqictD9djaRdkcePVV1PQ6C9WZLdbG8rdPuTWI0SCrWX8qqk5dmaLsc8wE\r\n8UDkojQYAwAZgcdy8x6C8O8E150HLz+uhP/lm1UQ1FxRZQv6w2MQXGNdc6Sv\r\nfvEt0H0ewVDS7dJK3ZC1EOls7EEA0hM46Ng=\r\n=gjHu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8304e794f430681d03b9d2d3193e635a072f2d8a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a02fe49d3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a02fe49d3.0_1657133426062_0.08664664975956637","host":"s3://npm-registry-packages"}},"15.0.0-canary.826a3d8be.0":{"name":"@material/auto-init","version":"15.0.0-canary.826a3d8be.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.826a3d8be.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"faee1168d55219076cd2083ebc72e4ef5d1da76e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.826a3d8be.0.tgz","fileCount":13,"integrity":"sha512-zCjYPQ9wRrDMPEic6ZXCiKBHblDsQpxGak43jetKIBi1Bj9sb9x1qiQm4lbjlatU1D/67P6XiDMkK04j6jCbKg==","signatures":[{"sig":"MEQCIAa7/8Mb6cJttU3N7DMZOOr7LxDEiq1xaiGoX/WkepdJAiA+23Jh2E1+Q+XCJ4ZchPtJ4oBqjGJZySGAug+Aw2nokQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixeLPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUkBAAoMnCqal6QPTV2fRbLNK/fREXZh5WgaIqfxm615xVahF08DX6\r\n9KjMpWlp+jgpOXSCMFtsJF9iwoTE4C+7dbFT5Ij48AItVGFYkSWKbvBTKWDw\r\n2jicZK6ieL/rQIvc4Dn+ENOdktOTIaf1k89piWBoFh40deRl1CduB9QTSvUJ\r\n/E9Qiwo1TP2O37I6f+SvTJS6nVxtZlteV9Rnkl5tp187RJ6HzTeGuYmup//t\r\nmGKSIqpPXq1ftHB0/E3I+ldSGHPBJIa9a644sEPMC49HYCL3VSSjLVaoduOx\r\nhyL7+5VxLXMNGglnc+fPPLaZhOJPQbuEtAdNcY9ZYbXu7RA+BP9Wj31JEpOI\r\nNQKI3t0bAb2NI882PXOoJe5hGAAiZwTJ9sZ7FXoEcP2tZBFkWIa9ZXOQE7k3\r\nHtrbsegy0nhvgaz70FPaccTzSvUSwcpTN43i21cwyumBNStBzjCOleR/iyzu\r\n9XHYbOJQgsE/+A01Qt8SMYLrYF1+UT3f2j6AhyEaWZcf9deGegTinoTjuoUi\r\n1Qm6lY4ecY9zdQtdl6yqVsgRexKku44nXQuZG3rQa0QRNlr1mx+EP+8ZYJpS\r\n0bLSywEFpBKXq6m0cxWeDIY/j0sS979vPVm+IgPR47a15pD1CcCTApLxdh2B\r\nh5YCHJGy/a1V2TW6dkBY3/nwtn7ikW3AGt4=\r\n=isEG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f54c723431e97d10fc1886f271ed251cb10209ce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.826a3d8be.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.826a3d8be.0_1657135823116_0.18116333311019694","host":"s3://npm-registry-packages"}},"15.0.0-canary.ef276aa93.0":{"name":"@material/auto-init","version":"15.0.0-canary.ef276aa93.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ef276aa93.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b833ff195b034c0cd9b71c25f5d86e75261edf7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ef276aa93.0.tgz","fileCount":13,"integrity":"sha512-EpNt5+BY5agNvPWjXAdP4Fy6JhL4wj3Q5eXUymus4Sv6UqEwxYqjGYMi6yHotOqBpjJzd1INbPaaR/5Hzddk+A==","signatures":[{"sig":"MEUCIQDjT6Gm5C8cNvPjW+Vdpiat4I3tEhuAcf5T7TD8a3ZSZgIgeEV+Esyk0QgtpPvTSavXzyS+6+a83hos8BkNyFLikPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixxGGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYKBAAiBwKk7WcIKQuO0HWcw9YuegQRoSqmD+9mKdoUhbnrdDzomx5\r\nehAU1iIcd0Ei9/NKDBl2JN21m9O64LuZId3pnHvfXZ3ansz+mvI2aJ7ksZqo\r\nYml/VU1Hjuf/Kd8gHbrb/ogq8ATxIMeg0VYnAID4OInDwBYcXKa0QgfBKZZD\r\njLIze2fzOxxtuNnbdQ34ubw703FfLPI2VD5hUsdtGohGOk3f78t9HU4NDGtf\r\nd6aYUGvA/UFMl6ayXSqteoLpU0ovPxNEoH6VBreDDUXeDZWznl2l+qPiacTT\r\ngmEvnrR0XadOSqg1dzHjQogbpB9ggTS+vGacFeB/V4wfj7cmTP07br0GXAtk\r\nfZy7iwKOSn5q5jjVHqwxCAb6jhdyDz27Fqq2ZkWJZbLsA/B79bgYvvz38jW5\r\nFTIlY/3nb2sQIGJTTqfQ67hXlHs0t+kO9pDBupqjHi4j5JRt2m9AsZ2LzNSE\r\nonbbzwjsUspRJX3ptBqbisYtf5BGKs10fv2cY4aY0THWgLvO5v1e6T9p/k1M\r\nTdJN9f8gqyIUrRJ7mn4y6GPBYfqpKNEn1HSshpchGGjTpjK4b0fIjuXzLmoZ\r\nfijfmCU/tSNDAyd0uOHtEOFnlvozTEfRV6Z6giN72HJIZt1N3PiZ/OhZCVQQ\r\n5NsaEx8CTOFMwhIhLNkHtq2nI4dO7ykrj3I=\r\n=4/5c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"502fb9536e29ea5887a9fac4aaf0c9dc2c732e61","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ef276aa93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ef276aa93.0_1657213318726_0.40179674521843634","host":"s3://npm-registry-packages"}},"15.0.0-canary.59cf61d6b.0":{"name":"@material/auto-init","version":"15.0.0-canary.59cf61d6b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.59cf61d6b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e2d67750d7bf5ddee45943a079e35f22b1535550","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.59cf61d6b.0.tgz","fileCount":13,"integrity":"sha512-yz+828T3kc1VRTSh+G8y8jQtWamPqJ+Z7B8zydQqmdoZYiRo3cnafIKcIx3CIxCJZ5KRu/c6gCT9VpHlruRFHA==","signatures":[{"sig":"MEUCIH28rZi4YqiUKh3vs1JXpeKzr9Z9HX1tjbUqdAYJbzefAiEA2Esn6MBQQm0mUinZqFToi/PpHlTN9ZsEjhjFh3CArDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixxhGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoR9w//Z6JFU4MfOg0eVm2YFiM+pJOgi0X6PeC+a7x2YEviqtA1NErR\r\neBysoe9R9spC2gApXvHtShYiTIEP4Qllbv3m3h11vOwW5HxS85bBpaoPwmm6\r\nK6nyupW9EUcmxIPN/JThV5HYCEpVW1eXx/ZavHNdzGxvAOVoVeFjw0MvUbTR\r\n8bMgSmHCnMF5XqssIsM1vAXHSI+JLDstMz6lQlQpFCsdKTG+ZmMRf+D5kJEd\r\n0Y0eXoL+ww0LcRom2Vfv8B2X/kvGsKCI7XvnXpBc8XQonzMnGxPsK7gZFrNZ\r\nB9ZCnzNLo3vR5xoRaJZA8xteQBnyfWax7mW92DPP01XjTqpzfDsaoeZjSblP\r\ngYgVHwVgG5aQP/3ZhG5HR9CkZVe6vNOQasmHFpt0SF/tWqo8ik9MB0AC/jj7\r\nBOwtVLEBmyYbits/2sspghY/ezdG0XV95VO/z/Bj1tNnorMqLCXrMoHAEppx\r\nCERBQ9oGyB9gjUod5MvFfhJRj1DH0KeNuSd9borJ9CX5k/gPXw5SaUT/Dhj7\r\n5kNyUoMnFiAKZ3rHu3NCgC6NewudOPREA9bOvln6cFGOSNO1RE7YZ1tfi29j\r\nM1xYukvZAx1+JAqyEAhMFTssOrRJbMvVMxtmqoj741+qgx0cjZY2RwuB3aB6\r\nM9wOuJqa6LnpaXyppcqY0qv3tMcJvT7tlcI=\r\n=2x5w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2f27bf33b194929683b4faa9f388325b07b408b4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.59cf61d6b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.59cf61d6b.0_1657215045793_0.37994614314381003","host":"s3://npm-registry-packages"}},"15.0.0-canary.8647092f7.0":{"name":"@material/auto-init","version":"15.0.0-canary.8647092f7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8647092f7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2a84ec7ff4fa143be87eb7571a0e265dd003474f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8647092f7.0.tgz","fileCount":13,"integrity":"sha512-sY/kbT44VjBHt0yoQl9/iQFNd5XWNvMAcBnieR2jcipFuRi1+yZLsouhzffhLmNn3ApJEzwDrqvpVASPKsXxfA==","signatures":[{"sig":"MEUCIQDjHC+OcDlwh1fG2nIkaiRf34+h9zCr9npGx45FrtU50AIgYt9X6EE+ics0n8nlz6fPOTzLVMNnej1oIkdyJaZvSe0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix0QoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTeg//X4fAmEzINDcXwLS4h26vM8I9Ta4yjLeYJKDubI4bprKI6YFO\r\n5jnv1fd7ZawLGW4WO5kLsCTvLEHZ9PfumJ5Goo8iSVpEWAWUOGk7TZ9EG4cx\r\ns3pYBzQjDSzOdNxRBrGYaXweFR2cAfu1rpf4BbOjdt9iJ6fZyAVm0rRvxU+l\r\nirqUZy5I1f92CtFBNasVuDOwjWbG+jGE2TYvcb5+44CqOkcVHw2IBh/gADH5\r\nGnXfPOSSJmkB53zF9NMuGSvYzUSEYzKIBFAHPzXFE65Z4ImamCct9nB77Ypm\r\nMntmf58wQByHfJAKor/pQE5NtdRyzaDXs00yviQlq0YiB2CSQPSJODU0wfth\r\nNZR1Dowf3LtKfO031Yx2Nwsqo705bgwqnTekEdjukqnlHZBgm4bcCLWlyHn7\r\nytcJilfgr0s6YbBKxiPwKVpEQLrtCgsc9uiVVjb3eD6oE4lnwLVwrpHDsjwT\r\nVGU+d3mAXubJNwDUZ2yRwa/6nGO8ywoL/Z2etmlP8d/YmdtZfDvRzeflE2ZA\r\nqYF2hBtuDeTx5cXTfhHnHmAWt+FIeiO73UhGOxy1m1yNYZV74pIhAnWRpqFY\r\nv2T3gNP+UJuqF+d9dgakZaEAqeMXo1PRfQqSY0dHPDJrLoNqSQ0FeIVGt+gI\r\nDKGC9WxEpbubbk3T6IUQjDAKKhSMrhvRXuY=\r\n=9/Go\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1edf72197ddaf5b6318f71205888f8ae695e9b29","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8647092f7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8647092f7.0_1657226280530_0.24499168793762505","host":"s3://npm-registry-packages"}},"15.0.0-canary.02ecd4d85.0":{"name":"@material/auto-init","version":"15.0.0-canary.02ecd4d85.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.02ecd4d85.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"340ff9478aac890eb47d2de93beca9db13fc1ef3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.02ecd4d85.0.tgz","fileCount":13,"integrity":"sha512-MzYfLy/vvqifi6K+c7qv2zFQfYLgG+vgmjvIkIbtrq7dWzJaF3znEwV/VwLJ6apXw9c0PxD/ELTJwTItedOvtw==","signatures":[{"sig":"MEUCIBvY8K1grbYr4R1CSaHRO2feB8wfo7jDqKPO/FsblUBpAiEAwm+RBqynm9uniUOAZzNWtAU0i9rBhsuAD4rgamK/Qgk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizFIGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOQhAAhDyj54AeGl+QtVh7Wctrrtfgj/RGrQoJ84kjhttQi7AZBJFh\r\ntWeciBb41Q5fFaj2fzDJ662jhCux2Q0omzGcI8Wb2O16oCGRgYzz0FlWl+MA\r\n1fQwb1Yzq+8AZtBfGN13H/0rnxggxZXptdElK0FFKgPCCPS0llPCf3bgtWUr\r\nHkroMpB12eJuRmGFsuSQhtH6VHFzAV5HnuAh2UbgBkFmlBQAqunkUPGFulR/\r\nWNIt52FQSq3/7uCNP3cgYB09sAXA8yyN9jVOHQZQdgmzCgVJsTh1OmHTKw/a\r\nmJB2d3KGN3iTdVB7mDT8oikL/iq3MI05IJByHvDK9o/7Ik+SvayI2L0gD1Zx\r\nhehOaTh6cGSEONpncvsN9gpAv0YC0EF08qRO8Qv0IQPnvjvDnVHhEg5BP2oo\r\nJbf9nvEO7P4xz9NMpywX+ZnbJaQnHpFC9ZD8igjXr1B72T171xBWrLxiOlQ8\r\nGM63uLUb6HDGcrGXP6CzpSOx2k6aC0l1UcthGC0hG+FfOKDSmTQ/wB5/Ufvy\r\nGbJqypr4sfc/EHzqaO2wJ9j5fvObfYlEiDkS7p45Y3fjtMBnjpqh0rGIgV3Z\r\nU10clR6p1OTcjVhXhj8tCh7Kf4ddYGDbnoB/GoZkt66YQAwElu4QX2/IvR8y\r\n8WR5fZz+M/FFi/MHFpox4vSG8l+eFCCuv2E=\r\n=7fQ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9bd9b1837b6df66731c0fc9da61877874518d2c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.19.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.02ecd4d85.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.02ecd4d85.0_1657557509993_0.04917856272981935","host":"s3://npm-registry-packages"}},"15.0.0-canary.63d3a146e.0":{"name":"@material/auto-init","version":"15.0.0-canary.63d3a146e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.63d3a146e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c560830087188d9625d56e926450abc39ca0654e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.63d3a146e.0.tgz","fileCount":13,"integrity":"sha512-fN5xqJS3kTOd+blJ81tT0wrFPwxarUzVfqh1kQhTPG+vhbik73hc72GYK56foPUnc05QK1iUE7OS93Wxv9U4hA==","signatures":[{"sig":"MEUCIDKhO5HRkHfs6aHMl/Y/hgqUboPfwZo6Af9ZIXoCbnskAiEAv7IzTpmgedbUFWXDYZ+jvGUoU7A69ZwXevrI1FWy//o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizVy0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzSA//U2QtHpu29UvC0Vt7vlgt7o+smreSCJP7Bl0WG/FvKj81rRDJ\r\nV5zPbZ4hQ6G2n8dXA2a4klK0uBFo4Pl18h0w4UwleUHszoo+sr9aNq39yZ1Y\r\nfulgyWnGsAR4UJOmD1xmo1ZUPWT9VFzQA3c171Z5bJ6R0LUisslaCVE9JSEC\r\nrzWUkUxuxY9wsHJg0eKzezsKnu6ThEukohOSwk2WbSCw9N8OizV0eBOHp4mc\r\n03aU7NAzccz1M9GtyGSeN2iCebNtYZrAe0E43U8iNXm8OxBRYVhXwhuWxjH9\r\n5F59iDX5GT1hmSxEdw9o2YkxXmqLdAuDlI6IhImq6oRkm40u/t8SLe49C7M0\r\nPCw+nB29lBBHbCpCPCoo3fMvHhgGpjs3L/VJrlXD3SdxBbB7QAyVPbEyd4Kc\r\nrQooRfKHXxcbDP6uruwRLhHAASvXYJVlXI8MKmLxPeT4bQ7yHoPr9IlzuXWH\r\nqQLd8X0B/ikpecLZAmpBYsltdheX3uz6i6fz1ybG6r0837OZ9V/dTY9oGkM8\r\nqg87HrFRTwU1iU0kDLiC75h9tS9Ddl34J9czYkiUNhuPNITMvzkJMoxx94oT\r\nKKzBZfQqgXUe6Qbpj5Wbr410s8iNW0ta+xDuLfg23qj5HQ942UEzOSgf/1VN\r\nLXO+DXfv8T1FjVrO5jBK62PUh/T+Ck6xsb8=\r\n=aGHK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"593f32d351d8703bd0422f65b3651e55f97fd31d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.63d3a146e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.63d3a146e.0_1657625779772_0.7308056725285845","host":"s3://npm-registry-packages"}},"15.0.0-canary.88db01990.0":{"name":"@material/auto-init","version":"15.0.0-canary.88db01990.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.88db01990.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4241590fdd620b0041472c3cb26a6297cf453b99","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.88db01990.0.tgz","fileCount":13,"integrity":"sha512-gLIySLtfo2dRaMF/1MD63Z70kN2vntQL5R5rhuPvtb4USCdAw0rZcO2HJgvopwQ56tt1v1U0hoKtOvOKttYAig==","signatures":[{"sig":"MEUCIEkFVHwdZqpvh+qVkx3msbxUEZmbDUA2KzkT87dX5qOcAiEA/fpImhJoSMYqU/B7Z9dIZHzezz2pKTrkvVv32EENvgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizV1mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/qw/7BENLdPFymCbkWWZh2L0CkUsEycAeZanni/EoWfdnAHDM6Rw7\r\nEet2mPpyBpj0H3FuHfigeWCJWWAiMtHtoVJb0/+Aq3Rx6+SsZ/m2LXN3s0Ed\r\n+/Zxk2DDXv5ddkCCGIXTHFERwS2ZsPzbEQIf6xsaI7C0puZrdPiY0aN9o8oo\r\nSDKXfhCydsenARn6EXjL5d6frdowGxIIc3PQu+sY6Y6WJZH8dVwKm/IY3NgG\r\nY+LPyqSs94jI3OVNvyKN9FsxNeEaD7rtJ0L+bwaL8oy0i4TCvt4P6SUsSW0Z\r\nY07StguNHwrwmnmJcUnzFpgyP/f+daszXexUmljAo7uPzbDNVH3dkyTprOBA\r\nhEaPW0n3OyDmbQ7+ugQ5cySsRHtp0mKpVJfKD5CCuRjT9JJPO8MfcHvBa9IB\r\nuWvkXAoj5KfenmBXBMQvTQiKynU0tnRm1m13YAYRSNTpYDPCQHQomQPzNDvC\r\n80hdd6zAoSZrYiilaNeW9S/TcQqoHuS6mb7e9Sq57DDHByBQp9S1FF7p7Ghv\r\nvuY4/VWiCoj1fCPdqMhjvQytVJkJWnm5klpm7cN1P2qa3HgYi7ScnitB0XI+\r\nt84VcDRTfZ7XDxFukjRcM0vvO07US6qxb9np5gifzJfAJXERCu5rwYTdWCHz\r\neGcAzYOsKE8qrnaFQgUTtX7f36QZ9Y7jNBI=\r\n=qQ3+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2570f15e2572775da6e1894e5310c107a703ea4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.88db01990.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.88db01990.0_1657625958157_0.026919121931936685","host":"s3://npm-registry-packages"}},"15.0.0-canary.6432d8fd7.0":{"name":"@material/auto-init","version":"15.0.0-canary.6432d8fd7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6432d8fd7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95c36be28af9722bf2c05938e117f7a8dd3e5272","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6432d8fd7.0.tgz","fileCount":13,"integrity":"sha512-QGcgOHddT6v/VAM3mxWiAx12Fd5vSqCEln/zllZuU1tpom3NouleU6J+HSIyUekJKUWGdvq8HQCZ20e9K8/FIA==","signatures":[{"sig":"MEUCIChEiKRzPK5S3/UWzYSJTxDReofLVpsnOwlJRZBhZAK/AiEAmhDrIJBOjeVmZ44hrc8NPvimkVj6tVClCiHkgtd284Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiz8WMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr00A/5AJi+7yH2LtrogTuGwpd/foQ4XgY7SmLq9bb30JtUaHnteX5s\r\nX6J+HjnSvV1awNiWWgICepw6szOxM++8GnZfJxJx26e1HtP54em/bh7WXXZY\r\nIF8obpwACOlmRKjnel2O8fSD5f+RWDu4iy5s8aFny7JCYOoMmTcb41ztzvKI\r\nWpTYTvIaZ2d6WHK6D6OvNdozxVB17xUZuUmbHYOoNlKuoM8YmRlPnEH2f0c2\r\n9Dphf5Xf5ogL/mn3o/xcIDmZeXMCLsewJpGruZIQHzMFqQpV5LhUWyOLz3lE\r\nEyvyo7gPWdcaCa4hS7jCtMcMhp4ECgDLcLQqhxUOqtXfFpUAmSJwJcD9cm8F\r\n4AYsLp+SBhzw0AzruQsr3kBUdd+GNdGoj8VWTnr7I2E/5CWjzHVk4uwc19Kb\r\npmlYBKgcIhfthUC06SZ2djfPllOjZgLYQfz7sDgkfnukVUuTPIoMkDYv8k66\r\n9QJEnZgOJjN0+gaIL8lFKL2Mh9gRmPOHccc6RpFvneQGcg7QchQX1dAWmOUO\r\ni3ZxzGPukfBVGoJ9nU8gvCnbzLPePdVn32mNB/CpI0kUoDuzDl9mCVqdndy5\r\nY2PUHTvIoTU8F/v4tWLMAyni1T3TuhHcJG6sm+J+wDG/Llb88WiCsYYvXdS8\r\nM/2Yzd3sJ7vXYMSyWDLyZWJCgM1wmopAeKc=\r\n=w1pQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"307aa53d6ea873bb978456b538f97f9922496798","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6432d8fd7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6432d8fd7.0_1657783692343_0.2744931718023311","host":"s3://npm-registry-packages"}},"15.0.0-canary.085f9b25c.0":{"name":"@material/auto-init","version":"15.0.0-canary.085f9b25c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.085f9b25c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"315465265adf8eee9e9252c7a2ec5c48d8fdd294","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.085f9b25c.0.tgz","fileCount":13,"integrity":"sha512-cEM0guy1BJs0+TJ2lEZXKzL8XR9JdXTP3wo2nEp354ILyo190bd9/3L7wOJTZ+SyZ+xKYDaXhsSHfmBWiBx9JQ==","signatures":[{"sig":"MEUCIQCW6G2X7qXIGvgpwOGIQohPdLc2t8hgDq4+Ja6paWtYLwIgZsw4+xjDGlpnukUqdNu+ia9S/u5ES4HZZO9yithi1nM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0EWLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2+Q//QSztiuk+0pivbGC+cRIo6kpxuBZ4h6yuB2Tes/1FxEmazKlv\r\nTv1HcXjeNLdhkTrysrm/QtgqOdYz3qLOoCPnpTGv4J4GAzXQL6ce+Cf8Jlpm\r\ny5GWx3DuhLLez/SU8Vzhx0aCGwUULjz/hHSbBvu+9vq2kps//jtjvBDe0EI6\r\n1/QcXy4vM4qAWrerMvkVyORnUf7N0Cz2yncsRnixX+WtHaPfduovHWpZS3ZM\r\nMABtwmJVdp6cX/4ttJAqQRK02UXXbmbcIs/8VeVV1Vsv9FWjyj1nE0bXil+s\r\nsp9ysZdz6osNRMV15TthLLCbSeRip55qzQGg4QbOANKiTYj3MwxT0hn9lWik\r\nEYAaH6dXYr9+AAnWU+xr348br5RKIQ5wImYyVsAYYd6yW17dyYDk5tLCaggc\r\nbkVzMV08j624r/4kYuo1fsDF68qM3KTf6Qzyy+1yhdu9wu/cCT4n5reHDPS2\r\nA2no4Z1zpWfYZSIVHr3WEG5x6Ml/o8kauB2RSkZhRjmYrHh0MDJb+/BGscwY\r\nJwIQ2NeT9V0Pbj3h3+YrRAy6Jd3ik8w85i1gbjcVoRNqEdYBwjLZPStIGV+0\r\nBicWAJ3lFF1d21LTjpYDr3qKhRS1yc1eFbOZjHbDSBdVNSXB/WPjsIn7Lff5\r\ndNmbp1SfM2e8eGC5NT+ulBaMSmQkteojdQA=\r\n=AFY7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"766a8d5f5fc7e4e022835f16c6ecdab8d2ccf071","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.085f9b25c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.085f9b25c.0_1657816459412_0.015411638403616257","host":"s3://npm-registry-packages"}},"15.0.0-canary.39f9424b3.0":{"name":"@material/auto-init","version":"15.0.0-canary.39f9424b3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.39f9424b3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9200cd8b4792485e692b7900cee900bac9499af5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.39f9424b3.0.tgz","fileCount":13,"integrity":"sha512-6P5Q9BLYHXIAydYpKsDMjvXKIAcKBKGz+hV/ln6Dr/gW+ZIP15kW9nd3k7JntXyytkBHdnu7DYYctiqtHnnYTA==","signatures":[{"sig":"MEYCIQD6+xeLHgVQIONcR9CEkV49z7fhbp1NoN/8sddvs8cX4wIhAOc5tJ7w4Vc/hllhIHE86nww36YnhZkuvOUCRbddSL7h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0EykACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIuw//c/gMzqyC2BKjMOudIITNcVnvunOLCgji+EwO9iC1cmpGoStj\r\nfHhpsedsCr/sFVPr91A5xC6uiruKBxQY6AIT0gREu4QVsRtzHZHIu3HKK2b4\r\ntan4ISKa6XH/3utAtKoqhIfUHQVnMS55/SiDSHR0/5Ea4pixfWG14Dmqhln/\r\nwbUhrnMgybZ/j4vboLKtnFrUdgRFSjZ9307NlPirWTRzV3hTffe/Fgi+aHf5\r\nyx/lPGmqe70eN3b6x3m1ymaIsf3/QS50keQ8vuua7xzNsA0LeFax7MmAD/En\r\n6Z8//Qocq6FXT6puhSGJ+VhfY9whupMiaRVqsKPcDZDppgDTUbE5qgDmiONa\r\nW0/XXz8UEPwmWhKdq6fdWl53F9LfwZCMUR3ainaA79oB6MtnjHqSrwcP2TeJ\r\nLNmwAI2S2ndbZV4BjpSjjoWRWInX0bJd1RNG5T3nS91+tvOzuzqQm8QL/H6Q\r\nnT8wJ6Pfog4jbfopz2CS6R6IdYeEzFkGU4qUn546hufDQ49+fjQ0rfOTk3Pj\r\nDCOC4jF+phHkZLm8OHAAJ11pq6TdFuGZcapCPdU2oGs8ID7bssxZQ2/P9QCT\r\nUn4pBZlDOj3XwwkPgC+9MWfJllpZIPaffQl2Y33xjaoIvcuuBbVkE+PBQA5l\r\nyuhpWI/kmWChCK1nCiDwVcbacDfhZxPe/Xg=\r\n=ScSe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"62e726843fd90c6139d8ade27db8da6ded6e1d77","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.39f9424b3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.39f9424b3.0_1657818276034_0.07989199105174905","host":"s3://npm-registry-packages"}},"15.0.0-canary.ae9fce587.0":{"name":"@material/auto-init","version":"15.0.0-canary.ae9fce587.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ae9fce587.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"514bf628524eb79ac0daa1901ae1773898f915d2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ae9fce587.0.tgz","fileCount":13,"integrity":"sha512-EddEz6V7kPa76PaSR5gqGT9agdrL6ZtKIB/zIJw7RWDn5PL0gXgUwVf/Jf5oWvIih2Gc6MNNFjZMGiQ+6rsB3Q==","signatures":[{"sig":"MEQCIBn8yTR+JJKCaMgbqowO6Z182bwClg5o/EUspGKk3GuWAiBdfOOQcTuqM1ZmqtPjQtyqW3PmsmeNxIeVoPP3HsA6cA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0FtkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouSA//X26cLd2GiOVTppfP7meU7qHRFudcpO1iveB38g9MCDtXwnLH\r\n/SDtKBjlWYhvh/yNx3GR0Lw0eXpcCHXZqYhH20UhLshbuy+kh0LW55L2oNuy\r\nnSW7Hpde+po60glGXBs51crqWILV2o4HhBZmk6ZFLAzl2z/QT6hvm8oNov/k\r\nAA2Q/dGC6WfoT521RM9S3aMZDH8uj9zC/K/WwBMuMPOxhojKOa74V0up+gKa\r\nyZVKETV+Rnn3/ytfmAGGXn3lzKWUyI5dosg64O+OJKLR/9Vr0l5/FiyR7Fms\r\npjbnE5ZZvfNBHCxKGDVawSoG3FcpRvnXq9+Buo+pMFLB/EXJ8YiXJGBhMjiu\r\nSflPA1jLxCQaKjQXWhi4H7ZRcEiCPc7Z14o1wRZnX4ZTMdd5Vg5ilzWGRfba\r\nXVms0Y9//fmE8pZNZHDxkZ9KHkshda4DYoNseBB6jKcIyh912AIVCDblVv8v\r\ndjCAjAjC9etajbZUsuuYd1Abv/qixGI5UJ0rJnU3Nb6/AQydwctjyR/NC7DI\r\njzF0EbXoowyfYS4zIzDq/HN2YGAHe2tIDOZFGfr/3V54qERvnbbDBrA55Tdc\r\nB92U7ZDjXOBhQSnfHZgZi/qEc5FO3SV5i+xZ+MeIi5Hhrokzh6yPpyKmG2Db\r\nYF6Flij8H3EZrcv0FdBaQFEZVaBGdgsYI14=\r\n=w41V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2d55d2ded8f3ebf66d72baffd67452a8de349b3b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ae9fce587.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ae9fce587.0_1657822051896_0.6174097602968269","host":"s3://npm-registry-packages"}},"15.0.0-canary.1ebddc343.0":{"name":"@material/auto-init","version":"15.0.0-canary.1ebddc343.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1ebddc343.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"37465b379a7c49084e0e9411489dd40e68b1d4cb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1ebddc343.0.tgz","fileCount":13,"integrity":"sha512-GgEcG/tyUdpRjUFGvf1FiJ5dDuuPIpUo65yXe8nhXbb11VHgi+nVI6LAjTTnUje4rTIAS2mJIjNflC/1FA4DLw==","signatures":[{"sig":"MEYCIQDX6m1wjljGbRVr5t6CADCZ40jNH0esT/HkwLGX7XUUjwIhAOvXIupZ/9+7/sb8ZtrQzqRm/TrF0udRxew1khyHJIox","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0SnrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokjA/+OUFDKD9FJ/waj2ghdhMb7OlEqLPtAcgGpVUK2KV7HDzk1Qcf\r\nqINWbhhX4m/jnF8WRggAGX2X3K6sgvOosJ2tXUV7NZmHesw8NrB0KHXXocnx\r\nQ+SrJYJt2OS7jnExCDGTPY6ncXGUgyQckcgBoIwedG/aCaV78l5hE2misypc\r\n949njXKEHF12+cf7unCPwKwCJBNVycHlLHr9Y1DB5AuhWC0wLmTdAl2iRI/I\r\nxj1DM35btiMDGtGdGOJohJUPaRs8Mby9hY3MAcyaHBIZ2du4RRC7ac7ndvsW\r\nw56X2RzkRmUYn/sSu2XV31WHS+/yYTz/gyFtH90gyPIr3yF9jFC/HZ29QD/n\r\nVwOrPcMcVtCW86HhC27DYq6HTItQVI0xyLmVJgU5YaxDNXyB4EtubFzNZmCy\r\n1+mKh/CCGxpAyQUYlRGHzpeN+qWR51PY+lIWKeHmg3nrNVOWeyNDh9ipaxiw\r\nTXX+rhMsW8KRW9NE/aYhGJZobMBG0HtRhjd1NxqvoXPrbzE5VNYeL1J1oypE\r\nvs4OqqWlqWcDp1KDRcwK6ouX+S4b83ssV+8YlyfsIDmdG+PISTSNkjXEl5vq\r\nxnaeaE9eWhBRi2evV56KElZ0gnstaYqDITfWr0Ax2sb9Vah9ISa4yAgybCGV\r\n/RmvW/H7STHk8NebnUwaj+Pn93ouiM9x4gc=\r\n=qy/y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2ec31cdb5e8e1a849368a3f352b213919bec43df","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1ebddc343.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1ebddc343.0_1657874922895_0.15509701727649583","host":"s3://npm-registry-packages"}},"15.0.0-canary.c5018840c.0":{"name":"@material/auto-init","version":"15.0.0-canary.c5018840c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c5018840c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dfab2be4711916cdd770b1a3c885cc9eb4a76cb4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c5018840c.0.tgz","fileCount":13,"integrity":"sha512-BuW2c3Kb/ZVx6KYVRHo5SDWwYNTDS3RTiXwKAiZhyl0+NjGvGlQGjdqy906QFZbfQz3YUQNxtSzk5xaxJOrvCw==","signatures":[{"sig":"MEYCIQCDbtb8Hpqh9TajjwzRUgoqxYPKJ8lZ2AQZogMUuWxCsAIhAPk90+Max7pZ8Kta/8SEeD2/XjMhxBMy3LmZIO6eKyXb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1SsIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCPA//acsqURPBsoXz0I8pzF+2kh+lM0nXVuEHI9AIbl4AeolwrTkG\r\n/rGjM64V8gUwSUol9emGDWcdqYjbSKmYO5gfNveLaLQGOl99/8janNWUUBLG\r\n1PXLi3r6gLd6CJoLtSCzdvAUZh/DdBq4JzH2v8E7opuk1aeZ5j3zbhrwUjEj\r\nOQ9HNZz0jzqJqgozfM4EAtAGWI9BfnQVIlXHN8YPMmb5eUqFggm3uyKg0WxJ\r\nsmXqSL3/mrL36G2kQP7XJd72nG+Y97iqp9dVsjvrG4bDuHOwTuUsqX3CerDv\r\nstUCvYnRn1wy8WpJ2bJ4eDJO8rJ97XwDA8pAc/YBGTP7uzIgVxefmo/iju33\r\ngLw4zXs+C6P+O0OrjdWeFjVLPV04FKOZYhMkaG4eaoKczR+1Ku5wqd5P1W9+\r\nMjSfX3NvbDKF6J+5PCSRT0YomA1OUCg8SyPfkbwkCGpRCoagBsmVfH9+x0O2\r\nAJ4MtQWiCMQdAOB4aUrxoatzwIbiN1UjX3Q9fz9EyvzkVSZPCKZqWfyxYEYF\r\ncNeAywB+0pcjYxgyKKQB9CFM7LZY+5qFxkqDuReABYFBS5jVqsEooiPlavpi\r\nqncMQYK0e/LOI93XSREKl/2AZv8xcvqOyq7zw1pvbG5QxiUPEnsCiAbQltOz\r\nd+lalrQvmpciawztyxWd55Rxp7Z3rKG2+q4=\r\n=Kkdh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c86de383c50b7d72b8c5cf908c5fdf3e6efa94c4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c5018840c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c5018840c.0_1658137352664_0.39015004109130125","host":"s3://npm-registry-packages"}},"15.0.0-canary.551b40d18.0":{"name":"@material/auto-init","version":"15.0.0-canary.551b40d18.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.551b40d18.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"074bba3f058a24ab818bbf4c9f09e0956294a5e3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.551b40d18.0.tgz","fileCount":13,"integrity":"sha512-UHthzmN4ftfCRqIybYJsop79eZnh7hG8+YvEzyuRcdtjrCFNsN6Auv+5zZ8dtcRIUiBeq2mKvICEFJKF7HmekA==","signatures":[{"sig":"MEUCIQDnoSd8On5VsDl9RjArOtFs3OUPLB0qCtU10M6YAfR2mwIgEFPmCMU89XE55jU+hEqzRPjevAnIP3eIBLA8nUgv4HQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1S8vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjsQ/5APbuFvOu+eoA2XP0Pv48eTYSwTeMMyMAqlT/XAS77AqwaZzB\r\ntfUt2EXwYqpj0J8a8ad2j6X11yhDhAadduylWnmxOBW2cz51Y1mjU2FBiFt2\r\n7wUk5P6X7SLl8nvMzkwh1zTrWep9W+uvrMexBO3STKhMe9RKMMpYvE1uJsXH\r\nLi/1Nc1DyW5/6g+N9GgXuMMN48WS/evPb/xEoaW6epRC3fVKOWiX2BLj9IKx\r\nrmjgZpoHKm82TpgHIhjwi8Pl8C+w6Za6oLn0Qw6a5vfumb1t65L2bE/uEGe3\r\ngtVXUjWowFOc77SO3w9TsWEpWQ7Lfu28hkdv8ctlOfxOX2FhDIeSyC2a8JG1\r\n5OaAbY8C+/vE05sw3DuKx+Ti4z4gIy3s/14FGDXOJc8u0zKi6hPcfFIJcnca\r\n1USpZM9IOVWVOb0QX60irT/dkSZN6QhZLImFv/FdfjqKtmxXqa0gLx/+fgTz\r\npr7jPz7fjvCE2QLeQJQzUxeqIXWNdnAbNLS8u5jOgduRYKF/48+Ka545TnGO\r\nr9DVDuyUQOQ8kS9pYKkgUnhO/SVQUcTpTlVxZtv5R7H4+qF7QZfZa21VfHb2\r\nmJActz/JhM0COhISe2Q1hJ9SpBgnPmEx9Fx+tJj/pj64Wbzu/0mBBHZCDfVS\r\n1PsVfgZ9RbBbT+12nC+iS6fZOFsVr9yo8zs=\r\n=hZKW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3e9aa3499438031c9229cf2a18a1a3672620853c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.551b40d18.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.551b40d18.0_1658138414969_0.5851716654288002","host":"s3://npm-registry-packages"}},"15.0.0-canary.cf9f12371.0":{"name":"@material/auto-init","version":"15.0.0-canary.cf9f12371.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cf9f12371.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"853ff84a0bbe893b3234d68e17b542376564071d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cf9f12371.0.tgz","fileCount":13,"integrity":"sha512-E5bBWbur6z0uxSqONvLQclFjhscvZUjfygfJ6KTc4uh1wyM32Ek30xzudRHWYHaTw8f86bpd3B0vMQjzdQ5Sew==","signatures":[{"sig":"MEYCIQC7GYjfHNmpnMyutfSV1WgRSaRCgx7RaRG4CVa6nOmIZQIhAPhOt+t4O7U8U9/k4MH/8PS3zkeI6bMbqZDJE9r+47zO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1TAkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoR1RAAksIZJJo7I5XjWu59vvBG/aZgtK2yk6K1BTU78NFXjyew6pid\r\nZZIEwEjmVCdBZ/oZA+XzjmjDvKo0XF+D82UQOpQRBEDqvEADBFI08HAXcZ+b\r\nZIQ03b4Z4qHHupDpDl5MRlCdDr33YuOGv4KB6PYW28iGaC4o1h1x0bhCNgWX\r\nbTyLkrOttpBbLU/8wPezZMh03VBO6nCZpR9eP0vhU+XoYx9t89+2nkilGiPY\r\nLM3zLWSt4KI5AiEJzx7+VmC9/eWhZrqQn7+TFiL0dA+c5ONjgXrvq2ukU/xH\r\nI8t4ZLf73b/FhkSuTU/XKMwgEIX57K8RhSSlnXx+50gM1DwYQsMTRy/kBgQV\r\npWtGEvgIajWuU8Qdnxq3XXUq5wcYo/8Su6xUy1J25FuXfDiyrhOtW67l0oH3\r\nTusvoKHmdgivefF0YSM99jE9HOmz+KT2HpsOE8sFEL7dHgS8ec1wAm+NJOfe\r\na4DfXZ6It0dKjJdmaW7mOodJZ6ghRZPJAnp4+NN8YnnHJeXowsh0j9L7yi2l\r\nhHSZXlAYWROx8EsCq8NsJekE6v51MBpvcnGS/6Ng8hE18JcSrMxB6tcethEo\r\nSl2UOn6RxtZY/xzJ5tsotJS17192U2w90BSjw2xMtFdeqp/tm1Iau48OmCDZ\r\niGW1asa6asshUt/5vHiYXMFHl6qHOLRYcsk=\r\n=Ya7a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1817e344a80081e042f37248beeeb96228402878","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cf9f12371.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cf9f12371.0_1658138660681_0.5049512300504062","host":"s3://npm-registry-packages"}},"15.0.0-canary.2797ff8b6.0":{"name":"@material/auto-init","version":"15.0.0-canary.2797ff8b6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2797ff8b6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a8b2b020526dfa4267f5e6b053954713b4fb5d86","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2797ff8b6.0.tgz","fileCount":13,"integrity":"sha512-2YFTd9kMGjlgoOSmOOgmwCDXDbYphT0HkAalXqZFKZrEMGHOKn6Iht4V29kja0wLBlH1lCoFgDrx4oZOMapwlA==","signatures":[{"sig":"MEYCIQDfEGo+KvujHpBGz3wTeUOFY6iBYlvON64eyBEtf0F5owIhAPsIUPCHypyJGTkmgtfl9msGRzNxDPVHSYpGd0yZ+BHS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1fl+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDBA//Z98Pl30aX0/lCXS7AB11n3zaMaD/4Kh67WoWjjG42zvJVsmo\r\nBk/GM3DMq7VTZTLQ85G5cATyvL3rEgpQK3hk4xlblIfY+r9UE9AhyMGBNc6h\r\nrOhUq5M5WwBodr/0rUWFqtLn4QF3h3jRrfgc3XOmC3auUSU8pImh9jiSCCnh\r\nkEzN2FVMARPt3qEwGG/7c1aQmm/LunyF3/8d6AtwwtOZyXAu3fLm7WKgdHuC\r\nsvK5rtDCRasyH8YI8oELQeP6lQuJbwgAKRsuGoD1AEn/HjiezTzl6o/FRI1e\r\n9XI5FlohV/v2EJYYwQBRkqgnp6nezVY1zTWGAj/3I430chYHRsut9Rx10AXp\r\nFQU4NbzgHZpY9VDprCGxdCnsONoPkqcmxLtkGBTpPVO6SMkAoNcJJlxNmolZ\r\nwEy0EXR/QmHSne2AnCxafcLIqIJh0waYJPYgmFoX6PNjNYAEmYWzsT09mgmN\r\n+DQddBLR0xgEIrxSopDeSY/YTBAl1AoEZI92+RjtY560HBjt1yYyYaik1i1V\r\nAVTI+yGs9+pDrVFE3WX3xOdb8DG4fbSB4sv21THdqKP/B4VRmwOC/qUalqNH\r\nSyxi5DfG1vUg/bdW6Sa0tX578KgWTJaX/8AkjkxIcyHT69fZ4OMPs9J9Qlls\r\nGP6/xzLz0L3aYV9Zilgmx5k6iJaDsl31RKE=\r\n=plZj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2c89951e5e0cfca0b1dc61a4f30259b33cee139b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2797ff8b6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2797ff8b6.0_1658190205986_0.38273049740070686","host":"s3://npm-registry-packages"}},"15.0.0-canary.110fafa17.0":{"name":"@material/auto-init","version":"15.0.0-canary.110fafa17.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.110fafa17.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3cf9662c63c835e3b6fa5579e19ddeb620628b54","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.110fafa17.0.tgz","fileCount":13,"integrity":"sha512-XspPTJatcV1o8X2XFYugpDpEAJAujAthrnGnj+pPlqBgKGnhAAhiDxdoB9tUGSUHxdp3Nd6nG2Wwp/CPtL7xpg==","signatures":[{"sig":"MEUCIE98zE5jbZSJLm8J8XTiQbBhxmNi+LNy+es8rL/3kyiAAiEA/+FXUpH4Lc0Ku6JW0mJCa5/ghKSmDtSJhF/NLB4RRUA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi17K6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoz3RAAkfQhgvnup8DK/NOFkTN1qf4yUyzif+jCzkO1oTQvxCne/HyW\r\neakLqP9Y72N+ndEnJIhG+wgrrCbHqHoMWBgOdzujvv7Hph02l0NJ9/Yk7aqS\r\nltgcdTz5sKERPh1VBYLPfM2g9Kid0kquupMkEWgL5Qs0CDWgZaYgcfRMQ3vx\r\nKur7RNnTUDOnEnIY/A7Dnxs4G3BBno7bUpqHOXfHDBixY1FPUKmFRQ9ajj3K\r\nXxsalNoEije3XljvP1kx4T3DUGaYqNoQX5BYO21QoGPRPD+l0GjUv4W95b6X\r\n20FQZXcauYxcvWnffQO5yAP6yY+n0NEsrads0NwbRJHMbmk6jbDPwPr6ioGA\r\nZ/arIckC8r33RMLzWKm/wjd11Kcs+rCiJgBTf+X/petSiv9yp4D0xaOy9LoR\r\njZLvnfhEKpFgkuzD8xhYYIm7T7IneyyefZ6huF28mzeaZVnPzn9sqg/d5n+C\r\nmc5sWAtF84lD2LeGhjQpvO3/jKLdo8/kWZjL7IFy1ZWnkw9KcFXgAKzlkXwY\r\n79Jd2M6teec6gDHO8cqnNR2GSOtZaGdsYu18ViFK3WiNFaAgvSJZKV4At9IO\r\n6PmsBeNOu4IaReKbACtdE94KTKzjUOOOrIXGPjVBlJzW1eJAGSkNNp0EuiSt\r\ngBOwrdtgQPfCReFLxVtYvcGJO5QZQziXa7o=\r\n=xtVw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ccf0ed3e8eaadf1526fd10979e8c00e79b228f5f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.110fafa17.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.110fafa17.0_1658303162514_0.7342125543690634","host":"s3://npm-registry-packages"}},"15.0.0-canary.386ef1d2f.0":{"name":"@material/auto-init","version":"15.0.0-canary.386ef1d2f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.386ef1d2f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"92f20c43bbc5abe1821b2888ecfa3175239ad27c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.386ef1d2f.0.tgz","fileCount":13,"integrity":"sha512-p883EM3UL38tS29FQoxFX+7KSQC+vMjm2a2VrBRQQonHpDNIXwyXfLIX0YiW9eXrxP3LRDU6swIMCkh/qlQgOw==","signatures":[{"sig":"MEYCIQD2qtW9CudFp4XClK8zALbgQJhqmq4SWdOr/xDVOarirQIhAIVCw1VUHejqn4pIm9NraQ/lYDBmBCfPWYcH/p/A6QTN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2EccACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJaRAAkWurkVTJnOKWJtk2+83yadKm6u/O5nzHzoh7ADV1OAj9ZyXY\r\nhnSyB4D3U9/Zg4868NFof1yh6S/3fddNcxHXaF1xlgUzwS7xsB2vssccOxxV\r\nYli1OYOooYphmS9xISxTNVLZ3/ZlXebz+q0yhkUQfj5aXSb0h9Y0iQRZmn/t\r\nety676KaPKtRt/dsyynGm3A6350afHqLhqS6k86TZDUgSsSRohOYSPpZXMKG\r\n/c1ximy//of9scG6hp64X/dx6aj1HIXPyMv28VtndzSNficlBrIPxxsPSUsN\r\nVWROOm6EJLvTVKelnKgZLzZMM5XkQQ0m21aYcoGOBWxTnLPF/ogAid0Yr7H/\r\nrTwSQQlyKOGSMWtCDbEMmDSHRy1AjNH5XroBYq6llPPoPnMGnaHEKZ3R13vv\r\n8/Nt4S5kjz9Rg3DnKxnmqEVw/OPO6yh8cSgQGiai3WtWhLYibqkCro2Y7rWh\r\ngJRO7UB9JR3YozqoBCAenWhSSz/RRCfJUpf5Ml9TWCE+vgTtT6M3cUKJ05MN\r\nTuBYwvr+vbg5d21vVUxajlrs7Yp4iqWI8Zb1gnkZ4qbs9arO6zJ2bW8ZlXc8\r\nq6P0FkkoBasZF+Cvs/IxscGmRTQO9UhhSrMveWJ7qQtCSe8DhKAzuMKZ1qMO\r\ng6BghbjHn2m9rT5BhLuuC7DOoExAtI3D7/c=\r\n=gCbU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f81dc27b99348c90268023c46429639f145ca534","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.386ef1d2f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.386ef1d2f.0_1658341148307_0.40932157928726753","host":"s3://npm-registry-packages"}},"15.0.0-canary.c3924efef.0":{"name":"@material/auto-init","version":"15.0.0-canary.c3924efef.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c3924efef.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"16bd994cf65f2d84ebc839e32907e3d2eeb5fdee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c3924efef.0.tgz","fileCount":13,"integrity":"sha512-QNso0+rxSy2WAP/Ymk3U+1Ib2ZcZPyE30MOJrLYH+V88kLU3Y3Z7jVbu5L978/psMNkZ7jsQFnlE62Xf1p9cxA==","signatures":[{"sig":"MEUCIAQZNlIaZANu3VA1PIs0e65Fsg6GJ9vTIavRZU1Jw7WOAiEAr90bHjeQuvQzM/H4HxWixaRNp7z7n9FOw4uU1qA+IdQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2ElLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUnw/+NEzdc4zsyIrwoxTGaRsJHETlwy4+Z8qPQXTHrWJ+5Dm6ODo9\r\n/grG9qSEx+IB5kGv2d2PbtF84MqjaZHb961Av7NNqncfzRRHNGqk1zJFknSk\r\n4mlXuiLs6Xm8LKM+F425MNPr0KYzZPsYVcfoFTSzHa6VavOCCNkfzz+5nrDS\r\nnI1/2ZA6jiZrmmQyN1uceVAO4OcVvcz67SDGR2RTRHXvBJeARaRV0f6NNa44\r\n9MwWjHr3Sr2QElVmm1bXWmdsSdP2JKW8V9y/k4llukTzCLDDteUx3Us+VEhM\r\naoGVOTid0Q1ZF+av93V43wxxuVz6zUgAM6S81ZPxKbGs9ZA2+0yCXdyF/hlV\r\nuszFNBAvU2U9zrtiGrJZXBHQaGmJDcu29L4uN8nlwT894fvNzh/FzzvYBKiy\r\nBmnHlE2VvzwLF0DQxU0LtUEd7M9+D20gKYz8dafQKPPzlFEkC4xHljET4DLV\r\nsuSwfmchl5fUhe5QdFke4sbXaX0yl4KxmAm/Bli7zK/TY86mhzl5WUMLekxT\r\nlayXWimXuVMvUJOFBVkEh+R3EedXTQWkMsAf4z5h73p+MW3ojz+2AG1RmCRR\r\nqjNCoQ4WPiQF5V8Jj3/NkNnZnWuIxjkARRWZr+JmZDnaKtFBtxcQ0i3VJThW\r\n0SmP7fXa1nLs0sdpQe9naAKBWK49HYdU5Eg=\r\n=NOXH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f665d9454e06d217296aa1a2064c9c67d3fe2759","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c3924efef.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c3924efef.0_1658341707733_0.8159451203993173","host":"s3://npm-registry-packages"}},"15.0.0-canary.cf5c5907c.0":{"name":"@material/auto-init","version":"15.0.0-canary.cf5c5907c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cf5c5907c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8e885f37bf9e3f53d36c4ad989e8a60926a3a54a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cf5c5907c.0.tgz","fileCount":13,"integrity":"sha512-3j9YWt3FLoHT6QUlq+69VTsJd5k6Q3G/7UEIR0zzKURS/kdpR5JLRKoicPmgC34Lu8+eHoB10V1GBo5wxHPnjA==","signatures":[{"sig":"MEYCIQD4dHN86PA5eXLoF2Rb5Qvi50N+xAUoIMhU2ARYksZICAIhALlOJ9BysAlkTPZ6TwAUaYvDMSZqa6ymFmjR44xOpGvx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2HHJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVsw/+ONRsV8N9KKhnlKj1LsAgLXCQ3Lbp1Sqj2RKOiepHFFMhfLBf\r\nkYpS0I5nx2TJk4yL4tNCzwMPVJD/iUbvRHnwOlfUB67/Czi58hklOF6o+0WV\r\nNCNYmUI9t55vIQfuIKSIuqaraW5zpzPj/b1lnpNrGn2ujMv0hi1j3KIZyix3\r\nC2Rw8d1WV6cwnwdoXDx2j7YTR7d4ca4qDLk2bCEWUENjkxfJxZ/J1ES1XSAo\r\n9+ujp+wAP4JcMetPDND1HVe0l/CfNJyv7Cw8FrrWf5h0tyR8iS+PW4lsQxD7\r\n9GP7OC2dY36tunfUA6PwsSM9NEsijYBIrCTG0cx8ZbNG8ttH8+99g/C6qFVD\r\nV9qpfOYC3tyBNy3MTAvzvLkH4XP1GOay0fP3O1DBcGXnoRupk9lVVRIKz1Hu\r\nCTLouvJ5SUqo4xRG+weXNE9u31+IO7q6ApiO98ddpGqca5iwGrMXtmfaEwm4\r\n2tf6V/zilrEHKv0OdUZUT8WoRRTV4e6O4MufFEgvaE3yAKg2HM7EwtD8/HoP\r\nHdaMZ8vrowMgdasZtZOLzdbGUW8a1ONgpiRbSl3OmNKRNN/TTb0UqyahESjR\r\nIY9VE367hpXl0soa1Nf4vlWrrFx52P01N7wAT2tOwjx2c6Ff22r+85qfmdAQ\r\n3CFo+kGZD3N8VtsyWnRh5jms6inWVLjX2dg=\r\n=bAE6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff18947542e40ce8532c2ad78551ff4e74f9d647","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cf5c5907c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cf5c5907c.0_1658352073311_0.9111893976899825","host":"s3://npm-registry-packages"}},"15.0.0-canary.0617e2319.0":{"name":"@material/auto-init","version":"15.0.0-canary.0617e2319.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0617e2319.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"63f08db42933c6ac007b3fb0edb8bdd15fd15083","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0617e2319.0.tgz","fileCount":13,"integrity":"sha512-HkWY0DxhzDUO/Uy7jz2HTaw/Ykkg9KnWDPl3u0QBJb4wlcxLoZwjmege3nwZ3iK33g09GjQzeB8XzTZ05ekpAA==","signatures":[{"sig":"MEUCICry0slTyqXDQEXvOS4HebNy1GDsug/Q7YPO4HLpc5KAAiEAmsMgAetbdSTOiveAx/Vj655qH6fGr8Q5nCKVwWOu0SY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2HYKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp78A//dN5WiUK69Vg4Eujq/+IxT8jVoKns2j4S5TCQ00aaCvRQgLeZ\r\n20Bs23R8zn1zxi33mn2a7MNXwXu68s/bXAqmn9Rs+ibKWf3rlocl4YmdXt7o\r\niU6TMpcR3wsSDvdw2Ahg27qIkcMwPbtzWep3WV2gDC7xttZsO3VgTTALxLGI\r\nLh0ku22OcczQAcX2smnLRq5zDRKbnJAHO9wCw6jSYYLfFEY18AJ8m2lS9MNM\r\ng0P27hfdmdV7x1pLyZYUjGU8bbZIKlQBZbLkeeKJby5sKvBVb4WZhZxT1KEY\r\nFUF1AJq+xozjTN/Nbb2HSCjZUnw/cjx1ZwgGH/A4Qz3y8r7ajz62bGrdBGg+\r\n0gWmgrHjSbynGmALb4yly53XTFxN0kb/aYHql+MmlYOSOcOMAo90AwSdSZDV\r\n76pxJwQBVygq8x4X80Ki3rDimLlMFcg98TRxSkQTmYOfml8tEQDpXTWnA5bO\r\nA1aEyMWyFPFTdYhuOFfz6olGvSiMAw3MrNsI60qMmlX8aKrvdHH1vT9uJju0\r\nsK1aXQuoAnDGqoh6M0ZJmx5t9G3wRfPNV7snD8ZcesYmVG858JfuQKyxOduo\r\n8q21F6JbPDCSEpVdInDTHAR9sDm4N14ZGjL1I9hNGlCcsnuMTW04NJ2pqtT8\r\noWvp67+yzedlR8/Rb1H0BZvDAxJD8qQmW7M=\r\n=hRpO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4d6efed0d00cc69adede24744dc368da0b2c897","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0617e2319.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0617e2319.0_1658353162155_0.18269818160682583","host":"s3://npm-registry-packages"}},"15.0.0-canary.a743b7967.0":{"name":"@material/auto-init","version":"15.0.0-canary.a743b7967.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a743b7967.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d7a1a34d298bba42699380a42b3dcfd360cf549","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a743b7967.0.tgz","fileCount":13,"integrity":"sha512-59DPGFkMdL+J0OCTqxrGfvLDJRQ8HrkOJk1BFFMwyY9ilSXCIXFZmBWpDjjlsocXn49//4WSTaeyRIkiGjkK6g==","signatures":[{"sig":"MEQCIFMHoC9MRtOI6HLxUQqCPDDuAUAx0pNzvHdoo0FLqMAIAiBbTmpbeEapSZC1o6v7ZfJ9MT889urH+E3o/6MsLrkmUg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2HoOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfHhAAnHvvmGwRZRNBTvs4WfTmBdiIxNBuH9jtDElUwgc9GoNTTrtc\r\nsct6ecDxmsgtNl0iLbMtQWujEg0ULhF7zCfjl1jsjcBSe7rXHDY0Oh7sSHKV\r\nUDLw9mzpW6b67F4f+EBjSguSy17wotDVACwvsMn6mq79RPdyv/Y8Pb6SNevK\r\nWWktFXjpxpx93qiwbQo9wztpLR1fVvn+xAbmUBLNVo0Jrx3Foi8RHtZ9apUn\r\nkSgl3sRWHi0WQN44EbTNAB3qMzU7noHS8cdJTFB2fVPniTA6YIPqTVjjh4uU\r\nbNxRbBdfsMVmCFr9b/gNMhKcARrlSrY6ESOYXO8ke07ckpC1/zY/oTvGf03E\r\nofrNIsi/8dT6RWdt3X4jXXj2kuCoq6A4ttswt/vy27AEma9YwDOi64KAe2NZ\r\nlai01qNkYhmNynICzgWvx3eHRfvxydIfcLAGGZUEVFANChuUnxb0qvpVzGlM\r\ntRbMEGE2bQ3yv0gaopgOd4uFTx9nZk2S1Tncz06cJu7yeoWtNJ3y1Olt6DNO\r\noasnfCZquJO2KfUshxD/gUfp7IeCVOL5Z0l1nDfvKV86c2EQGRaigvRQGrvw\r\nx+JbNz9XB8JIHy3AJP/LSyv2cMiqxS0IKhOwuxWNs07lEsDfmgxmTVTd5VyC\r\nFdM4QjqA0DQGTISxsQj9ssheaUT8qbcWWSk=\r\n=DdVs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6fe7cdad71b01dac35a3d815662020bebbe50e23","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a743b7967.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a743b7967.0_1658354190292_0.6310229321723664","host":"s3://npm-registry-packages"}},"15.0.0-canary.69fd619d0.0":{"name":"@material/auto-init","version":"15.0.0-canary.69fd619d0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.69fd619d0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e65add072bc254da64edf4508c5ddcb57701335e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.69fd619d0.0.tgz","fileCount":13,"integrity":"sha512-w9APg9Bd1j4zOFH94+GEwM/Ub92syngXC+oC6pBo8hcP9iSsntFYARj6Umokk1uYBBI24UPv70cOTSH6YWKfUA==","signatures":[{"sig":"MEUCIQCraJpYaTGGLX35QMyEQ6GQk6Vd6ffbNO17sN5jxuR8gAIgWsPWQ+k+fEE1J9udAckhe9jxZ2i7IqFjQBAW33W8c90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2HzVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmppqg//V1yGJIPLy0kzMZlomqcHEPcOcC48DKNoz5JYsfhEb8fmGOdc\r\nxiF95mfTeZcjaalDvEsxjMb/Gv+umVeLxY5MSxAEOoUHP/mk1ZIJLmxukFVc\r\nA4OPPqg51QxcOChkbdTN/ukcC+tyHTUEuUdWaW1W6PtooUeMskCMZr5SMOOu\r\nEYbpVw2I5jYhYByv4PO5an+YSXm0ErHGoYRQaquTCNj4C958xr/mCG5a5MUD\r\nXRwIfpQtdyw1vgn/9766i+DmSgWSHy2bz/kdN+YRqk+ShWeUHwOSkr7m5LcM\r\nihBG+fWJ5110rfvmZ36wf1zWkvBPu5Na+QI4n3Oy//7dLwyZUUh4UEKRxkQi\r\nCEvXuDQVzzC64SM86ng88fDjrdU833jPZvxhClCtKzreOW0dMYGqO0gmdwo/\r\n4+4/whIyqGA33O6sI4ZeVr4BWfd9nG9lQN6/5HmB85f9LVaxGOzNheJO9tVO\r\n7FjJzFBuLEQIoWKkKhPKKvtKPgneONE12i5RefZL0Iap5PY6sGJl4PGk4Ehe\r\nvnvS2RyalgdNr8n+gWwL71RMlGPK0YpcdlqV/ozzNtlQIbz/jXBBO6zjDMso\r\nzSTKF+xr6p/RJAS3R7wHSmP0Z2K4tNFf4xQrVWRY0YweawbxOQxPcjZVGYyd\r\ngmf0rEgt1tXWF6IlKOIH6nEAB4fOdQofueo=\r\n=dNfI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8982644a21769a71fcdbd9d8a35d87f00bf73b3c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.69fd619d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.69fd619d0.0_1658354901760_0.6370067778929731","host":"s3://npm-registry-packages"}},"15.0.0-canary.2a6ddc1cf.0":{"name":"@material/auto-init","version":"15.0.0-canary.2a6ddc1cf.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2a6ddc1cf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ee8c3d63fd90ad3d1ad8c81a9eb873480300e638","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2a6ddc1cf.0.tgz","fileCount":13,"integrity":"sha512-gpkA8s/YWk5s44H8q6ZOZmtfGSvXEd5B1DeQASRNX5/q4Ms3Xdu40vHOfrMoy8m+1Vl0DlCPRpqeG3J32TEvsw==","signatures":[{"sig":"MEUCIQDHn3+n96ik08FQW9Hkj8d1VnZSti/RRAlY7jFKl3f/fAIgXPUksr0YurH+wXwduZENhIPeC/QifoxCCrD2pmlmP7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5ATtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSRA/9Es1B/1slqPhcz1VHI6o409LJr7tjugcZADNWpxatE4GrBEkL\r\nXDGLWMyEwUDfqO9dc+Y1BgMr2jhSz/qAoRV6adZXCSQBUndhyeQEiQdJ6xyt\r\nuT+84ZK7NjVUNCqdC1/hxCnv1b5/bwcIritHL/+tD2vvU/dm3kXZ5tfEQxzF\r\nmosPbI+mgs59bobdmAFFYQgi0o5efwDxFCulbdZHVKjN037j4asWikqvshR1\r\nCnZwoZdeN5+bTjxV0miUjkvdcRg6O7Gbxl99ZUybKDb1d4kXDyqoKaJOf8hg\r\nFJ7f5ww0ZuAbj+JwCiuHWu6PM1rX/y8S+pVb2DKD9PNIT4hWBVgz1cSDkymt\r\n6UbPQk6PnKoTMtn6L06w5W54oSLNWYWoKhAA6WYDz1kwJttnwpnKWSc5w93O\r\ntqFf88rVfhDrW5+tnltt8gNOKiQt7D2qm7pyEo0GhsSNo7mG0y8bR1sLDVYK\r\nbS/TTC2AkopO72Bs5MjUkJg4UdTqqJp31URx+ij9d/Ntnm5hTD1O5YHEXbU4\r\nykdTXdo/dfROCk+voI4bP35h8717EJHMxHrhhPr+yeVsGgUTjr6brptC69/F\r\nUqZvqeIQLQKwbqiyNQMbvlQSSBojys37jiZL4DDsvH/h5+MXQbHxBD/+v5QS\r\nlFU98NpaX9/HMGapVehLlinFHz6DzdjnGcI=\r\n=HaLY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0e951ea9d38f3d449f24bd1d8ecb0fa70c0da462","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2a6ddc1cf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2a6ddc1cf.0_1659110637199_0.531527046190019","host":"s3://npm-registry-packages"}},"15.0.0-canary.86efd56f6.0":{"name":"@material/auto-init","version":"15.0.0-canary.86efd56f6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.86efd56f6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f506c2b96606da24e79ebd53ccd39c06d3c8fc56","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.86efd56f6.0.tgz","fileCount":13,"integrity":"sha512-i+QSWKuoA6zTd2iIFf7AyZXt1F3ugDUaH84VFns8irFFoIjeE/zHn0AoDWYALDfK0+oL92IZVxWYFqwnk4ldZw==","signatures":[{"sig":"MEYCIQCajcR0boGD7rIdlG7Dir0hBg2gFn/7jllepN3lysBlQgIhAL1AFWf7ltgO+I6DWrDJ4yAUlWEuBctxvEm6C/X22qI2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6ThmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsTA//XOnQZiIgOS0AzIY+AjPUAbLviWHEXkoPXCvdBXpu8W9GISSl\r\nyPlTdutmzd+2CXu/Tvlpux5B5Z/NDGRibB1npcHaiTz4hIivUD5y+/SMGvu+\r\nYLwiB7TE7m8Dhb6DG5mbeMJbb0ZK3fIU/+jGx1I38WWLV8CKxRc6RbYLw4Gg\r\nPzHL9+4Jd5frXPHDcS/E9VMSbvirm889RUnyiZKIxlT2EBBkzRUGID35h1w1\r\nEzxA5Ue7DgCY/FBFPKJMUw7bQRyXo+GGP92O+NX4e171puJxXdyRIlxbwY/1\r\nP8PMNvj5dAUgrUczhtnrZORUJQK68ucw1ivxLDOfeMId1x+Cf5hs40yyjXCv\r\nVT/1mU0i6frI596/cmN4MRa811QCHSpDm5G3zp7T1i1GZYMrDUVrgwPxkiKU\r\nTGj6XCk63sAegcFIjB6En0583PcR6i61VWCZujE+7v9X9BHQWtuZp4wl9/Av\r\nd6tcrz6E+b7gvd2gDT9aVWmbDSjdFzDlPI8Cb6PezrxXZ5OYU6482NcRErPh\r\nQUgbhN03KNttxE10Caf7bX2uvZgIk818M6bCGfshi/6Tng4S3OvRKSNeAUg9\r\nxnfKhudWVHm8JcxA8n+6bN69FB5xn3tix2w0Y80pqUg1JDYPeAiDRYQ8LVol\r\nvfk0nU9U7iQkEkEFUwCjePkvXj+2AXnTgZg=\r\n=KHiR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4781ca009f9a9b59c7dfff5df2d23bb14b9de2f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.86efd56f6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.86efd56f6.0_1659451494293_0.3939937697958471","host":"s3://npm-registry-packages"}},"15.0.0-canary.ccfc24d19.0":{"name":"@material/auto-init","version":"15.0.0-canary.ccfc24d19.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ccfc24d19.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5156251e40f2679523b9fa025837cb23de28794b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ccfc24d19.0.tgz","fileCount":13,"integrity":"sha512-oOpA6L8nO1pGR03u9NpYqg4AAdlVf9VNKCWJHBJ6c9FJVDbhz8nXhjwGhJQfmgP689DGgLlk3UpDQ3QsBKbUDQ==","signatures":[{"sig":"MEYCIQDxm3cuBk5IjnYYbWMYYXmrrSoBzqoG1sq+UxiQ8z3IxgIhAKVH/JA5mnMfDH6TlUbDfjGsZJB5W9MWt69OlJ1hPDVt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6rqZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTXA//dkwpMM+pM9Q82ByHjbEAW5XGUxWA8IYr2YAbOgt3G5yxHza/\r\nYsGsNB1cu1AvSt2A5BMfHQHgxlcZnTko2NF4S80DBR5eeUiV57dKHE2kQRCf\r\nA8RIUuI2MIk9gAWLF6UxYIuHTLlpLJNS24nRrV2acImnAQvUh4AB31k62Yqf\r\nwZrenP8lE+OBFp/l6v2Og6WwFyEH1ckcnRkAW91kzsyw4uPNsroPBD85+x2Y\r\nZ1OAwhKIBLhrDChRFM2HPBbx1X99hMm/aO6pGOOg6Q80sGm0HbzT4IBemf+Q\r\n2WHSeh1wT3Q9JmapsLQELmqs6x9YmGCDxa6CWnS3fXO4KeYL5EDtXPw37pl1\r\nfFFkGZSj1Yl0b32A9qxmHxjumEOjVIUsH3Zcf3f6UUUj9lNEt5B59+TnudfP\r\nsnbUxA7hiWK0LTJStQ7WZihGVNapMC+d09McZYXsc3lH7TxR8aYJjcU4HLMD\r\njr6cEHGJvH8Gw53LRH42aMW1UAwfmgyJlOyxUe5alT9CedUnsTC+YdD5zUH8\r\nR/OF1MmgvCaq8Rx+v3RIpDoXFszSI10D/FgTSeAtyiHZUT5qPSNv9Mqb09Wx\r\nFdFo1hVD4aC4zsyOOto9UdYk0Oq5eBljVs01xQQny4jERgWZgzcmqrNBTVvo\r\nKun5Br16aOFNLFUy4WMFyBsICfE54ZOhUoY=\r\n=4+H7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f790058ff0b4b30289ee965102aae1ca19654ddb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ccfc24d19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ccfc24d19.0_1659550361324_0.34529408590572297","host":"s3://npm-registry-packages"}},"15.0.0-canary.e4570146f.0":{"name":"@material/auto-init","version":"15.0.0-canary.e4570146f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e4570146f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5bbcb8b4cf99aa55887f73d6cbae3b8b74916bbf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e4570146f.0.tgz","fileCount":13,"integrity":"sha512-0m8J7NpMzwPdt2uePY5a+lEC7AUqfDbecdmKqZiaalbg00vQO4HpYHYsd6JtjiKjYF1dYUIIcU0zVyIZFCxeyw==","signatures":[{"sig":"MEUCIAVxNgn/yI6R0NvkWv6GKzTIxYO79GHIJwkcHC2sO+LtAiEAqCg4KyNS+4hWkGIb8zTxQjuhd+MBl1z5EbAciLWoP4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6sD/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2+Q//aD3B6fv5WfQuk6heVg9D0sowluF+uQFS/pQB0TbHrP5Cz+Ce\r\ni+VCi157ATNWkmOK+pKw/mrs9KUbBnUjXItdT1Ov2ryq696yyDBE/o+luQ2v\r\nzrxRrNv6yNRrIjrx7XKhH3ON8QeX2LMIVBhSPV4gn9recBd/KJW2uZvzx9XM\r\nA1qgC8swf4ICjVoMDUbWxJwWNhkWLstVzceMQG88zzBuO/3svIoaYz8IOhL6\r\nMU4aM+xPGepVLJdP6RnsmwkLCUlX0GjK+5j/WPJvuFSNAWyomFcs8EmA+PJO\r\nHEyusSddmmFIkOthoJoygm8SNXCDbV6le+UA7UfvdBLS/ycS6RraCTDLYwY2\r\n6qnKwUk96cVD2Uui46A+2emvbuI17BN9olQsKfKAXUMQCfz1uEuP8VzDuK9q\r\np73xMdFqh0/k7ciAyjY0o0Lu5/wA/Q9wCqfdWah6K/lk6hfGJs63H+tJzWPj\r\nKl4ATfkL69MaFuq/lPm/b346f1HfiyQHRjMxppE5yKJtWwVUoTcKHly0tRuM\r\nVv+W4IU5o9yJ33QZeQF6d1SK7twkqwyXomTH94aH7ZhKya184VQrgn/z3daF\r\nnPA44uKFpC0Qg+nXwka6YNes/HqV5jKdeV/fN95twisCqaHzcxbnMkpYKKaX\r\nom+uFNp2MeE9QFaEYy9lRMtRGYxuvFFDiFU=\r\n=F5Yc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e80d690ce0a868398025065053615e866dc51ada","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e4570146f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e4570146f.0_1659551999625_0.4710792787164053","host":"s3://npm-registry-packages"}},"15.0.0-canary.6683a36cb.0":{"name":"@material/auto-init","version":"15.0.0-canary.6683a36cb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6683a36cb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b7eb5ecf1b66b716201ac337b3a3d9edaa32bfa2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6683a36cb.0.tgz","fileCount":13,"integrity":"sha512-GAm7X9ff7DpaMJ+MhbWD0M4H0HdJxNBaOaycUPdw3DYERuBC7aaY3dy/YmSZwS24b/e5aaMN5waUHd+W0G909A==","signatures":[{"sig":"MEUCICJjKtxqT/Vh5dEcFcqhYBPx9dpjKrWKAzb5YmyJsLSgAiEApxogEWMGLzneuRcD4shwzxfOqjRatzObDEb6NVaw3R8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6spdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmosag//YkFoukiiNqTlKqDkB0ENe+Q6IKeyuZNHDdMSbmH0ZK4q9mAs\r\nUrdJy7iGoUIpq0hcZx4Jnl4kcTh1F5YzDMfarVbKfMym+5aoIemzUe7zBlLC\r\nwGkLo5BdPpHbrrmq+pIczw0eR8jhJrOJgfJPQx3E0KTe9mCeaVzntzriSiKn\r\n4bfT9rec8EskgTrYl0ZJzb6V1prWOEP2uedT3ZjpGPb0gpv18XvaGl5tiLoz\r\n5YmQtqpo1naZegOqnUtvgeOC2T/VxXLTN3h3jqZ/yNMjFhizth0VJV1QdHSA\r\nXHB833syhMD36KsOTs2b83RwQAqTjUfiwC1kbkkGe8Q+3Tb37Wo8Fbb8lBGL\r\n0vJECYWjUukgQLaMyxjRa/jRWjM5CcIqWpaN9UckXamDO4nWdv1Co2vZO+y4\r\n6P3mJB4lVU0uQHEdqHbK7tPYoSMkoVGhT2mX19xsv58aGlKLMRUte4k+1o7i\r\nPdOko9tvOcYMthavTL7BwegviqdjZe8iC8elXtvc/AJ7mFRaWwBxMfiSH+Z+\r\nMXaRgoM6MAUVoOOu7AXiuk5kwzqtXKsW5u0IORBXn1yf2ipcsElm81ioiZ3+\r\nqy7gTGMoV1vvsbaTaWwPJtn9Q2i4BulQU7B85E1Cta95bsLuiqFt88Z7cS1V\r\nCtpfZ8Xix4QkVr1gBGXjRPVgmEmC3mvsPR4=\r\n=IjCO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8feb0b9a8c5151a18a06d282cce87d861ea12e5d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6683a36cb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6683a36cb.0_1659554397281_0.43749082110367166","host":"s3://npm-registry-packages"}},"15.0.0-canary.10196647d.0":{"name":"@material/auto-init","version":"15.0.0-canary.10196647d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.10196647d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f4bd4b80372ff665ae8d04c34103afc1aa49f7d7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.10196647d.0.tgz","fileCount":13,"integrity":"sha512-U6X+I7GlJMxnd+zwCKGTjG6DEs6TcQWPQG8Wc8mt0jidhPy43+L1aCJIVCMLmAdytxKwrZpUeLjDj1amrFHW6w==","signatures":[{"sig":"MEYCIQCVDG+AeWbQUwszvqJnmJ86U6HgFcG0I5NDX2WNwI3dzgIhAJK8xYnz44YaM7WsOc+/BhvJ8Dqc3PTNvmrknF+yd1PQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6u5CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmob2BAAnv7tk9YerPkOnL/bjN4wCSimdd/P0bSH+TEsNL9L9K0s4MCv\r\nNjpKhKxHQLrec5/9m00rg4Yi3MN4+VOYIzM/cae3dftjw8OOjWQO6dMd/Ort\r\nXMT1Ggu2h1ObKEQryBUbNKBMqzQq1zF7bsDdjE285MeYiCeDNq4teqb+a0Ap\r\nKKVrI6m6h3AxPVZpQcl5B2dN8Nbl+KBYhsZ91R731pU3tP8TabLtmag677cm\r\nRnhuifb7yamNkPdK8uk6FOEMPN4KW0jDTTZ3B4IkX8XJzVq7ucGe50BvrCzu\r\nl3SDdK/KA4UkYzK2tvZDNh5h0vnMDSpjKVg4c5mpyyHHdIO2VYo0UenNGwic\r\ngQXCRXAFwP5iY2v/oesluJkCsqZtwDjbzYvCaHOSB6sbahb4F5qNBAZQ6zKt\r\nLmErP8m2uH5jpKI34zWrrYY/Wj+Dz0QpTOzqWa+6bLwArBL6LLS5ue9IU2xL\r\n0+raAzDw+/8YTcqggVyDEZl3cvbEKz68QbluUqz3thXjRFRWjOGDCE07N67V\r\ngf2glXDE4dpueAIqRlyWd5EJ0P2PHSSajjlM9kPU9pC9tp2R0C3adHfVks4N\r\nurXJ5jFq1TZT3s6aNVU1E2+61FXepqF7V9SNGhjQG4tNPKQdN5c7GfVcIyX9\r\nyDJ2u48rFcNj1DUC9Ig0/geGM4Z0cPF8wkY=\r\n=Si5n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a708dfc09b3443c565ce80a676b159abcec1339","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.10196647d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.10196647d.0_1659563586068_0.6506815956662013","host":"s3://npm-registry-packages"}},"15.0.0-canary.b20d3d73c.0":{"name":"@material/auto-init","version":"15.0.0-canary.b20d3d73c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b20d3d73c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b554578f8bad7a6109207bc5478b64aec92c3e71","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b20d3d73c.0.tgz","fileCount":13,"integrity":"sha512-J3Tje/hyxnuVsL7L6w59a+Fp6Moh8Fyb562A3l21lTV02OjqkygrLu8c4VWwiVHmH5jgJz+ZQ9WQZIahwchYhg==","signatures":[{"sig":"MEUCIHhIYztPI9IsHGGyKdlYr0Iyt/dhOuCd7P5nrtstXuwsAiEA3mSfYSqNwbH2DupnwweTUTHpIv1ntrBMghCt3we+obM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7EtAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrqbw/+KKx38YuO1aj9VqrTsgDEXq9sZbNoBjORUPP6jE0QzlE3u2oX\r\nPpYbpk4K3RgSCC5qNk555JvoJZAycXiQAoYWMheeXSzNuHS8u4CK+OZsY4xY\r\nP23Pqd+xwjtHDlk6u0u28PIm1hryd8ZgxbXhaBRqtSabQuoDG6PHqECDQcqf\r\n80SeDft7R0xNi/oRjx1KpGE4TTCu9jiLoZh7JwbQylOpy8Z69JFCbhKp6UXO\r\nCk8A5PkeHrkUJeQvFAqO2FL8Yyrd4qtwCngmiRHMZsBYCCqFsWBJ1Ba7bV61\r\nNBqDh+ee2S9+zBv/yTkRpLdT3PxMK0kI58JJNbZuAhY15LGnpjH8dNhYB7/P\r\nsG73dj8MxxIsOoHvWITvSAxTq3AyP+5e6kXaiC3DHqiZnOw1S3Zm7H+IAP0w\r\nfWUs9yy4vVzkif8zO7/vYBVyz7sTRyihtFRAHnnB4dxXhsiCoa0IIxs5pmNL\r\nQtvA9od+Cse3PwbeA2q88f8ieylt3fWe+GRJZLECVb+Lo5cgNmm6RzdVslrM\r\nK9UawBZUYzCk0JfLPTk+WHnKT0skBk8wtwSqOLpxwFUOiVED+TpDZSDpne3F\r\n4smw2FiBgTVEroCHKC1E5UyJ15in0YgTz9ZpP5tz2ldrw04KgBBYXVexjbOz\r\nrZ+FHYUplCJfP29M8Sv1hhNcqqMhSFTrwmM=\r\n=DFBC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c869b5a3ceaada6bf2ec164c65f1e4fd88a0e7ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b20d3d73c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b20d3d73c.0_1659652927808_0.7374987733486305","host":"s3://npm-registry-packages"}},"15.0.0-canary.47c0c6b1e.0":{"name":"@material/auto-init","version":"15.0.0-canary.47c0c6b1e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.47c0c6b1e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e23fb772c40ae65ff01678a7b702e515dcb4f62e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.47c0c6b1e.0.tgz","fileCount":13,"integrity":"sha512-8z8+MzpecZup9leUtRdVGrUzQzv+1BlXql4Vex55RPAQdUCCAIdlccCkDa+AarzPQbuQdshQlndZRVnR84z59g==","signatures":[{"sig":"MEUCIQCuuny1dvsqKhCWZwV62eh0Xd9E0p/wWrDwiWLOFe4zvgIgMbALCcxfdoJ7xRFt5AUw5hwy8BTw1+Hz3cEqV4iWMDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8nsMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhUxAAivv1Q0tYa9x/7CqKnjSFaowbY0X3RhllHrua2EBh0w7xaUL1\r\nK/dD65n+aCTa9zuVJNe930c1Rij3+9ruhwvblKj7qFicjEKjcz99Hjrtentm\r\nMcj+LfdtHY+2PSrSuV5xbwNCGq4ra6EcOB4Naegq6T2cKb8bXc4LSG0mmcH4\r\nz8ZFDNUE3cq6Nt3y4/5+GEQi7XhnbozRxvx6cfuA4WFuAC7yX7mIZxP/mIEV\r\nI+Gqfgm2A3A/2SElPnm5QJ9+Em/d8HyfXFrD26Cv5L0RgLHm9V4aiuQuthAt\r\nachbpUaqfm1iCzXzZRCe5EHuMoUcg8EU+t37a6cu1EblgqLDUEU4i63gcMBo\r\nDYMB8HEfN+38W/mBEIEEWDNA1Nbso+o6GVMwDNhHj8xN0UkLNeQTMQEawDuQ\r\nBtIfGV4Q9a88cZZynG38y7MTGjpKbhB46edK4Y1TtEwIYj0U6Ycf/po0zuOt\r\nPt73VDfMLUvH7/cfEK5xYxL5A4Tk5hJUfbP7O1G0eegmyuexsd2PWg06+ZSj\r\ngxjk+TBCrQaQuL5URrIyqLm6hzbm9KPlQw45fx7v+AwhTN6sBzow1bAKHjOz\r\nhjtjfieCjqUm+PdioQ9ZCMCm6ihJdSDnpPNj3O/miPOTZ79d4kpa6+Ws2OKg\r\nGFHuv4M/VaZ3FlKju2cv+nVqj8UPyBHoPSs=\r\n=7Sqo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"692955bb2bb9c99ddd9321606e40fe4a56de120e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.47c0c6b1e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.47c0c6b1e.0_1660058380620_0.043275342360442615","host":"s3://npm-registry-packages"}},"15.0.0-canary.0e3dc8e38.0":{"name":"@material/auto-init","version":"15.0.0-canary.0e3dc8e38.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0e3dc8e38.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e1fbd604028675e9883f32a1928cb0ca506e6529","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0e3dc8e38.0.tgz","fileCount":13,"integrity":"sha512-9ggMOsmzM2xaE0rqz26BW9AEjqLTZF7K+WcaeZ2dkSnkppm+9hm9bNJm79hEIUGyymg7TiiQf49GIkAucvzzzQ==","signatures":[{"sig":"MEQCIBr+xJj0l8eIcf4iCtb5wITc06V6+c/TuHwStirHJlYbAiB3++fjQJh9pPfsaZ+i3MbgKMjFmA3pGcAeUUbQMRbZpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9U46ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEOA/+IJvl49xEGT8IrMrnRWh/hn0qas+A3NqW0Zxl5AQ3xZqJbpC8\r\n7bPKla9QQBgW94IRuc5R17MwRJBUVOXI9Q4dlok14gRIghnGmIZB96DI84LL\r\nYhfsGLBSn3CakyZlu47PMdz1Zlm2uO8Jsxn3pp/H1T1cgxH9zr50CnniP/Pi\r\n2lMfgTSgDuJ2iLLDaswQWNBFuKVb3COtNjLE216ovb3s+EdyiGuFtUrkfwQi\r\nGhoAyvaSytwCy8SBDunoCD7NmVFFQIyn9VBH2nMZIfoXmt7VmchaFhlURNhg\r\nqLgae0E/QkQkDoq9ZuaBQeWVB/LYWymVsBE2u0nLo6VhZctutSD+UcgzRN/V\r\n4teGDLyN5L2+0Uaffkk65aqksntLghHs/W2EdVfoohkWTs0uRVHh+NhQCggJ\r\nWnvs5slMbVswW2tiSmZ5KrObqRPN9whIRN7BVa7cJ6nhQ69L1h+SHfU6I/J3\r\n8X8zjoTZbM0XJglX83APwyaKHLD8zwlFe0c8aX/qb5TZuCppofodKzQi9tiy\r\nMg7zYqLUI3bA+wlBlmCC32KxYgi5f2gaywNf6TBBH+TjJVKn/F3OzQNdyyi/\r\n3RRgo4JPDee2C+mPGshpFt7M8GqP1RWMXe15ybZQhIZSBVQkEEYbuotLOV2/\r\n2FIcHSzRV42QOxJZ4TcIxT5wD/DS1pL5hZw=\r\n=dZVe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"51983e03d07e3c1f50454770dc24ff8d6d6f97a1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0e3dc8e38.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0e3dc8e38.0_1660243514169_0.8760405653912138","host":"s3://npm-registry-packages"}},"15.0.0-canary.d5a11f1c8.0":{"name":"@material/auto-init","version":"15.0.0-canary.d5a11f1c8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d5a11f1c8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"555c18fbfdaccb690c8ccbf56d0d38247a8bb38b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d5a11f1c8.0.tgz","fileCount":13,"integrity":"sha512-p9UHf6jMHGnkhYBmdurJvXfNVIrMjce6c7lIEpidLWWg1ada80jeTejprjTnQLdsmeie1KGZKI8JxvPii7Rz0A==","signatures":[{"sig":"MEYCIQDuf5Un2Bdluy4buWgnh81Mp3Njfk9YGO1iSQlAqkDnogIhAPU3TA+VOt/9RUkq5FG259vc/7bE7wP0OgO4WQDONO97","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDpaUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCfQ/+J+oyF7fm9fwSt6sUa1SqSGuAYkQHComTz2FkK8A2zxHdlrRE\r\ncCD/U7A6A0QSS6XR9P3yie032OR7N32JZrCY/6xOV9243YDVrhfPqHraNT6c\r\nXvkSKOnd2DSkYZ0kOtC6kM8DNkQ4gU07WVHvtH7T0qsYe4pDgmauekIs0BPJ\r\npMw1zstVJMOC2fGNebSW3mWqZf4/QVDmPfAatLHShisdja/WozOIQzEFPJ6l\r\n8q6IPgvjj2aXCINudGytp/A51Hx4x8PAzFvXSCexBsNOFQtEoQTwvI2i4GFH\r\nTFt/j6N5O7jMx7TgZEBuVLchfF7+9MIRuBT2R2PonRXMg0Y77Gjl//hRtL/P\r\nTk8zCCjVfPm3agtDZNpDU/MFF/rKSl1EeeFMdaXxTHiD8UWBGmO4VH3je2MC\r\nOvz5NFY2XHzMVogG9eqb71uwZnbTvhZr9museHdd5ycAs0xMf0M/3eiyAxm3\r\nQcwjXFiYwZzaoAmt+pZU+AJJ7DMBfGYv+vw88i+KGvnlt7eeylTYgAkySN8b\r\n+DT31F8kgA14UkW4FW7AxEIhjgS/8hC6IyVnfwdmveWrQYvArFWNh8PVXTsl\r\nfGIpaMSp/n/gNrEXD10SPdT1g3lAD8DTRs9D7zQtVxfHoX5SwOQ8PF0gVCVq\r\naqKuAQvUelakkPq4gkK0hXNKaiotzkZbUbQ=\r\n=xDpU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ac71b54192751de3a5469d20cb2e1c30e544d30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d5a11f1c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d5a11f1c8.0_1661900436576_0.8680026965993721","host":"s3://npm-registry-packages"}},"15.0.0-canary.bac992a95.0":{"name":"@material/auto-init","version":"15.0.0-canary.bac992a95.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bac992a95.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bb941f22f601c47b9eb0839826307d9978f26136","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bac992a95.0.tgz","fileCount":13,"integrity":"sha512-GX1hFYreDd/3gSjDtFnf4m7S7NfYpib383CV920I2raCNDVEyjqY5QX+V10qNA+/MPrkPWV3Bdv4lxdrFznl7g==","signatures":[{"sig":"MEYCIQC/k2ixC4HQeOeVzhMjgemR/wEYTvDSdrKOy0TFtBu1xAIhAP5hRPWdQN4iuuwj1CG6HLILVu5ZhPwzSa3W+TJY8Pk1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEFmWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqB/Q//SLoUp5fd4Nlv8unnWVYgKdOrHnKYHXIRpWGdOvG2t4Oh3byP\r\ndjG01OfgD1Kg0P5jtsuN7U3aXHX5ma2PUHe+3eyycbQTAVOKz8NgFfVSi4fJ\r\n+K/g3yNKxxhOtbSr6MDiOelPQXeK4SA9JccJMdG4BMMAiJ4DMeHxrvne1iFc\r\nvTmZb3p2BWuqTS0dovkp3mvuJiMcqPkRIoK4TAe9fLWnhK5XSTR1bZ5KNdnX\r\nvZhCysLlX/j9xuxYozdM62ePGqtePBMz78Qah+7kZFuFifJz067aAz0/odG/\r\nAVPxl2he8mkX3vd2msEkBJ4sZ3p8YaiIRd1PFTBiA32dU2nvLAbjeypYEttt\r\n0CoJYl4b8tp4M5XY8/MrFbINFB9UfLH5Q//+p00yfKGrKGoaMAqxfPZ1nSBU\r\nseLAbrqt3ezf35yMlyhoYAtHaE6q8FPwlwcTZGwFD3BdqkMAtJva9cSO0G84\r\nijGZ7ntmecvL7RwpsUadTpMcdd1nZFSa2x5IqAOEp8Crp0V5AkLSSEjuaIE0\r\ngRwWfihIDSHJUGx8fo9ZHOcovIooqcsG7klanK/DrgoNE8f/Cubx0Fsrt99Z\r\nzGj6i71GZO5WjH7wx31ToiMhN9vZ6RlHdujBweJk76K+veDa2fmbJy7nfQYu\r\nGocCoS/0bArjvk2BE7bo0PDA3zLXn06khvY=\r\n=Ylai\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b8dc8f019b6b9a7241d55c21925faac495f9230b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bac992a95.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bac992a95.0_1662015894539_0.5019307436727676","host":"s3://npm-registry-packages"}},"15.0.0-canary.d25f3404c.0":{"name":"@material/auto-init","version":"15.0.0-canary.d25f3404c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d25f3404c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0a2647dea7f36be213b539b5f104c90c754bf2e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d25f3404c.0.tgz","fileCount":13,"integrity":"sha512-C/GREoZxxNTkmIzC4enXfcd8lwse3dXr7259Kvs87CyrArudpGZkwQkojvWE39/FZmG0SzNv1X8mC/7j+cn9Ig==","signatures":[{"sig":"MEYCIQDnB8myoqe3XJstPbCzddcj6GleA4qj0fFmr8yQgxqJKQIhANU7FcPCFsxQyU2bB5ikJYheqUmQcGvaATbwTsCOd7zu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEH7QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRDQ//cTVpcEB+yqAmqp86kHj/MTvLSR185YXyeKoj3i0aMQNV6QG8\r\nCY4uVaW5pNCpTjPdnGDETG7dyYfxPsOCKh/yPV8IXviGxXhWLp5zsv6qwTqL\r\nAo1F96BUAadcScR38blEG/70gFcYzM+Z0M1uzfAw/7EEuKrF1NDlZYb9gB32\r\n2jfwpx1oVRf1LrfM1sP2tUJonuRXVER/zeU+bWhtSPhQfkEJGec1JoRFnEtD\r\nUfq/68nKvQrBFNKBRcX8YbR1dhG+Fl7IuNDSJqupXlzCTyjYtxY82tjm7ivd\r\nIXJwjRfYvVn8RcS2d2V5I3aRajwVr8p2Uo5XaPZbloFoW2RNdWZwMjPeKerR\r\n0X/67mSKlDPL5T1yZ/Lt/XC98hF0DUAGKyflpzBvGivtWebmfy7DB6uzV5Q9\r\nabGXjbyF6HVaM+EwJxZbyjZ8MAfrTgkb97ArfJGsO2rtLehIlVKTd6v44HXO\r\n+ja3x49KhKhQSoGx9JO8LfOsY0TPbIogFXaNcuWz7rZdAhvq3EC9VN8kY7xv\r\nlXtisyj5ZOidYUMklj1oTVIZRrAnRg5d8khdoJ2IylUmxVxy6xq+974kFv7u\r\ndAXvRLy8EBAImXsSVrZ9OdQBe+o0Aergvb6mH6nDqZIG4/OVg/srKF/29pYn\r\nvEYBiZQ87xqJsE5f0toA5wENMy5f6hL9wVg=\r\n=JWuL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cea256990068cc2248c9bed32c4a47fe622a3286","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d25f3404c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d25f3404c.0_1662025424200_0.7822071311529115","host":"s3://npm-registry-packages"}},"15.0.0-canary.920d8a79e.0":{"name":"@material/auto-init","version":"15.0.0-canary.920d8a79e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.920d8a79e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"02c27f82f16c66f81b4620f6a8b54308b95d2f94","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.920d8a79e.0.tgz","fileCount":13,"integrity":"sha512-UFq/n/zfIQyvZHmbFWhGgmKBzKirKN46uoKeP1ylcr5HranR1CUxAhUNxg4H9TN4stUSGRPxiSqPR0pdjFQeaw==","signatures":[{"sig":"MEUCIHDQeVwgmxm2nIRmhqQohFH2UzZoqF6CR8ZR5iQE29f5AiEAl3J7aO40vHWEYPYMjn/u/8PfH4tit6ZONmBsBAm1yLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjERP/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkZA//aENOonj+Aclh8DNhlfJR2uMnls5eyG9AOajf+SLmTFVfrfS1\r\n0PkEFrjPlU/XUORE9z6jej6OuIJyYjkjRsdJnKlpLZI40ekLzXNEEsVY+pL+\r\nG81X5iSx1T6uJdlCXUrdtsGQEL1IXA6MzhmWPJ119w4YpMGdRGHrlkwD448h\r\nxtd1JD7iG8YuXffEByshvY2Gph0N9VMX7iTxngjM4/GS1O2Uc7Qd6Uh14DOb\r\nzU87T80jIrypLR9rZ7FfalkcVBYd0ebdYv6fidkcKYA0xJIyKOYm+YI5y4br\r\n2nXEAuQKaBYe7Kk4U//RVCWYGdMBG9EGN0UlGG+KJFaja3m7dhXegR6oMaYc\r\njxWPEcjf19QgZS7Q3eQxAApR12p3aDOWAbct9sTplNiTiVWW5X18lsu40BKG\r\nXaw/1NdKfQk1fs8en+tqcYip0+/SU58+uFMkbg2QxLoO+N8e0V5itOJt8n6J\r\nSsxxfqRgrR+PZKIkIjuzN3gmrdvnynaMZupHtuK6i7CrxXKYMa+gGjrLzcGw\r\n67Adx3zN1f1PMJrHA2qd27y2/1oAzIpcjSbZRHQvZ0+3WBsx+/H31sQCkZeH\r\ni3IpzYsUPH68TUhNOhXPtcEfapeFCIqh47GnNBhOhEjcMGA+x6QZuo5IhaVe\r\nS34zyN+IOUgeF85NtE8RT/l0XQ2k9sjFHuY=\r\n=LMHp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"781a4c78770587fd97c25633bf9f137081c35bc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.920d8a79e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.920d8a79e.0_1662063614618_0.8051425632388765","host":"s3://npm-registry-packages"}},"15.0.0-canary.c363f267b.0":{"name":"@material/auto-init","version":"15.0.0-canary.c363f267b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c363f267b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4b7fe1e2a48e541334ae7c78be8e5a2bec4541c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c363f267b.0.tgz","fileCount":13,"integrity":"sha512-Ai2Y7pTiIkMrqRrN8ZBEIkxfV+MB1C3UFcT7EitWo+JLP5Jm1Mjdclj/TNKKVul380MxVeI4FwnM8DBauzLd6g==","signatures":[{"sig":"MEUCIQDNcF1cQaOivxjwc5vpaPfJpzy7xsZ8vKv+NhuuH3AcswIgf4x6Yvjgc/J64ijmbfL+LMRYJFtjd3hFXKC8Xq2RSJs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjESFxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphrRAAklqMpjYFViqHoZI0H7JbY1GuoEwb7o8tQtZu6GlDpX+fofBJ\r\naV153Emu0yGrM6vKp1M329DoI5u0+J67zUw7G+NOomWhp3A75Rie4M0xFoU1\r\nGahXfKAgh/825LEwDMw8r12zfLPEdWWaUudbhTarmDtwZOhGJwuWeja4NVK/\r\nPHKYb9iX0/MWQnku1+MIdoyrO4tUNfEj+3pTjiscNSenomQDKM78DDPc/gLq\r\nG714y5MfIaZupq5YWG9dgoq5+6Tz2vz+6pBdx/zFgpa88aWfxEYhfiOjbpl9\r\neYojaOcphIKecpfKYpSNzCAdBhcdJDrrNRvRCPeLHBB6vq4YMyLI7DM+ii9p\r\nnlONU0rd/3mhCHVsascHtMYuW1OddKYUFmIhSfd4hZDOmvwShGSvu0i5Cgix\r\nIbeg03dcuFYjqTX4c/bX5WTi6ktrLjeV1LA934s9hv95ZOHODtJ1w8gvd8Ze\r\nZ7P/2Uvi4Cq2Bx8qFGPz+mIj2SRe4RKj1XoK2YvnKMrS3ZbTbaZCSC7Rjj34\r\nnhrymSFyTtY8isJ9rSZSBo27k/9xFLfhUD9pfZQ25tvG47012+ucI8f2fxH8\r\nW5lhEa/onhFm3S3F6f4P2vhUwVvcwyw921sG1L9+Cx8e6I/Ul/zuIBPuRDQm\r\nlDihRE5BCdL69Q2E9axDWA/9GUb8iEpBzwg=\r\n=wz8l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6e2ef624f85a84b5510b55933f017db57797f611","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c363f267b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c363f267b.0_1662067056831_0.7046567704122928","host":"s3://npm-registry-packages"}},"15.0.0-canary.a4eb4937a.0":{"name":"@material/auto-init","version":"15.0.0-canary.a4eb4937a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a4eb4937a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"48d02edd930285a9778184e11a89c23c0991c0d3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a4eb4937a.0.tgz","fileCount":13,"integrity":"sha512-Z9GOu8soGXwbNcw6rDgiNXmtAFx44DSImRViV8r002hne7qLWc5jx1iiQclNrmLqTq5imIdoodFb4ahofJYDLw==","signatures":[{"sig":"MEQCIEhzJRlpC3MVyHDPzyVJ/s8aF1q/xQypa/9nOTaOySGSAiA4/QLVicPPvCn9eDQPSUNZKYliZGF5QOmwJkJjbPk0EA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjF48cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwCA//e08v1NV+oKuaLKrHOZ1Yo5HtLIoWOWss65JfH39A5Ykm2RYw\r\nMIfEgShKR0n4hbKwlexc1VYka4l4AaJgt3v3/7JbeXdKyOTncLo5uIs7FCl/\r\nkDOzQfsCnAkGfCc5aOz76JzToSCj3cIUo2FyyydYL5Qs1aL8nhtzsznSjuph\r\nVeu5HKwnLB20So+bU/0eqDMXDdo0NpcdyFT9SU1ZNV2Rk2NjVRlEOySJvTpE\r\n3ZqBdv5QPEitl25vToKveQkfro6lOXdi3dUmzpKpeGaBHg85hRXbZ18ZDySb\r\ncObE/jdZ1+3riwBiIPBrTCRH4+oWlziXoa/a39bJinpWJHdaatKeX23sv30S\r\ngUzYCnnEk2wptoeuB19IEUvt2CiTZcBwzBe59fZEkivgoNhnBa8D8DbDvlDp\r\nxWmsvz7dOV7FipwVnfa+0pAHWdCP0obZwxLclGFwpmE9vStV/TrkwfgvB2RN\r\nX9akgNKGX96Yn8elTSPk9mudzGCgXAFgtv9uVKwxexZE+btjvVO2IqarGS73\r\nFHpXQ9Wym24B48wAkvIB3YAQEczO0dz6AFOQDeBE1v24lcAh3PlC971VqLwJ\r\n31x6zBlKnoudx9gW5cJ33rLi+9VeiG5vyThhm0ZKxGujcy34BM834wRCAuM1\r\nhxm52ijFWPpNOdGtCXbhwBKvI7xkrLP3CvQ=\r\n=0HSF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc03915314119934676831cd7a244f70e12dd2c6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a4eb4937a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a4eb4937a.0_1662488348441_0.9172411144984374","host":"s3://npm-registry-packages"}},"15.0.0-canary.4299717da.0":{"name":"@material/auto-init","version":"15.0.0-canary.4299717da.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4299717da.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f05ea7d46a6d92ab329a79c755509577339d9e06","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4299717da.0.tgz","fileCount":13,"integrity":"sha512-gfUYZ3cOFYSH+mmDP6HMlqkQKac1M7Odx3P5sw9t3UtAjVr/iu5/69hbp+z6r1h4mWS/jBNcDVqQvhnVsQNpkQ==","signatures":[{"sig":"MEUCID/MnhnZN/QcTaOJJwHk07OIPxWrvLckiwlOGGbrA7epAiEAzV9dVsZWMv1dhswUzzUa/dqWwehDggnlRq7xdjh0ofY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGMODACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEWg/+N0nIHjwm2oqNQ/i0FJz2lrfSWlWuVw9oiSfKMKpxyMJc+v15\r\nP/67lSnzoZ4xZ/xkIpSr9gLGhu8jXqZt0hlX6Nt/7Giw6TOD2TQC74u28R7X\r\n5Xt8LOWYjLJv5FA6BLeInS9JeSLHUM5m7MbTzOgcjUSKZCvi4z4jGTkKEgvX\r\n6F/HIvHW4wCG9ogwlVkG6cSBtdIf94+orx6NbwcnwEsSaBX5pmo2YhvSM5Ed\r\nRv1ohaoeF3zBT+PtdDzbKPsus/FKGxvpUEqmdiGeVsH5tFgn9mWymFgwxyj/\r\nyqA1XTxgHntowvrlZbhRx5Fy2pGSJ221es4PPumZtTUN8wUWXv+9QGQawfKr\r\nDv7D/8ryXbYF2Gb9B5blnSyLXG9UQ+1Oot3yUdMAjlU1QS99E3NnyESE6Nxr\r\npt6HKG/FHHJ9GRlQAUuRdd1oBi8ytCqX4EzFh74MB405ODz3+mysgpshP96t\r\ni7sg7Nru/+IAGqDbWx8ACUz5GoDoEO73HC5U2Q/plaObKAQ8CdJZpKnRI0ef\r\nOrYrIiwCOS45GMbaF1dY4jnajBeWE0xOovFDdt/+zfGfxP+4Krsz4qhe3VCD\r\nyCR3eaZ+29UxARamPcTxWQ2SjOOHXW1BZxhy3D99h8Qvds7eZGSxL6DP4eAE\r\ngmPHb4qzo3F/z4UehPQ8/T0Ai2+wpranAOo=\r\n=MWEk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"22082634ffad1ea812192e5ac62786a8ef47aa81","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4299717da.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4299717da.0_1662567299419_0.6360656343118547","host":"s3://npm-registry-packages"}},"15.0.0-canary.fa7d8d44b.0":{"name":"@material/auto-init","version":"15.0.0-canary.fa7d8d44b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fa7d8d44b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1a5d0de01f3a4bd8df2912a12dca198ee91ad166","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fa7d8d44b.0.tgz","fileCount":13,"integrity":"sha512-EzKHQiC34RrlsxbVOF/JIg2/1ULdF0IQWUtKP3u4vxCZ3PFufSTt7LTcnK6ImwPU/c4HINq53wLrx4kWc29W3w==","signatures":[{"sig":"MEUCIHJ0XphR5cJV54hQfQvwm6ekbWZhd0alelD9PZjOgQUJAiEA4fWsF2rzaAY9xcAmv/f6hpoxBQw1oI2/uHmFTNjg3EU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGO5uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSng/+MjMrlykWLdeQfN5giKuumrxVnYanwFu2wkyWYW1AYpXzyfXv\r\nZL2bNnFCqNSfazbU4eT9POseFzhJanGUaz3b9cOrNyiMKPrvA4uqR8+ovMJp\r\n/bsRrrJwL+PPfaaO0Zkf6U/zLZK+zE+l4aidUhza1Y/opzv6Vy4kYOKChmi0\r\n24y698l/dGIpbCNeGnddCpjgn/d4A7+SPHfsdSP7iiTnRBTvLrV/X9AKVYcI\r\nv2QQAHjMCgJgRR2RriwIlSU8i8Ch9GYK6d+U48m3a2ZDtGQy0S8nwBw/RFtX\r\n/LZQiKg2Z0SMeuTUeISJsdfyX2mmE+ydnwGtMUgEQhtaAgSEn1MNPWci+9Ov\r\nUeHJWC1nof93+IBcBzkO6j2KI3LXmlVBLvlbhLv5RGY0pQmAPZUTQ4k0Ize9\r\n5T2BMyGq/3eq2fliC7+3v5s0jgLYKPkBrGEmtvaXMUsHJqy6EBfEmPsso1ty\r\n1/jMdwF/lbX9wwIhNVk1FYVP3Lr3yRRWPbabWq8nh9b1G6Sem4VPQz9c91eQ\r\nzkbvVN6Edy5WCWu6Gh3ZscuQOpViZwUDMTWEbsW/WOM6IMvSgerfqX5AvJ3S\r\n7rSqn6uVPUPYCU4pSfk9REi+KbdXT1yMq3kzfwDPaQ6WCN6a13wCTf+0rxG2\r\noKD5jvqb9wF53nGLzIrY5I9FkuO+cEaUSMI=\r\n=FlNn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6fc828292e73ec2f8aa4332891628e90f4586658","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fa7d8d44b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fa7d8d44b.0_1662578285976_0.7206040756188923","host":"s3://npm-registry-packages"}},"15.0.0-canary.a40e3c768.0":{"name":"@material/auto-init","version":"15.0.0-canary.a40e3c768.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a40e3c768.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d896a053ce970d18781e98dda50480ee283201d1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a40e3c768.0.tgz","fileCount":13,"integrity":"sha512-a7D4cLV8q40IHoq3hx4QpElLoKDXCfZYMM4LXq3h8WBoHrSqDUsUUB7Fs93VlsjKX/XLLY1qOgywnvvK/wzP/w==","signatures":[{"sig":"MEUCIQDFLC9d8qOwopdgREyd/wfh363JJ6NPXPDnd/XnzguFjgIgXGZAP42HCC8M6fvmqr9xd8HvPs7tLhrG1Azt3YFyVtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG5wEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYuhAAkQk0z6W/MYXZShFvX5Us6wPIIpquw90GUz/mJos8okMj/KZ1\r\n72IBxeHkRLVOvzWtEL3gLx1Ygxw4wE+zAd/iGDgyOK7gghgiOaL/N4pFxW2J\r\nFMyd+tXGLb17YpYRiFAJl88xPIZS1oU+OBtIKBPGBQ/dJKkWXef57BLh+3h8\r\nNPetD21uzRYgAj6mvc49D1UrkdtfuZ7Ca22kW6pxBL12JFXD3OQm/jsc3Lip\r\nernFuWNtFBby1HQ62KpnbXpEGVeZOMriBCb1NfXExy46SWQ3jeVuFXABGelQ\r\nU6wTya2um7SINowDXT4I3IQgTOy5sbWwYKj/APGk3lQNmqS4mWN7a16v3ren\r\nwS8FCDTmQtHasa7V8SsXTRrHJuSQttHZINjlL13HnSz1SLFSn2O1jrcb0VVC\r\n6Ci+sep5zz9EgOqynG8uAc7guWatVRVcFUoT0NlA6QG2bTRUwVkoOrvaifwX\r\nG9/40XskjscF1K0YBD+2jF8p00ewAqUl85nSfXp2GBAJNkDKs79nzxNKsq3W\r\nAHimLfXF7wGQUugT3GdBj1rMg1Qj/+bGvXt0ksapu/0DgCVJFy1b9k+nbMzG\r\niU45eu0d9MDZkWUeJWrRX8dObrJDxvrIah8ifGbCktroq+WH1awWpQUjAMYq\r\nZM2fw1M1rMiaBo6X2giISCzCkhr4BWx3tzw=\r\n=UKta\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"33ff1e71e12298ba7158884edffecc83f0055913","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a40e3c768.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a40e3c768.0_1662753796523_0.010075309409882882","host":"s3://npm-registry-packages"}},"15.0.0-canary.18cdc9a00.0":{"name":"@material/auto-init","version":"15.0.0-canary.18cdc9a00.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.18cdc9a00.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"93d2b04b4af3f332c7a3fe375ef869ed7385883f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.18cdc9a00.0.tgz","fileCount":13,"integrity":"sha512-TZkY1hqnibEH33eTRk+ohXx0QjY0G5cSU4rx+65+IPBokksYPfaXYAk/4TvSvG7baxkwXQOYFU//X1ZbAdiUqw==","signatures":[{"sig":"MEUCIQCpWoGCokAJQNxkBP15ila0+cRMJtBFbA7qadTUMQBx2AIgdZsr9agEHwbBjXkZBoqNkPruItQ5Jcji7yzRH7JCb+Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH55TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpvnw/+OS/IpA+ou2SbxFXgjmYDpHm1FKIm0EbK0zolVg4ixRn1++UQ\r\nfWpyc8WR92UUWoDdKYrDVAfssaRmmne6HOwpKizXDOMy8HFBQENHjOHtEpWm\r\nU7dl8578sF5vGYJILpVJEoYUrBy/ldU5zpfM4qwYUohH6jeFk/Yt22K2XTFU\r\nzx+mG8iwWTOWakjaKz0T/D43CYq5LzQ1rTqkvXHFTIApG8thFomHrSubygi8\r\nTM91H4MDeem/vIXT5+V/3pup66xMo3WaRdl8tPYUPHdToyzPOSXlwZ5K9Tfi\r\nfLZ97Zuk70E+xjYqpM4uxzWoSBMV+6+Zo2Ro6vphE/MAC4R6CmyJwyj37/IU\r\nhj4mx2OshA35JNhKb7Jeq90pMdS8XFTdPuRHjx3k235D2Zdq53fLPbpPuHcA\r\n668+6WH40DUTh489zwM3PPc/LI/p3GhHnfaa+gbHvBozS5GP+K3e5S95o7Hv\r\nadXMaj5LB6l6KI5izwIoC+p2BHmykwHQNI7do4XoxlNjUYEcUQjvbIcr9iW7\r\nwk460apw4ZyMFRuRHnpqe7Y4r34QtZZUX6J+tDSrDuYNoXZN/NuZBd/rWcUJ\r\no66s56YtKNjJZcc+LHGBevzXwR2QANLWVT45qWU9LrawE6pHJjJo3mx2Uhvy\r\nvJZVhglK+X3pLNh3q9goJ7P9xM71YA2uoaE=\r\n=NP6M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85b7dc2034fbd68e480826d635d6d061ba62d3ac","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.18cdc9a00.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.18cdc9a00.0_1663016531019_0.7376752967694473","host":"s3://npm-registry-packages"}},"15.0.0-canary.7ab3cd3c8.0":{"name":"@material/auto-init","version":"15.0.0-canary.7ab3cd3c8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7ab3cd3c8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0587835e53df0ac5d095b14c96b20bd2b7f48020","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7ab3cd3c8.0.tgz","fileCount":13,"integrity":"sha512-ojFKap6jEZrPQOMErGRvT9Iwejw8Slp4slMY698fAYqwkTgqVrDUBGePr6Dwa+Nj35+024uTlZWKr+/k/Tdr5A==","signatures":[{"sig":"MEQCIA/3mOwWjm25fRY1ZLDBoTNiCMpqFzfS0y2vIOVkSTPkAiA7Ck9rFIedAFQ4i6k9S/cu6UVKdoLP1Wa+Mhe73WIp/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIQZmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmxA/9Gj9lz9CR2zSidfiZmOFiMgXrO1FYgbAp/xD37evNYyY5fkNP\r\ngGUdZex5KzYqe4GrgQex3avVXASXsQn+FCP5mm9ilf1DDAIhJy3+5ZURc0xZ\r\npa6KUK9YxZ98M3et+LzKi753CbDVcJlMdd+X3CLATbLdQrDT4yc/RiZbdM9Q\r\n41MujJK4zLvIYR39So/3t4GgVEd6BkwBJlMNuc2YCLsW3orSXOfV3++5cDkQ\r\n1KBfDFkhh0UayzyPieboGq6KbK33bF6wibJ4RT3KHBZLdVerfIggH3lVSXuQ\r\n3OhIm4RSSPvp0Ujlx2rou/pF2EzwT4JEZVAzkpnZY2bTS6KKNFT/GPaAb8pJ\r\nn/vpy3xZ2qYxMTw2pVyg8DvPonRxoPieKxMIigsybvNvtA5mmf7ALc3ki2Ts\r\ndDWDTgdqdO3L9D0VgrpwBLJloTt136p/m36DtYgOeKP47FGvd9uIFhZTmzpO\r\nROWlZl+SbcGXR+qtZ3S23+v4JIDUR+ATj7FJeMkRBHaaBS9idCND1pN0adlN\r\nBmGeneN/fldzygvBsnbmyYX/sDLZUDkcASFJjZ81crbeZDqfVUPKXa16wbTk\r\nwEx9gcWaUKybEc342/Mg3Al553A09DXBlM+VU7wt9l8uriXl8M2wQmlIA+Vh\r\nOllQyYAjfjV+NP+L5CL6MKu4gm8Jn0rcNV8=\r\n=LEqx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5e840f2c9b221706de7ff81194e71da2b68b82f5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7ab3cd3c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7ab3cd3c8.0_1663108710392_0.8360464176099984","host":"s3://npm-registry-packages"}},"15.0.0-canary.2860d244d.0":{"name":"@material/auto-init","version":"15.0.0-canary.2860d244d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2860d244d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e43c7cbe7a5c53e00c76cfd69b632e79ca393486","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2860d244d.0.tgz","fileCount":13,"integrity":"sha512-3LjfKW/kHzicjdsXbcfNlmzS0KXxh5nNKv4dhhjUZlgpCEsuiiYj/6LiNLpTsEVDntUM1jtXT5ETaxte5gf43g==","signatures":[{"sig":"MEYCIQDPhFgCJrxUqAe+QCqubn4/BfsxSBrBcaEVnHpSJYIUcQIhAInSJjAcQsnYmElyOGx0wQ4HXCHfJTlrY/IP3V9IPaxp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJP6UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUQA/9Fs/flJyQp8KlSsfNoS5Gz1Axds1eV/hNPFuRfK6pIIMlsN4E\r\no+7nBZTyOJrejC5YvIUn3/G0wD1Du84+spCYIhnif8aVXoAJg1LHmVQUuovD\r\nvVb8fQUQyi7RLZmpZU4Bb/zkUvU31huUqXNvzTZIZRG47adI+rV7CdtviVN3\r\n+qTXa2v1JnsDGc9CICd9kqDALr7eLRDA3qh/1E2VJCQ96Y0JWSlL3l3oD4Pi\r\nw8vICTHQvTlV/lem59WExCZWkoafS6/mewkU/x3i3C+NDafSlj5JZHw03m/e\r\nQmh5cMGeeo5NwQLhGCmUH6WTh9j6LF279PF1uuhfAFmCckTsRM6U8T00ppSR\r\nnBSI18XiNgntjKDs7b11UcUYNJXW0PriK8KrLLU0C/+mh2E1M+2csSI7tYQ/\r\nVSTUmkN0nHmXvFMR/tcMaVf4xS3LMATR+wGBjh1s3KyZLBtRnXguRotoKiVp\r\n7gHtGyZoegE80hJLgOoUIYgrGboO+Kv7a8uL70H7GWbjgi9iwXDEZ8lCqO9X\r\nnjMwl9erA70QKI03TJECBEBhSKWGPIZdQUTVjZERuwmNfVlSmqk5VOVNe5JR\r\ncuIw5UF0s6ReiXv/oCQRnm7tFWeZUl85/0aeBKSdxD9tGoN2Bf1U3yhCfnf5\r\nACGnMQ6BmZxvm/RsNxQiDqWhEtLFLvwIg64=\r\n=KB5L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"992b4ddc7340e4e4231d1001d68229e8911eeba5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2860d244d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2860d244d.0_1663368852558_0.31684304495124715","host":"s3://npm-registry-packages"}},"15.0.0-canary.e8726533c.0":{"name":"@material/auto-init","version":"15.0.0-canary.e8726533c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e8726533c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e155dfa1408e8f2335a15cbfe7e7504625c8500a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e8726533c.0.tgz","fileCount":13,"integrity":"sha512-ReI+2s+tdQbCIedVlgZpHt+ujZzEiqh4IT+qANKgeDX0DL2/vOaCfxvjnka+9QFY7s1gC24wkAagPxS9nF7Vfw==","signatures":[{"sig":"MEUCIQC6cBNfVvrjoo9TSVIQWwANYpz72+gNnom6w5AHX7d1/QIgHiY3UIxPErCok1530AlWEy0Ha7XR6uGC+xS7pptxMX4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKh+8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/4A//Y7Nv01/GVLSNfkbCxof8et0cjswSdsSy0QPvam4qPtrg7XvE\r\nV9n5vJlX9V+1UwsFFP8F5yVXhkQiXaVOQi24IdIsxVEx4KPcpNUXdjXYC0/O\r\ntKv988fvJQBJH71w4J6yf/WSSvCa1xQo5+SLwT9RFvRpGfk+GvKPfXIGAr7z\r\nETD8h4r9xeJsVICG0bFw169FiC4ufWTI3MGby0aQAl+C6CKTFLkVYqJAHNPh\r\nrpH2Jpro7chFhRsC9Vy8kwnGhxgXLdozJIEpaYYE4YkC1HrpQRIN6trURTrG\r\nIfFKJb1+NglckjgQCb24a6jUDevlz8OHlO8OioWBF608QvPYHFwZTaWqwmZ6\r\njigBypKVnzddD/E5GORpoYzKVK4G2AMp/u2tgSCD1E8apStPFqyvmwlIGZe3\r\n0oj3sv6BqMFrWP2MXYfXnV6HxLeY457jIHm1Ikivpvwjon360Yz7gZaidasE\r\n5Cw4vOLGSywLoEWnHuvv9nvKR91Idvi1GXkob5BEk4sSgP/PX8Hbzd+nRY0T\r\nSqmv9Wx0X4HxQ4NM7EviOjYbuvpV0rfq00+grZ041eNQXVDzJFVfhRQHrWWK\r\nQNAEgVO+9my6Z/RF/udi/Io9r9ukPxPPwrtnb/xiPkD10Qps0rlsnIqQO+St\r\nfnK8Kzu1Ux6a0GEOLsP9uUN48kCV2eTtABo=\r\n=//KH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b85a9f4d1ad6e30de8175562c0093248848c2598","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e8726533c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e8726533c.0_1663705020303_0.3129082290942342","host":"s3://npm-registry-packages"}},"15.0.0-canary.00d8de0aa.0":{"name":"@material/auto-init","version":"15.0.0-canary.00d8de0aa.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.00d8de0aa.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e65e75e006bdf6577587e647a52962293c240ad7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.00d8de0aa.0.tgz","fileCount":13,"integrity":"sha512-uexbkb233aQD6VKA+I559t+zaq5pHZfvCccpsdiahkJoYzfraqFibKM7KVqxONZ+XGjvnaHuOZIGDQu7wqGb0g==","signatures":[{"sig":"MEUCIHfsKnH3AM7/5KYZX6cWnKKmUu57YGrHPsuJc3Xlb6LoAiEAlBUfS3lkdP1fDfAxhtCuyYJL+cNWm8FD4/HY6Rb2qLY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKyt6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFhw//UivUYYon/BTkWPEAY0WWZig8a/EOhHE/Hu3WvPz79Is3Z6HQ\r\nQt5izUfqiVw69jyR/42OISr9wN9WX5XGkI076Oh8Uln/jQXIWsHBcNuN/kqE\r\nqMY4F3qIWt6rf3Fn8iTmqOxmms7qjOkQrW/j84QuszddLvInTffiWx+V1dmu\r\nzDZ5xcbhuISb1VlBImFknW7oNa8lnZ4zLxZbpZp+jxFAc9rPWGPvSPSIiwbU\r\nj+VmPXA67TmdquY+aj3Py5PAi+/L2j8gzMjz7vQs1OwoI3lDwxwroWMo+x9+\r\nN+sS1uLF4zTgE37aZ6x6wLueY/Y7GrbQHWPkn9YRYbelyj39lMno0F54Niby\r\nBUGP4quruUW1jWuDttRISV0oM7fm1A+fTRSpcpcVfLW5PSmlMvRH2gJQocAC\r\nOK+9Nips/K6LkFJotWhKEcjaHskn9ZKqCETpixmVdyVRj72N/NQxXCr1BrCw\r\nVwp7hwboocLhoMDCkgA2HuqdYg+NadEhzzsx0I0T0BV5fCvhE6viAt4iNmh/\r\nmzi9cvH/Bp0EXjFUSvPpAy4gDN69uqabTkZoNLHNXHILJwm0h1rmSdfOdIY9\r\nwo/dEXpBV0+VizvY0/l7N+51FCI0HEPNsaB38ZoXjjL0nQlghbGMlIEhtI0G\r\nvGicN2uuQkGGGp0mAOkU+8Y+y5MFoUkBrkQ=\r\n=pDRr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0be0806991396e042fbbfb14ac3ad622770647cf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.00d8de0aa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.00d8de0aa.0_1663773562754_0.8694433059316751","host":"s3://npm-registry-packages"}},"15.0.0-canary.271aedc30.0":{"name":"@material/auto-init","version":"15.0.0-canary.271aedc30.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.271aedc30.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c5a2c946568832d8ac924e38a0266689fbb874ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.271aedc30.0.tgz","fileCount":13,"integrity":"sha512-Khye9m8P/wc/m8iOa08PJGrg+GAf1ARb3q/EsocgcuTkFck30Z46zKAGrekNlE+ZSs5UoynzBSkjbeBka/+KJw==","signatures":[{"sig":"MEQCICe0kUpr8Yd/nCTQZTLNlSHY6tVdhEgQjGJ9W0ujtBfVAiBCPZoIdzxNH0onOK2nL2+ywylV4fMEkeRkJgsTCCXLtg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKy8vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoieg/+McfI6if9ZhP4y0ghY8PmHi5Le6h2lGWhZHVURMfbsPMORkq/\r\nBJDgHLwquKlU7AShvpYvFI9EiJlFjsa7N7QiMLLV9X6K+4c5/lIGYhlcNSOS\r\n0k8yZogtRUHAHkGYRcRwVXqEbTAcZwjbQDYW+lNOC+NPFfWbTVhsbb61BFBz\r\nsLjEqbm9rK8nWhw8VTJ/2Wc0+fcCQ6fghOb1opkM4dYRVcYY9va8UVIKv3i0\r\n/QRkYjmpUdIoxee506enaS0h/CADPmULJ/cB2laq+mNUX9fUtZLHfDIJGcUe\r\nMfTDSRSzs7OfLv2cuYXPTxANkVcQS3KQw+YtV0yJXB7prCFfo54HrEJ9MlfV\r\nEpgDFYfmzu9hPVRI5bZJSamChn97waA4Qk9vDc81Qpr5l/UbU5x8OovkGGVt\r\n+a+/2Ms1iHrZIby10cvMj9kVld4rbbKOd3CSrOaxWXbqrDU4IwWa9X+wUFqR\r\n9XTN1TJMfXcybOA/2GcSz2G8K7s+VKdcVkXaFbvhzDxfUvcBSbgTl5i7RLf8\r\najVxTDUSXXT+TBoMcEmS+lgvisDDtlYu7TmDCSSGsy+lvKP+xyFsGqqfXKuy\r\n2wxjfVsUxgyjf73o21cjt1d+WD95DWF/fWTd51IxaMAxm6llA2OcTXUhTAS/\r\nHAe+ZE8FSrMI9SksDbgKNV1gtluQKAoe30w=\r\n=IAYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4972da221d6f097e904fd1a001de647e0e185749","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.271aedc30.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.271aedc30.0_1663774510749_0.013387572690361615","host":"s3://npm-registry-packages"}},"15.0.0-canary.9f17ff2cb.0":{"name":"@material/auto-init","version":"15.0.0-canary.9f17ff2cb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9f17ff2cb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"00d3b891d79b3792dc280c990715ec4f19478294","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9f17ff2cb.0.tgz","fileCount":13,"integrity":"sha512-TkElUVPfWnvlfFiS4xnATUpWgKUXTBCvPASIgzmSQYnl403fW/HCyqT76inAvX0Z8JEeMEnoX1QjwF/8cfHnLw==","signatures":[{"sig":"MEQCIC/fp0jXIYPKB3+W9TO3o0aG2/7QxDYGUaCSdzLm+WNUAiB55pOu4bPVtwSCjGqsQNEW6pHjyZRX2FbDamWfGMD4Sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK1LnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcJA//WruCialX2WYLQc+4M7CQbu8ZhvBdQHfbC5ctiRt6qiDJBH8S\r\nBv6NmFfOrIRaoxexH0VSZS2Wr5kr+QxzVFpIuBSVBCHVW+Cvorrd1ozpsv9i\r\nXBxrrEmMCiz/dMzC5AOWLOOVf+I7l0WNA4VhP4x53NZgW0S3rbNUba8dgVNw\r\nZaGOIouquW0fcpZa5q378o5TtG5QZztX4GOyhSsCkcOXVfAspC8nVQ0+Us0J\r\nqtdytLCNZU7GwOxttdkxBGJaT3GNYyJBeXSbSGDBJYalDUY29Iag2TupL5Ld\r\nhoF0GRCMvCUIcm7GlIDeYWWgEdEUgqoAdHD/wJ5pf6HPAocb61gLmtORSTIS\r\nPKJiJFjEWR4p+o21XnBygZFUjzu4nUBbkVfBXjXTqEaS12qcq7MWRFWXeHre\r\nZIsieOkJQjAofcYrPxRzKlEka5slp3hiLnjci9aCBpYYfxG2eV3yaNBZ4jzp\r\nSV72qlM6quQfSTGyoNYojvPiFePud/MhIOo4bM+xOXgaEJrwqzM0KnpcHfE+\r\nvQrOJXT/fUNdF24MyWCG3aiAqec+ESA0xEJm9VcKa/dX/qXW7DfXnCbbMWD8\r\nLN9i/Rvo5re99YpXU2AckcgoouH0FIRkEGWpmWWZkFBb/EmBjw0p8xyuVid9\r\npCgHy1KwMm1VrpVT815hL9e3tIyzpUW6Mjw=\r\n=t/XL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"34e73eebdcebc0a0b475c8b2f9fa0dd4a4c3397e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9f17ff2cb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9f17ff2cb.0_1663783654938_0.15653414022099166","host":"s3://npm-registry-packages"}},"15.0.0-canary.d3344c16f.0":{"name":"@material/auto-init","version":"15.0.0-canary.d3344c16f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d3344c16f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06ae25d26c83ead9706cc044a3ae18641e2849ae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d3344c16f.0.tgz","fileCount":13,"integrity":"sha512-w/C0itpxuGKx+UeqaFAj30uV1C/4gxPF/gbQcKk11XthhEW0hekvCgSEuG1VgKYbPt37NIQqstjYbc2hMSBX+A==","signatures":[{"sig":"MEQCIDWmH5VZcuGg4XGm0PCUTh42lUV1qpEntkO4RUe4qV4mAiAF+FsUCmtvDoNcejZpW6UcJj4DyxZcu+Ir00DCSYEvHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLCmcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMyw/+M5ZBuIXF5utiY2anGlz5cEhqsZ8iUNpdXrTJ7t/Ttwr05q1d\r\nZ2dQMggX5zuseKU0YBC2W/YSFN+yK5N0HQ0+3tHaQVnU0REI/J8vMd+wbKYX\r\nw4KFM4W299KoHZ3s5+UtrIFbbcwuhsNvgtUov8J17hmTT8MScKrKkHzi7QjL\r\ncPlrgP/7NQPuw/6VS+hWJgMo0ZywYg8HduhLJt+QFyIUFv2UTy4UUI3+maMA\r\nVxTGQFSRzIsg906WgHGXZV1w8+b9iavEByCMSvjRfVfOlZYEEXonXpAJ1xwD\r\naeh07tN6HIMXXoukstCWoDRUfxxjgHD1PUUeVDTcwYzkH1oM2d4dZPDalO85\r\nWDmmDewPesnYbJQMxh4J8OD5g4vMZe7f/HPbZSB894K6ciCaxRG32JPCijEL\r\nAladPtzRrWIUMvcp1AduNOqUJVOE66qR7wwfqb1UuIRQuBTtP9mt2PrzNLLm\r\nYuDHeN9ClnN2wgvkamzvmC36c9engOOHOi4MMDaPe5XReUahiLGPPb0GK7gO\r\n78S2O/bsZnWkP7zKEEXfpW4LzglZ9fKrvHRDuMfXVcfaHZm4erHcGbw0RS2m\r\nV4Kitte8PcM4rYjtkTGIAdlWib5QSRK3rgRQfNEJIX8T6OTG8uj/Xik6q0U2\r\nVq6TGVHtGoqnsjnbiHzGw1V+zWour08nxts=\r\n=zSmw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0a8dfcab6df46c9fcc9969a6dba1f4fe48e028c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d3344c16f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d3344c16f.0_1663838620488_0.041401478706056816","host":"s3://npm-registry-packages"}},"15.0.0-canary.94f20ccb8.0":{"name":"@material/auto-init","version":"15.0.0-canary.94f20ccb8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.94f20ccb8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dbc86d715a1a4b11290c65280cec82a2bb5c3878","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.94f20ccb8.0.tgz","fileCount":13,"integrity":"sha512-dF5SeHLI6sT+bN84+Xj6cayawsJMcYpEv/2aVsKuEec+J2F227KeoAOMa8SX6soYNmjPMq13mnhuUtHK8zLhgw==","signatures":[{"sig":"MEUCIQCBDPpWIcfnZFwQd53Uppd223lgtoE+V7PPOHa11arshQIgclk1uJEfrXdP0ldiku9nbXSKb1UQwyDSM3iTJBIzQhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLMnQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpb8Q//QFVaX+7lkRf8D+IKvrwmgYeZ17FhoC813zLHIVEBgrLIhdgG\r\nCBUCTcm4iNRSeU5K4ihKQmdSJ1s4BGxIEe/W8bypfeP2Je/bwNYfdKp5pQpV\r\nvUcmV1HrsjhFBFNXBBlYOQBKs8RCIk54MWwwfN5l2XD6+7wjtPTc/uPXu7vO\r\n9aENC7OZJORUSGAito4/FsV584SH6zuEmo4b7opBx1ulehbDVcZjLuwKgO1w\r\n2x9g4vG7NbqxMzw1+YiszmGv++k0P/4BKjeR3giufzpz1K7hwFIrjs7yFBgd\r\n0iyjA+VawmO8gdSNcDGXCRS+0RR0JJ65vYF59DuEsyc+IH4MPl3lywt6HjOA\r\nHQcjySrvlKHJXeXPaP/hp/uS0NC6WyfW7GhZK9hnL4fa1Vad43hj6rgluiSH\r\nx2bvqSiPOfg9X2c1g027LET0vBKAWh9tO2AZ2V9Q4ZGC7J+y6ZzrzUayjmyn\r\n+XhunvUZra851IkZ1gQNJ4fsUaAzkwxI0CQVzwMTWwKfzSHt6Hw+yqY6HVxt\r\n7dezFlX5QibbmRsMmuu7xAVgidoxETlrWduJt1vcoVAuSw+j4qjXIGI/AQdX\r\nAr3OaDDeUwb+kl7gbQZlqctl0ybifd8cylWB675b4F8k9i6WI59c/3vDUXxQ\r\n5cc4th5heTEvOfwPWz30yuBTUUnxBGbQxdw=\r\n=pZlx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"16225f613437ecef2ed2d760a08046953ecd51ff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.94f20ccb8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.94f20ccb8.0_1663879631971_0.9866488141000931","host":"s3://npm-registry-packages"}},"15.0.0-canary.81e4cb7b2.0":{"name":"@material/auto-init","version":"15.0.0-canary.81e4cb7b2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.81e4cb7b2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95a378daaf13157a794a5e5e554973cfc8d5cd87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.81e4cb7b2.0.tgz","fileCount":13,"integrity":"sha512-zH19watOBNtu7ueYUchnslE8+Tno0xwUhb7HYIufQi7mugm9j4bfjZqDkBqCz08O424C4zZaiHOvtLP0d/jFTw==","signatures":[{"sig":"MEQCIDt49tCByBXdZfg1e4+/kbVMc2YFaF8pH2R9tVF8fQfLAiAF5cs12LxYW/KqcC3FU5TNYDAoRS4zS1JyE5YEuTcetQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLcumACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpC7xAAl1qqv8iU/Lt6Kt5FQNadKMTDciUbCpyRZaQhdaV3bDx1vqzk\r\nbSJvSWxKsLFLUlel9ngDnsFJFxMBW14zN+Nb/lWIRFqIzpUF0ctz3No9Wdxz\r\nKwwUNC3eP68DoPF71jPBMCgfAYR9S/mAREMDgrSf/GYeQozu2nFVutaA4jMm\r\nNHLahsVRXy2eqS7QAATMryyEGT+7G5yJCbT0wTtQej+28Ant+kcfdkYu/f3+\r\n/baOu73ho6xjKY8/Th2cgYpCg4mtAijbVZPg2IajGZH6M2IiqyJIVN+3jwwO\r\nbxmjCMtx8wx9UGegHWh6fWmB5ZY7KtM9YRxf+dz1p64ZA5IDRoklK5IRE7i8\r\nBcr97Wt93YMQsbGF3at98KMbckKqvrwOlaoVizjwD2g/ArptJqXihZA72eNO\r\nN3aykgB8J0l0zQ5LXhfTL/Um4/fVesYliIJ9F7AehmymuXhSWPnyRY/Jt0TE\r\nUc/aRLxegwJsAJJA1PqwKXgOb+jyPL8caKBx0DV+xoyYc+Pepi+XYR4xvNsa\r\n37t+szOP8NspXUmq8vD22WEp7+xxDXVw43R3ZWzB/0bhwvR8R2+t0Lp0rzvX\r\nxJJrMaVfxt2WFsLTyczDnD3qKJP2bpD0PV8csdLeVY2LIN+fbksKH4pfGHQt\r\nDAgBCQv7w0+774hhNOvh8dobu8ce6/kDEEU=\r\n=Hdp0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"63fefc99b30106d8aae83dccf8e6e8073043a3fc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.81e4cb7b2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.81e4cb7b2.0_1663945638017_0.09902285561604507","host":"s3://npm-registry-packages"}},"15.0.0-canary.aa85f9413.0":{"name":"@material/auto-init","version":"15.0.0-canary.aa85f9413.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.aa85f9413.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6de2171ce32521870ea3f02ee4b49f16f773cd92","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.aa85f9413.0.tgz","fileCount":13,"integrity":"sha512-T78RD9qhmXM5LOLKpb8+wKLZ3sIV0kkdbsSS2Gw72wxvpAvig++eqKPbQPvA3wQI8GW0VSqj/0iOSy0Zqqkb2w==","signatures":[{"sig":"MEUCIQCo9hbjKuKQxnc9N+DJcBD4IK7EDnCh1Hjk29q/YDL0GQIgC0QVkpVsKBjh+SDcjsz7ZOkGEsxriTzRRMAdtt/99j0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMeedACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJPA//Z9WzmpcWShSRnSTih5n7Xqkn1IC8lJ99Xp0WOtNC9+R6RRiy\r\nB+ZsgTYPu9AMlQNPxL9QQSCiVHnX/n76zEttgaUg0rhLMXh2QgflVQxJeKT8\r\ncC0ld1IPzJP9BLg47WrtETkPuxewTifbpmaQyyb/1Uk5ObuquyjhwRQkDxJ9\r\nhadT4lFI1wQKxW1T02q5VPaViTNTbpgTYjeLjDAppW6zK6BfNHeW9D2qusRN\r\n4orZLPyRmCWNnHpHZCZgkVla3Wmmqh/tMVSOKOif2pNFZnPBdnN4+gJ7RmI0\r\nnsr0AJjV02peFzneZpy7IPCFAuvfzICfN/phB5uXyOg0ZX3tzdPLsgCWM7jy\r\nzGA7JghTIv2oFu/Tbly3reogmIPHofCu8kTuypGBsbX7eyPS+fKu1QXp+msL\r\n0VStx0Q8/hNAlpg7wT2EaAJnSamRjcX54vzTeMzoE1S56uPC8U8vygd1/Dd3\r\n2V4n/duLBns7pIEhewXq6kR5cftp7slO2e4GqdF5EXaS60g3Tfz4mMW745tJ\r\n9Lj9rdH51zCHjbvigsB1IMt/Oj9HEcmnjTHyepG33mFEtnZhnryqBxb6H1tK\r\nPuTYPb2HWSJJZFlAwW/p2tPVoFqb7oVnk44DranPz86Lvd025qCqNM87kkzq\r\nCah54du4xFVP4exTkOCFvHVOdvl2ltVyGpE=\r\n=5U/L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"73f7402d0fd839f22c2c3bca08292a66389f5829","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.aa85f9413.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.aa85f9413.0_1664214941455_0.04909703108576524","host":"s3://npm-registry-packages"}},"15.0.0-canary.7134a7752.0":{"name":"@material/auto-init","version":"15.0.0-canary.7134a7752.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7134a7752.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b07da03dee57b2bf1f7edd8e5dd4123f3b216180","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7134a7752.0.tgz","fileCount":13,"integrity":"sha512-0f+fZig5y/cDG797yYR980xNbvKB4QTyYltPrXZJ+fFb/ZIAZFa8IJ/vnGUX8Ap+92Uf22yxENYEJBDXszcH5g==","signatures":[{"sig":"MEUCIEyVbFGHN3AahF+jhCdVNOTUIR2nrMxo/ODFpGpLfxGIAiEAlzVmS5ZheQORM+UIMVaFyo5+Nj/fY7PlOEdIgZwFEG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMiAmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriHw/+IsQpYfTttthULC7UiJv4oUeyTKNRq5GKIxpRFa8jlYG2e9G4\r\n4KkHi61j5zoSHI59f0ugCw96o6BfrgRy4OtHZEGmrrRLZ0IEay+8aZMYjPYJ\r\nY9qZ0nP1KXXEKGuCm7XhUXee8llzOfrg/A0eSWM3IHzYBpctZGCGQNrRkBeM\r\nqvO7Vck8ituXNBzLgjjSePFiL/nEmQJQ03s/mfFgh1COrJi1p/itD2xu5XaU\r\nRyTSRz8fvUD6yaOpmyl7JenIx0ewZ+YITrJx72tQvcET6fLQsO0wdZPlhoJ8\r\n4jwUCNse+VSOQiKXhrPPznZsXYB7rhsTWVS0wjw9anHob80CKE0XBjIoOFCU\r\n2wBVAYXSV6WbYdetuErc0HNjmm6MPuFIwVIiy9/J4CWzEwoikdfMQxQ71itm\r\nyQQrk3OnYct/jtQhgpXAUFPe0GuDWjQDkqxoYlMKBVFb8oylnyVyNqD9azMC\r\nIWTu0BR9lyZNTaii8bF7nRJejOcXx6X9sYN6u/IcSWbQ6PDWn11TEuLC521g\r\nOMyovdAOD5nqeb2Vs0/TjP8eeN1jv5x2Ey8UYBEsthabOMFjCLOnwY1sPKfn\r\nJ/JknshM5fAHGjCLLJEWdqj7HHFHeF5aER46lPVQRQLyBMY7POtUwajEPpqX\r\nST7piU2K1Y+C+0Nku/BfbYGzls3yzKyIgVo=\r\n=rKYN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"31aaa09805eea1ad3a30e7b91a8bf8ee8911e80e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7134a7752.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7134a7752.0_1664229414579_0.31699959099884123","host":"s3://npm-registry-packages"}},"15.0.0-canary.70b8ac16e.0":{"name":"@material/auto-init","version":"15.0.0-canary.70b8ac16e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.70b8ac16e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"899dfcab67d928f86fe89dcdbb489445172917cd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.70b8ac16e.0.tgz","fileCount":13,"integrity":"sha512-Q8p4QgKSsWdzZcPKj/UpX/Vcu4m6xLdu1hiYIQ9x10LSyO8O7LRmcvr2yVHsNzd8qS436ILZwsgYUvh3/VqgsA==","signatures":[{"sig":"MEUCIC0OphbEFc9QJUSAiyp0+J/01myG06Ix65u2ecpjUaGjAiEA8KRTYyCejI/Y0vfptjrgr8GON07KQMB05+RXRUbH7r4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM3y5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX8g//TmaAazMx+QdIz0S5dVxoaCQBCmonKbPw0M5pxOWpsHaiaEjl\r\nHWydTQ4+nYcdJ6Wx/PT54Q4ncZHS48X0txpLSKdaEAB47Z/YHgwhNy220Hzi\r\ndjGcg+dz4onnPQGwPAaDLQsamap8GvKUd0ccs1lkJSoz5ccl5tNRlUbqULCR\r\nuitW4ulwKRcOTByhjxSgvq5YhHtRGS5GVAyx3g9PLK7AwIXiUA5wF3tMIS5+\r\nUxAgGzI04Fara/rW2Xj2fHsCj597a/9dz4E6U9mODzcTVGPj2Mjphxs3EN8M\r\nY23PWovMHgHcpwlRuGBGjkNV+bRcco9cv3WFZzK3VjmAJt57Gw0H1bjgRJUf\r\nEOaRvh/y07sWakn/yEVAspN0dZMD3fdGpZfGs6hLJNzAnhVThlitG0LLsLdn\r\n1+eliMsYpOVuoqDWHGJ/CxCnLbE+x6Vn3nn/Xxc4RXoIPsSk9pRxkfx8mchU\r\nR60/7JWEw5VV71fb7AWFNdMkqfi3rhsPePq9+QaH4utKJEy3FkVnqdIOO4nq\r\nJRfkfW30xc3JSAoxtp66kTjQYD2KFeBMDhnYnWR4I0MIiF+g08/vxVzBXw8M\r\nrCvOdVq+HmQ9XJcLn8b2gPnPib8600dclYQc/WxfE55HtJOM8thCnX/zkXbd\r\nB44TIw1rHYSGr6yFa4IzYD4X5LosF7Yb5W8=\r\n=xHep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f9fb4c3a4123798d2b993ab287cc4bb7e8d7014","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.70b8ac16e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.70b8ac16e.0_1664318649643_0.29268716653779125","host":"s3://npm-registry-packages"}},"15.0.0-canary.c20d74405.0":{"name":"@material/auto-init","version":"15.0.0-canary.c20d74405.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c20d74405.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4bf980751c4248fd13f8e36da4023f59dee5a13f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c20d74405.0.tgz","fileCount":13,"integrity":"sha512-J2qFJVOc760dwRXg9DL9wYvck7TJcOiOXyWYSdoWmfo/jk7SnlnVutcQNCknTyK3g6o/Oraisw5LJ3KcjRE9fQ==","signatures":[{"sig":"MEUCIGpM9tiT8RVl8ZZWBOG3W24JkfYTPWUkmkDbzOV+tcodAiEAvJBm1a6Iio4b/kCXFxFdmM3VHcVP7Sv/vAXq0AKbLe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM4eWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWzw/9F+G5Q6W5l/FNJm6TVamgZ9GY/QaH5wxjXXHZ94EALowGtcTe\r\n4bfIkWwN+hEa2o9qIWmkjZzGqnDaz68JoYvuGTvToQrJIu5JQNlgjYxFUY0G\r\nUmV6qoCzdO8TwQkljYvw5Hjyg8OrYynVlyn4+lXoJKSNBQA98KJWJcZBZkal\r\nCRragHLy4y0gxtDWz2ooGmCDDFy7r+LLiQcSvttakhEFvDWsSuHyvPMHNqq3\r\neikmZaTzoK/5P9JBsGbLuaRGn7K84gWtZqWohPdmh+D1B4K88rPr9H9+csHM\r\n7LRQneyboLF7wnCVvf5cJmlozUd0PoEgMAB4Hw8TO/E3dgcRk/pcZ/Py6ca0\r\n7QVM/PDLCTJAkQurledi0nGGz57bkM1ABpv+ZDBcGR4qRyV/CmV4dA5CW4e/\r\nCOtgogafs3aRDrCChBSv4U7ZLIKYZUw3f/XIkwiW12nE1H6Rlr3xa5XVIhvd\r\nzb4CgUvO9WoIXYKD2bTBSNUY8B5yddRuQyN0uoXneXds/PpOewzq/go01O9o\r\nhOy9daroNNi47zEVvFqXPHZR61Wx7OTmUPtQ/BRVV1Sq/Hl+Q581l2bi2gin\r\nnnXf68EKvTkFlFVcDJstLIqyZ9TjCjj+Q/42mCt1Muom72ZijrkoQkS4SK30\r\nErKHhLgjgfIsExCqHjWJgsYpUZMSpl3KNG8=\r\n=egyD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7e1c6f9d7e3c90438265d23d710997462d087d78","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c20d74405.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c20d74405.0_1664321430134_0.9537727409948711","host":"s3://npm-registry-packages"}},"15.0.0-canary.f033fc8d1.0":{"name":"@material/auto-init","version":"15.0.0-canary.f033fc8d1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f033fc8d1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6eb4b8280339ad4bbb5db8493c1b141872f72bf6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f033fc8d1.0.tgz","fileCount":13,"integrity":"sha512-et5ANGbNHid6OPY4mwCXKHdjQIvsmHN9458aY7oyyj9VzcfH7ltLyt7T7UXHjTc+z4uf43yBjBQ8/Osgq2+haA==","signatures":[{"sig":"MEUCIDbFAFrSydlTlIM9BwqIkrm1Tcfb3ch/Dab54TQYLUxqAiEAl6I88O937ASN26fwrs8Rdr42G1izXPsoV8i0czU4ue0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM421ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1nQ//Y37pTP8XbpxzsbLgD4lPQLsQp4dRokXZsyUFv43fwmBFIsTp\r\nJsowGa95sCBX3C5YZIaG2GA9e5Xx//Es/4y4kZikgqpvsECOuFcAz3Wc3jQf\r\nwgP2Nt10apZXrQns2xm5Ge2kFs9nA4OYhs66fHm7H4gd1aP757yXn/RN9DK7\r\njfTx4tULkUSSgAbcl4AQHNuy6mTfBMMb0otSDcUE2q2CsNbGtynDnJ/YNqzc\r\nz8Xh6XIWggWQildGX0zA4yNv7gCU5M5c/0BOE4TddpZHnp/AsdwoORggcpDP\r\nYr6KKAUBqGBSWQIYG8fnIBFM4Y84tTk0w5LeUY1w42UL47NYg0/GMClhzSTE\r\nis3Dj2Cwor4siSc1LgcTVbqNELOgF3d8m30vp4AeVFXsl9uvifujEm4vAgnI\r\nsNTXj3/7ODLuqhqO6KkFPoEyyC5S4loST2m1BToI1LpSbhuy1Su8Yf9FZIul\r\nZ0PfwV8Or/4TJCEeDMpiM7zkNgL/LFHZEVWYszLCKyPtIkqN+kBLp0Q1TmOb\r\nsdJ9XOhccaif197kQVAGODm/mCq8JNJjj/P1a7jdAEsaCCItkuS73axt4QHX\r\ngd9WhmgIeyIgXQ9IVJL7VLjezPwaTBFmF6lMbyap4uwJ4dQlOFn0hEJqGzWK\r\nPLgONGGevP05aIx+VbkNryrlwdVgjAl4IwE=\r\n=oa8l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a658683d647364520f9de8a2d51f15913b5ffb78","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f033fc8d1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f033fc8d1.0_1664322997213_0.48231233247957195","host":"s3://npm-registry-packages"}},"15.0.0-canary.8d7ae912a.0":{"name":"@material/auto-init","version":"15.0.0-canary.8d7ae912a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8d7ae912a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1066ab8639c6ffef4d7c974345b4447d17963aec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8d7ae912a.0.tgz","fileCount":13,"integrity":"sha512-CIj/EMW8FpDNVVdIUsJeke2j41/stqCby0bmWxI2UaPm+VK6K1IBIJhvGCmeoyuLLkZgxBRMRKklLgjlZqj1/w==","signatures":[{"sig":"MEUCIDPvnQ3pgxrpSgD74zTmCrMaameYwPaxFJdc7Fhm2KkwAiEAooaK4YJBrGwmkmmKr4kzQpgjiekJ2c5C+43oXfptKpE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM/3qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdJQ/9GUwQlD1qh1Q2fpKRS2SSv7i1OdG2XDLlr7FHM6nQmIvSuHTA\r\nQhbT2mzW788lg6ip+SwegkF+xvPfm/QjF0rvE+WCLKpbFzv3RKdMEim+F/Rm\r\nqH7JxvilQBkiJMuymq8bIU5bafScX5A/98pC4sO9N9EbuaId+DXk45s3IEHd\r\nWIypp+3N8P+L/WfZJVOxF79GkxGR3Ji/hn2aUQ54wc+J/2UHH9GuvEBGw5SH\r\n8V/moWjaTKsnLA5L9ET3p8pHt1mgQzVlIjbun/KfPYjJY0KtZG6Z3hIDtffj\r\n4alxx6kH+Sjf1Ohnez66HvpSjCGX8u/b68cjjsz5CYADMDwC0jboTadvfVSH\r\nUNwK1G8oEnLTmXTqXVYO9l/z6JV2MI3ITLlRJHWASoPdHLOTXzYQs0bT4QIO\r\nj7LnbvwAhMpcTbzhhbKWOS+gT1MtwDtXyNw/Npkm/7rqSNLAQ61Vs0COEnst\r\n++VfedGsTC/xvcwlO5VW1QMb9eAz81jvhO4RH5Cw7W/+UOiC4gPl04vrU4K3\r\nq8P0MBGs4pRw0qrNghSIFGUNt/tS9og84qAV+MeRUutDZVylHReRTJ14k47t\r\nmdJWU7Z/R2cJPPJJdM4UhIU8KmUA6u1BjesDZSPNuEgOpffcsO5Gj3MdkLLs\r\nzq7rlh0f6J+NmulSWjTAGV2xx8/oIrdLhjQ=\r\n=ZqGF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"26b2ab57ab7cb3eeceab31102ed1b6cb133f4cc7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8d7ae912a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8d7ae912a.0_1664351722079_0.0598999068324515","host":"s3://npm-registry-packages"}},"15.0.0-canary.db414b864.0":{"name":"@material/auto-init","version":"15.0.0-canary.db414b864.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.db414b864.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cc4dcde891597c190d28aec56621d04184a7a5ef","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.db414b864.0.tgz","fileCount":13,"integrity":"sha512-tVKdJo+FpSgQj0WxoYk1mvBVqCklqS7PNSVy97jTVHehTfBdgrQB/olv0iZualfELuz+F+Z5FyiEcDRHSDEo7g==","signatures":[{"sig":"MEUCIBKYuF8O8On6SdzsVbu5bFvS3R/bWztzvl0Jh4Fx1RqbAiEAiPrCu9fV8/wgmTn3EWpc2SpoPoKInWKDH0zrpfNt0NQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNF+FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeiBAAg0N7Az9IQRjohAFmBcrkAk7MjktJ4CfmMnGyv7GNYCW7BzoN\r\nMjaqSS64PSeMVqVMgu7rqCIVsm1LLmlhFiHVtnL3grqTc1NB6A5sU0aBFsyz\r\n/61Cj6Bi/5Svz8rrtlbR5EQvs8Y5qzkac4dgd5aLvRBRJUMB+QGQkOSOwB1m\r\nXkRBgGp2TLM6d3BbzUfiH/mOCr0Xe+c9Sf9/QAhPxIxIxX7H48kOabuEWRDQ\r\naYbhXW806g8SjUgg28L9i3Kyv72fhIVZ92wCdgyPNZ5HctXS67Jkr9p+NNp0\r\noR1yCSrAl8RAKWuI7sycP3TGLFSSesh1eHnYqSoGC8PfML0IgkJxAiA6tI9V\r\naEOtw5pGhuRdyghd/apZxVWs8TuPSVlPqEJjAirnNCSRGZdGiCFx0XBLsltM\r\n84r1/+JO0+4KPgvCHYZM8Cv4yUIWDzZmOogin3Uz+2T2WgA28RfNt4FG9n40\r\n+qf7uELOqCrtSfM9BcJVMNhDPSktQBQN4Hvl9DOAAWkaUut7Vf98SUjHw3xa\r\nZ6oAYLtLFlw+E9TDyOKoZRmG16qowE+RKQ6mkic+j8HGMUQXTTB8Eai9ehum\r\nxAiK1xDM1uMJNIMdbN/LLNGYWO/Ld1axJWpMHEs2GUukvONPwZSAmpzx3PUY\r\nJqcHxkYJj5i7iHaN87YOlDLmXndBNbpz/vA=\r\n=UI3G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7601f089a2e7599728805effc4e9bdee40008aa0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.db414b864.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.db414b864.0_1664376708969_0.7940012350264867","host":"s3://npm-registry-packages"}},"15.0.0-canary.c0462d134.0":{"name":"@material/auto-init","version":"15.0.0-canary.c0462d134.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c0462d134.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b2b875a2fd9cb9a2e01acaf7ee74357432c6c3ae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c0462d134.0.tgz","fileCount":13,"integrity":"sha512-rmTft7VdWl7b/ivGAc4h+y64sddw1rkLsDDJJutykk3qBPilbVE4ntSmBzGozGgnGp0RPQ4toMIDsErxBw6ZXw==","signatures":[{"sig":"MEUCIHDEvOtUNHUbDJlnljJRcE/slfj0UMeLUC0ZwTVca3TeAiEAv9p3bLdes380KARQEhjBYGINNpKenz/nQRwgRgNf+nA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNImXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGaRAAhF7BWUBwrvDKYHmln1tuKzvDzmy2QD0oAers3AOKtOh2FcKL\r\noU6slCOCL7+giMYHwSUQLEvEniArHWdHVge9sj3pvmSPyaRJnBPrZqksMXeS\r\nL76r3DYg0hH8z408bPMl5qUHymvUd8Rsqg+osMNJ7ZA0Ke6pjb5/CYLs94+A\r\n8wyyD5OJfzhOIt5nfgrQhDQzvV++IOkYKVNrqzqxA6xTIfi5GzrgieajBh8h\r\nAsnCCVR3fvyYWZ84JLw4bj9O+sNuCkYoz3ZWnlYihSTFByUtbysRYAUhgS7h\r\nvnHImkAlE9WFkbLWvkSMiFJ8i0RC0NuyjfrRkaOBje2BluVnD7rniBA1eUIL\r\nA/5yow+74LBeaDZwX7rhFfHtK+liD+UNlpxjdoCNpUDHleEFh5bOJnZCA/Yo\r\nTc9OSppUE/Pjsyy0+mC8AFjzedz5ZFoZtobmW0t41qWnsddv3qC+JfZQldNq\r\n3p7HDzT4Rdyh/cui8IY775MX1eTprl148nRQTOweVPI61m48Uxdvwui5Um7k\r\ndSYHikxLmr47SjW2cHl2WaoZVGBUf9kAsSL5Zk67tZ52NJSxMKJH5mH3/Osf\r\nUcZTX0xcf3BFCerTMfasF7WnON0xYAqr7pQk80t4wa8WD88MAm/q0HJUIqTP\r\nJwi+TatvrX/y+/KK/hJX+8jBtK7ASHTtUTs=\r\n=tbpC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ac1e8bf31f6e69539e68b22f40f639cb7eaedca8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c0462d134.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c0462d134.0_1664387478953_0.002428236239670145","host":"s3://npm-registry-packages"}},"15.0.0-canary.28cc6791f.0":{"name":"@material/auto-init","version":"15.0.0-canary.28cc6791f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.28cc6791f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"697af2f6d57889cc05ac0ba0228052e44326df1e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.28cc6791f.0.tgz","fileCount":13,"integrity":"sha512-bxuEuh8M/uj7CEyEk+dJShpXgRQrmE3+vPz2OzlLhBPr4RVixo1G11JnD9cwCVm74NOWB5SVDQ6UQ8fie8fs+g==","signatures":[{"sig":"MEQCIH0ujauNHf5PnRWnxUGYJO94lRjBsEv22hQEOQx3CUnGAiBiLVtbFsBXHRw3vorzalNwAOVvMlCKc8UGCiODjAAOyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNI0MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrrmw//QUVYk4BlspscpfQ8FYc0wpaXklIV1rF/uKaZ/6Eo3hQeLLEb\r\nRuxRSj1C67OjOifuN1Hb0f7kHHnfeDc/Y7PNSUr3JsfhPDfJl3wg+HAe5c4C\r\n7XYOreYE9A9aBIeSe9wJwwzC/oGxZeJJ9rlvsSAK9An3S7ePl7ggeWs7A68m\r\n6ENsY6xXep2d9hVjtWa7tvlZEYQo1RyZOzBaCe2i6qI3goGZaj2/1kmdfHc/\r\ngkAaStN3wpRhBZ3NWAVs0DiseqgLLDdcImKbqHD/8m62F5bniXg9IRc6sD8d\r\ngrXUJZ8rrXvnF7eQHwSaNM/ibT6prD3HVBzSO131srTEN36MGjBBtg3j8XbX\r\nazD/pVDFQSimjcHsJ5ztd7evVYhiqngManyXPScQ9swxEhq4wKmBXyjc5H3q\r\nr8qNsqI1Zuxj0dAXQdHdXaRzD/w+CsFvqLrzcxgoxau3y3X/GMa7PQ1L/Hgm\r\nQ+ZP7iwcd4ZBvQSno+sfGHjXCF7O+zTp4D3P1ruBV9stoXiwxM5rAB+y6vXG\r\nIldTds2p2HM1+0u74qloqmNT1f1pAj40ZPQlza8tIA1E5hbHiig7Mbf2/FR7\r\nuqTcmKAOn45CqL7ZFxDgX8OOYjTYmndIm0fwRwWsBwR1Hb3HCZLzQGmsQyNn\r\ntOhg+p2qFaOR8QRRhdTA9CKIFUrmsawHRlI=\r\n=ZMj7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d2dfa219437727922f4cce877090f9afdd87edc3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.28cc6791f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.28cc6791f.0_1664388363866_0.22270820266158875","host":"s3://npm-registry-packages"}},"15.0.0-canary.a515a2d18.0":{"name":"@material/auto-init","version":"15.0.0-canary.a515a2d18.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a515a2d18.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4efc8fb5472f9fc22a7824e8a5b185629b39ae0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a515a2d18.0.tgz","fileCount":13,"integrity":"sha512-7tdhk6YfLDyi5IaJmDccS9YP23bZb2x7ucz2XMv0ciDCJtPf402P2Ezus79Fkokk2vSSNaTTPcx5r5Hr3e2/1A==","signatures":[{"sig":"MEUCIQCxVH/H3n6+2LuRwtdXN3MkN8aAWzS8u72Dgwe/AR6xJwIgXKix+7gcLVEG2sCEB2ND538zM4apmsLNR0ngbZa2L8g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNJiAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsmRAAoADBhzHynBtYwOPwqgzTrQyiZrVMkz25IdAqCWN+F5zGu3jQ\r\n/3ayYUUVuLPULh6kL7pRr3TKHln7oakEYZiQaPTlQo8Dra+4tW0NP2GgA2VT\r\njzftE4YXDCDUsEAfoLvd/BkF4pXAuA+GHYbU7KSQursxatZp9rFJdtfNmlCH\r\nFU3wbnUbnXXGe+/vzPv2DsRiIIr2WeHfcWmwQnLA7gHUq2KU7GTOc92unt9z\r\nDNyHrLkqRyFOZFY2NXK3EApUDQ20BvILSXEOp/O7fRbZoXwxVcd5WFfM1kf8\r\nfv4Eqmgt9EX6TOJZ66Dx435D9fpCj85wRjUxrC7gniDHk8GwSW8IiSU0uG8w\r\nvW7JuvdUEo5WsCbTIdqem0D2jBTVBAfywmswBRMQ2JZmirISjh8CoNd2oTCe\r\nDyi9pHd6/e//uTJzeW037fat4xamlqJp9QXGIu9YPzip0tM8ohSmpkzZ6npG\r\nfsP5ukIGc7w18Vl1c/NYGyTYQt3jbobegZk+FGoBDEmJ0C09iEkblKbd6QSi\r\nmpPkZr6XXII4hasYIHUNlFnJToMf1qDMk5LUfla4CKK4h5NZRidXVAPTEkjD\r\nCV08D7pD6p52VrqXLv5jJViRHMwYW3JC22sErBsijzkZ+DJ+dbmigEsCUIBP\r\nVZxGBHfkaPGKrjPCc3d7oEiTd7md0hROJWw=\r\n=64iv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b634251c1f816bc66bc81c76758fd339ec40a76b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a515a2d18.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a515a2d18.0_1664391296207_0.6022630901321437","host":"s3://npm-registry-packages"}},"15.0.0-canary.ce9523167.0":{"name":"@material/auto-init","version":"15.0.0-canary.ce9523167.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ce9523167.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6962c525fa9e8c4e5c41cd47848306574acb3726","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ce9523167.0.tgz","fileCount":13,"integrity":"sha512-0odzulNRdgxacS15di/7DKMG6NfseiQ7hiYz3AnPE0E6B0DhB4xPfAmLOQWVXQOWnwBbaZtXV9bedrVoALMkuw==","signatures":[{"sig":"MEUCIHP9BOpTiq52wi5YRrRhpK1y7bvzVygu8gefJU8Yn3srAiEA6a75tiShwUh7fnlVg/XPEYuuDj4aW9trosFFq7K1F9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNgBjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryCg/+OZGPje2gzLetjiSSb7xxdIMkQ+V2KzEwXKBqqx+zhcYm+KXR\r\nBDM1pONH/BVG/9J2xm54K94wz8qxndfPcAHewJ43QL3NK3nUfY9Hu3xxa+n+\r\nhB1UHpF3k6Xgg/VLIRyMKh9J7gVQDpTc8jJ0AJOqEjuJ3UPvp7crfMMuoT6A\r\nn0r+Arsad4IxkvKZOjPVx0dUB7ZtRuJOD4KZIwjMeqJ1MEQG+SaRQ/DO12tx\r\nEuwkZLD0D5XY48XM3F/Vkg0jLW5/e7wUvUNhpZURhVXVRLJKnebULiyJ+7DZ\r\npqcole+Uau7kUa87/ZNZ+95IAQjvPr6m3KrcH34Iek5NL4D1xAzuPENjrYJu\r\nkNbnUuySiwP38+m+qmBC0f4Hgpy9dqMriVpCqXABeUUj4UUoKDvcoJPxpKHc\r\nQU3EGYqoAr2tqqJKbU7HeV9JnrZs3W/6v5BYUt9QnKEBBTUo9DF0g3k2MHPZ\r\nZ4/m9vl3Ys4yIIy8muApRdi+pLgQfeH/1QB/LZ9ZJ5P14enLQ90cIbqnLPHu\r\nxLOqin01/498nDi6cBaaHlAiLBB4ZiOK+/rsfVmutwvaMyHt+2iqLYRz0MLt\r\nOV87bsdzr4LAhgUP3KKlUGNT7Toe048muLqjmLHOHVSE9ov2Pi7di909SeXx\r\n1qS1PbrjUdqqCsz927nTgghABNnc9lXEElI=\r\n=jOZ2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8aac5a80fa36dceacc7b3a6e2474218f9092a107","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ce9523167.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ce9523167.0_1664483426864_0.17505638652933553","host":"s3://npm-registry-packages"}},"15.0.0-canary.b2310f7dc.0":{"name":"@material/auto-init","version":"15.0.0-canary.b2310f7dc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b2310f7dc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c29ca190697bc83ebaca49390494778f6321354e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b2310f7dc.0.tgz","fileCount":13,"integrity":"sha512-HFKCHxDpK11kHpc3RUrjWrjP5cTqyu0zEG+MX504epKOzasQ35HU4BTweZy1gvg6slgG1K3LHX7gTM2f/UNzVQ==","signatures":[{"sig":"MEYCIQDfWz8XmimMaDqlx6xEGmD4NS3NAz3op6/PfrR4ES5qJQIhAIiOGnigRUOvNelvXw+kYknZM+HbHic3uodUb9J+yjjY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNjSTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVXg//Sm7CvzYoFudLWxrPGgvisZ1hBCAqyabk64K8pR2NJN1Sp/J+\r\nL05M0xS5JVF8n9A0QLE0obw6/fM12nGrkVfpQUDgmEEKTnhQ5hlRxHpnXdl0\r\nxK9AyQ0/29JlNGLvNO144YdIkStmf1pTDZnWICA/zqtQCq8aWcEVWZCE4AJo\r\n2aI2j1gEmocIC+Gr0TyM747PE0Wf1LnSJnAe0rLbU9WZ5yofGCW6dB0yfxz0\r\nh8nbKElu7c8gH39ODUx/Yn4eQXT7k4bIXWYpW7DN6/uMpLd+4JmswdNUFR2t\r\nVXAN3BdtNm0eEMCpyjgDbC7z8hO8ANi6yejSC1Fot5/93NiIx/d2uTGG9pca\r\n9fWzDLy04T35KIRNTdwvtJhP0gd3tjA4svbIMt6rIsHQQEQBeRygA3Ox403b\r\nZQFFgm4s37ooMa5dv+GIL1IEAjI31yWDBlJ21mr8ESuJCNjNb8NBsceIkU8z\r\ncZ4COeC2swyU0M1HRKVXip5Mk0yi8zjTHhOPkpfSsh75v5t5kEsqwWAud64J\r\nfa9B8EB1KvrUH+CQ/CoRp6JpnEKGFXcWVzr6/oJrblvZm051TCOBnbAE4jS9\r\n65sgIbwfliQwDRNXTty7QtqlpH7qtA+c/fiGUc/cAOyqRii/BzFkeuuVB2P+\r\ns9addTb8M4I9uADw/6bXwwEp8Emt8OV23Xk=\r\n=SAy+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1b1f8d124dcef049ff4f3730b930eadfe1e2a58f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b2310f7dc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b2310f7dc.0_1664496787157_0.700700658564982","host":"s3://npm-registry-packages"}},"15.0.0-canary.a44241e54.0":{"name":"@material/auto-init","version":"15.0.0-canary.a44241e54.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a44241e54.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"41a5f19c6a471f73c077630420193b76aca508ec","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a44241e54.0.tgz","fileCount":13,"integrity":"sha512-2tVtYpgkAEWgRW2gdBJXZ41A7sg9egUMZC/1jNEsmSN6ZIDUmvvJftPyjf0fZP3GK50y3WqgppSo1GPHNCQgYg==","signatures":[{"sig":"MEYCIQDlQrZ4xGf2sS0wRsZ4D5If4k3sbRtJIA6L8J+nUBo+OgIhAJ8x9btv/FYghvB8hB6Qw2iClj3vGLVBsM+EV0+leiIn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNqbGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0Zw//TwLgFMR+v3dynhj28QSuF/Sz3RoIUmnlGaNoLE7MFqK4qaeR\r\naaHiF0meH71zRaB2cYiAIH+Q+el9YHlGSzRZanVWdviQcfKApu/LKMXeXT4i\r\nKdcS7abJOB0D+5pmVTPWNIw6T1/VXSiQcn97G5TxEbWdJjRa8J9iN6T7opKE\r\nUXoWNz5wvw4GivynMxfC+dIkD/lfDncWDEL8fig6hFSgDYOmONA47Q/BtXB9\r\nmQ8S0VEG1mO04CQagFWzr8ogNvXB1NdxAvNSqbL753bZmU2Hd3z1rW6AeCpd\r\nvM5+S0FxY0SF84MkztcnvVyqxr7Sjb30++LJeX3Q0k435GZx9fv9uRsW/mEV\r\n4gvkqEW9TgjMAsw6jd2PtEflgahqgC359RXp2BqUOVdBHpz2bysSC1x31C7Z\r\nS6uicTFDEK+Uzcd6mLgfU0EErNmAjYtAT13AvmOdySRz2SxToc+UBURQI31i\r\nQe8MvyuVibfKzOESXvTkkcvS605fCsbdBMBuPh6mBOym4mWz9OspMRo1lJ3A\r\nmNBHdz/d4jiLpoC9DZLEA5dS+cWm1kfW2dyyBnBATUgDoOOMSKOCQMGba77j\r\nL1YcaIQfPqesftnceBU92maD6D98PcmydPzHOXxiwBFAbgmhaRjXtWB3ZF+w\r\nYOYLw2iGZ8x1W8T+cNNlIdgFrN6aU/BOw/Y=\r\n=82N6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2a5fa6460bb58b3b2866631eacb27411a12f8d21","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a44241e54.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a44241e54.0_1664526022463_0.5059121859541482","host":"s3://npm-registry-packages"}},"15.0.0-canary.0ce81e115.0":{"name":"@material/auto-init","version":"15.0.0-canary.0ce81e115.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0ce81e115.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a106d8c0ae8636ba667b52c033a495ddfb3e59cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0ce81e115.0.tgz","fileCount":13,"integrity":"sha512-N2b/IXAZuQIszEAVR7NMgN5zqnXoI/Bade5ep6NqbBihM2gGfFP22dm9wy2BkZ7VClFWHJiPq6eu9hxf7fVWLg==","signatures":[{"sig":"MEUCIGBoPHA3iCgwF614MAVRXID1F/UOazmT/jINcev4UcLUAiEA+o7ZmfX2IIKsSc8hf0tYUctDFWQ1T3O6+S/6KqvVz9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNzK2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogcQ/9HI5zZy4DziE9EkWnFQcdiDEkvQtQDVNttVZ3KuV0UpEK1TYz\r\nX52aGxRB47ZlQx7C0bX3LjMq55qVTiFITBkInZL1Au6LxwQFyKYy4ncuVr/O\r\n11JqWJGsEgwOeXkhxFVtZ3fHhzFbU20CGEew6IQ0WsiGDLhg+z2lvR/mBKAu\r\nxYJpyBS5avrlUnEIBRAw0bF2cW8Ri7vQcd2QzD1EpMxYH/jQyAmWFBq7fxFN\r\nFdMixsvgPDocdgcLijq8oIh6QLKzR9SiQ5rjO1TyEGm6J6d6fYxsUUIvnkVg\r\nd6wY0vNbP89s9tcZFORbjfVs3ciwO5ZhFEaQ33b6gfIuLA2zYPUYPQ4Tt2ho\r\nH/UECywDDeMj2xbtN7XQQLCd9zb8depg5d9oxOskH78TN6YPOj2aGmErF0AA\r\nD8JAV6gYy9xbwbaxzTAoeCKNw4DUXnfWub2cXUR5AcBoOKN7+AccVjt2EAxX\r\nybr7cHjT1MO9D6aP3K41sYDqlJqHxi2Cds4h6k88AlRIPFciOmVOeKHVVAU8\r\n38V9mafmiJHObdc2/tAAsO1Xir5gawE3T7FNTdOc8GERBzmjgZzviIUys89r\r\n5aNwcjXUtR8bOru0YaRv8fmTUC+VjezJQemEnuyqcRnYuUCX+U27PeNBc2LL\r\nwTKBdjgK38frORjhlGmzGNzSqhM6FrK0jVA=\r\n=0kiC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d690b44f4e157e829199ea749861c3b827d46dff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0ce81e115.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0ce81e115.0_1664561846280_0.30064853460860697","host":"s3://npm-registry-packages"}},"15.0.0-canary.3cc30f6ad.0":{"name":"@material/auto-init","version":"15.0.0-canary.3cc30f6ad.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3cc30f6ad.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4ce09348982fea0165176a024c8663d4541094bb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3cc30f6ad.0.tgz","fileCount":13,"integrity":"sha512-qLFUIkdWxPI7svQ9NumHHYOqezO6u3dIJ4cHu8cQvOVISkYTupZWt4bZpwZTrMVZeBxlK3YA57mZv8RtGB/v/Q==","signatures":[{"sig":"MEUCIBlKbTPcALtWY8hYtoWzbYnX1dxFDydpI/qn9YKdG4nSAiEAnh90Krzug/cyR6mH21/Mm8yWP3gNu8kf59zORiA8oLQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPGrgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYeQ/+M6kt8jRfJ/l40/pRjuJeKsgeJMMAvlDrg2s9PLXLVCZ6hdT7\r\n6arf8efoXG6sCE0tL9xDdsCXLsr8zTfmKMbl0an4GQSSca89SIt6le+qoWAi\r\nMhz3S1+uA/towtZY0WwOu55lXwctK2CyxITa75dZEfWVChMjhB0UvJ7cbGFZ\r\nHJ1Gkd+ShXLBZjPGb9b24KgJO8d25dEcf8spWvbXoohiYRhmr/8u4U0F2vvt\r\nNjh3RikVYGB7je5hyzF3dhBJQ+mEmmBatbJ9Gwcsl+GySSgu/ztBlHETVx1c\r\nyyBTX7NdAgzCgBQ9Jn4kmRMzDQIazPpB61yr2iFuUa5srk/cVmDwO2HaNUGm\r\nEGXVMxeflwblnklutuzzN1M4TYhxB/9VmhIBATBVXUSBfDetPV+nGDlpgTwJ\r\nRAjLlcQa+4+xHfm/IPvdip1P5FCBnep6r14tBRfFRt3MXNq1XPiJZxuqooE8\r\n7nZ7p3tKAw3S3RUqMRyTqh+iJ8MNNAZqsZrfWoFNiL5VRBvQambk7odUegEF\r\nm7xovtQ+brbJFgTQLeQdhuXT0svWmeBlzM6z8W+6gKmIu388G/FSAxiLfb0j\r\nqTBIUgbDWQgdLd+5B6LAmppJYndXnfQ01e4kJLaqKIS2OffAQlTnEbTY6C3F\r\nWmDY6MqY84PYKb3R+Cghf1yGB84z/nuMMIE=\r\n=bXup\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"78d02265193749df2eae507da620e7571c09da12","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.0+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3cc30f6ad.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3cc30f6ad.0_1664903903722_0.3539817881374012","host":"s3://npm-registry-packages"}},"15.0.0-canary.d9cf98e60.0":{"name":"@material/auto-init","version":"15.0.0-canary.d9cf98e60.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d9cf98e60.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fe0efa52498c8db1c6d10cca7cf01c3f3afb4e24","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d9cf98e60.0.tgz","fileCount":13,"integrity":"sha512-A0ed5Yn/gKCJYNFVz5+DfgL4xDUszPt2JI1LXBMTjBWQbh1tpJMvOc0zXWYcwh5piXusZC5+OVU/zCd6IKdehA==","signatures":[{"sig":"MEYCIQDVE5m8FrsCMJM50NP0jC/L7GERQb7Sqcb8RT8faNSJPgIhAMnOOAOfqS8qRJR5gxhS7WRBo2Pjkgdejy0suPsylTJl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPINjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlexAAgCdvVUwoviBYhnjEO3xOrRWAL5YLe5ihipziR5WqBzhzQpwW\r\ntiFi6Ac2pgh8vtbTdgtmOzoBuhMvcnyIF9AaECkY1C4LdBxIelkkaQMOWNR9\r\no3TpmOekIDZH/Mp3lddXm8Vks3SSC22q8PhTtaz0i3+KIuWAoYpzy4k3pbgc\r\noFOu+aogWoSO5ECi7WF9JEq4KYNC8vLpdT5JrYDCdKJ8IHs3phiJi+dxiNQv\r\nKpj2c4Qf1yKVWwa77bsniNrj31bGmhHM3lq/BbEzV1H5PXKuilDajSEY50UQ\r\nRZ1Kl2ZwQDAgw+OLagqsTarXp8q1PqzCqHof0YMWZAOa4zSHRA+5+NkjQLCH\r\n9B2s7EsNCEZyhCSOHA/LaoCy7UA/cnDJ+JIpF25D27XglVQyHUROMFmCWxG9\r\nU3V0RYd6hXESEVp1eSeYwpxc64nnhFdyn606cBoy5+m852pZJbdcltg5dTlI\r\nl8iGi4a1hciTQ65eWJ0sZv6uDJVLh+X6Hxo3ixP3ZyC0s5Kk2RbEyeQW3ZZJ\r\nwrH5NG9kXCTTjtwDrcNGINIft1cFj4NH9X/8eh4k4Zg+49O/1CNgBWvcgyg9\r\nASo/Hna15jIrFOtW4Spp9bs5sdJfMa3DlxVIOeu6+6ZJStGl4BA+EtjyT+9S\r\nKugH8JF6xUfKuQrsFOu/aROyUiz1E/5eFfM=\r\n=tigC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"554e3182e6804b0bbc262ea0e730d556747b7382","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d9cf98e60.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d9cf98e60.0_1664910179335_0.2821630463375919","host":"s3://npm-registry-packages"}},"15.0.0-canary.d71935c8b.0":{"name":"@material/auto-init","version":"15.0.0-canary.d71935c8b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d71935c8b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"42b23b234a072677751d52e3c7630c53a6ff23ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d71935c8b.0.tgz","fileCount":13,"integrity":"sha512-ToHg4o9w0+Jrok0Xmyda0tNwiCRe06tCmiFIKYb/zo8rZezpdar9bxvkLXaLV7Ls77j8KUPc0/iF3ZVX4ubWVQ==","signatures":[{"sig":"MEYCIQCQP8LdAZidDSuSBcmyGNTie9RQ+Yh68J9O5QYEoA7zWQIhAKitGtDOV1+813R1Taom2jf86xXOx2Jmefn5XvKbMO1F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPo5NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsOg//ZC/qMwlI+c+G+mzXk42ovLbAaKMw+xd2j8LgkYZnv+qKGe6T\r\nd7DxHyhr9It9KnPoGD/mz5HZwA1Vo399Dc9wTdMJWNa37rkqcidjDWUxJYhn\r\nL2PqiVV+jWTiDefkq480WHDFy70oTA49ZoabzWWlDLBDnZ/dx28vnBse0MNs\r\nn5qr10h8on9Dw1MK2Sf+5cp+UsnIit/0pTOPvm7iYADXt75gip+61dP/ZvV5\r\n/v5kgvXWeCf4iyCoouf/hT/R17n5Gm3MND88oyJkZQiR+BfUCYz7NEdj0+e8\r\nDk4wYip/m4PbGcJvifpqy0BxmfmYEUES20UEC2DjoaM6YghBHjsYbLBHWuUN\r\nDplMGUw3Ma4rTw+YLVG0d0n9Doctev34M5vi5JHdt7DMohF0cD5kWzHwrl7t\r\nINs9ePao2x62XkdhWkayLwFkF/DUesMl2W6xIm8LKOToNTOK58o3Iz+p2LVE\r\n140V39L0BVbf0bFMy0I1EfywG3y9cm3NEl2ZuDkYlGNDSYXIs8v9WIDBTdbf\r\nXNg/F4TcrejakyykTaSYIg9aWeVTQKyVuwpvbO/jPITpXhpLdjwIpJn/ncJq\r\nWu7n8QIWc5vCnKUKk+p6kYu5EjvN6ZS2xb5s+JOeuaowbXaS8dM7Z211Lp3z\r\nes+zohzaZP5N9SBARnSIk+KhduLnz4BOR5k=\r\n=Kz+d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0e9f697d8ab3c0b93969f61d22a2b06760934fa3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d71935c8b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d71935c8b.0_1665044045615_0.7845090932307144","host":"s3://npm-registry-packages"}},"15.0.0-canary.49c56a25d.0":{"name":"@material/auto-init","version":"15.0.0-canary.49c56a25d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.49c56a25d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"35e9552a288c101e2c06ecc20e74b74fc046ea87","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.49c56a25d.0.tgz","fileCount":13,"integrity":"sha512-XuJdQyay0vZWx6BHt6VnZVxyKImzTiZuJum5+J9TrBkaTGSw0sISiPIXBaZUOXBFHFBubnNI+bwAtNtEP4QUwg==","signatures":[{"sig":"MEUCIEB1qOagPJJBxZtYQGdVAmuaDk1fxRwBe+gBtYb31WkEAiEAttJ78wzNRaZOT31J6lKht3GbhM8HgiYO7OhCWQS9q40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPyNgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRdg/+JxnCtUT6158aO3BpUfVaolyLi0IfN3URzwBCtNrVHNu1UPsk\r\nNy8Vgz+9YT55IDjYp8uwSd+Is4rzH8KOMViDlDGXv3ZhK64GMWklyncUPbnZ\r\nPG3amTqrBL0Z6CJzDw8e1yTIIPt/R2lrmisICHlLuW5tPSoq3ZrpxneolBPJ\r\nxjs1e70vOQz7XdIqVnk7WcKVoFV0UG41NSSe8H7p/5EHWZrwPS2vnT7c98hh\r\nT+Ix/PSaX3DeRxMiI1luFkt6OlTR76Hgsosh7+7cFRO2UCMohtgYwMY2JKk2\r\nr8fOnQ/OEvoVdz+mnEYT7KNQK+tVHP/vZQkFlDneEkkCJzLLD1iHAgIvk9Hj\r\nja41WRTvfRtS9HwkGQ93vtl41+xbBOYE4T8g/GZRgenCLuvksqT0mzRviqdp\r\n45n2+hH4HTv2BHRBjMS7+IXRwxNFO/pO/Ee0WTxB6nYOJC2SUGKHqfZ1OUby\r\nBe2fX56ZM4hE83w9gFaFbS8DPxQkiIlUINnkV7nGiB9XuRraw9QbLOrYSnDJ\r\n9CsQTdKIkyGnpzAMbxxFkET9lK8g6Hri6248uY/vTR2eA4/FrRLemOps0lJD\r\nkkZaIAfvXssf8sWVDhQuY5ESyj4+B9TOZbZlaolFZGl+lLHJjxKjhYeJThDo\r\njX1/ijLYgvPWUPACLs7WOhB4Si7hZzV2dKY=\r\n=aFur\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"46425b4f1ee71ec9e841d7ffacdce7cdc35e7b69","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.49c56a25d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.49c56a25d.0_1665082208258_0.949171132716049","host":"s3://npm-registry-packages"}},"15.0.0-canary.07acddef3.0":{"name":"@material/auto-init","version":"15.0.0-canary.07acddef3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.07acddef3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3247d70571c013d9f2bcbe2de9ef57ceff9178d3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.07acddef3.0.tgz","fileCount":13,"integrity":"sha512-cLNp/I5fv8batXzVQfU7vs46UzBDbm24qjuCOE7U4p/Kv7tAg1qPJICLJHDh5WsFUm5GRrhROflbbpqHAqatGg==","signatures":[{"sig":"MEYCIQCgQ1DWh99lCnSyRiTIKSoocNYJrj+OQwmZscZMlnl9ZAIhAOqExN4rV8bMFQCpRFwcKF8vqwm2g5Bo00l8v/ebbugE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQJvxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJvg/9EmpGOlhh3vXsTKLpCk8UUm+5p04yTxs/X+PeXkDvSOUQ44XV\r\nQ9wWpsaPXKyWS6WGGYTW186jAk/jOEyhQ8DAPZmKFn4rl2Vd7v+616J1lVdv\r\ntpfrmRxh+gxH4Ri5vhCXDUBxgKD3XRYyStN6TT96G1D0zSOlSlETF3A5H1gJ\r\neBWVmDdGLbSR7Ev4LUvXyuU78XWGyDpVLXTf8OL2lW5Sbd2F3kqQW1dkvIm7\r\nbNJchQVJXwjXhH1tVF3CthwVzqXcvcFPHlrTfUQiDkYBNX4RSKyeFNfLqsI+\r\nIeanvme6NmiCYa0n45OsmeWOsUH5+/7BjY3Mzokii5vTygJPy8cG96IfCPbQ\r\nMrx+Vzl+RajuLX6pUPW5SQWBUJPAEK6fTTTtQlYrQtQvuu9RkhWf2bGXJ5E2\r\nPN7720yM72ekAfAN7ZP2+nQMKVmBxQoN2IZaehKeoOanlGujaIbVWplORjAw\r\nOewuGUK7IZOVbkJGPO87l07fJkT7diAKJE/w4O8fsJcDbiWB2wsj1PORDpaQ\r\nd57BG4/UJBGOYbzu2JgXrffRPFQSHWvEG+WMCRAtGow7kVBhB8+g2kjLtxBI\r\nLIFNCv7YSZDx6kX7FkCD99iUNW9GVQmwJyaEEQQuTQFD1pQs7sec3Wj4AwfL\r\nKAHIT05rJa3C+/QX7EwMMjXIRoD2oOTdfQE=\r\n=6vES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f61a6c26b4bd60354b690448809f9dfb7ea11564","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.07acddef3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.07acddef3.0_1665178609209_0.46055430475824033","host":"s3://npm-registry-packages"}},"15.0.0-canary.1c74eb2c0.0":{"name":"@material/auto-init","version":"15.0.0-canary.1c74eb2c0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1c74eb2c0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4bce6eeefe1b917f785d1c7bbafda3f2f0ad2b82","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1c74eb2c0.0.tgz","fileCount":13,"integrity":"sha512-aTwNn6RF3cM92J8H0eOpqr1caci6Rrp9seOALLcE/40XGfYxTFPs7KzW8+mwHGu6MgAU+C7ilwoRQuM87DNydQ==","signatures":[{"sig":"MEUCIQDFs6xPtq7snI5g0jbNSeITRFY+neRgLpdVrrE5QTGSWQIgWpHxDgvZ4YJlFd5VzHAibHxYhvfy9wg/6+Gv3b8v570=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQKAIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyJw//fUKtXdltjpzlyEcXBZDDoi/1oN+kxxjFwjc4+LtUTPpKEAab\r\nkL+Msfb3gWMlPHlVQTMLHbw8C4IfyBJprSr1X0tkBD5Y61Jc2o/ZwhzTZF97\r\nobGOynsqr9xx2Lwmfu14Evy4gHYgr9HXeXj7zCOj8A8uGYHrQ5K2ucAiMTKS\r\nsC6PmkjybQF8MjDwc2IEac3Xh1x3K3gm8DZJTBSNoTIpWHq5WaO1qBlaFpMp\r\n0nP5ihQY111FzexE1X/PxDqAHVSjPbLTJuuxnCchPr9n4+/BwbeSJTkJdYLv\r\nYHEhO6RkjSBymFhG/noVvzzXAA32eFWlSQS/Gnho/Vk1dvyRgnXB1sQTPw4q\r\nQ1FXgVgjZLjhjViOcSitlKrE5h90ob93sKeDCX/yQODIp8JJU7ZYWTql7yoe\r\ncdNgILyBBXNv05eYfz1k1QeSPCxlyzOpROp6PJHg7N8/nS1tuiUDekE/uxU/\r\nw/3PxDs4mKZdoLxCAlk95uoOUJr5jwctt6iCD0nGecGtmGdx5393w3gE+M/1\r\nbviI+4C7nqhZs+hIEfbd2x2IxO+vvrx8JVsSND2WmtQI4VewJVhocb1JYNaF\r\nO9b159ueElKSgSRHKM7gwWnXy8ggGlViE5Xb39YdEYoHTb38V3aVbPXgI8Lu\r\n1vgrPGe9PF/MlpoHM9yuo5c3jLu4Vmu4pxw=\r\n=9UJ4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fa2e48f4e71714ca4a637a500ddf18f562031ba2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1c74eb2c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1c74eb2c0.0_1665179654721_0.8564168930597751","host":"s3://npm-registry-packages"}},"15.0.0-canary.dadfb713e.0":{"name":"@material/auto-init","version":"15.0.0-canary.dadfb713e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.dadfb713e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8af67bdbe4594a24c07bdb5926b43427a3091f36","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.dadfb713e.0.tgz","fileCount":13,"integrity":"sha512-aGYwCerWJTkVw4bX0qBiGf4oYHCERYeGNtvqpJjPrUBa1x2u724G2XdLqpXltX5SaB3u84PVOZL+tuxA6T9gQQ==","signatures":[{"sig":"MEQCIGpdZL02Hk5halXOSuubUIUuKXMq8auPJAHVy09OsWdvAiBMmwYQ7aU4BKt4pPxoEAdnohr0LNeQZBC4NaVEuN6awA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQQUDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7qg/9G5GHGd694/s3t/dZyR0ramurYIsuHwqA5l1h7PUUaiOkwJ95\r\nKxkYq90tjzWXorKvX7A9AixvDRyR+5DdQlNhBJeeDXzmGlZFUsHMoS21zdBW\r\nOhm6JO6R8mWB1nDppdjkIM7mZ/V8STXTlsCa+dC5IO9ER+x6zzsr1E8h719Q\r\nrhxy2aLy/8hvnk+Lwks/NuSeIwaMygzeXZ66ZGjmTNpF0EGtn1dxGLXNhCmD\r\nkinE4EYr6MUvX1MYQ4JGb2y9sGSLdYRaq7xNSrZ2z3wjMthQ6LIZ3n+7BC5t\r\n5GGN/baX7pBahCHhmWxNRtFk1MtI/22JKhKPwP9uUQi30+O0oChu4/TEQEyA\r\n5h3Thr374v/EnGNPCHcIkcO1M+6cIE4cqsUdveBGseMxHdRD4QURKl/kDcNN\r\nYGAYKYSgpBqYwCUE5MK2tAUDE+LTOweOtIVlOw2irNJD11QFK313yEh04w36\r\niVQVpbfRDPrAXAvAAuE+19tKuP9UG+F+yoz6xE5K0yLSzfWt3F3pNnMBOgtJ\r\n+kpnNqmHAPLurTZ47bsNMdPPG7/vfs69iouWjj1xbaPh0zJ1aoh8w17/4twl\r\nYQOLSzWk1GRZxBYMa+IF2YqZ5+/dgvhJv7wnevsWIzIJex1rx5ePvZLTwCPd\r\nZ27A7yjkHcKHtyaqq7LcpxCjJNL6w4iqR6E=\r\n=C0JA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc577772f45028a4c4dca1d7c8ca8dfcf636e763","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.dadfb713e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.dadfb713e.0_1665205507221_0.1772477703019535","host":"s3://npm-registry-packages"}},"15.0.0-canary.395f1ce61.0":{"name":"@material/auto-init","version":"15.0.0-canary.395f1ce61.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.395f1ce61.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e55c8465b2a74df5c87c8b11d20726055f5d637","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.395f1ce61.0.tgz","fileCount":13,"integrity":"sha512-YRbqzCoBoxSKsPNoP1OIn2xlVg2k4SjHpqwXwXXh2InLIYpi3IcsnxLQa+s10VPGL2TOuXj9ZuBSh+40tSYYEw==","signatures":[{"sig":"MEUCIAGQIoiET/NyBan05A7Iq6iwQebrg6z7kBDkbLk4OogXAiEA4RwP5ddAFgiQqXRi6ZJB27F8bPcXFpFkLqT+906TqsE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQQV6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDZw//XcYIR4KCa1hJuNxJ3kdVIkeiljhaImeqsshzQzwPpg0XVC8r\r\nKiGEoKNv3NGOxZ+DB/TpgTrKwms6COR4EpjWix76Dl0cO6W7IHBSspn4HGW2\r\nFil2Ar3/IH2Gu433/gKteaKaO2O5UU+6I6cOPV+/bcEwFyeBzwX/ZIWerpdO\r\nDqo7qB4xJG/+477Wl79W3p+EDXoP2NvrzpEKj/F9Z1eU/jrf8cXwWiCaGwYs\r\nn0QS+QVt+XiENkmpwZttsNufmB64a9b+zRpXncpYUHhQBrp9X5qklssv8gLd\r\nDp87UsP+vc8D+UK52tnJCyMxitS4BVL/dkzBzi3mVbZixlcsKYzZoLUREfMV\r\n/BLRvfbgLpZtmht8cqWavHA8bMrHSbieJbdAhMa/5WR5236Ec/2yMUvTBA2j\r\nTwaiRZxh9775kzUvqDYp055gojm+6Z6qdI8FC1BAr4SyieDemUMxR+9xB1Tq\r\nIqAJtBih0rKCwxIWt3XSAmmu3jGNUpM58TwTqObbPuuDMXE89u3Km3iVw+a3\r\n1m0F8TGxtkx2b6ktWYIayWiTpb7C7DK6q7fofXzWSU+k8M10BTV6jvIzoCoj\r\nbWKnmIcoAlU13qCNz/n0BL40JQSqaiji/v9Dxo3qhYTupL2jrQ1DIb3mHgXn\r\nwnt8PG674rPYrEBxXs3/1uqc1TpkkGTxFq4=\r\n=ro80\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"15a2d954f8c5260da0e9b6f65b6f49df69764a95","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.395f1ce61.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.395f1ce61.0_1665205626307_0.062020730275118785","host":"s3://npm-registry-packages"}},"15.0.0-canary.e741b5c82.0":{"name":"@material/auto-init","version":"15.0.0-canary.e741b5c82.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e741b5c82.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8f8441713be8897c60cbc909a687daaff3b3b104","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e741b5c82.0.tgz","fileCount":13,"integrity":"sha512-4Futj8OaIvCl/hqxWESGQ1MuD9Hi9Fds8SDAdUUYGYCabV7G0qFMyY7vq7KpnViwzgS/R6cyk7j0N9VsjKkXpQ==","signatures":[{"sig":"MEQCIFQXohZQWWGoXZazQ6+bbRgfeMda5JOebx479E9iAG5fAiBAxyeLB5UNr8gFoDZqjqmk8+E7kOELczKRkPwB4BgZ8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRFhOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreZA//TL3T4IJ6zEhQM6k7hetDK6rC0WRhysFAXLSnDvF480mC2Vtq\r\nn3xUxuy8LgDZxhbyUHgJG2ncEusvuQfB26JP1XS3gFn0a4yzjWL2AXSMcHGj\r\n8q+VgDM1JF+ss2FR0609mb+GiEzzMm0L/Rn4kNOb+EfL+E4MdmPObvEjPf+4\r\nGo0DremA5tIH2Vb6FE5cXVZhkMSQO5s3JyZij2OPbq3Y6BtXT2UxB9GSDgw9\r\nGYFufCItnuGUttWtMUs+uYMPmbuJvu2EUy0sIJwNqpTV29QvwSuihnglufS8\r\nVJ7fLVCk3UiGH/9/LwcvL6eFTxM3Y+nhm7dO1ud4c1cIcl3Hzt5HUovZKXxs\r\nC2WRt//HEVd1JWPgr2N/Dge1Q1tqlvGZJtykMxpE+G065ByWGr1iWI2XrUdW\r\n9+R/z9DK/uZuAXQbmEKCEI82TIut3J2UDzAiHzO1kgVP9ZmERI3m7TL1WVvk\r\nwJFFLNxQLyWqp3yL5ysfOMHWt2Y/Ud2uiTDf1VTd4YIl/QrPNTZ84G2h2DFe\r\nj0LaQ1O55U12zpt/XECy+EYUpmDw+EXG3/Ji+Ik5OslNRNPBrNUdhCMTFwds\r\nc8Udm/RrxheNDT2ApL4JOgU2OfXBk4UdzkMa2LhuO97/OYKPolI+uecNIjwG\r\nvw2OTzv1Oie6OKJMCv5qIQ9luM0udjDZUME=\r\n=gs2s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"489583dc41bf06c909feb0a87f9679b40fe6c03a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e741b5c82.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e741b5c82.0_1665423438334_0.9486898408192399","host":"s3://npm-registry-packages"}},"15.0.0-canary.582f3cc1c.0":{"name":"@material/auto-init","version":"15.0.0-canary.582f3cc1c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.582f3cc1c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c94bc32de12519662b5404ed649718db01b72df9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.582f3cc1c.0.tgz","fileCount":13,"integrity":"sha512-mKjr7OlnGsiJ7lGEraK9R/A25yGEu/nui3tOLGocJaM8LvknZRmYBn2uM9EycJiy1ADUUIK1CqHY9d8kawM79Q==","signatures":[{"sig":"MEYCIQCMPBpOjFAE5J7PUWqFeJtyd2hb9ZKrTWzkqWSjvJZC4QIhAKELvVw50Cnn9qTqEhbHKGSAL8XQyLMved8oasEyxWRt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRPWNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo00g//Vm3D2zjAp7Rz5Zpv/3vI2Jsqm2RFM22X+MLDxwcZMml1IczD\r\naejUfFbCC0d0TC8yK0spBKeATKikvUAJI7ivLBYjDwyhWtmC5dSVKb/0o9dB\r\n5UlJNYKA/NnL4GwYBqVtZUBCj1w9vNUFjROhstP6XBcUa+9/ssw4gpT5acAW\r\nwGO4d4YqxfpUM20iLg1yrnLKSMcdc+OEDtQ5/+qHH6ey8oPsRuDktXUGg8wC\r\n4vcY/ApHEhRLtKzYDJtXrB3WcyEHe1PqXZydzGvHISvpQ+AIwCvmb/qMU/tG\r\n8xYsAiYBfT+jra+TNwjOG2O7ppE0j7/ujDsHtXSoVZPpNPIofAAJpyc3APkH\r\nZxtLbgcDTEscwVPzzt6Dy6S/7TU/VYnr4dEDjK+MBuOM65zSh2uGKRDQm7ck\r\ngmsQat2C/mAywxeyOBRafNjCe7ksAu3D2xRXGzy5HYKrDLkNxxrkE3i1cmVu\r\n10CodyTXGsvNJObj0SN68ZyrdjxXIwhReRI6yJ14yqt8M0IUpHzY/CIiuOlz\r\nJHZvxRZ3ty5PtT3meccek+ndWAs8KJCpM/PjLQUoXOD4NliETsp04UbtZWEa\r\ntzRBfJhVjpNF752kKWg5Qug4pYGeIwSD8xj7chqhhv/RrJGHpj975T1bcRs8\r\n8JB1QhW1xRFYc3mZCCpzMFpy4su1eGqa/Dk=\r\n=mcv7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9910dd1f5b3fa962bd02fe552774781896efa7ee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.582f3cc1c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.582f3cc1c.0_1665463693488_0.11306091634504312","host":"s3://npm-registry-packages"}},"15.0.0-canary.b1a6e3e88.0":{"name":"@material/auto-init","version":"15.0.0-canary.b1a6e3e88.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b1a6e3e88.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ac892f6262e8b5701e1383b6a89e0e765b0f1416","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b1a6e3e88.0.tgz","fileCount":13,"integrity":"sha512-MR7p+M50andrQSRDXQYuPXjP9qcnfYoFuhAlGocAeRyoN7bM9SZOkY0AuAN7rJ/5auywbECV+K7btgr9xdNOPg==","signatures":[{"sig":"MEUCIQDKbUGlwCzIfHNdUPyxtdiF8BRAHSKECVMYoVrCjDOyogIgBjQ8c8lbY9f3X0Vw2ULyKF+28PIRbuc2yDX3++oxgu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRqyfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmeBAAn+jhiyzIEZUyylfHboaFY2bcU/+aF0rPP6uem5d/vNGeQixZ\r\nuUS+M/5aFqELUTc2qosW2NsoowxEEb/Hmm0r8C07rWSFSby+efzzeMORyb62\r\nY/qQWnE5RTYuEfn+/lenT7uoaeVXNBA0KF1N95i/iyEu/YEQ31FieEMGDU8P\r\nKiE0jXN7bFEWO1H9t2+fDE8jrlwh1ZUpgKrs7jBN2s3N9vaqAJ3QuoRBxMGA\r\nGHDr3OZBmrrlmHPifc5SEPiyQ8gUhwgeOr3+t9Qo8PJ1xsDdG9xloJhhxQHM\r\ngzJc7t3ZFUfY39wXJSEqySFDkbgb7IYcvPvlPD4aKzlbGlTg0RA6RkDYMYKK\r\nBPCF4vOGfv3PmXttXT2UULMjMyqNNj6yEt7iSgJ+KcFRxuVGVqzQH33GtLjX\r\nC1STRcGLRIywN1Iwrp+P+U6rGaaZBfVhsgokujIEYejnvJnqupjehwPnO3gu\r\nrTTWDDQjyg8xb+/v3nYGCO9GM+MD92ozE/4tGYh2Oqy10Ls2CDiNgqHKAsiR\r\neyqN7D2KQHRbjGVYe20wdX6br8hScX3DEDkQqnW3HzAEUCzivRS2HIsqTyNZ\r\nm4f+TcVbMX4kXdxyAqVt1Xh6PX/ydSlJSxNgEc5bYXwxlwVRs/wrrHSxEqfF\r\ncnSU/3k4T+snVLOFFqFvZjdd4XiIFAaRrs4=\r\n=ZbmA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fd6420b1b81c64578026927a4acf4ea73b7358e6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b1a6e3e88.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b1a6e3e88.0_1665576095495_0.48613411336235446","host":"s3://npm-registry-packages"}},"15.0.0-canary.c9b1a31e4.0":{"name":"@material/auto-init","version":"15.0.0-canary.c9b1a31e4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c9b1a31e4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b57e812229485ab61858c2e42b115f4b51723ef","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c9b1a31e4.0.tgz","fileCount":13,"integrity":"sha512-2rU3GJ56iytE6Y4Y+1q1KRDT+k/tTYgJAUI0mRXYpaU0i6iQZ6wnTCHO+DJvO/w1+eoyLC0T5pZyKx6RU5UGzg==","signatures":[{"sig":"MEQCIEw5P8fjiaZjtwHsPhWF/MDLJSnomyp63dybmcbNkOmLAiA9fi/7Le6nTZ6BkdpsTse9aaVImVIhaGEprb13XvBHug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRvIFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqqmw//Xj8OZtUEK0F98rz35aLNF6kHcwtp6rmtygle5j5cYMTDARC9\r\nIOHF/K4zaiy/MWI+pAXX1e8//5DlhYKwUXWn477bRx7w96SngKJBzNOBmC8y\r\nEz+MdomqbzygkLk02Q4APouru8v3r/y9pZNIqUIJHWkjsnWmljJjpIpeVqLh\r\nLKjMKVnpBKHOpPEXZT0HOewSDJzhqzoDEfDjooJFDZC2bcsLmv5heXEq1aqI\r\nOlJ87d1JRCJihMTSd8xhIh+3/r0hXfpIqswwmNQWmRT2k9kCfvALS34ItikQ\r\ndLbzvKY5mKDFWQteD6ihGoPHRUUONet2FYkSzCbiITEHt95UsBGFC0CIA5K3\r\ndp+TXa43bVrucMhtMLl/HNX0Iz2Z4t3d5JSesAIGLMQKWuIBzwIQ6fcDWdeL\r\nJU3nQD4t61aAmsJaCx9G1Lx54IRqnO9GiazSK39j7pfCXdi4qs556p3N/RqW\r\ngLcvPK4IxV85ybc0WrRGy672nejvaxiNeje4BVyD6UM9kGkLuKzB0jHzZbe2\r\nleU/1fM61EqaGiuCfO0QmKnFZPBLxUpfjEyaI7PweqhAc1oWzpnCGH4CRyQe\r\nULXmsBeAVcNH0ezsQTlQHDlW6iPmDKVwHWU7ECDGc5KC6BjdZ/gbJ6he/xz5\r\nKf36elg8k3QD6alPnKEjtX8wA4AugYDT5M4=\r\n=Pvv5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f7a6b71c85fbf0d1a9db952402e002f8421baf4b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c9b1a31e4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c9b1a31e4.0_1665593861092_0.7974534429457798","host":"s3://npm-registry-packages"}},"15.0.0-canary.13e9b0d1f.0":{"name":"@material/auto-init","version":"15.0.0-canary.13e9b0d1f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.13e9b0d1f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"32a7b60f58e6f692ad0d2ad7af3912b5f78d6d1d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.13e9b0d1f.0.tgz","fileCount":13,"integrity":"sha512-rpHfm8Y7GqgBxFph8QbKCon0XJ9sb5kH4pqyEUGUMsUWnCMRtR337+rHxQ/TaoavjOZ+vQDOxD69RmUHO/3Pmw==","signatures":[{"sig":"MEYCIQCWU+bPrKrj5l/RXST+KiEI2usf5wlkMB7PsqoJNWHsbAIhAOrBxYOgecFTfeG/AKDE1MBsbGTQZ6qLjZOoCRoQ48yx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRxNjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9bw/+KJ1gVI7zmA9GUHXhnKqbWNGNzhle2Visia8lEw5VWJr58HBd\r\nrImuU3i1mAAHHjXMU0CsOp5oZX6Ugj9GWbTyIeVmL0AXtIIhr3JYjpXtQtkR\r\nC/c9opWwRUBFL2fIfetm1hBEiyaZGlgyaMNql+hXTOx1BaxyxJ6L0Fqj+Vj5\r\nXIZP6uOwsx50Zt4VrmJpPttTbTsB9PlUtpvkhsrCbfixHKujXnfWH1e7m8JM\r\nP32Au+dt7efaGWJRXbbe5/dJfv60WwFiAUyhWrZ6XcBTGeFHD9587GxxEB4J\r\nAxoq6ZQGpTOjzCbgMy5mHM5UHFX+hUVcy2na7A547713/FKylyfEFQkaPI/c\r\n0n75Xoz2VCd6ykijCp4LB8c6VgvTbv47fDh+GpRyCmhqjzkkjXTA+1I2fyCb\r\n5a2fJ1vcL1TwmDKdakDt8w7wQ501b7LjZMjEd/JkwxhhOxGdEhDnjbHui9Ti\r\nvphBk0XTXtngLU/WqlbL2z/tP+56qLmKEMJOeB8AM8tIsjozEnvTD6kO4EbX\r\nA74XrVbldCP24qYIXl5Pfj8/A4k9t4u8Q+7Wzr/KuCPE1PkYsIc6TP8c3M+I\r\nr2iB1in86Vt6AGu4//q0rgI/DVHCEuW+rxc77ZpbiD4MbwcAss9q/478xo3l\r\nzbdHBUQIb/AfW09EoGDO49RLQGOVlX3ZAfY=\r\n=dQPj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4d9f6e4f27b68587a15ebef6f003f73cdad60bff","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.13e9b0d1f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.13e9b0d1f.0_1665602402588_0.07439425457437521","host":"s3://npm-registry-packages"}},"15.0.0-canary.1dc797e7f.0":{"name":"@material/auto-init","version":"15.0.0-canary.1dc797e7f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1dc797e7f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd6707a1a33a23e5b36bd679d96212ae71d38e82","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1dc797e7f.0.tgz","fileCount":13,"integrity":"sha512-0G1LGRsPgDAmowj9H32JPu5ki0LtZlhrO0Pe2HxdVKuRMpSFRXymrnYLOLkNiWFPIiF40nNOzsKPy927cfqZog==","signatures":[{"sig":"MEUCIQCFcNHlUlJrO2YFDtcoXGEjzgH+WotNOkJdp2GkaAytiAIgYse9RSXpl7zQ2h8sJpooabw+ft6eU0R0ZcVV25U2h6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSS6bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7RA//cQJ3AcVb6rVEU8vRJjRCpYlnsKVAVBggKt6/b1GHqIdMdira\r\nLsjc8tUqI5XqoSkwuW8UVZE8fij/zER/kqZ17M8r3HNWGG+9fBW4L5PeZKhm\r\nMj2OZpEmWMZ0HzHjJ5gOHSECKkPLkTsx3jS8lMSxcuRkOnF9ZWID1vjS1dnQ\r\nImyt42F0eaoe6VahMVnXgi7LaIgYoxOM8mmiq6b9n1VcYSU3Rs2F3LRNHAvY\r\nj/PUQ8203iIvRBrDxOIG8s40ctRmr+F0OKryE43kWUB0AwA2F5PCw2D6r/AN\r\nbChjSrUg4Z3KqnV99n7EBOB+D8Elzeyj5SJ7oT+mcVPboiPSW5NEezISJZIK\r\nCqW9qNv86WelWmdmsEy9d8aRqVRBnLJK2wwq0ybjX35t7M2Xg5mfSjub1HvC\r\nbcMid1BcxROf0XOsO8bXU/ITQZA1iK6YRXss6mv4YImn+LAm6omB1lHU2CAh\r\nK0SJKEJbRu4eJ81Ht6y+6c/oK5b5+c0ZEeRMeFGL/a+oNknjWrJAJrFTZ+7Q\r\nIerN6tLAhwW9YKZOQw07OVBPldI5m8KVTbizKkiriJhiPnxXAtti0R+wDmxL\r\nwK1lcNaEs8ADk+bOXkH4wVtrfKbB3JhRJgGU+w8uFauKvd/GGtLYBhR6qvls\r\nJ9NAd/62Ykw/7PtA04m5/hKrAP2viMWZG3Q=\r\n=P8ZI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"22eb0904d0b7a84996854bc57cc417286deb08b1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1dc797e7f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1dc797e7f.0_1665740442967_0.9031595369003169","host":"s3://npm-registry-packages"}},"15.0.0-canary.ed4009397.0":{"name":"@material/auto-init","version":"15.0.0-canary.ed4009397.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ed4009397.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f080fc9fce0807a063a73d9345048bdc1c50d981","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ed4009397.0.tgz","fileCount":13,"integrity":"sha512-Nqehubapen+PBeHJB2VpXGQRvNYRdjtdltttvmKDUFnWmVtgAdhqP3/ijM/f4Si8GaWPRbvctGDqHy5bfG3g8Q==","signatures":[{"sig":"MEUCIQDginZt4HK0om8ZI/x7d0Ni75FFJPsMX+zXGkDa0zaBAwIgAUabBCm183cM9pCxXcZ0EriDzpU/3EI4J44BNH4+MGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSZNWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEIw/+NnzSDmunHurgG4EKjyA4wqzCZSdHgVGrNKxpicMgpJ8YdTTn\r\nA3ZQGSv04UWSTfcn8bYlyEIE+xsb459DMxhorwl1INoMs027jDoIz3bvqa9y\r\n5XnCaw2Ems9T23c1F7Xwcs/x+kLjIm0VYgjSHROLe7/LNSlTLpLY1aeHTpnJ\r\ngUE0sVLLtix8yFc6IBBYcyIefngSJlLWmNFKgFr7KSfBfG4r32KHahLd3wN7\r\nR8qjnSjFkQCwU8Vnn2ppVDcNKSsfhm0OK6m9tZiX9Wfm4S9aMVTL748i/eaW\r\neukVoYjBkyV8rDjqrU9zi9Iv87kzmWeRxW5YhY5c9immpz8uWohl9eTtsZLd\r\nwxh6AKzMpp4JKiOPHH5T2zC8o1HHjS60wmR12M6UMnVdTBmbjSTXdsn8klfm\r\nWdSvOmcyTwZJn7wXbXgoC2BivQFc66z9TpO+H1J2BNoa2FzPTHsRPRKY9eK+\r\nT5xFSo96O37vubHUdDyyQVEi3LqItvjP8ygqbCRqZ8+dPrM1iuo6gpaDoOv1\r\ntz6MmhdidbAURStHry7e+DfcolVRs9SeuovYRsyFsD8Kcwk2gtApMeZOb9TI\r\nMRNcYj4aRwRZFf4zzHe8MnJYZEz8rO+vkTN4nv5Kyp1l4f29KnXjzqehudL2\r\nomYhgc0hg01QhxrNJAKkjctFg07VzZyC+zk=\r\n=bTNT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a749634198bd160446873ac2c5cf3d4345b1620f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ed4009397.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ed4009397.0_1665766230689_0.7895768113586752","host":"s3://npm-registry-packages"}},"15.0.0-canary.95ef196bc.0":{"name":"@material/auto-init","version":"15.0.0-canary.95ef196bc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.95ef196bc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e8b0ada89b697bec675d73b76c04fb4634b13ddf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.95ef196bc.0.tgz","fileCount":13,"integrity":"sha512-8Wio0/re7ywgFl5+jTOMKjOPSe6yuc8/y58XkyH1hi9fTMYsVDiOelAOKD+P1fCRhuVXgdVLRzf2Xz1HpS2KGg==","signatures":[{"sig":"MEYCIQDgIH0TeWNZhcHR7h0Cf9E/hG8zDx41F847ISwCjlzGTgIhAMe7Add6leUsx1Hy8VWXK+1HAcEO7d9Gtby/mg2GwNwu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSe0GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjARAAj73KQjJo7soHQQ1Ry0JPkUJ0vxLjIGanUawf5h1I4CKDVPM2\r\nxS4vRd1h+h/ao/jS9LEp7OsoDLmOxKqWTGGczRzbx241OldaTq2CzFmO1T99\r\nA5gN08loHGSgyBU6Xcf8lra3yPlrscBVjt2gSP7Go8CdPlqeDBoHAkUMPBar\r\nivELC0/JtY5vZBzUDln49Lvgo/GicZReSa3Wo3VIo38s7QyRmcU5HTNxlHJU\r\ny+eZGPAl4r8v3gGCbAK2+FTTX+iaYlqFwGcD3sXNQ3gS5CbNNbRBtlI9JT5t\r\n82wdwT3v1BzJ06YdfI2SIRCC6IbgPm7gYTi9YbyI6FA0Pz4lfElOR3/OuIo7\r\nZXQfY0urETOP+A3Awx4n3YkQXytiUm3YEaiuL1fEK/01MuON3jXQ8pxj98KZ\r\nRVIFGe+flPPYZzBUjwrmH4hGFbq6rI1E8bufFQ0w4/rskVzlcpm+FdSNCiD4\r\nuPbdOq6oLdFWE4mt37LklDkY6gXIV7FQC2rPu53BT1SAThlryZBXOqumYCY1\r\nHgcVcMO0UfyeQE8+NvFlfAOw49HtKiFOF0oZhrtJQNDdqSUSTjiOUUhQgx0x\r\nr6/fxPuJJLPTJJc+xtmJ8KK6qrvotvTTdTXPZBKJdWPA1l41imm6CHACTPG5\r\nLu9R/Z86dyTCssxKLFdvgLjRUSx07/jcp3Y=\r\n=VLNW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c133997c8c45e50d9ebfe12fabab75ec90d244e7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.95ef196bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.95ef196bc.0_1665789190400_0.1643191392028689","host":"s3://npm-registry-packages"}},"15.0.0-canary.13eea1b2d.0":{"name":"@material/auto-init","version":"15.0.0-canary.13eea1b2d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.13eea1b2d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b1781c2dcaba57451e16fbf7b2d53d16f6a6e015","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.13eea1b2d.0.tgz","fileCount":13,"integrity":"sha512-fbjc10KSD3sdRZluHlk3J4O3U4lyJ8GZRntgBWHKjq8dFZgfG7KOxsQ4dt726a0hYjff77u4uZkhEK/pIGoQCA==","signatures":[{"sig":"MEUCIBZSpqfg9imI/P3SzcwMLnytUB71EbSbWbz8VlpkGd48AiEA/AJQmWB4Aewt0aA2Z4aIOAtL9lQp3kLaVdF4g8AUhnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTNEYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonIg/9ELWxSEc16gtEIvTEKCYPB5/d8U6Rc/JrOy40yk8gq4ufdMr3\r\n1vWnFtfHkXX/CJ2WTErSgKoU9+NPmLuac6KZxvQSuBGEc6mtrAtDm+nVky/D\r\nEljMXA88zJmZzz8r+F3rwOoo80uTmO0Ax3sLDSA8mriEoVlR8xr9+rztp8Cy\r\na2DxmJq+PHwlq3b668uz+E8M9vF/bU1t1HHSIfsZuk0qXFwKbGO8dzBsfz0/\r\nTqGii3iJOgVh5ORRPpFSAAZ0aDTOy1auIhUwheTwo5RFkhwlqlKKGJklFcxB\r\n5f0NCX0Ym3UergQcEXNH8MxtrKusmnAWnfOqXqqufdqnt6CU2OIaa4wmV4Ru\r\ngcGM8cvtDfxqro8Rl7fCIC3IXMt9ZUhk0fXD37e8waZ9uXotQF2ct9sCWkx0\r\nSkuNLhlCQNSAFhtvjuFo/Tq3KClPPNLNNr3PyL7wHDIYDQiETuyQjVxY2RiX\r\nhkQjUtNTn7Lo7P/xB/mKCKdXJyt+uT5+eYLyPFNjT6zjYGNEeN+izu2e7WA9\r\nrHyBW4kjJDgT/7jv4IapLzxOdDWTUzBgRVErcwV/DSLRFj4f0YCY3PHSXLsi\r\n91vshtIJzdHDLmguMIgPOyawmlOdAWcaAt7u2vzQfFPcKoLgL4aA/Dj7VH+g\r\npwbMNjuEJa7YgXQalS+ocQrMdspjxl/xwxk=\r\n=DvDV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e9a13860e495e7f113966b4c71b9c7931a32807c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.13eea1b2d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.13eea1b2d.0_1665978648521_0.1185628768634257","host":"s3://npm-registry-packages"}},"15.0.0-canary.ef9b2babb.0":{"name":"@material/auto-init","version":"15.0.0-canary.ef9b2babb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ef9b2babb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b05136b5dd739d9158da8a567523cb38359cffd1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ef9b2babb.0.tgz","fileCount":13,"integrity":"sha512-ci59PLAwqe37nhhf+ICDSUIcHsOhUR8oSuer6VL68daMEIf3WMbwfQMG3golfvA7vs7ftruXmmuRbQOsY3kwuw==","signatures":[{"sig":"MEUCIQDl4nsKpVDDuTwnKdhFTRO5dDY9grlyDT0wlxl0iIpT7wIgQg04mnvmzvPSvWsyxwQbniZWSkYKebfRDtVvYdXHysg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTR2MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2wQ/+OJd6nCeqZBYzpd6KY//96WIvn9YUAlFOe145dvdZaVSitIle\r\nvBRq5mIaXD527ERoQns7oAoEba0maSeV8FtzULGG59CPe/oIIh3iefEYMU70\r\nqU0MQYQJHoP+Ut813jNBRCqYH+WEfmrC7QDjfS0p5Gxx/oDikpObit0SrRnS\r\nkxrmllJgat2oEchN9ppV0cHg1Aa7XSFUdSIyjkRaa2kikuHSWmbMiCmGqT5j\r\n3ph6CLN57QmVMqlWvgBhEiObhAQleN5A7SIxtH9nx4hZH9SR3yR4Uq3gQjBP\r\nZrDhOanIdTZDiaA9cDGwnkdEmBqzojjljhn0SpbGlHFt4iSGAYj1INqkY++Z\r\nbpJluIaHl71CQDxNHxnXx2gh61xDMurCpJt09Ph4VGKIaZoAsJWVCqMkNwcA\r\nkQBXHJ+sMrLEENmB20niMP3JvCSOiQ64novPq4QeDv7UpQTnQHMcB+Cx3+D+\r\nzP3uhFktayU+FPqqinqCb4Ywqz8r689ErRUPFz8ZqIXVwMMuQUC9VPCoecwz\r\nqxmAzKK1GuJ8QexUPM8O+/GxqWKJTzF+1M+RRh3AtoKMH0yhYqtwAtPAmZZO\r\npwQpUU5Ks0ltuQldgnDSINZ69/gjv1KhDDJ7uAFiBgrghTzSPn3EF91rlURH\r\ngTixnINHlU9IUxPmYC6Vjg+zcDE0MyiCCv0=\r\n=vuNt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2e04dcc89ca80bfb50d7ee1e4172ff9713c149ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ef9b2babb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ef9b2babb.0_1665998220791_0.8608916376293418","host":"s3://npm-registry-packages"}},"15.0.0-canary.cec7fb987.0":{"name":"@material/auto-init","version":"15.0.0-canary.cec7fb987.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cec7fb987.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"71de64c26309a7605aa4802fd5a90508ea79852c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cec7fb987.0.tgz","fileCount":13,"integrity":"sha512-MjZmVJXprA5ErM6VgD0owAwteWdnQeX0a3huFWTf40Dej9iDoqbxdQNhpEAFQkmXiFJI2lTher2NeWIT4szqHg==","signatures":[{"sig":"MEUCIQDgRfw23s84uaoe9Bh6lmhFs9kaptZM4mbfoR25gUUfPQIgeIP9txcC0IrhwbXJF7AIZ2+uJaQQkUIS0Og+QWzUr3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTTSiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZ1BAAojPrrznhEsVnzW/2AQs5fMgG1R+oIXZy2KNdTGlEoS1q5qd3\r\nq/tMROKXKazvaUZ5yLv+UiNMnExddr478QC21o6LJngCnQ5E1Mwy56QT9Ykr\r\nYRtBEMG4cMUTx/qG7Mg6fX+/T0chhYTBxEpi0860RhsHPBbbpNMoOsXld1lH\r\niKYtzYWZXstZhZEFVWYQsAZLOUlWd6MBMCGafDICIn8V3OtjB7Q+hRZDMPV7\r\nDLdI0G/S6sjR2R+sxuLW6NY/Oy7V8I088sxiHUlUxg2KJLfVDj1EcV8yG6L2\r\nVcvqnQg/tmu4BzZkzGsiVYvR+W2vsWI/K3N3Y1ZWcVeJaVBkn9ADROQldLY1\r\nSKnrTgBKWxNGfGs2+l1JgwrEMdKkdQQHIOtXP2IP3aaLp2jFyWiZqYujDu8i\r\nOZWYrmZaJPHKH3EHPKHJvtNFxD2N6DLCTWJ4Z6YACEMAXGAQ3hb1feBFzepJ\r\nTn8XzSu8tdfOjqqSfsg9KVGqBxIz8lDGqbiO/pQW45ueLniPBK7pW/X6Urbg\r\n7KTwYXndWf7sMNNJoOp/8wKUet6DTll4eqZyTV4nG2KO1FzqRCL7/4TQSfUd\r\nZbyrlOWf2/zL+Ql/UMRTARtwR1lynBclVDU+F0GRojVU2x5R70GgHfctST+u\r\nNExuZGIp3v+I2Pl6PgIrKjWeBE35fsigOLE=\r\n=6KOk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5af4beeec511ff0266173424b4b179e209402a5d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cec7fb987.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cec7fb987.0_1666004130440_0.4891758192213518","host":"s3://npm-registry-packages"}},"15.0.0-canary.4fff58b08.0":{"name":"@material/auto-init","version":"15.0.0-canary.4fff58b08.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4fff58b08.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f9a5721cbf5ad55cfdd994b641eb1e88e3ed49c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4fff58b08.0.tgz","fileCount":13,"integrity":"sha512-AOwdnM/hEY2dlhq6/t4vqsm7SsS8IyNIUtUAEJUt+H6EaetZEH1a/DEwk1dI4lSP5JxvdapUKHwCPLEn/y2kjA==","signatures":[{"sig":"MEYCIQCMubBOiJvZRRnm9wcVhvelBr1zRyREtRhoztg20hRs7AIhAJYgUeCd+gEEkF7/avgbOvWENU8vPzNrY/O9FLA+clcX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTXMCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFSRAAjBWZFZGjWFO3CUZIf3KOt4/54thP6Ec7m76B9V2PqxPFrd5z\r\n6pp7nOeii8MdzoYqSlvaE5XceR9IQBqXaFQ4dOkmEHG17ELpJ2/0j4Zu4DUi\r\nIk23vV/00K2Aw/effKkiTpoYiBooWxW1AjzeuIF7YENOgVwfEhOz2uTDRG5O\r\no8M4Eh1HKcPrUiCd4a8z9rhKrYj1OJXnhoUE5BFZ90g7hHo/LlbnKz3aiBRm\r\nlk9ChDTgOq9pjDOwpzA2tpgNkwp+iyuW6xW0YIWPca2hg8xdVrdoQbT39DzL\r\nrJvcgBQgzP8jGPX/TKZ6C4b/DSEOHRgFmVu0XgBQM0cPDLZX1i+w4rCJezxL\r\ntQGWFWT0rlIz/fNKMnZsfqmBPvFFQ5P0jTUzRszNe4SIFjwjp1aZJOu9+Jgi\r\neD3VMjYgIowwl2z4SnQnKxk3exiuhgQq8LcEEhMS5/XRF5GWxCedPsP3Wxt2\r\nCIR9KLSliF3fiG50J/krfK0SaSenE4R+lId5447SJ/AjmxbLR3vOpHJqvDpo\r\nXks/fIc4F5/ASyU4PRA7VvaqCDyymfkyams3ycsAw6xqKexBnov9aG8+nAvq\r\nDq72NwECYJNO1WXF/k3L8MI24hv1DcOi1i2Q/cNnPeJTrp+IUQXkUF8szRjU\r\nW8T28J0qxJuzHp3CzVkXQmRPMsA++qkja0o=\r\n=PjQr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b44726c7f5a5db16ef660807b5247cd71a447c80","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4fff58b08.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4fff58b08.0_1666020098036_0.8293022562944927","host":"s3://npm-registry-packages"}},"15.0.0-canary.587d8f871.0":{"name":"@material/auto-init","version":"15.0.0-canary.587d8f871.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.587d8f871.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7188d18b527509ee59a4d2b267e6b71deea2441d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.587d8f871.0.tgz","fileCount":13,"integrity":"sha512-hGYRCWCwfK00RJb0TlsZ/oI1HhFuxImpTpWL6V4sghxgcO1PzciD8sQpQ/4wdOeGRSN/iAez32e4JirLEIfuYQ==","signatures":[{"sig":"MEUCIQDZw32Fay1gsOIP25DzRQg30tcFAAwTWiYYg8Aeg328KgIgPhznm+0Gq1L1BcqDfJDXltJE3dWmkyoAafJKWY+i9/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTXskACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/Pg/+NMVlmP67R4fnJ+VuAs36OG41KLaEg1oKYbTR8mkgqsEo/SZQ\r\nAlvFzUalpT7ExsnciaPsb0G0sr38nIR6Q4YpDRZP6OH7EJrBVGl1uzhLS8dA\r\n9Qn7H/uKBxoBkb2R3FfMvNMozbRxHulMgVsK+RbzSaBCjnVRGD39KPE7pfiT\r\ndrlEIbH8VWoGig2yUy/VCTMMCI1KdfiMnNdM/1IctlVHfwFiegWaMsTVb/77\r\n7eVUJ1SoRCLoiLt15qOvve1126W9VhVzCYNfek6KYHpQqZREYQmpcJ1MspNs\r\niJPIl2RKE93kH5GtktgjQU1fUkc0oRPaFuNKHEE1RBwEgJ2Sa46QB55RctuW\r\nxlh9SPrWWeiQg6EsX4zEwrEVvfUA7KvuBcEhXnQ3umvfvC8m8hJ2OKayM/SC\r\nFMW/xTU8Fa5bTaUAuhj3ESVOmm2d7TwyloqYeRdYC0inF/dp5IyR3a4WSUmY\r\nah4qOq9CnCD6H424GdvYgrW38+ELVdEETaF6zC0iUR2brH89CSmBxbWd3Evm\r\nGhxNW3NdjhE/G5sOi2h4pKUxWLygZpvtNzVXJZKsEzb6lL2mxEuEra9/xF39\r\nhhTnzHJ1TQQLEE5aRoGpaCLK//ajWUgyuFlASOg3WKF5ym3yEGgFqV4QyprF\r\nBTdqmSB79dVEqN2L0ypaLDUtvy4q0YPSDlc=\r\n=cWez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2ec38be871dc355461961e4ac44d48ec44c42a1a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.587d8f871.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.587d8f871.0_1666022180287_0.18713251907108774","host":"s3://npm-registry-packages"}},"15.0.0-canary.edf4b98d0.0":{"name":"@material/auto-init","version":"15.0.0-canary.edf4b98d0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.edf4b98d0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7cb0e94a8cf9204895dfe3ebda98ad2500806be6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.edf4b98d0.0.tgz","fileCount":13,"integrity":"sha512-UxwbGvAazCv/CdpZ6bd/cYW5UgU0OO7zQvZ9Z5YtgEWGfyb8mtbV18/Dbclle6xpVClBnHIsW68WazvjPL/2fQ==","signatures":[{"sig":"MEYCIQD7+LnOVl17QdfdCPMBUyV5wx55VYEVju5MoGa5pyK9oAIhAIK6zCzdPrYE4jilJT9z24U170Pq+Kv0ue8eTMCbKm1n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTYVMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKIw//Yk2YtbCaJhGm3gg1EU021ejyGIDMZBTORtBbujm6uP3DHHoK\r\nHlQ/KXuk2WQxahCbKqU4QYm/xF4xSMyKLJOsccLaZW5AtWRdAhYx8sTAO0Fw\r\ny9R1f6xw1IUBqaDCFj6NSsx0xP0uxBdkBcr7iwhc0v1uPdYMKZ5yD9XOpA0t\r\nZ2EiOQzPewQoR994oJcwfzO82Qh+4O4d5pWOSAr/CJuGcCznkj5b++UJVr4a\r\nSH/vkFGe/+uOYUF/8ItEsB586q5BFOqUxD1g6S3Kjf9hIIwlTvtTERULI1t3\r\neH06Cr50sy6i5n+S0NAxH6zcWFBsTXlGvHMFkMrRwrQXWEgbgr1rsm8osIR2\r\nG96zg79dfpkfp2ZwUxWprdRJpYxLzlbOsmKv92l62JDjlQcLy9wE0sojY39r\r\nV6UK/kOQi4SK6SBbP+Kok8KXJAGIC6nUXglF8HLzpqY1d4lYIo/PNQaJ7MzF\r\njPE/L21xH16hq5HAdvRpppttIIkYtxuzvu8PASmm7Xfrn4WjOy5QLgrMPQje\r\nEpfsqvgVr0YbDGnuhgnR0UfxRvN8lcQa4bBKGg9FUUXcy9Au46KTLJwiNkJE\r\nlN/LOaQotlujoeLI3xGYb7hGLLX6aH+/JFqByUXAzMHgD0Q1HoHOv+V8nLjX\r\nFD02G7i/UcStWNyS+lvuHsR9NzS2lxB6EPo=\r\n=yqsS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ad4766965d2bd24e69b2e2e6940c960907c93c1f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.edf4b98d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.edf4b98d0.0_1666024779963_0.8744183362166746","host":"s3://npm-registry-packages"}},"15.0.0-canary.024ac5f16.0":{"name":"@material/auto-init","version":"15.0.0-canary.024ac5f16.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.024ac5f16.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04c362992bd781f0681153e202deebf9f0458454","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.024ac5f16.0.tgz","fileCount":13,"integrity":"sha512-GRLYf8Lh5xjpGAGQVlXI1h0ZaTPnY4ILoPFwCH+phMHDmRkr9gz/SwKDwzEHtz1TRwmjahaap5VWFnstwwgScg==","signatures":[{"sig":"MEQCIBMNXGsxfNQ43kmI8+LhW9S8ag6LGP96n7jFqcdpIelXAiBDoCAmGlJycXrqAas5tIEQGjp3f9TsuwVT90JbNqo2MQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTdobACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowrQ//R2ms3A/cVQYBQEUu7UmZQ5SBBJsoEu9woFs+vHfF7VWoLESE\r\n7rWfH7XuGeDyH/WDaf4Q6LEGSVRSent1YEWrETaImB3c8fMQVqp30+tg3ATn\r\n//ZXI4pOgAxcR3zQ23m9q/UL+bx9UBy7nzv7R0WV7Zxl3q16XuTXC2g6Gnxf\r\nthvk++ZnRWrzS3N6D9TP0BVhTlGpJFQNSrOhn4lPyp33Z1rdjHHe+z0stbU/\r\nxMkQ1gXq2cq7JAK02eAU1XCqrraQGalCPZp3YFJhv7WAO+ia8FWdrGvVRB4/\r\ncwACh5sDs7X8T9l659dA5VJrDJ36S+PKHeY4zq4p8bpMRoTiuUh28cvttyZD\r\nJIyoKmf5JYbC9KBDRonITemmCcOk7YTkqkKVJ2SpZPMgXXM2VaTMose46k8b\r\n/emwydtwygUgmQCNnA7WrnQAZrdRjm+/yfY45x1irZouEQgJXp0/hth1fATg\r\nfl/zOeDSyF66tLKBywbiZNZZ48E5V2wqbQMfflGKzVn7vxFtU8oQWyD5CFLN\r\nY05w7neuaasO7qw1u7f2QvA+K38ECHAf8aXwC51q5BEFI3LvrxdB0LxWGmj2\r\n0iDgvfYa42TbUp1YsLbI3mj0hH7uOFVyR7vgUWNTEvOx3/yaRlsEUY6Q0yv1\r\nZy0lqmy8l4thEahiQ20muVXnQ2rLVofSmJ0=\r\n=8T1c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9ad8e77cff1167055c10b93b4082fd5b4e1d8643","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.024ac5f16.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.024ac5f16.0_1666046491552_0.2901829282658215","host":"s3://npm-registry-packages"}},"15.0.0-canary.c8bdf6144.0":{"name":"@material/auto-init","version":"15.0.0-canary.c8bdf6144.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c8bdf6144.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf234a57f621c3a420f69187654095e833bc1c77","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c8bdf6144.0.tgz","fileCount":13,"integrity":"sha512-ERn3hMByyp5NWYwMBwNKk4cfs/bWVzB7E5zWCf5OEVjgpVSIDOvAyG7WuO81Sju/nYLg/0a1k5KAIbfiLriOxw==","signatures":[{"sig":"MEUCIQD2yONu2Fk6QoqszwjRvnqc6Wr+jj930nrOxHdsXf39nAIgIUsm0ftY7k4QLFG1RFNq5O6guic4QvpEkwtpLeNaEJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTu7nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKww//WyK4PzPVYcRmRYHS1jvedBni+u/Zdj5IGNf/0KRrUofKP3dW\r\nhFt6NWRg3MhHMqHgUnCSeNkb0o3ZyrYLsvVgF72MxuJSxy1HAigOO9txsVI8\r\nYln8R8/F5aTao55YJ6MLpM+foBufHZ4p5gp5gl+xSR7QuSR35vcSO/dkjT53\r\nkc5dTtj28fzsqaPix7XLWA/2ibdErr5t51K8wPa5qNyuREMTUmsFLySPNDwU\r\n88UoondQrcuEwRBRniW/WUyj8Jpql/0/Rz+m2uElD6idT0ZG4jtPKtNX9mQD\r\ngsn6/6vfqsuZyyXx3RNkBDf2XG4rrxm5tYy0tkytUPqjsI7XjPHMUST//SD5\r\n7eOg/5i3c3HvTvd0JTiG3PSepWK+hO06tacQ9Zi+MiHAVE1qybiie/Du8kGx\r\nq3oa55UlOurfxHwFIAOm5CNlYF5eN+f5wPv2u5n+fspBUrdTJ7liGTR2ALlx\r\nWM9lacKZEJHGKLqrG9U2OeBxuqqDTIHmb3VevTIOOGmAUQ8rhfJVE0SGKRGF\r\nVBJ3diMHRbKkWeXD2aNf2VgIvzXPuszxAINHXsWR6iYVGmKLbwzbe8W9sb19\r\ndSxjPLXARZY7n+S2PX3cvC/VwCk2RKih/zw8UMY2bIEZQhVpGr2I5kZkTOtG\r\nw5UyfErGWKHwGfQv6miqf7pvMSKls+43yic=\r\n=Uj6M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92f4fcf51598cb8f9b9e03a35332a980296c24e2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c8bdf6144.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c8bdf6144.0_1666117351761_0.07338660090694038","host":"s3://npm-registry-packages"}},"15.0.0-canary.bacda4885.0":{"name":"@material/auto-init","version":"15.0.0-canary.bacda4885.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bacda4885.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ab9165b037019c9deadfbf367fdaf2de3ffe99a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bacda4885.0.tgz","fileCount":13,"integrity":"sha512-ZybhTXeBVQbE4kIoogE4UBpg0kOxmiq90IQ1Om6pA+XyOH8p33cEPnsMEl23dtPGB1FXQ5RqiOoxAw8jroUBAQ==","signatures":[{"sig":"MEUCIDZw1XRCLvvRNnavZFySUFSpx+htvtx6XyrBL6QoJ4aAAiEAuM9ubjAlrnJRrp61eFtWGjPl1Z3KxP6YgYSGznt2uLI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTvNvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonDQ/+O5dHOCuT0XKlLWDwfFn+3AnWcONZHP3mg4nFZyLzb66Cj/wT\r\nrDmh8eNfBzTpXC0OMV7fkEtgooDUOXIOzmIFEAuu/fxE9PbhtGW/cc/QcqtI\r\n7ZizQTUVyug+DOJo9s+rcoHQpSdIpPZitFPweXNb2Y9IAOx9hOquOZxM9eKZ\r\nnyhqVljNVZOZnA033Dq4YnPqBAfI3wgKVSrM4mnanZBxd+xoP0rIxtSe2LWI\r\nHRS6cXsNv9yMG9XEu+DL1fFkB8VdhntIepoKz9VVyTQobcU3A1rP9PfNydPP\r\n43y0W2uYC1yM7WYbjEH5vAr/tKDNPDBdhj3M2Q+mJF8u3eSEp1QFiiTFl8WV\r\nfDo+GBG9Wc37I2kgxf7y4/WR9CZbrvi+p/gQZ2Haq1vya8JAxckZ5/JxNlPN\r\nPH5WHSglERU7Kz+0HtMUvxfmHNBr+jFS1Bzdr5bUBmpXcZYavqHAOduHpFPC\r\nQeaWVhPLAKLvaUrVij7+lGU+9ZTmlb2Oqa20CJzhabKdrLEIdIO2Xw5fPs2/\r\nohdqz70Ofmjm9eRzruP20QqeSiQE4qvuzA4ULMgHiph5dszDA6iumoJzoqq6\r\n9A9M3yVPFVnbwlkRbBeMQRb5OJx6LtEYIiibKnlEWo+eQ5xI/wEkie2u+vOx\r\nPvtDAT/UTuGSK+ANreBnE51emkGDw5N8Llk=\r\n=NS/v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9e0a7dc5fb5e2d1554093d85949ffa6c2aaa33ad","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bacda4885.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bacda4885.0_1666118511000_0.6784275385573746","host":"s3://npm-registry-packages"}},"15.0.0-canary.92b2556cf.0":{"name":"@material/auto-init","version":"15.0.0-canary.92b2556cf.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.92b2556cf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57ccac45ed271522ce40708f368cb1a7856cb96b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.92b2556cf.0.tgz","fileCount":13,"integrity":"sha512-KekfXgrgj2+62KmVgtO23M2dGsIBX/qkctNNbPepaRNIwBMUqFju47Q1WbSxOKEWGeij2XpUmS/813rOIdVpnA==","signatures":[{"sig":"MEUCIHSLk6U0+EUzJmbPGO8Df3DAbN3VzDMaz7q5/KReOb8dAiEA03jiB28RtWKTiFwx2bXFvv+pEzEmb/huAIQl6fOWZ+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT08FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ+g/+PeTZuOuM3YMkXdyjx5mbaf377dki1tZKAA/nqzcK6GRgaD9P\r\nRrUroqYmsNDaf4Wkhl9YguwOCIZAbl5Y60fwrCbOdGgxEvcBBRRHuZCi634N\r\nqxB1LmwmZEvM2i1mtNF8tpKAG1qSR9xtJgHJGCyb+AfGI8ObRSCp8rSbW4h4\r\nB47MZbj5EnetlCVZkPHDEgYOaF0HHmCAnu3NE/spCRMMLj34ejG6+run8X42\r\nItAOdFqpuEua+drqoe1GwYBsVsLcF/BhqWFRKgAPR9n82mq0YYWjQQsle0qS\r\nt2W2i0Y5xo40GofJn7RE5ldUzAJakOhQWb/OoC+FMXec1+AB5hk6uCQRPgT1\r\nLBrSoxjAA48KgvrZOpZibqhGbmCS7tTgKIWLiHfUFZ78KySW01XZpOCNmu07\r\ng/Vv8IdPoowWg+qPF56AwwtDIbDUmehKfV7eKh67l0GAkXR971MnMRs3Yk05\r\n4bWqfXddH0njjDz8MaWhBw7ME0lQI0bI3f2cfupBu/mJuNxmJe6Mx5Oz7qCY\r\nWeUY8fkRlx7bsxxwrPvckaQH9KaoBTFmEmmEY892XG2Vy5hqFIf4pZkq4A5N\r\n+6jmTmd+9nRebIv0KmnPH3LWpwh5CYGfTUU27qKvSJudjBQZAkqV+UFJi4/9\r\nkd2EG/pkwalI31snEeJIxcFalV/QYp9EmWA=\r\n=0meo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ac326ada7a9c6e84bacf5e01a6d22e675dcda8e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.92b2556cf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.92b2556cf.0_1666141957225_0.3364494188746099","host":"s3://npm-registry-packages"}},"15.0.0-canary.cc804509a.0":{"name":"@material/auto-init","version":"15.0.0-canary.cc804509a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cc804509a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"84aa4b359867a5536fb798b4a9a0733e74667d64","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cc804509a.0.tgz","fileCount":13,"integrity":"sha512-T0IdmnHHLBuiMnqbBLpQA36oGEJX9z3AatEhCdYCQ3V2eAdoyIwOMMKhBl/7b5KFbvrYmMzj2NHtu+zzTeUDAQ==","signatures":[{"sig":"MEQCIBoWM/rY64n1ltwUyCKc7mtcXNdxmKKSxnXWNsMEoF14AiApkLaxm/Dy6WC9JvyXS2kOZMJz0+oCdOrin4ornNUl9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT0/qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpj9hAAovY80RHlbOB0wXaWBp33wlgVXXI7Dp6t/QI4EL7ku7WCTUMi\r\nTi7H7pZMCAMX+sSSpGIExuVnFBL4FME/jQCV51aLTpzJn0D344QTccnQ8XnP\r\nYqVfbHgJkb7q6hUwCxcdlcD08BfP/HPWqdG8J7o1x2Gx+mZDhqJ+wZoGVWH2\r\nwRnxYCdoW73LLv3PnkcpE9z81lC6dkx7joMXxMXx85V5JSrNc/ptzgC3nyTa\r\npQViP1K6wzF6GGMIP76ZpGps6hm6hc5bKEwav1SVubGEWsA/P/3P6Gh3qVz+\r\nuSoaWubq+5W0wcZemdt4G/8h1VPCPry/eQFBtL1inneKW1ly/sSaq290FY/K\r\n6ytyYkUH++j379a7yt6Qzen3tRkrjtIHV6QggBsbSmKhbb05tbW1v5v4v9Dq\r\n+CzRoNaNOVO8Le91PEKTClhloF59qEGXsSvxT6ITZh04L9/r+Sy0KSirK79A\r\nO+NeaTNUVBd06koT8+q3y/fc26JoEBHj+XyuklckUdV19CB10Gv1NcW0iSpm\r\nKwD8cFmi9C4EdBkuMcJBJ82yaZY/PHODR4uGqA1A0TEC4wgV5L6VTbeql4p5\r\nrnubhFBfnByS55QguVi4/HNNycKLExI9KAh+q6ilkiTDFVgLOdNDA4jbzZCS\r\nN3Gw78aTuF+dnAFqgy8Hpurbg12HrDFp8xs=\r\n=AwaS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e8cb944f6f2263dc4b4fec5d7ade2bdb5172b4eb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cc804509a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cc804509a.0_1666142186509_0.9299704300831981","host":"s3://npm-registry-packages"}},"15.0.0-canary.982bedae9.0":{"name":"@material/auto-init","version":"15.0.0-canary.982bedae9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.982bedae9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d5b709144a7bc5418732a0292bc50ff11b9ae3d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.982bedae9.0.tgz","fileCount":13,"integrity":"sha512-BSe1zVssapcQKgqsWTCCzOFiDPv0nr6t0Ddzo50C8hJCqXnmObeC5MPWAyDAYK5qkekBGU1EhwoJFcizpHgKDA==","signatures":[{"sig":"MEQCIHq51VZClZ/uW2WUx+FVTkXDcQBmgAJ4d4UX6B+Pnoh2AiB3yuMqoKgog+fwjojHuqf2lzzO6MDEmT1NquAJ4JQ6Sw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT1SMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkNA//Z6EOlmvg8OeLJ4WW3vQv4eeiUKnFwoz1Nhx37ByvyczogTSB\r\niSWCIF89jnRptssHfXfbgweFRIOo/fGyCQOFtIdXazYC+zSEkQ1zkxNZ0FD+\r\ngIltbBBJU1ACMEyoPyh6MCgm9bF07c660w/csy5POt2YdwtdrQY/ivjNjvn0\r\nQxos0jrXYdEKUrY7nmZS6iPLY0DQZYWTCNYztJznaMy0olonK6BXwf7ZXno8\r\n3npUsjIET4jrMgJKbmeZQHNFbJOkfz9IFqvE4EuPYf0e4/2Do8ZRqHm2tyKa\r\ndPg6c7FManamTNcoP3eXiH5DS5a5CeSS9l0wOyKduDjlPIsrsuCvVjdlcz8e\r\nyVGP7ru+U7/M9Zz0EsiEbeYkRugRrTLauYItQbOPfxnlnw75ujHwDKax1rMV\r\ngDz0eZtL0mgSDuE5ZjWrhJ7dOjLNxUugqyPo8gIXrRFSJfExfvewhlATq1vh\r\nep2c/RFKhHi3dsryAMLuP4ff8H1qHL9+6zMMRg2kNzJK9/Ma62g3p1pJln/e\r\nbHOAuqpKts+eQorhoFguqyBArjoXWqSUd6D0ejk+xRisKOmXvGSLMYQ2uJAb\r\neZDhuJYJruJnLq+Ksv81YvzpB6MULIQyy+FhaH7TaC7xu8+5EU/abc0IuILx\r\nXrwpFHknjij9Yofm4FgnSpZU29+yzet5aAg=\r\n=aUUk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"247fc73217ef7d2438e876f1477d141e6970c9e1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.982bedae9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.982bedae9.0_1666143371857_0.6367364915363978","host":"s3://npm-registry-packages"}},"15.0.0-canary.ee40081f4.0":{"name":"@material/auto-init","version":"15.0.0-canary.ee40081f4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ee40081f4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"37befd749674740f6f91adb025a9b43894515c26","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ee40081f4.0.tgz","fileCount":13,"integrity":"sha512-0vsiRZm5Sl4vFeGSc8i8/aHTN83oq9rhMxBL+au/UoDwalYUrZmK7cA/iJ1tiubF4gNO2OBNjSG9IzKXnKb+CA==","signatures":[{"sig":"MEUCIQDqN+5ChxQ9Y3ejztw/91jkIZ1ZYDzig9b3OZbNmtte7AIgKjo+qHpk+/D+j352i+zHQ+TMHJ4npQRUzKwEK4GP2Sk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUFnMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoElQ/+MobyxZIIMP+29chtL/gKbe52b7w+CpEm9DlXlmc/Gwj+yGSv\r\nVzFeoZCsDYUVzsk1q6Xm9E/KjNL3/aucVLz6IDDZcmELTySWYUXx38PTrg7B\r\nWOHHQGM5fwIE73WGiwIxMe5jX3VU+6NyoJlBIr/iwV/oHvK2D6h4X50RBI2x\r\nNEUqKW2iQtLLWX4+IemvN83n7jMv9HqF1kYZ10ANjjxCrvIjtz9FM0G403dy\r\nSHJ3J2cW84LfyaR9LZ23wxxpqUe72rfgFPCvseDbYlIAvsstMG4R0aPAJK3s\r\njek5aH/jErwkq2ysra+fuehurCJ4RBnp27CE2LbmGJgIeHRYgFmdhEui1wxU\r\nVTqcLH+jo4+IpdCHkZnVrB0P5KEREMlLIVfI7VXsf03hVwufc4xWrbLKDbn1\r\nCk0s5muHVyJpSCpCJsfHQMz5i31fQ8Rul4o8YutVet0zgy6WqcMSNsbDBBpd\r\nSVbUI/GBmax6s9k/eJpg0UEyczjuksmiJaCv1e1v5/+jSZD9g+E1URbs70Pc\r\niQaqyMvhKJ4hqjsWkH1w4JelHLkrnBcJ4lQ5us/X/XcsfDHB6/n/UDn/ycHt\r\nFmvtNa0Yvdv6Jxfz/mpsaTsgkm95kFNzFUBvd7IL5dE3yNyn/SH9Y8hmEb6+\r\nyu4zmKelZRy73B3wxXUO6fYakHl8PO3Ls4g=\r\n=6QA4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"04ad48e358b6eef4ec9ee359b0ab906b30425504","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ee40081f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ee40081f4.0_1666210252044_0.8158050045784155","host":"s3://npm-registry-packages"}},"15.0.0-canary.98f1b54e2.0":{"name":"@material/auto-init","version":"15.0.0-canary.98f1b54e2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.98f1b54e2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4b51356b45aef9bd8a597e760b93b73a268e79f3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.98f1b54e2.0.tgz","fileCount":13,"integrity":"sha512-eV8IIgk2xPjUBJTOYgmyHZ7tDlJQ2OSzhLzKECwfZ8acbdORD2SHnqEgh+kDZsXxRlKVVnIi/q6Wn7PBRctKeA==","signatures":[{"sig":"MEQCIBueAmMPaj4haRiurymUFth99d8Lp3OvxHmBR3//87iuAiBSAoQNwV/LaaoGoakgU2ybZlQ55V0e0oS4hQ8WY+VnHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUdH9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfgRAAgtHlRXho5KOLrv+mapT2ajAxzARrmskazO/Cpdcgp6ifD1GA\r\nj5u64bJ3eWPbpqsHOQhrypiQ0m2XIFYI9l81Cro8qV47D8ru7GV2U9N6e4H/\r\nz6fbcpfFhUugT8UpUok78pz0IUtgMO8T1qeauovl9cPfi8PHn3mmaK2yEhF2\r\ncQeV8lP2D7eXyDpVwhMODEsF+GPc9JjYQjt8hbOT9Mx8IYhMC54xCRDgV1AX\r\naR0YNh82fzxGI98VxgHn5KX2NcafwZKTTufqQB5ZCpgBzT2mDrbe1tm/Xmiv\r\nskFayX1valZrH8EwLnHazr23y3n3giWYttsnCM6LgyluZTDQXzHETJ2jPugQ\r\nMJl43UrSDE8RMpsm3Cew34ca1BMsGsB8FtaPqVx5fYS4IUhIUhabGrEk9NXJ\r\nQo+6DmqRar/XrDKwfPaSb0Cl4YCR0/S+YlV8rOjU+0V3+b+8zszS/xty6dkS\r\nqlle9fDKf25jO9y7l9P0mdPb0XR0Qdi++Vbl4HTUtAxGNg+mbqoI94dCLzKW\r\nHyqV1dmPFNb6nxAqvZGfb/XNwPmvqdqmxJ4Vm8wzJNpVL5XbbHHSQNrUcbbq\r\n7g3yX6U8AUFXQ7SYs5o7QK/Iu1LBL8mHfxFAEkpIruu4WVsGccKOkz0aMrwb\r\nrx1Nve5ZtdkPvEj70X/JJw39F8TyGJSqba4=\r\n=7mTH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aaf0a191532b3357cda509746499ff62e3aaa47a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.98f1b54e2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.98f1b54e2.0_1666306557025_0.3630997283890556","host":"s3://npm-registry-packages"}},"15.0.0-canary.e74b7ba7e.0":{"name":"@material/auto-init","version":"15.0.0-canary.e74b7ba7e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e74b7ba7e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a0dbadd0d5ef17a4e13d40a88d30b7b4e4ae7609","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e74b7ba7e.0.tgz","fileCount":13,"integrity":"sha512-bYTIorbeU8DJYs5NNIrrlJPr+j4LTtOOVJlm/Vy1gKWvEgQ9qwRwlAN0jS87Tay8b9J1Z/cKi9tuUMY0jy8WIg==","signatures":[{"sig":"MEYCIQClIbKoptG/R1gSSVf99OiNQjuGHbiPw3pzFlZhsi+IFAIhAIQHHfSrQMcKEzoU2CVBKAh+5E35V1/PS0naOtid3l/V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUtE8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0Iw/+Px1+1CQts0+gxhZvSXEV8RpvNhAJi1VV66m29E5+loPNBJl3\r\nwM/yg1nvvI3FF6lybnUr6p8IOKXHbWxQEdueDcTehd/jkmn9ZaXNqUTZaAzO\r\nEkSA5O24MghQG4HfIogtEkUzRUykRXY3crpVKd0/DicadIRD+AUzY3FmNpWi\r\ns2x3MG2r5J6vJAtAFnBz04NAU/ay+wybUAemp0i6oDeS7c7jFzIY0LuKJ5TC\r\n2jyJb6FOdLppwrs/DBZ6e/DGBF28RGPZhggaw1eUawo+tOkVb8kK5Ai/16yo\r\nCBDb7b7+mze66X7At+Ds1nAys3gfOKHVRiwyLchodZvcv/fp8RtWzcYrG+bn\r\n6iJ/eukBE96TanxLG+Yx0GqlNNrrgjFijK1bELv/+Jf8i49JJiUHpXzElGMs\r\nwBu3b9rbaHzYx9cQtvMxixjCJ+KemoN2h86wrOCpPOYtDiwZ91eP37pHiKG8\r\nz48NL9WCO+hoLBCByKD91HJIY4cr+H3RDui5voWOClJYVM/9NXph0VVN70I9\r\nQ4499Obmbprhns6drPRpKGdcf/hZYgJPy/urrsLj2594TbVTneipqdzwmR96\r\nnFZ41drJ17+reTORVuvHso66M8TpNLE+ceJ50KfSz57Gl6K5PQDCmE5FXIFS\r\n5+m91JcU6WkxM9frsETPkHupDoO5dAR98p0=\r\n=suqC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e30e36776ed9bc98d53938cfb5e48bf5d2cc67c4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e74b7ba7e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e74b7ba7e.0_1666371899798_0.9459471654739244","host":"s3://npm-registry-packages"}},"15.0.0-canary.ab55c07d2.0":{"name":"@material/auto-init","version":"15.0.0-canary.ab55c07d2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ab55c07d2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3931955adbb1945ef6f806e0178762d70825dd61","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ab55c07d2.0.tgz","fileCount":13,"integrity":"sha512-65T2QzT9omFQweNQyZMkciZHG/LVsq6TG11chb3GDH4HmgyMEyRQQDtek+VhU8fOjRWTdH261fMP6mBymFotQg==","signatures":[{"sig":"MEUCICNC4z5VhOtfpqD0IW5KfkgCCrmOKxlupxcnd9OB3QCBAiEAlUlaACXGeg8rgHywQtd3sm4GP+1Yrxwo1slRiXUVFtM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVDPwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoniw//aq468sbqOQB3GBUXPT21P2EqigXzvwTXr+6A9w6ciClGCOmg\r\nQ/3gLA6zRm09af0jeV8tii2ynHN/GDagVEVWreXNQjIv3PmHZuI9WPgHBkPS\r\nykWVwXVjNVepikSOSelfYFmWDqvoSnJCkHXYRUenW1qOvA25raVMXYNp4K2C\r\nV7l5bABRikPs8v4OJVaV0/awnM9ZlkYA9/61dMoEQYIAvEWQzF1/3+Y37SlM\r\nvs/Ww8eEvOQUloVPV8mcqONw9h6BzI7Cja8lUTZKF0x1dWbHYi5EzV503v1W\r\nwf3/te23fMkFgxccrNoLXIRZmHyoaZuO1rDY7LIuceApmAEw5fhzm6yWzzlh\r\n90nHzqQqna9ywjCbI4Kol+in1R5mFx+wMi8DgVXlVZMOJpb6Qvsmw/jDO5Oi\r\nsjo6rEhxHJNG8k+41K0KztRoKV38k+9KToJA+g5UhkrBOeDej+jKr9loVAXl\r\nTllZslnE7PJ9u2h4WLn5SJx7ysTrPJnPJCIAWi5KhOArveaoD45BxEiII1Tn\r\nE1xuznpwV+olO7MHyxzxMLTosXDezcuXJLKBYnL0L+q97Upv4mGQd9kgbdyd\r\nu2PDbwAJ5LlbDh6B8Z8/iAMPMkVPWoRR3B3gKjTss5WllLo0MN+dqOKiidvu\r\nvNc1MTslNN5RBY32uY7eFn+vDgEEHgB6UyE=\r\n=Y/km\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7fb32c724b7903a8060cb457aca1f150a15590dd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ab55c07d2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ab55c07d2.0_1666462704610_0.25018637484456385","host":"s3://npm-registry-packages"}},"15.0.0-canary.fc539db34.0":{"name":"@material/auto-init","version":"15.0.0-canary.fc539db34.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fc539db34.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0f54407d13aae3204c4a3a3b26bfdbd28c368c09","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fc539db34.0.tgz","fileCount":13,"integrity":"sha512-7QdH3J+u9RyFDiFLCngUKGTCBT2erZP5BAhb4pfflRaazqETvfM04eBwG3/1BOc66ih0HY9bfWhm9O6L554Gkw==","signatures":[{"sig":"MEUCIQCq+UrMnv7H1qTbQErb8vBeyBsu0QswZe46rRtYrUnZLwIgO8b3wJ5G1SyPqKmvqjsHd1FnnWEUWW2vAoF7y8dS3Yk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVuBNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfvRAAlLwByJQsJ3wgBYH4JRt5/1iS7XH55LRS6OqixnmnASruVpxI\r\nA14mfJB572s5bpT4V0qg0XrHXKof+wlZKffc4s37u9Ddo4LxiZpgp29fMFsz\r\nTd/7T2Xy+SDMDHPjMVR6MYbuHfzP3vJWu94WrgnoIgB9eSUNMvV/HeftS+UM\r\nilc/di4gdbR0EFzvhRP7u6s2vS0kWOKr+OwACBxSQNepiwBqgdTJlvf/Rfcs\r\nu3zCW6eFm9u17ip6nquQdL2RboKHwlTz29/MKoBfyjEJRV9Jh1L9VXPz5dWG\r\nJpH9vtZb7XCIYxbbllDkEuSmaGWqy51N6U/chxYyI2LqTWDPZjl/3kI3dDEc\r\nsMP8vnRKIa069ng5lkB/8b3La24+lnJtTf9hfFHmaUK2e8/BJ3fPIuS+qR4L\r\nfgXCxm9t6FBlO9pvE8QBoZvpL/FgtyrriL+9Qq6IxMB6Spc2smD/eA7hidoL\r\nlCl8y8fjygx0eVwULMjbGAmbK8NQJU4f724uzu5lon0M7ulQZM8GPtxJhda+\r\n2xar5sHJPTZb7Ft0f3I75EfIPd+kv8FEWQ2FrAWbDsTA8Ulmv9NJEwYwEiMb\r\nA3KGHmoiHiuxNL5cHaqWi4BQEdMfOrTkuubXlL36StfGQoFmCypXqSHfuxeD\r\nmI3T0lhBR1STDHTGnIELCJfOV+B/Fm4rJ4E=\r\n=27K6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"18c679c73aa42d66117f8f1a88ab7cbde6f2a201","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fc539db34.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fc539db34.0_1666637901552_0.2019648259803002","host":"s3://npm-registry-packages"}},"15.0.0-canary.e340b04c5.0":{"name":"@material/auto-init","version":"15.0.0-canary.e340b04c5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e340b04c5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1ee7e7f21320a1909b89b223c46d5cfa0410cc71","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e340b04c5.0.tgz","fileCount":13,"integrity":"sha512-QsgEQX3zBGYqhYI7UF0Cqg1e/wYgB7D7XJAfP0mrc3aFj/4svU+lNauamupU6Q/YXvNXlyxpPqamXV1vfJZOZw==","signatures":[{"sig":"MEUCIQC0pCfvuQKiJ6LershLycfKoTBKtsMEbwkkTKBTPddJ0wIgfwvuJqlz6ZS4C0Q+7Jmt6sWCYx2Nr2fAHXdi/gMici4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWHTOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNrg/+Pik5Vpc/UBYTXJohgbSOoTCljHD6OzbDhF0J1XDA0gICgGBx\r\nXauFpPjVqpy24+75fIh1KA9IedZrIiXHAVizR4rfX7S5XFg4NF1TdEY2k59C\r\n5H95vNTfeA6wuQKu21kTqKZ+Shid7jUnlLQmEy0nrmwQvmqX5bUebElStmxF\r\n+uzIGJu/oDPV3XjseMiyw/y7+DCRviHvVq5sFymJe5r4sXA5fW9NDc8rPW5d\r\nMUhgSw2wwopEN9y4QXkkgvGWwn5sgOyZytOueol7q2/k4xU77MPr3+VUXdQH\r\n/CVqkbzKeMdDJnyYG7kNMkCYyfVZ3LHbilWRQnN3q0kWDkY8c0PZZVSegk6b\r\n3lD0b59Gs/Y2voTKyS/mO6u6Qx9hgmCZRO5OXxRhuEUvJGMODMXueUat4w0I\r\nrpWvCWTbZ1lWlnDkcScxws+YpTpzBsXOki8PmQhpIiKWAb57FiuBkzLcA78Y\r\nKnDj3NOCCjHgstEeFYhBzF02YvQnskBFibvH0GVexOFw2u+4/7BJz5xCo6nx\r\ndiNkx1yW6i9MnK7zd2SFjBh7y6+y5ohH6zFl83g5mC91nv10UEHAA9SOMJvo\r\n8xTAeDpTeuoPPEStdK49zOZ2eTAMhEdHXI6qJaeDfacDndZc+pf/lM8dJB3y\r\n+vTg9xUAu5/avRDdI5dqVWOq/NJk6T7qX58=\r\n=CjLA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f3e39db57f42dc19c08bf6e97cd6918a3ce32dcc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e340b04c5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e340b04c5.0_1666741454448_0.1428124565708737","host":"s3://npm-registry-packages"}},"15.0.0-canary.2c1a8f8fd.0":{"name":"@material/auto-init","version":"15.0.0-canary.2c1a8f8fd.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2c1a8f8fd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cd5b166066eece4036dc02476a20cce322d0a176","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2c1a8f8fd.0.tgz","fileCount":13,"integrity":"sha512-SUfFjuzHh9an0V4UlGqW5k6smXI79dU50E0U/pT4y9UkRRTrsgaCpMYZjD9hXXVf+JiB6ZktMPfr4P78fBIPsA==","signatures":[{"sig":"MEYCIQCsIuIt1KYAxEVzHREpefljehUR5AQw8zpQsbmBWlTw5AIhAJAcPl1j4Z5SQuXIiKa62B24skraOfSu9kMywzlPL2Qa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWW56ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1kBAAgcGCoiVXVqIG1kFv/+/dSWm/aw+wBs35tsmum06UeF1KX6qP\r\nRvMXwi73T6CM1yer9S1fiVIFK8chwR4b/m4aoKHbiDVe2rsDEDSNeoV7AItq\r\n4vTyJSQdygl56EdVSRXSHvSCB2NQkaeHYVOamNCIwGwvmeY4Xln0umbW9vgd\r\nClTopRGIHCwAvfxw0NGk5UOHEgF8LmbOtx9Mu/5mijJ0wCASTmCJ++gVZbkR\r\nUQlbBL2U6hN2ABbcC23VeB/7IpyxtiWS1j4rgcs1RQN6IUKxi5XAWLVMgsnJ\r\ndQQe21p7hhH0fFV2gPgbTZNHPsIaCRkrGNk82BpIN8qP5vC8rw+zToMUkmGG\r\nEeb4PAGBQ04k7bNeNHiR07xhmuTC1ZQziq4YPk3IrOr2XvSB2J+d7jDSqx1A\r\neODyWXVs61y6e7jEzIigcFaikOPadWPuUhVe7rkYJOU3FYCHjzZTVt1PKugB\r\nOebwv26Gm4MjXe1df0zRtBuAR5NGWoFpeVkTQMRDq6UOjNiacRVgJPRXXCee\r\nz/KpfE3zXlxITSFgHfno/xFVxo+SUIow4+Y7MnQEGbhvv5esN1ajrllhkjS/\r\nIF/fG9ZvvbFXmtO99hC1xDmp/23pzcUHjmkJkCz1QPOCp+oJo0cznFZTwVJX\r\nZonnU681IGOue3I6yqcPKzjgY3CcvUCP9QY=\r\n=cOlW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dbee023b5e37423b8695520d95f2d00d884bfd5a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2c1a8f8fd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2c1a8f8fd.0_1666805370381_0.557381796475992","host":"s3://npm-registry-packages"}},"15.0.0-canary.ecfee946f.0":{"name":"@material/auto-init","version":"15.0.0-canary.ecfee946f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ecfee946f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cc683fdd30a60715f7397981543b08aac30b5fd8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ecfee946f.0.tgz","fileCount":13,"integrity":"sha512-WvmAlRrh4no3ewh3E6b+CLM6UC0w6xaFhzk7jkTFcSopDxf6cNieIM6oXlmVjN9bg33ngxEHBOfz7JYJZQOA+Q==","signatures":[{"sig":"MEYCIQCTmBPjEK+/z8GWL/9fkxfEEv6xorVSBfS8JNFy0iqC+gIhAKu0K5KUgup1tsFCUkMUv8BNvPn9oLW+6NCiuPAp7pKi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWZUaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmopwg//aU7uOAFheyK0KqdSgRJBv+LQIC8d1FU1kKwLKtMg263+MdZO\r\nnJ8gPbSs187BYVrBKM74d/PdgtueM2l/9rCHeMlM/RV9o1Hqz3w7dQHaUotK\r\nbphmDXo8PAUAyj2yMBk+41JhoBbWDHgxl0bT5mvwQYz7nfZFA/SRti3yxcMf\r\nFgpx+60u9sdJoNVKd5wzZEnsF6/awSGCKSAfJvCDc2alWUh9e0K+NgqCAicY\r\n/mxJX2w7xy+k1HZusgvsKeFNUp00qBT60lo6NA0PYHWladc1UMmn/0mqa6JU\r\neMXMxhiaMxvDznbTujLOFsNwIONfVWrEx8iwiIjJAXjJnYaLyQil4Ytz/NOG\r\nLGiq2zPsovVmTxLIL0SRRQiPXEwzssVs61YakZI8hcLH8O57SLbmq4v9eI0b\r\nL7kNWDLc02YIXfmuFGi4efdZdaZChU+J04ZY2FW60W4e3TUYQOfNV7rleo8t\r\noDgnB7dDVGFfNoOshmsgRelx8ijILHzT++0FSiDJwwcWGnpdVj8vuj5i43cU\r\nfKonri2EU8BTcvul6C52qNSQTxiJq/2dUna5tivm/l7F6XjG3dAYt7DyjmfG\r\n6SB5R/MSwJ3gcj0oOluhGRl9Wy/2YmDsHHPat+X5G/TVcmBOTXV3IFLi9kWL\r\nOmXpgzSuSTUUG9b9DzVEvtvDPrKXkEWS/hs=\r\n=EtnD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dbe05d725a401275de1e88f9d5bd6cd2079a0047","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ecfee946f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ecfee946f.0_1666815258339_0.15649696728438478","host":"s3://npm-registry-packages"}},"15.0.0-canary.73ca9dbb0.0":{"name":"@material/auto-init","version":"15.0.0-canary.73ca9dbb0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.73ca9dbb0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"29f34042d5f4f31b1f0bf5541ae1e6d66b7ac53e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.73ca9dbb0.0.tgz","fileCount":13,"integrity":"sha512-vbpS7YyktteQfxvj5OtcGMwNZPZ8KxIcdjfbEb8fCcK6OYXcS3Buei7+vFzQ3eMwMRElnw6kPLtBZA28CamUhw==","signatures":[{"sig":"MEYCIQCpsEplsivEgGnUfpCHM3+sc2sEcqMngmrleBjsHIyBuAIhAJ32r/xAR/S3jysSyM++dKorrlWZUunBscWi3TXh1ylw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYAZ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogAg/8C6XJmYVn/OA7WdPMlxqB9sOKwfT4RzQeWICCr7NGXiXTBNlw\r\ndwa60f4SPaE2LWmmwc4Tcaywc3qHpRGXCy2gk1nFPiXg/FC2XLiSvAV7ObLE\r\nQahCPWXtNNg0CTvtipSgaheCCRJEE6nK1xgtzwHkDP+VuciGDOwE1zFy/vE8\r\npdA8UjgpdNZtk1CVtUvP98UrIkAfIklsXxc/F1kjcKXfl3A33mUx0kO19/Ao\r\nnTfgHGWNMgeJgoi4brJULqe80Ah8azeQvmEtbcv/CiYXShLN/yElR+XlxuI+\r\nmBPOKVzpvll4Sk+4Ws7v0eokKwy8cQuZfABSZ1pf1bGgieTgsjvIVzyc4Y0L\r\nQ6mXJ9XWu0WIqZJk/6Sg+bZRrHezIp4mHsWKWnkeVxcer0VYNTZxgQbfT76P\r\nut3PjSFJa5xCd80linW8w0GyKYr31Q35LxklRvxBpOI3r3Lj2wT6R2VmzEos\r\nG0GWMDmd7QLQcxKFqSaFVc9VjjPKXl3cXBVIqXkitocRsoXrwd12HWQAe43Q\r\nmonT2FakltswqqtsPSvI473GIe2gDIgkgZOj5l7LFm2PP48Tye2vJ/Pid3xj\r\n0xN4LBIPutDpMQFMEm9EE8pOkjFbxs8XBC/8uId3GZVo+zlwxXkDHwGG5tZk\r\nP6H3qKlsnKSAy/9VvqLu2vTbVNQho4gtTxc=\r\n=tyYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3b1ecde6148e6e8d98c4b0c8a4dd2ba56e95586a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.73ca9dbb0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.73ca9dbb0.0_1667237495134_0.37344053171543257","host":"s3://npm-registry-packages"}},"15.0.0-canary.357f2e5f1.0":{"name":"@material/auto-init","version":"15.0.0-canary.357f2e5f1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.357f2e5f1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"279bf9317a8c1244401484c6479afd7ba17e06ba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.357f2e5f1.0.tgz","fileCount":13,"integrity":"sha512-USWf8h1ul36JvV83GuITcjtq5s4c2km22MoTcQfb59uG7QOPXkC8k3TQRhq9SwryREy/8gpxPEv9Lp7IyccxeQ==","signatures":[{"sig":"MEYCIQDq25PmAharXzXy29QJsyEUgiXQzerHZAUta+HO57gROgIhAIWAQZV1A9/9T8Zx5ShxogE0DpDdVW3b5Ml9aNorcxQf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYBh4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOORAAhM3YmyclljG+77VKR5zuEbSQDSVjI+KVuO9IJ672GtnmqKm6\r\nQJKqQdFIg3bepPXlL0TInFglIiW1u5xVUJCtqyPjsjdh4PEed2EVIfM+HtQg\r\n9Smh6+iNKSw45FfMvB1wyp0wrNdPPpOr1xd1WOEHNCu8QnOD5oyc/2FAkMbD\r\nYRWUMIsYf/U2XagB792h1imVUZhREnW7RqxYoPRckYIZTVGAQ31xgcf0XMQP\r\no/rMvjvYj/RlXoK9/xTdgLDDD1o3Ir5HkQyGKr0WSRQQ36Ea/tGkw5ezl1S2\r\n9WNpLhNei1Lk6/TYutu0zRefCFtzdBYIj9yVHVZKouKSMuMZf3ZIqvzHbKTA\r\ntLAq35+6k3XGIohv3TK6vXGAxkVSiTOHZHDEN7UpnU6bGNMByrhD4pAw9fow\r\nUWx8vcf2ctH8i4+AUorNEW9XHBZfHBiLQOYGMXV8IQ8mfDAvfMib5oHTJcO1\r\nuaKVsYwtqyw4FVl1pkYLLNyoy2FYQJDdDnGiME1JvPtbWem3WTj+fIjAd6dI\r\nbn3xqLs24yFzygU1kcVK6nAG3PqYC7mCDB6SAhJWzplxMrOOiZv1ib0OloMg\r\n5ExY54UiAkHcNu49/KPqgIlWmRlzO9Hcf/pq9U7LjSVTGLYgfafaOrKJEYlH\r\n591AqU1ep9tYTlbIrTBRqe/ICaC8oHOegpg=\r\n=t1eG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7f8af87642d395b497ff80efe06544dd459b947f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.357f2e5f1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.357f2e5f1.0_1667242104614_0.8678948555908688","host":"s3://npm-registry-packages"}},"15.0.0-canary.eb103d4b5.0":{"name":"@material/auto-init","version":"15.0.0-canary.eb103d4b5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.eb103d4b5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e9954d977117cfa09c4b1d960b3d99b8d5df8e77","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.eb103d4b5.0.tgz","fileCount":13,"integrity":"sha512-UX+vz+aM6bg/vaVch72Z6xu6dag9bI9oFnd2rnU9QKgG5oo8BoRQNkMeq6ofkZdwicewwn2lUVBuQU4YnxCWlw==","signatures":[{"sig":"MEUCIQCbp3WOxHLyIqXGp5KF9tbG4Woub1zsI0w4Uka2ERE7HAIgT88j0U95VaH7TslDcWCKqaJJYXD4S4t5PfDEaIQo8pE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYCg1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBsw//SRsfng5TST6EJXOi6dBTFxWz3Dj3HvSsqOuEMYP0Rnw0D8eX\r\nYfL2xTj2pu6viKFi7TyIGHnI2KsrNqgaR2QOivkRkivT9qo1IshyGpNdk3sA\r\njYtQjdN8MK4e2t8E46ZekUWfzbJIT9HtvSYb6HyRdKMwDN6SFXEp2K2ZfMCX\r\ndaRCp4qID3EQVXVXtLaIgdC6buqU9X3ix5VUf2IYaRHG6tWe126FRBV2LtLy\r\njxHBytjdAZqhHsKEO0y3P96QFp2EoURIMHVZd67P0FfPyxBgL5mmepMmRFMB\r\nguiMXu7t4cC7v8S5aY/ip8SLyKQ1/S83vmWi94q89I7LNMCGdpvE7QEh+LN4\r\nv+upRYrcS7yZFWZOQVvg64cIGaoiM57tbqp9qKtvNifNo7BApqm72LOEYD12\r\nxoYbmwAvU8OXVfdlWHKyE2xUiL/PjyzRoxL5NLKyXMSz7apeTVXcUwT98v+u\r\nW/bqfjwlRlqdCiq2e4uXxsGYh56nJ4QeZRu8zzXNCO7qC6ABX4YAqZJkKTxw\r\nNBCrD8LaQmB2Faaxq2sSLLI0kK0ucG1TgZJNlR4PINFQwbHx2GSut9+LFYM+\r\nFtxy7cInmd0FhLOKVOPN78CdTJ5UaAoh+cW/ghC9xGv6ZOeU1lgwJkU96k+y\r\nESJFypXdmqeSsP09/XO3xLUD66zm6Gxjmw4=\r\n=H+Np\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6fd82c2abdb8567ca00c6847142375ca8ac18b90","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.eb103d4b5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.eb103d4b5.0_1667246132776_0.9529005345908055","host":"s3://npm-registry-packages"}},"15.0.0-canary.af5f01223.0":{"name":"@material/auto-init","version":"15.0.0-canary.af5f01223.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.af5f01223.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85633b4a161ea190c58ea62af5aec1079b79a318","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.af5f01223.0.tgz","fileCount":13,"integrity":"sha512-XTxHe9CDVfVxyYLuaWBKR0mqWrOwSEht/QhcQArvIChr+uETY/t0LRDWlL2bmq4/5B2V5THjKcMI4nPP7quQ1Q==","signatures":[{"sig":"MEQCIBiw3nikGKFqcPF2YsXbgvzF+4Wmj94B4CwhbMvLjaLRAiBoFE2D40SUl585d6vND+2tbrhKf7JvEcBxt2pBadeDUA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYWcSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpi8w/9E0UdqtzuBeXDeHA2DcJbBzK8nu9tO9tT/S0iieoxKamHQ0Rf\r\nSqN56s5+Jus58m3VaQ2xCrP0V8fweNpPS97eYoX2OHyieN6W1Pj6FVSK7qy6\r\nnBn8DgIQlwLRdFUsXqJJhxsobD25ZjfmMwR2k2MzS5z6YVBBQsDgQGdZzOCH\r\nUKhB/EgLrtqcSlUhmqcthug6tjiDaHdkwNTfDygipJGEcJkIsakK3aHNWqxV\r\naB+1J0siBqyPR+FJaYG0z6sskbkonITHxQT4u1CGnQvxm/KBRrIHtXE5ZULV\r\n0xGVzfAEQ6AJmk4iGtvYENgQ1NiVa41VtpDlgWaof481qfWV4SGkGTWD9x1x\r\nPr+RvtSWyTK23LDnkIS0nAMyeEkbihRrRhF8/pkx9HkRi9SSk4MxVIxlV43R\r\nkkS9+hprU80sjMS7qG2048oinTzX9ck5njWoZAobtnRUoxDY7aPbglbJWbUr\r\noN6GPmIUv38zJmTc+rUXKmPN4iby5bPU3HdWYQ+HI7VkIumndzdCpZBPtBNe\r\nQKmwOEt4weICzoo4txgf8HQ5OrFTLNeNZEUFkVOEkST9Ql/3+OwUtP8hfm4e\r\nd+ilJTgkMaDzDXPcDuI7Tdu8rmCRyfZkFuVp2n/4R5ezWnqpqqprb++i8tkn\r\nbU6r5sPwGff2euRGQqGTcD0ycDxvYKsHYQA=\r\n=pUu+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cc7d8ea77d18e30bad947332164ac02701e1ed9d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.af5f01223.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.af5f01223.0_1667327762748_0.7549272004806096","host":"s3://npm-registry-packages"}},"15.0.0-canary.58733ef41.0":{"name":"@material/auto-init","version":"15.0.0-canary.58733ef41.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.58733ef41.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"72178dfb5fda25fd0ac7ee1e0381cd4bb76ad489","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.58733ef41.0.tgz","fileCount":13,"integrity":"sha512-YaOXA1QNlAnQUiKK8ETkmXcJWE8M7KAr7lUvSglWeKo5zdZPBu/IxIvPFUGUgnm+7xynbF+DxU/vpWV4daJbAA==","signatures":[{"sig":"MEQCIA9RYPYxy0C/RGxI57FWPl2hSCWjRKQ0kJE9JThZFdHaAiA7XRKb8qTPlBr3kqJ2yI9Qk+ty7oZ7TYi+inMOJM1urg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYrJyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmooiRAAlgFeCj/g0Y6PgTIDhK1aHKbExrzs5r7HdF1vdvUmDGaOgOzN\r\nmvI7tL4yZKp1JpKjkmNw0T0nDOAiGhniI/dJLtHWsdlkiwYoXqy7E0WRIsZZ\r\nkcZlPJdPE9e6NKMOJiOu330UFJu9uC7FVoNKV9RUAyEK7J8PIU09VCy25CdL\r\noNY9lWifG/lL3wNvQ+3FLREspJX12/U/VXkiDwWwt2E0KAF93EZ9DaNXTY6w\r\nSogN36dohvUDxTe2Au/ZaVmQFe9Mi9xJB+lbok+4QFVycKWIWGjwdzm/Tdcm\r\nxMNn3+tVdm30xvclD+FbvODhSF1cveyELO8IUzSmHQpwstZVsKiU2Jm2rAjb\r\nL86X9oE6znckfNR+T0nEiHV1N05cwo+5VfjcqLFny9AVogmBdGk2bbuoLTjh\r\nEKdYvBgNFp0RUQk0gdST5+IthAVxAV5BHPOL6zqQI08VhNt0u4+mz0X0epn6\r\nUvPu0Eu0de2y3FbS1bOp2HX5K7zkvn6tPEJZicFA/3utKHx8/6QSiIj0hDGL\r\nrbUPQ6IVWa0jIfwMFlArajCZuTca8n16/W/b9Vag3xw4fM1dn56iU0uor1zG\r\nNCHa0r4SFZefDVwIM2NsMpWngcCe1QYNb1NHj58iF/m5mL7nfw7R1bMEtFxN\r\nckevp6Swg0SVVn8WhnqrODkS3EQ/old7NvY=\r\n=6Bsx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7754bbdf66b8fd61976d3dbbe04b991d9dbc0caa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.58733ef41.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.58733ef41.0_1667412593933_0.6568403613438933","host":"s3://npm-registry-packages"}},"15.0.0-canary.909b48215.0":{"name":"@material/auto-init","version":"15.0.0-canary.909b48215.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.909b48215.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c1219e768ff55cad2aaed194e173dc26a9d089db","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.909b48215.0.tgz","fileCount":13,"integrity":"sha512-nMqLubCAHCZFV9GrR8LaGUnrfQfM8nlkvMZaghtcXupv7vs8wtSxonZA0KogpxXGdPOZ5+pVDDZ2t2tZoqixrg==","signatures":[{"sig":"MEUCIGL85KJpBt0YiRc6sTPofF6gqNafaKAcsSsOmIeJq9/GAiEA5HcC1Ni05QYbR5ch7f+qQDEA9lR0bitYsckdI6xSc0U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYz5fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZLw//dcYrSMfm/iGEjCDjRbUKSShXTyUnoAZQZQTB4/HwMeikDJjW\r\n/v1XjJglT3/xYxyy+jNjg6xWHn7khPIvu5xSkeHaSJaLUnm65LzORp1nHOrO\r\nkFtXlFCuT7GACtSWNzJy+dvriRO/AjrnmRI81kS+j/H5ve+DgNknLW88cIYm\r\npO1MkjayUtaAvHPu7bpQ3DF3L5AMZ8ZYIZkObAK2HGHU7dp0IKH4TrZwKj8Q\r\nv3n386+g9w7V/nlya6Koas2gchKpcFCDIritT+KWerQBJ3+p6BawObQ37H5w\r\n1iQ8NPrMy6o2U0efPOWXjIa9zN0pk7R5RB5Q2aN9gAMlmSCc3z0A4QCzuN/h\r\n0nX53gf85/uAzwoXNKtSGPJxBAx8e+fi5OwfZ9HgoTMyo3MebxIjzNu041DS\r\nWEYZPu9tnhPBwasYyw0lIwXtu2G3LrrLD//k0OGl86PE4uErx7fNSaB3Hp66\r\n182X7v9Oq9ktLoVI6aqUpPefAglTlfSX/4wR2cUMtQJl/c58iydg098cCVCM\r\nopd7pxfib1IQPAkfVP1o4YVgG1bAGYmNneOtunZJ3E3Aqeu8Sp/KnQR7spfA\r\nM34KbnCsoRjdMYccba32CRDc6lMEB/JO1C7rlVGl13KnJOUXNhe0PdKVwzz+\r\n92Nu17Br7MC10OcomfUgWgxrLVCHoWhbmuE=\r\n=MGN7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"68d372ae12d017bf28fa2ad3c86cad4f70609116","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.909b48215.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.909b48215.0_1667448415450_0.1270533041440578","host":"s3://npm-registry-packages"}},"15.0.0-canary.7f17127d5.0":{"name":"@material/auto-init","version":"15.0.0-canary.7f17127d5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7f17127d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"896a5d336401be1091af489f1e58604c1dc280ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7f17127d5.0.tgz","fileCount":13,"integrity":"sha512-PB+hjVy0EdyqVN6dnc8k6mF1HVPtM9BLTf3D8hNxNBVYndgu+3gOI98RvwwJM5mn0K77PMMj9H121DdrxqbrZg==","signatures":[{"sig":"MEUCIHaxUjpk2hNMdeKUdWlPB3dsfy7ncRqAsdEHi6XKyMd5AiEAtqKL77YymqV3U9ZZXKtLfabE0yZQ5G/oDIQ45qFL5/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZAXlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo25Q/+I1gRxqqhijIXIg1A4/J+5fhZC8q3fYWqtmicCRzvr+RRoBEj\r\nHNPWiz6eUFsngEI9GRfKZjy96LMBIs7DYP/O3UVQ1O6oE/71MzNZ6vDWCv0G\r\naTnAjH9vgjbPWmU1konl5URwole3U23Km7iiMu1adQ05ImeM5rj7dYPpzJf4\r\nMbRqL05fFgofZcoMRJZXaSBrdbDp/lGIQdkVJiE96gwVku0xfeyi+Fs7Q6s0\r\nBS4Od1ZBEjJzUi8I9t1VfLHX0y0dDziDx/fSY2ShwYEVPmqiz7AHBa+XMbyg\r\nfKQ4YRejBP5/+S0VNNnLKzTUorNboDrpDiI07XedAH4iVZlwgk+TPeL/Vj4Z\r\nuSGhcZSqV4DAbEGapCUqs+AMCv4F9XxLVeB7NesZ1vEFA/bp7rAfKlyGvXQ9\r\nFyojxcs7ol/L4CQ5/ZAoFGBsuPvwoHhMieBN3Q1mZPpW50y55JkynY75RHMS\r\nwjHT1JPgI61XAkvpqVWiBaiuTeUTxGMhNBCnMHLR8CZ/jFtRUPcCZn3OiORJ\r\nhlPbp9KMfc94DHOHTR0jDSXE1FeH000pzGAqb9PhAVz1u3ADMT2RoVqQM6c1\r\nwNhlylf3STy7sz9+kjtOUcPPNuIsoru9/zaFgla04wEUey4Jp2vTigeX+CGA\r\nDka/CQviYes9i/di6yFckpki+tBPiy+qmSw=\r\n=Jmkj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"26e22af93057c0fa00e7fa9eb104abdc96131eec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7f17127d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7f17127d5.0_1667499493008_0.08603819920836808","host":"s3://npm-registry-packages"}},"15.0.0-canary.da95e2a05.0":{"name":"@material/auto-init","version":"15.0.0-canary.da95e2a05.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.da95e2a05.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05a9c08048d8b8c0af12ec3661597fc36f30ab3f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.da95e2a05.0.tgz","fileCount":13,"integrity":"sha512-pVBkPl5ECXWruotUZickR+d0PWwDkFMIuRsKD8XurIaLPg6mYTUihyp/9fSwNi66aCjC7eDvO0kA6OiNVKIRPQ==","signatures":[{"sig":"MEYCIQDH9Sb2gmBAenDWKMeXVQbdkROcK8g501fPRpqoNjbYtgIhAMHrXwkwDxQtOLadq2LXtDsaqXd58I1Xh+OP3ChrOM5D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZUSkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraSA//V3klwd6IZ65XDHMcU6BrTt0hySEHFrjAZ0D+jZkOawJZjAHn\r\nLJIrihPXgrpRoYZINug2qMaBEi4qQoM2uu70xk7N+6kf6rl/o2jZ+0WZuUNr\r\nXgCk5fXeXGh7i+/O8MUhpcB1EXQOKlIG+Bu8uiVf9LzpwIw95O0anw19TSzt\r\nuOj5IXM5dr9gGBpbMQ/3VwHMB8QfLWmUkx+4bm0nDJz31uu/v5V4M/m92hdS\r\nbPAHa4+CyM4r46U0OihV4NzdX+CgXR2hyCM4t3LG1RrG52xlQ2oP4kIF7c0L\r\nrTrY3AAR9R3hax+ziHCxaVGt/zT4HovEz125csA0Myg17lub320ANUxHoxEe\r\nllwxyd98m008JnA0fNigM9gTJdz9RTkkuxGpmrgNdo5PS7ysDU4iY8HLiyFY\r\nmBAehx6NYIVKZb0ugWGggluAj3TYb2X0kYN3PPN2pkZcOtIiQbvVh6HkCP/g\r\nR3iIG7Je6Kvsl2evuEZ4/hoXfKM9kFwhCMuyQEq8SnQwXAqjc8+Z3Fndi6f5\r\n5ARxPVIyS0cKC0wYLILIY52T47d9o6O9wLzbCpZmJ8Io/3CUTZD7zrOv9N1V\r\nHmRj6mxSkTIXdS1rEuH2FOtf9rKcrUmeFTRuYJq0c4ChGuY2rIaHGKLulSwc\r\n9KQEM1dTCBB9/3bJj58d+j9v7OYGpuFiggw=\r\n=VAOJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eb47dc6e824d05fe1a33c55066101c99ce1fe241","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.da95e2a05.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.da95e2a05.0_1667581092582_0.06697219812832755","host":"s3://npm-registry-packages"}},"15.0.0-canary.4832e2750.0":{"name":"@material/auto-init","version":"15.0.0-canary.4832e2750.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4832e2750.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"deb7a328504efa476204ac7309b5565ae1d81349","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4832e2750.0.tgz","fileCount":13,"integrity":"sha512-Q7Gq/LlKePJ3TKpH+bO0aJf7n4H9rLg2EvhajrLcOSGyuZWz9Ke8tFQpmxnUvuXzR+uJltgx2pITn8fyQ2EpJQ==","signatures":[{"sig":"MEYCIQDoPjvmxSArh+Yt70qoCxLK192Pupj77FJLGcaSsyxRzwIhAOZSW5VNOS8iTT2TGj6Al9XKPTibxkHCLBzVavsVKUax","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZXxsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcrA//TQQV+iOrMwwAgdF7+UWEsINQV2dlSKUDDrEfVLeflrpwdYtf\r\n+5vou+wbFjHTLwNcZxCUk+F2ghSqCyDBhtGJpNSL7O1U9msjgTf0/NanwM/Y\r\nvpR6KtviBlLtWD7WTO3zQ1sMeuhySyPYKn+jbNCGn5DTPfpnwHnaFyXTism3\r\npQbWHfprZm9T9bkJ7UZI3keuRJg4tUC0I23p5r6rn+pb+/A/uGsEE1O88cs3\r\niQsyn5DElkHs7IQRImDP0V5uLLm2xf5u8xaixXU8KniWT0zStp1//Jpj7Zx8\r\nEBCw9DUhlKoKbS/GAD9lrmzLiFleEZvrfGdvT1C+Es0AgDcEY1BgIxODJkZz\r\nl9YPvwZDVqhtbXUKIq9ervktepk35G5dWDm1onQyhdAvE3+14cMEb388zNo0\r\nK2ijHq2Q+d645Hh6ar4k6OmbjkqxErgY+TDJwwXMOpTE2WE3LCSrxkBD1dhA\r\niA72gTD+Luc8CgkooTMvm7VB2HFXXnHxOSjUJTyXsoLZGtrWINMEboHZLFSh\r\nd6Vy6rxk9AA/2P0DFz+3KTbGK9PkU2BQNsAYqdoOKqHck57l+vNTkgTGHWZc\r\nyAtC1K8+tp2IooSSSozibKuJIsfwKjIVL3oii2Y9MsKEbBtoeOrxGwMC1xuz\r\nrN/y1l3oFadwUAgcYma03IdGLCRKTo2CfrU=\r\n=8B49\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"258def578bdd5ff3b52dbbfbe6f06e14b2b74045","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4832e2750.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4832e2750.0_1667595372566_0.6416053913846957","host":"s3://npm-registry-packages"}},"15.0.0-canary.215506426.0":{"name":"@material/auto-init","version":"15.0.0-canary.215506426.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.215506426.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"78be266757724cb4799ce9613c5303908a593857","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.215506426.0.tgz","fileCount":13,"integrity":"sha512-pGzACEvjJoGDd+P1+osvoox8SLqbKYkZ9N65yJ68CV+NL8R5zRKwagU8Ew/sh0mg9RR4L+KkHNCransZ8+L6Fw==","signatures":[{"sig":"MEQCIEWEaL/B+mzrtwWg1737FYodA0LTRXRJs7q8N/k1SXSzAiBzXi95pZ5CGLfbnqJr4UC0eL47P4p6dlckvMYfCMwZ+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZbbHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXeA//ZMD8U/bVod/l73UdruVdtoK8jzZqgL15xD4NrltHcvM4FLxO\r\nCEklbhYxkU0iIkUTnw8BeQrdQM9fDJWtPV6AjH4kR4g1HvMvEmMDU22e0B1E\r\n461aKth1kUZOJW7l+YvnIyKVqNNuGNtYsJbHPXqSIRY8ETY555XoN3a0UUcY\r\nQrkj6UCdqq5uuJtvbgY5F0d/4raVbOgUxbmTqs0q+3vp99LO+YXQ002kFMlf\r\norMKXPnUur0/7WxB1muJqLmrNJxQwHWFNGM+dkgoPUfNvmXoSxcrteIZqxjH\r\nbTWAnHHx73DrDnIEhQpHMAX2/7IPKEDuJ36qz8GWikwNRbGfa8y1myT6ZE7z\r\nOZ02mesa4dhv5w9o5coF2QYJ3tGxlqGz+JIcnG9ieB7a9oGP+BLfEtofG0dd\r\nXiLwL/RPoOvUjeDQfSyKmtWWdS1f+wiRr3Q16ZLTcsXoP318wD2wx2oNDMcn\r\nMcjCd/T0Wv/d+4OSEr2NcEmDjIL9FlKP2HuVOyzBoT3pFkEsB4hL3dwVJ0r9\r\n8UWxDoM6iv9AaCnZwpYwcQ0aW5CG8TXJofgGr/c35LM4Yj8onqrNVTyqwo5W\r\nh4eln3gyf/HKdNdBW8joK9VW2sR08D8maMcjKkfD1/Ut3eTzn3kguC5XUyrf\r\nVphC4KwbUN8uQGcDBvj8yV4RmNWjo9Dea/s=\r\n=xB4K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c7da5104ce280eebfc1b0cab2279b8acb906babd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.215506426.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.215506426.0_1667610311587_0.10959168177326783","host":"s3://npm-registry-packages"}},"15.0.0-canary.4cf917476.0":{"name":"@material/auto-init","version":"15.0.0-canary.4cf917476.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4cf917476.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cc27b396ad0e4c525181e47252c527060b90e22e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4cf917476.0.tgz","fileCount":13,"integrity":"sha512-Y9eVhcC0XZd3hJLqSVQuNUDtqzl1eqH15APamby1ZjtiBwIaxyo7EIhy5zr0AvhaubSz9VWupy+iO8PeG2esUg==","signatures":[{"sig":"MEUCIAvC0BZ5onC0V0o6TaZF038EYFsgRU82a7SI3COzHw4KAiEAuyT86gGoYd7hDp9VnEVLkbHhgy1eJE9qzbzTgMntnQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZqViACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwKQ/+LmDdB9QTGCxhh8u02cO5nSRl0KvA3OfTSBds/UM81V11ZrsQ\r\n+oQ4QO0s5SAjBiFP9C65yShk3hboz259kDpq9hOlvsLMrAbywBViA29zl0V0\r\nroKfx6N/iSKfqK++hyGG09F/G+qOrtcCExcD++Qt8rI7t9O7dYQelAvPEEAV\r\ne8Ln8mBZh/+tXqirdITRPkcUYbWbAfrBKGI3HvbRUSnxtO2L+bayAoYAhqFF\r\n+wUNE80U7fc4LFZdjMuZJkLoE/0l1/TLI6zHrJW4Gt+JeXcW2XvOsp2J5C9V\r\n/pO7zl10QPGnU9S0P1KybuWVS6PgI9+KWNk1IsI3WEZhcjDfq/uRexUvXDUo\r\nCjLjuQ7Us2sfBfqbbVRpTMRGAA7W4x/dsVcPWh8j5YAFtFjtHmrIHBuLL9JN\r\nbgx1fr4caMcIAbLobSxAeOwvR4H0jU7J564VF9yRK6Tr/Qe+U+f13BKSJkvm\r\nJ1ikzKdLDHQLO8Qzk68WS6nG3TRHBu+4ApFNVtSZz1UidCt2blWSTlf2RvkB\r\nRzHci8W/GHOgzg5RQMv7B8p3UFnJoDVsHVGURRZI77kto7pn0J2NGivTFj+x\r\ndfGaH6WSSjzwDN+ZLzLU6T4kVzzwnfLlrwrBqcQqmZqwTTWVTZMwgmCvLyQ9\r\naKWIaNR8D4xa6rAoBa9Ah//kUhGM+hv5Yug=\r\n=AI+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c7ef38a54cc085b34eea4d38f143f3b65dc649e2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4cf917476.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4cf917476.0_1667671394607_0.9070984287138935","host":"s3://npm-registry-packages"}},"15.0.0-canary.eef14bd32.0":{"name":"@material/auto-init","version":"15.0.0-canary.eef14bd32.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.eef14bd32.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c2b662e7b5b1c4d7ce98fbd23933db2a3d5866cc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.eef14bd32.0.tgz","fileCount":13,"integrity":"sha512-uCAS24C2pFeGykGgtlY1cF9AkysMpAswIpWAUj1hQg/jttA2kO1TaN/Mc677ZKdTGiQmLPoX7iys5gfRAGL3Iw==","signatures":[{"sig":"MEYCIQCkxbtp2uWlemEycVJ9e4p/ND92tYSj852XrQl7ca3pywIhAM53tv+7sbUikRL/c1HZE3Yw1ZMeb/FkoO70gqVInoD2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZ+2jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonzQ/+KWIA34JbAYfz8G3O7dF4/CitglNt7Xn0WbeWykRaUI3aV0zC\r\n3dATvn71kjGBBx+JJMea1gMqGoJK7oulBeWzkWOg6KPSs0VHumgY3XhrrZPm\r\nL0s9zt8gHYnYyeLq0HbVag+32vrftNSN1x0g6tt4649j517rgY1V5T+Tlblh\r\nqwzMEiqxExLcZ3FgWIEJThzD7/1F9DMwfMhQ3z3xaqBHG7Qzt1phAprxYHUv\r\n/p08UVw/KYHR9HBPuIBDnijJAczc8awQYZclDo+ebatYO0C34tm+zDB76F99\r\nbzBcGQ5KEqXjWPV8GO6EHZi2BpG19VJNdGVoMnyvZdCW0V2veNzFcXNpAHBi\r\nRu4HH05B8b7ssfBequtYSHMmAxSpYSpw9DUzH125E+HfGWxc8SrDfykykscc\r\nA+Cw7iQiNb+fJTh6N0RqRbZ2DJrcr8BhuDXS/yk908MgxJeCvMBHhtsPdmLc\r\nTyXeGemQ3pxDtUicCuZHw7Z84xHi/QBaVZb37xTg24zuUFQPIKI4gxV/E434\r\n44VxaFXO+a6ZA8siPShsy/wpSFRf90EmOufidqDXLN8alz9thQemXl1goR7W\r\nJ7SiubRb5gKPQUXS9uBnK4n7WKal9jihGet78nCezHszyp0uc9icQpgsc98S\r\nVh1CPmBpLYHyncQ5e0BwHQ/Ub9rScF5vNjs=\r\n=s2ap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"40acb6cbe1201f5ef758bfb96da3145ae3c4c1a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.eef14bd32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.eef14bd32.0_1667755426939_0.6307739157081276","host":"s3://npm-registry-packages"}},"15.0.0-canary.6faa29fe9.0":{"name":"@material/auto-init","version":"15.0.0-canary.6faa29fe9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6faa29fe9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"96a343b2210594344987bd6ae5533f46776684d9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6faa29fe9.0.tgz","fileCount":13,"integrity":"sha512-rYsMqV5sWMntROHhPal1PwS3BXthGzvJTPg1ud7C5cBU9f0nlWIZrABmWL/4Qgf8GlMuJWkwb0I3d6K0WVBLKQ==","signatures":[{"sig":"MEYCIQDygbTIyu/9Z9S2lODVpmkXIY9LXiV9TmoHl4R6u+qXCgIhAL2sR91Wsvd+oTYBadP6VsZ+x+gDkyxrFJVpBziDIMR+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaHenACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKEw//TPmEaAjS+E4fCBGHebIebsCEpP+5NQXjRDd2QBQ4PIO/9oBC\r\nT7d7Aq9EEVRJYcKPYeRBMMCKVhnRwyGMI4J76UWyiLssPeQbPkYacJguWUZs\r\nmUSNFX++cEd9dr4v4d2NT9lBGcGuRdZqlfU2OcJgvQsUgbvbgvpnj0yTuyxL\r\neylkWyx/p198qdMcWJIA6a2QHuc4jp80b5JONMcZeZHxdzXA7J7fPux7yJVK\r\nrc6zoOzQ+qPenxTfmhoaHgtog5u2U9M3ubfdd5CrfW8jg3uIwg9F8RNgWqwo\r\nYNObnDmVi/VV5V8eVZAWjVm/bVYbyHggH3KNVGdjVbb2FBbDmqDFlWFS6R/d\r\n6dAf8y51prJHNOOB2p+VUS90R4/DuauvcwfLObXPGBYZOhXeGPYbHXuPU1qz\r\nHc0UzF1rYo1D9+YZAaw64YBoxhH3/fjJbPHR+MSmPVUL6bZ+YB/ahc1h4mRC\r\nk06Q4WGFaNHXOylen36SFOxbugPvufhkdN9O7QjzgJyyh/DRy78od2ilb6Yq\r\nhn5zGYyIfQ9iWVszVSPHJM2oMzWKUp6aRYYRoyiQRgxCAKaOXJ1NZDXMQkJ5\r\nI3xMV5NTwdAamfS9hQuCX+hQimEJd9RT9DL9rxbSXI/zadZV7B2A0a2zpu9I\r\n922KZsVcfM4bZqelAtWOdfuJd8czfNcVbsU=\r\n=qCUf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1403858386443f73c0593105b5654b6ad8596a9a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6faa29fe9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6faa29fe9.0_1667790758789_0.9891134767004659","host":"s3://npm-registry-packages"}},"15.0.0-canary.9af09b967.0":{"name":"@material/auto-init","version":"15.0.0-canary.9af09b967.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9af09b967.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7830f2fda39d9d1a7d40d82cfa58cb74ecf4c982","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9af09b967.0.tgz","fileCount":13,"integrity":"sha512-bg5XVANewvBPM9z+CWeYf91A5lCXQsd/C7XvAYfxqn/77ovGhCgfCSRY/gVPseLUUgyLXWZdEXyBkdJMcgXMQg==","signatures":[{"sig":"MEYCIQDDgS/kxGJcTMJNLEq4Q/eiM2nMCPBuJDIoxBLzrXkuLgIhAPSQNB59U45fiRMgl8rMQ93p0QulZABvVpftj3TikyOq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaU3mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFPg//b+5yJ0u2DqfZ3MJ98FKWEuMUt8FQ5u7O8Opt/7EoES1hGjKm\r\nc6v15NGh3VrZXlrhXelSd32J2GyeAGoy6rlVNT/sW+dtb/D7E61g7FgWQRFS\r\nTHCWJNyZy4+edBrWKX8BOypb1lkvR2VEJscnl1elIxWFL+wqTjNNzByKOtTm\r\nioNPckFWN4nz49Wb5zZpfv4EGNmZtcSWjewxGhi1KWGKKyjZlMDalkHdeLq3\r\nA3dEOLRd0jwa85pxW0lswVTJ3ve3DLGKyOP0ptt64SqGSLzdZ41Oxv2bGfVL\r\nvwYgsxXyhvWbfYobKr4j8ApPZ5jZyy8gLa9oNvOGmXNwbXBruFN4X5T80rsj\r\n74wV9pICDX/HgHbrV2H0L1rMxMK12333/g79pr6aIoGZor5lcjwR4AdFKcvH\r\nTu081h+lwuHriAY1PQqacQPEQyjOylOz+KYL53YntMonAvIFw7i9bfcMCyUn\r\nNBeTLRdK4nx9CyoNeLj4cmu+KcDE198X6L4b5XV+LP+FANGXueG2zn+aZM6f\r\nKR3oj6c7FtTaGe+0ZcsiL9d/DBaNwhBlev5mbOTa9lMKQlzvUU8JqIusyv1i\r\nbG1HwcEotRPJYmWdkWKhsX2bnLYFtrz7q3caQahMi96/tICkwf85IaH1Yx+B\r\nMJwXlBUfcjK84YCdSsh7M66Q9V6KxHLTwoI=\r\n=iPUt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"745e702463a22f4c5de6e94b3527530a9bdcc9d9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9af09b967.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9af09b967.0_1667845605788_0.8662456676655585","host":"s3://npm-registry-packages"}},"15.0.0-canary.0f54fbb93.0":{"name":"@material/auto-init","version":"15.0.0-canary.0f54fbb93.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0f54fbb93.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"74ec48dd13834eaeefd955f27fec5c8b75c9fa74","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0f54fbb93.0.tgz","fileCount":13,"integrity":"sha512-xYgPQ+CnmGMOpin63yEOYbZTDG5fRvkMN0z67QK913aewrIWM0oY+jcDAs1zrQkwJLEVFdSsMSRe8G8CQi9jXw==","signatures":[{"sig":"MEUCICJJ+AeRs8JVB99giceb247LIvAXMlE6bU1OCu70zvB5AiEAySWkuLhDwOUodhvq98/dYM/gooI93+Bd0RoEVD0DpLs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjatBkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjIA/+NjZd3aC8K5m6WWIL4UGY8PCHYXzhG7UFVgm+AgebCEJj/aBE\r\nbe8+AZVvelhdNNdWlc0k9SlsERv9oXqOt7I3Vah1TSSgHQI/J+HXX2Kfpb5o\r\nqjesEaPcXoFRwlLP6K0iRtkN4jenQdgE5hIbUioCIMU8lrQBgar/0W0SPP2X\r\nYxlYqh6Dt91aGksUZhF20gSHmNaf6XrrHl+NVgqkB5+GlhPL43B+jFdwsFJo\r\nGs4Pus6s0pRc2RWKuFso8LQ2sXBjFhdT9Hbf3WUU1nFFED3r6YgqYz1QA7jj\r\nu+t3Q6Pg7PjkouhJ7WDmWCdDeXL31WmpZ3C0jvtbxxbp1BJKwa+tbrXKm4WX\r\ngRwI16ceRot6V9vk+GuCcwl6UkFOyI/CSHMEHMqLsjU6MCHN68tjS7KnLk9j\r\nqQA4KW0KKMXTWVOyiYwMd3RiVxB6wXt6u2Qnz5YJ/7S+EjYK0FL3l0MI41c7\r\nJAB56Osi75MvYX7ey49nVoeP/neOtKWRXJNAO5g/qULWlDYO172Y169r0V6V\r\nMdmo319XOl5VNnRZW4JN5b58V++VdmmTRSrgpsWLlld7X/vxd7LxjnZ2JTgd\r\nlHd0GZCNZbxyP1q9waKdl4FBPCXabGJ4qPH/DzcYn8WO/PPnSAgN7Z+MO60v\r\nuYT1S4m6LJbuCFysCHmdTUzoqHTz3CEypsI=\r\n=g3j1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5d2d1814fad8065dd869bd95c156c04ad45926f7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0f54fbb93.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0f54fbb93.0_1667944548296_0.003050686124258517","host":"s3://npm-registry-packages"}},"15.0.0-canary.a8d47f9fe.0":{"name":"@material/auto-init","version":"15.0.0-canary.a8d47f9fe.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a8d47f9fe.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"995b8731b186708e1cfa0d7a2e6b71aa9e013f0f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a8d47f9fe.0.tgz","fileCount":13,"integrity":"sha512-T7+8W0upXvjZT/IqxhWgr1P33KD7Mf2J7BJsUjeMCBA8Fh9YWBkEzyW46jsTnz5LLpDnY9L2jXvxIqIvVv7zOQ==","signatures":[{"sig":"MEUCIC16hVG44aY03Rux9wh2owRqTo3ldeV8tPVF3fIfHk9FAiEA9J/4EWh3UkdpIC4v5HayGjuaxIiOLYqi5sUtQQUCgVA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaymvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJLA/+Ks537pIHb+KtfsKNQP9s9DlbngxLY92A2OZouTtMamR8EFJY\r\nLw5UYwPaZsDSDlbItn6j1Wbm+tbOd3KEtuTWRPn02bQNNMRQPIXttrHlSAqg\r\nu6wt43m8lqtQuYqxhvY//cgbUX+VICHwoi1UH0YWuem5nI+F0+Cg/4AgBCmg\r\nD1AbhUBqt0LvfYcFfnBQDSGme7dvqXdb4Na1IABN2fuTarSbuZDA2Foz2/RW\r\nSSUGdntFu80cUZ8/+dQHgXk/gGxyZJFFo2frZI8/y8npt+//aDVzC5ZYr97P\r\nmsMmkzlA/hwVi4CY+ZoBlZ+rHPhKU81UsqGGHYe5JLmTdgNQI4MIodD8WI1b\r\nKuvqadFo79ZpQSszTfKk2x2+GAWIbaETbPf75nnaIdG1ZQ1b7Od6cfoecQ7M\r\njvu4m1OCMOCfXLdVAnWN9QBmVrtCnpN72a8xq8b8TVOo1kP1kRyry1GYpybv\r\n3735uqJA9gzpxD+B2f+NEHFpSCJIzf5rfxeGTlUC3yQ8AqstnNrCje0W1QfG\r\neYPMQNzI4CnpFN8W2KVwAY7y1HyuBkUSXkJJgVPztXvP7b19HWfABEUKgIRq\r\n7DeKsbLsG+3P7UtOL3YnGvoiPWXDIBy3d+o5fU1nqMkpC6E1JrFWIAtA8JLA\r\nJ3lFiPbj0gVsZehzsT/mlfAyNsjN065UF5U=\r\n=n403\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"37662af94525622cb00ae2dd17f31f6a93b4eed8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a8d47f9fe.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a8d47f9fe.0_1667967407320_0.9352148337570085","host":"s3://npm-registry-packages"}},"15.0.0-canary.66a1e75e6.0":{"name":"@material/auto-init","version":"15.0.0-canary.66a1e75e6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.66a1e75e6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"de4427b9bdbad8bc3f0fc8a71f18d2167439492b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.66a1e75e6.0.tgz","fileCount":13,"integrity":"sha512-+8bJwn4TuATCevJGvl1wLaSz7xdbawkbtJFpBlKhMD3cms/roHk6XVslvADZD2linwr4U8pfjATGISDs71KJqg==","signatures":[{"sig":"MEUCIBhX/VIXob1GPYNu9wgIsV6cRMFAYZEb2xhCOC6OxObdAiEA3EduUbsaP6qeL3AB16RsYuT/tp3uK2q5zdudh2YUVuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja3Q0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHVQ/+OF3EcASvt0hiJn+gEyrsbxByrLNKyWe/hBBatHRP489zqvMt\r\ny18+5n/uwG9pEif/A2MTh9eePB49NljhGM3MpMjxpKpR/lWeVfOqkvJ5jXSM\r\nwBeEz4Dx+uOl07Fn3cz9/kdikCQsLIYHrneoQgQdpHmpv8T9/IPp3GEhGL8D\r\nXsdm9FOo70JvUJkP981bLO6JHjQ+wc2xYxK6kFcFuvU984B5rkjJ6Sf+D6Qq\r\nR6dLhFJ6eYd9BBaQIN9E2ZA5BaNIgPXa+w4pY4dLMj7pqvFnMzjA8RRNsO82\r\nQhQDjmVCsiKh8ypO/jzQkaigJM9TXWI1TxWRFSIWaI/xXYnIQs7AY7VOIXiA\r\nKv+xN6oldfWPB3WQ2zfuVw8OnVhM228X0pBsG+2RQbF07rVeOV3rzkBy+Usp\r\nldrPD9Lltj6KlnsuFTwcZdTSkEevsLAv56nBTZIQMZlxpXriAxZNJ+LWFAan\r\nDFKvtdKTIBKUOVHmQFzwtaEsD8X9RH9+2URGIAcOZJor/yJReayIn8rpqpsq\r\nxBK8yfMUDARK4BzVs6V0lpV/puYIupGtxoVM1PMd/Xh025q718qE3o08F10v\r\nJT/k3OuyzneCgJuW35OvbMVmVKMZWNT5s8QBOpD9hxDICTTyXLbVgfLgIPoy\r\nRQjgWxQRx2GlxK9sVukkwGijyPvghGjZpxQ=\r\n=Rf/4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ed0cca778858904bcff29669c6dca407f25ef98","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.66a1e75e6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.66a1e75e6.0_1667986484542_0.35117748917726543","host":"s3://npm-registry-packages"}},"15.0.0-canary.5e5c2afc0.0":{"name":"@material/auto-init","version":"15.0.0-canary.5e5c2afc0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5e5c2afc0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d348eef29f302ab58c08b90f53d2e6c6043fe6d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5e5c2afc0.0.tgz","fileCount":13,"integrity":"sha512-JDq06SF3+U/ABuwG+Rke53FnpUEANq+SNSYQDzsPxZKQP4SyIWgsmK3ac9LApm1dIiyzRsAxuif33nlS2OXrRw==","signatures":[{"sig":"MEQCIBbpKElexWK1MfnIWhzSAV8AZkLwNapyTJgzU8uMbMT4AiBSwLlk9W/tNBM37P1aWmlmC6JS3PhPMZiGG475WxKreA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja5R5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjEA/+JTyshlsD7D11BYrhmxsR/lxH7J1/XCQnl3sFLCOFUDS06FQA\r\nzpK1XDYpDRtsYPWeeOv4wyd3PABxzwxytB+HXdNr+I5PLzDQ+7fX9HgsRsUN\r\nZMI0UZwEuxuBnzBrJ+Jo0BuhEF9dPOZiYrP0oeRL9qa5ylpGrKsRplDFF9rg\r\nV3QyTdWc2qziDw50175ALux0r3p8VNb36m6nRX5E0Uqo2rSlrcNEpmdvUoWX\r\nWeS1m6pdVpz87lO5Hi1PJUAyDqRA9Wez4NbU3vcB75TH9H0jvckHNzZDft+L\r\n7/Mw1c3LXurziikV2l+n3OOk1HlrQe1LehGv64jYnVwYdVCj4lr33XAi3xwT\r\nrIGS7+PBRHkSJZzYNnsHha9GahugX5CdnFad+mF5IYq63kMo6uvueu1Ap3cR\r\nLXr2aT3PGxzUteekzPbzg8LMJaZjrd7hhZjt3Z1WEKBV2f1ch/e6liJ4vooI\r\nnMyeqslfpju6J9bOgDtNwmchoqXwLvtDeHLogqbe8ismzX28uMGdQp2Jo8zz\r\noDlyvsIdqnC0piTcEdy+5hivjYbg70MvtSwC3hwYIcBfQI0s0NOnLJ1Ln6YL\r\nKRiPm8wwD+SfLD2wCZHRxDCIlth/papIfLeesIRV5ZqB7hJwOv8MGFBB8/49\r\npCd/3/GjBMiIaxQDDJsHpmHOWOe9yp3VvkE=\r\n=c3DV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f14204a01be3c79ff286a8287a0ab731c371492c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5e5c2afc0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5e5c2afc0.0_1667994745313_0.7593227338984228","host":"s3://npm-registry-packages"}},"15.0.0-canary.3e3f43359.0":{"name":"@material/auto-init","version":"15.0.0-canary.3e3f43359.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3e3f43359.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"09a6dad26154f849c70b341a9867842faaeb21fe","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3e3f43359.0.tgz","fileCount":13,"integrity":"sha512-4eeX/xmi4OWNn3sFIe8ewW7ISZCaAi5IDatew1JjbGCKMtw/qCJG5hSppve+Y4ws98c/YFZMrC1bsxKPVP8Ekg==","signatures":[{"sig":"MEUCIQDjYi4479yGV/N1xxkf3rpTYwGFuKohmooMQhI4Lrm/6AIgUhm3XXgjllFr1zDpxlmyFlODvy2GTpFzCVdQ0swdbQo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbAc5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqZA//R1LicFh9gnqp0BREqMFTbNMv6K/eGOZAioqqtQqHlPQ+FGYU\r\n8KUYbRiPXNskaaeU/o0C/J0rnqB8HSFd+Da2zT8KHG8gNUdxq3kqFzqg5Sfn\r\ndxsX2Hf5fZTT+3M0iQ/JW9WNpCUkpD854LWZY4qwZR8TqqNZ7Am+v7O7OW3r\r\nM4DjWoaCA+HCgLucs2YzwxCnLiKcN9N+LK43wySFYLjVMKjI/hzjnIcm5arw\r\no3rfPGQmSkb99OrooMACwdw85J+siACW7ISGlVdcO44pZGgd6Z0UxUxy/Tc3\r\nicSN4bzJ6mu5dnlj/5aHIqKHzZiVT/MfU+VX0Zq642eoaNjZXUSUChBueXiB\r\nQnh95Aqfl4xnuyD+glsemW5X0mOMDj35B19sp9+Er4vRNve1fTEPNYG+uUtV\r\nQ23goCo6DEZXVKNpaZh5UgBdKOXbDd7nWGcCJ0RZbggjcgNyYr6ucxOM0LrM\r\nJ4Zwj3cqZ9+5bInnlX6B9hAcjjy6bcOSRoYJKDVY+bsR/5eZD0hy9GMCm8YN\r\nuiKCZx7rK6GbnZ3M7MF1JwiCkAyrpl0a0dl7BxCHbfREU4cBIUZr1wwzySeq\r\nnbSO0NAsKOrIwcoGV98wNGn9m70MMJlylYdonaNvPnyWw6XH7k15uVFjOp3r\r\nyj4p4hcdjf6U6s1GP7xw3VP6Dx2rgNoS6Is=\r\n=fXF1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"722326ecc6026aea1f22d8b4e1c9901bc13141e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3e3f43359.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3e3f43359.0_1668024121437_0.4151393656635465","host":"s3://npm-registry-packages"}},"15.0.0-canary.3f667fac6.0":{"name":"@material/auto-init","version":"15.0.0-canary.3f667fac6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3f667fac6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"91359ce266bd3b50ceed76fb7f6ce595e3e6e01a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3f667fac6.0.tgz","fileCount":13,"integrity":"sha512-jtu4fcjzrit+etWn+KsYrg1hY8mIsTqN1dkqToGuywrZgw/Tv65malQQZFaP133t3MdxXizlXZQqLVWP1jJEYA==","signatures":[{"sig":"MEYCIQDA5oEeSh3zPUP8KuPFrfPCv0l9WABy2X+qMxWrKe/ZFAIhAP6kRtDy7SI+xw2VC3xD2Muk2NUC8FEBhYY6DrevDJgO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbCQUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsOg//cRL6bSM0Y82W/4y/rqNMotDMZE83ny20L51TOD3D36g28rMF\r\nOCW9hi/Zj35y7a8FjhG2NRjunjA9WMMRM3TDNquETjOUJFTMqCN32y5Z1qsJ\r\ne5ly176lvQCcCfFRrPAyM5lvXHHAOAheLgg3RxU8iXFg8Jk08TD9mKk188BB\r\nOb99ijguwsBytxbMhSNjbBqsmZH9sruYMVtrZ9RM7wmlF7BVR1iEYG7nrSBu\r\nMDfZZseKIz3hB89oj6ZQ2bOvMh+YFNnCRJJkt1YLA/k6TvwY+aBtgkHsZ5aa\r\nUfaZUbFWxoFhO7JmTqeEbUgkg0J9hX+uwTBkhyM4d68cQVJh7EWo9gBltjgY\r\nPyTh5D9xm1eTJRaBrjWQFblWSmxGJmlTG6S4uEPHuqQ4KxnDH6VYmIR9eGuP\r\n0kv7sMSdqvOvymr9V9PhwVyGvOxhaPLCDBWpvbxPMQBUa/X48jPOCeO7nxw8\r\nY75L1ppAtQ9gheFEM4QMA3OvRkWRDF2mbGDXD4b2WqVmxAado0T+/lsQ2qjj\r\nFDT7x50K+Z3tT/23/a3PvCzXvFUvULaIaWBwzkQdILYGw2sv1stO+8tuHIKE\r\nLSJeUWrLN/9ANpC5lCE7ZIdKcEgUTSk2BB0Zmj+Gq1/7fabVjkOtiDh3oDjJ\r\nhhiF3hQASs07p5gq2+vQgOUhgLusiHd1p0k=\r\n=XXs7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0980467335d47e19b4ec72e32644ba0a08bc0c34","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3f667fac6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3f667fac6.0_1668031508055_0.24109139474151053","host":"s3://npm-registry-packages"}},"15.0.0-canary.faa28c1c5.0":{"name":"@material/auto-init","version":"15.0.0-canary.faa28c1c5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.faa28c1c5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bcd65b77953c1fa578bd2646c0aca65318838687","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.faa28c1c5.0.tgz","fileCount":13,"integrity":"sha512-1IFtlCdn8qbGCrADBtu3mqlJRORlFPSyz03/YmiRMAZJrcIB6FZ6tUqmW0AM4lXaelD2XbfyA6b0peHh60WvyQ==","signatures":[{"sig":"MEUCID3of8xqOONjMRDkkvIAKW6WgQsfbucEN45vSrUtNjqnAiEAhQFPXVaqNbmtDuqJgTwfShgolc+scokvBk9qMOgiY2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbnmsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojEw/+L9QpspSf2gAybnjHarWWCX6eJEHhjrkDPI7R4/Zmdy7CMh9i\r\nCqR2xrRnk6PZmRai8ZL+x7ihNrRmy/n7AJ/Xz79cpQzj1njLYoy87Px4Z1Ys\r\nj8SsiDgW9qJSjvYb3jycTqdrdaNpwks4hTMR84V9UG+Tb+eLodJUim4Ls9Hi\r\n8DOIsn7QNkPkJIGObhnrFUIWBWRqKaWej6JbGdInQQLq3HzOdpMB5mKG4pUY\r\nmQFkgrIqKyEhHdoam435dif0CTCCM5ds5m0MpNwpf3hNwg/afle+NVuhOsAs\r\n0qREzyzmFTBv/VE038cZR+gvh6tT1FyqkoyfzCtU9ckDtPpNFvS7ZYkwQqoi\r\nUo4roHU4WG4rjFlfAHucOB2uDyBaOQEaWMmxM0CFZuxxYMZZvf8fRmKH5ahB\r\nxzUaqTLl+SNQ4D0BIUS3QTkkcSSwGogqFxSnksub8JmG+bmXaTF2d3Oxtcpj\r\nbGnXCEwKAzGLqRwWq8K/eOtf+YXBLS9hmonpbxe2JKbw0Oc91fw9SAMVQBZT\r\njH+yMKh6uw+s94dZuxaWy4lnldKFX59b9MaUglpYhTF0d4wDzwmVruYUqUgU\r\nkXg2XzL1mVdDgiJUa3NdZtvrt5XNqyDWlD2sD/eWUG0tLSdP9/JYT8TsXcP3\r\nfLOSg8wYtR8xjbGdP8SSdakg6Rx6hOb8O3Y=\r\n=Mc+Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d36350ee1c0fb11d053acc0cd521939199fd696f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.faa28c1c5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.faa28c1c5.0_1668184491805_0.6492322893421905","host":"s3://npm-registry-packages"}},"15.0.0-canary.a868c7866.0":{"name":"@material/auto-init","version":"15.0.0-canary.a868c7866.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a868c7866.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95651f6595af3d846cac6137b069cf71bf0128ae","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a868c7866.0.tgz","fileCount":13,"integrity":"sha512-SEFDf7TXUCdZjuXxI0eghKqBXL+9u2eWeCqhgl35y4wDQ/W4J2hT7JutDSqOOkh+GN7JPieES4+vH+znJaXt1w==","signatures":[{"sig":"MEYCIQC7EmsQBEY52um0PZnFyo9xtCJhRsWg53OuWXD+x5nb3QIhAPSDUZgJB9+ESnkwYrCFINKnY2z2fAucliIiJbjkyiSI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbnnbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqmA//QUI3/KpgUVps9aGV67y4DVlyNuoIcdFtEQbZSnMz1Nj6DWmT\r\nPKxU1+tamFnHtgLFWhfyY/U33Ps0byjIZXak65tplg+UGiZfPSNZ0K0cWSf7\r\nL3f/sVrmKt5MzCG8x6asVC5jR2EL4n0rm/GLJsaheJ1Cz/Ln76Z3PxIE6ITO\r\npUpmNF8oeaSaLAq71ZoQe4vNQoo6s58YtJFbiGGD8K2N1XrqjiEM3Fg/5XAR\r\nkTBF5Ia9RTZsl4WMcwIRkCXifS2dTggGgXBvBMFtJ/mOSxvnIXFsdwcZAFWG\r\nEpkm2kNDf6j+MWI3Li+3Yd26KKyJu82f9fB3gEKa/8B/Fnyj3VJq3rQ33wNz\r\nJHhzWNu1IE/DKddM08n5fYl8F48rhOLMVCUHTxkc/PYzESI/uyt/vaiVU/tz\r\n+kpwhaR6oriNlUJZJsH5UkPeJluHVMso55JB4z3s4FrEMJypX9ioAX+pT1sX\r\nGFWYaC6RVwu8A7e3J1oR51z7y7bwPaTZbYDBGWPQEdzflVIR2T0UPozQBxU7\r\nKY95vfU87uyeahT6MoXeS0S1/VQpm/o0gWWfdUy1geZh/luX52v5PzyDF6XB\r\nLdzlLLjYuk9hwe3at1fsuQP3228SQGh+tt2Y5O7vmPi4VbXs+CBYV9SDIahL\r\nszMgdsbI7d/p4AaN3BMTNinnYSHZluj3vQY=\r\n=1yA/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d35416d7d3365898437e980f43ade48e60904e85","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a868c7866.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a868c7866.0_1668184538934_0.27761705012567206","host":"s3://npm-registry-packages"}},"15.0.0-canary.602fe8efa.0":{"name":"@material/auto-init","version":"15.0.0-canary.602fe8efa.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.602fe8efa.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"92b6cac81756f3fefddeb21abd4daa06ab4c7b56","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.602fe8efa.0.tgz","fileCount":13,"integrity":"sha512-zCIN2SM6keqo74+IEWEeWOu2uoAbWF4M/eRFktmqiXaTLQtMoUjmidFMKUX0ZJrwJWxvPTFk/b8BNwIf1UlopQ==","signatures":[{"sig":"MEUCICvOca7WQl0AEOxTru1yCArKb5Rlx/3VN2AooYSQsCu0AiEApEoAVzOdHBBRAux/PbQyiP6K3uIdwemNqGTPzI/naNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjboIkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZ3w/9GA3f+eVDlwnQyXeNgY8Mwjhn1vJ14m2jZ/0O93a8OSwRxpBa\r\nw7KW+6IcnlffvWxhHYA16QCHM3PKC6HEQKYjQNyqO6FKUibWPmvJlV2RMyW+\r\nlR87Nm21rw8AHI5TCqKbLO0JPgLs7zzhJ3o6XD8oe8mXJq3TUFcjdBV0YhFV\r\nm1n5dEmc5lkmju6BphHPtQW6SuxJpmM0Tix3swyGwCTNgkDk+YRy3UrxUOpl\r\nPXyC06WaiWyeYO+j8CNlQyJcY6z5eUzRSPtVAw4r7gZwVfUc2Yz81ve0nH5R\r\nBPdTxaPDEL7oAfhWhVdFGcxb9AK6ZPAI1hVB13zkDhUGYAGJGXYtx1EtXAWE\r\n3hrDHwF1HAiN5CbcceadF86ZmBzISP50KojKavJwVi2jwIvQhIqP0E18Nw/c\r\nRsikVbKKcEKAW/hnp8zrL+EYnrrCa2M2x2k0IdJqDNew69KsjW5mYM2CgCvv\r\n4+tOrukAcvtUBTvoGTruxERjKknTrk1jKaPZdBEfz+zoDj8/G4f/AZmPGAml\r\nMCwbgvFaAXWdvzNVd3W+NEwJOTNEQTnJp7vvYiwn3XkEP6VsQ9xlB1qKWOos\r\niBje2M+BF26uthZsZuG6KLBGAFA0GDDE30KAZrlp7rQJOFulbR7Af+TcjfNL\r\n91cd/Qs5f5lnmrjsysSbn2qQvzBKyCGemoE=\r\n=fOsT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6bdfaf09ca41b2fd7e3db4797bc2f536f8fbbade","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.602fe8efa.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.602fe8efa.0_1668186660057_0.11120792997745843","host":"s3://npm-registry-packages"}},"15.0.0-canary.558c2be62.0":{"name":"@material/auto-init","version":"15.0.0-canary.558c2be62.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.558c2be62.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ff3ecaa0e6ad69311095430e09119a03a1242539","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.558c2be62.0.tgz","fileCount":13,"integrity":"sha512-0Do1S4k45VbsDU9MUwpiLP9IDzw3DAEQ/Zy8O1NuuF4Br/WSLDlF1r7r1bXfx4ex3KMdJF0S0oPDAzdWNLSIyQ==","signatures":[{"sig":"MEUCICxmVxHkI0t5EQhoAl/tXsFNbsWvEyRCmZolMaV21vHBAiEAtKCFb2NCWB17l6HyrzMQmBCjvay2Fs2eVWyqEoBzifQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbtBMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNvBAAnUhk4yUzHQ2sFtskl8aOX1KT2pv2PoNmGdw1umpDdFT4j+lk\r\nQQc4h9/3j5F/vk+ogTr7tOorMFLebUyIADSd29GQpE+dtm8sU0YUnXSrX0zJ\r\nZq6DFSGxQxCogn7bZ2649W794jHDpTCae4BBDt9Z83qu8pdkN1OTEPL+PfZY\r\ni9TZbrI3uYsKjAuDGAnylpc/eO6uqbAMKulaJaY5AIvrouawY52uNhb9jm7y\r\nCkr+BacfYV37Ex4phUOAYDZfRdcKLwOTonRSQeUC3FuNNznfBR90OqkmTfdA\r\nm7/iVQpVc0xsGNfuisa8Sw64F8BOV2YwdHc/OYhWVh/fTSfTLDEHusNc9r6G\r\nZrfX8WDyPyTYj8nK0ExR1urXnfm9Yw6bc6X//kP9ZxoX8oAW/+C0ceTUu209\r\n5LNL58pdHXYkupjnxl9DdE3cFUqU1gjxA4Rgd8TytHa6WfjiGx61Gj+rbU4B\r\nPCAr/GIHRxHIRXv0hxg21mcuMi8J/UHD43RdQTISIpeZjFDiRPEiCIVjMGGY\r\nF3evP/wcMJStDEk0lzy0sYTBjY/qFzfGuvbxdWZuzfwkW4T6ZXbafw6X+Tm+\r\n/GPvyey72r52dJTw3Iu6fEE7OukeGAFtQ85eJOOxJgEUxNV7/OyJN5ms6X0v\r\nmvN46fvrP9NFhkmpQI6iXb0iOaijSJLnOb0=\r\n=grqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"64666caf2aacf562ab6ab5b701e89f28a9bb5c74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.558c2be62.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.558c2be62.0_1668206668065_0.19238166844008342","host":"s3://npm-registry-packages"}},"15.0.0-canary.b5c13a7a8.0":{"name":"@material/auto-init","version":"15.0.0-canary.b5c13a7a8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b5c13a7a8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"df2488a3ee719adfb1ed811ad302dfc68ebff29c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b5c13a7a8.0.tgz","fileCount":13,"integrity":"sha512-zAbTy5KaZ/B/2Pn9QCXo487kpZ9hAcoLPhJvaxEjcL7zhM2T+IK6E5G4LTGJ404bG1md2lU6HuZLSb2yQ/xspQ==","signatures":[{"sig":"MEYCIQCaANytkPF+6nki98NgL6MNdb5Xomh5T3uElrZf0OWcpgIhAIh2oDdSJ+HJG7LgpZfyCCDJh1fe2roVyiFAXqrmy6qM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcmVwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJRA//XpviZ3S5+6K2inK9IJ/L5htXqK6qwYsgzl4kroPnYpflF8ak\r\nduwvdIl3JFT8btaC1iDf8Edls7F6+KC6bwaYGmC/DV0WpMuxFOaPYriC/US1\r\n9mDUt7y6ABsOPDM4wO3VV3yjMoFkpoWZIV6uWfuviHWpS/MGDOrVzuxOjO9u\r\nSnywtmiRXVeR71cIGK0EhCllmPetxUK2G4DqdTVtHwoTw6SlpOFRbz9h9xMj\r\nCpJdLHIQ/vmaHSawOgXXUEGHtu6ng+OxxKfvtwBW9/EmW3xoG1eMeTXwEFKQ\r\nYvpsk1hwrGeVwhVrwCJt5/Wup5T8iGkQUMlwWFZz1NLsIoNmBY3oppjnVefw\r\nUmT4fV14oltbldy5IVX4YrrrAnFkvweB82fvG/hUSfnEBtbgQOH9StXsmWvY\r\nvCh0PlADin/79LEP5gDbjya+iy31UH5wkZG49fc6qE1uf6Wfu78vA0P5hvg7\r\n7tjs22s3Xx1QlDBsKF8sNF4NbWQs3hWyiEyqPimcV5DlrD8fg8wl7vpH39Yp\r\noOoAxhgeQNX3odHvBaCOsrfRSNLB4QTqefJWuzs4wnhRfpHdVrsezuplu4cg\r\nw2170QTyb8FNJZrhxZzX+xC2JRDArqAMdqiejVYY6UQdnyGGYnsL7o99rMxP\r\n9GbjpMtw3j+7TaN19jqgAc+5rwR+DgVXiGM=\r\n=sBLr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d7e326425877e3ba53b64755680e3503090a01cc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b5c13a7a8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b5c13a7a8.0_1668441456240_0.6352889405236442","host":"s3://npm-registry-packages"}},"15.0.0-canary.a6e1c0702.0":{"name":"@material/auto-init","version":"15.0.0-canary.a6e1c0702.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a6e1c0702.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"158ea178a068ac2820e64b0eb3442d653da4f840","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a6e1c0702.0.tgz","fileCount":13,"integrity":"sha512-7YMJ85sBVWIQGWlxvHint1rib2s4ye+o2UnU+suGw6bu5Mhdvie5LyhFqnBZHKWLos9xXP6wcTMI/lGEmgI3HA==","signatures":[{"sig":"MEQCIEGCaWhgPYdpPO3WDWWGVZjtf7WDpgxsEdLns7KS/PBuAiBabqOyN2WI5v4J0uRw2cYp8Hm1fnVZKJ3isn9heMOLwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcnoyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJHw//agmkxTion9uYXt/nuRQgteW6K5qbDAdkZb9PDJu0de/piwEX\r\nDPeQI5NwQyOf5+wlwDqz/P9QVQeYTnrvcJmjhHevFmAMMy+G6v9qZefhvsIC\r\nl/ltTgYtUdJ0kYEWqEdzrhVVXnhrU7ORY9JiHOHEZqNhFPY++HPAhS7RZDQy\r\nHeWz/Dai8afq6hsgbwGj7U2aXzbZVnxZtyBVburH+BM+gZePUOrxDMUUEhpE\r\nbiAHgVWzMiRzIObCEr23xyvubE8yg8Ns4UrIpX2yNLY7talMse+qbCJ+c4tm\r\nmmUl/sizhxkOdd6GnmdU6SOspdyF7hIfHgZFmXn+McgZXsPhKorY5J7IpfiI\r\nDDPLrzvxh+6iDcfk6rV90QegN6TO8MtjZZgDEJv28+afcWmKRSNiJpupnZRM\r\nXAgpvVZKncD16GvfW9owS9cBg3p+rVP494v7f0Ih6SPmGtogmacP2nN+XZkg\r\np+D7QX9v1yrevJ6v8fhoQ/EIBFWEaRBbH/0htNIsEAC2njJJG2iKi5xQj1Cw\r\nHGPXb6BAlweKkGWJNzHaW8+8cwgrg1M4XwaSif5LHFxnXHXvl9OV76cF2lc0\r\n1Guo7hOyeOhGP1Ily/Uq5KaiRI26CUL5/aTByd1McHnpamrAmjDr11MErw7+\r\nc2Yrfitan9HnFmNajoXczi92Xr5BYJft4x0=\r\n=NCAK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3c1ee7333cad68ece747437d4bab1a737d6ea96f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a6e1c0702.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a6e1c0702.0_1668446770683_0.018351214638156366","host":"s3://npm-registry-packages"}},"15.0.0-canary.b6f8a06de.0":{"name":"@material/auto-init","version":"15.0.0-canary.b6f8a06de.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b6f8a06de.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4dbf592e32e81888a26b7448d1307763d8156c9a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b6f8a06de.0.tgz","fileCount":13,"integrity":"sha512-ueFC/sugFogqIHqnbEQ7mNKhLrUWL1xU3DuPvr+XlCIAlbYENnRDKPVBdF97CkiDoFT4ovjNnQJlpgL1AEhnlA==","signatures":[{"sig":"MEUCIQDOA2ioeccEswIk8EO/vjtGWi8+Cnael8Vg8Zl1YDC23QIgHdZQwkd76OM0rgWTW7KxhDvJjnc0ZmtatJxarycRc0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc1t/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKABAAkJUPOPm+DSHHCme9fwv7h6mJ805COIPeQ2cJz0n+rnUxIAXy\r\n3rwt+xYaDL6TkyzVjJRBHVms/At92VDkvl44m3rbx30y3DRssB+jFO94SVTC\r\nHEpFKxt8L5hf3JaHXfFVs5jbkMllf8ZsMGNx6yNDuIXn35FMpkirqzqWaena\r\nU6YGCBsAdmreLnpUyUuwZtpD9RjO+UY/Nm4TD5PfsrU9ahR72sORjvngH8Bb\r\nLZR5JG4QNx1z/Z6ECXSYch9SnBLfN9YIMnQzWyv4v5J5kysJJzqtS3Il+0hJ\r\nXphx/+G7+KlU0n0brd8hcyJeEALAtf45fjKOaw5CmWS20jS6G8xwcgcES178\r\nE6U5tj7cP4KxNjZe+WkumPX+LhehY8D9n9aAtBgvdwB3I9Ku+NmJn6/rCI23\r\nZ8H9hIeMmtGXMPa/eVmsI+vh9E+XSVFjmbY1yXcr2RlQtIN5MkaAZgHLWcwW\r\nTTUxAx4JJ5yIsyteVG88z0RrdasST3A+2CHVJolcjFu303ntBxO014bYrQYs\r\neFidR0jsCjW9GKYG87J0PiTmp2In2IbaetPZT3ga5Hy1ZO12v1VAknwY4dns\r\nS9rxD7Bx4KXoZ9UoEXGCKdcxQqHldDSYAbCPQSnvPgp9w4K9Hr/kJ/YEvLRB\r\n4XmqWGWktkWfZ1+VkO43/XNIKzChf6g4UyQ=\r\n=Bjnj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92681882b16f14e6a94df4b1ac983fa86e242640","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b6f8a06de.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b6f8a06de.0_1668504447453_0.6728497988472628","host":"s3://npm-registry-packages"}},"15.0.0-canary.0163f3ba5.0":{"name":"@material/auto-init","version":"15.0.0-canary.0163f3ba5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0163f3ba5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e1ec6cca10414b9cc740e7de3a5764ab5b1decda","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0163f3ba5.0.tgz","fileCount":13,"integrity":"sha512-hLHmZ9ZLgs7YPnij5hF0qYGy4AnDgxGHhW8XDMcPeA5Pa8N8GtHQsDt0MtLyY+ih/Ib1j77kJBjMulYqptTGkA==","signatures":[{"sig":"MEUCIQD/KCxnmtABlZk/Rm7IkE9C5WOsIlmAVjvJ62Jn2Gex6wIgWARRH+u9Sgz3k+BQev5WyLQ0m37APV/aNZwtauwfWS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc9PgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplORAAlKR/WyF2lu4hmMtnNmf6FDTs4iTS7gdZ7Jpdks4iZsrHv7h0\r\no7bSDpGRLTNKnDMm9uOXVxDxS8fnx34GWbqdTZq5pnbIsYvAFogB6vr/cWnS\r\nhamJeIiAo81d2HG2bp/ySNQJF2mLfm3bttJ+ThZEWS1seayJElqLtwlBoiTD\r\nyrF3XPUTHPguDF4djv8JVeoojhMqPOoOONPDE8KuBJnOsFfPUaFOArofTwMO\r\nrc3XFkK7jkSGQTtnj+1hJCOkWddWbD5UvnJddh9S72cK/UtKzc1Jq/1RbrIQ\r\nhgCqmYroLWScHor1rwuKHKIADHUErEalTMPmL0BwNV+TLUhQskeY905P6rO2\r\nlPrGIgIoW25Cj5zwm0J7SPSctNFOyc4QpLz2VNN5xp6cE+1a5sA3jHWf1rHQ\r\nRAEnatQn7FV1seA9YteH1kHQ97KIRml7bDrUmmkvET/8XHtL9Jfm1i4e+eH2\r\nadjHPLh1/Axdng3H/F6R5OYz/KymrhfWW7GDB6/NvyGF3XuI/09sFANcs538\r\nZMqnEBBZz8grD26X2/yeF6N+fVvGx6D07OgBS7+YTsOOIVWVAUNIBykSmbls\r\nP8dFwSETB3sHcigEWXj7czcS7qX3ovCAMIIYfsQ8LNIepAkWtru+kAEODloY\r\n1ob4dn1nAC32rnoSxdAQbafmEtvmC//ubr4=\r\n=4NO0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4198cde77ba33a68c74eb5e814d92df422f464c8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0163f3ba5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0163f3ba5.0_1668535264734_0.029791889245429637","host":"s3://npm-registry-packages"}},"15.0.0-canary.66c5cbb94.0":{"name":"@material/auto-init","version":"15.0.0-canary.66c5cbb94.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.66c5cbb94.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7cd8faa9b9e151ce995c1a7534f211802f45535e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.66c5cbb94.0.tgz","fileCount":13,"integrity":"sha512-rxiWwL4rqKCN+MdQCrFrO9zNTHhY7felBLUi+IsXK/bBypS1TC5beTKF9+FAtBYDhq4VDFA8VNwco64+O5O4rw==","signatures":[{"sig":"MEQCIDWYdn/jIOq3YWyY0hM3zoeVK5WK8MM+f2wB07B+Q0daAiB1lUCzBJNvDOdOMzRU5tg+//LeXGgYMKOXj+zpC4vM3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc+h9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtJw/7BvpruiRr8aNU8AgHe9pWupen4i5H39cOS0RTbeMkMeXg1Zwi\r\ngo1T0u1ldXc6VtOJPxlwpMzUtbdh16IXTalcGSuuaXTrdg+6R2Sdzr/l94BG\r\nBtQPc/AflX/YP1UeA+aUTFymgpMWfogzFG/SJ8yr84d2EAL9uaovW18PX6y7\r\n4u1/M5X7+RbPHVuPrzgqDVAuYcu1NCqXya2KB+iN8F8/Jcmh9KgSq7g4HCEW\r\nkfcGq957VSXJt4Wxgrdhj/+m209s5NP6rv7RD7IX12IVzMXvVtaGH7EujGOv\r\nxJclZyFPN93Xa5OwB6sAkb4EU2afTJGyi0yYn64F9RwweSBDc+vf8fVmEE3+\r\nU7hwgjejBK9jQ87eAOiiIYkS3kufXVF4mZYTd6xC8xkV8dbumpyKfol7+i9z\r\nhC6uWw04o+/8mmzAKMeQKKFDa5GG8RgUCc53fZcarsvNh+PCSDLVRC7gwIj2\r\ncAe2bR+Y78DwmZwNLtIRPj2LSzxMw0dRyRUtwF7ctyuLcZ1zzCszUtCMzZCE\r\nN5Tig257n0HMRV41Y8Y2K/C0l0d0f/4nSd4zwWnUmS5E4/J7eNb/l2e5nwE4\r\nYfhog4790hYgpb8MDKiXE1oLaYeFMytTWkaMXSN5avzka3fkg+Rpu+aijugM\r\n6Jg7yk4PhprEjBE02FJ5SZF8zufVyVc7e9E=\r\n=uEhB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5d01716a4e4556657b2c4ebb469b826660673327","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.66c5cbb94.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.66c5cbb94.0_1668540541755_0.3597734019891039","host":"s3://npm-registry-packages"}},"15.0.0-canary.b01136063.0":{"name":"@material/auto-init","version":"15.0.0-canary.b01136063.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b01136063.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"54b01caff71519fb64c23b00bb60f4f43e7e0f04","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b01136063.0.tgz","fileCount":13,"integrity":"sha512-MkPF6O4vvar2aG3nydyyLwm9iof6YBeeyhMjUgz1ypSsyHaw8QD52nousBRPsmU+a1eqezHLtMMPOlvS2zjnmw==","signatures":[{"sig":"MEYCIQD1eJRODXP4FfULiRC/Og5sgUxg6CiSy8DW1e8IpiZpNQIhAMIaeUHWM7nrmbIBhn60a5aVZUsMl71pXIlSq+XQMi3F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdCt6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNlxAAoTvsYpAtoAfkyi6qIX7xu/xPMY8MHWk+1t2K+QoHQd229I+P\r\nDZiKtD9uGsOHHANc9JaLhAgCuOOBfqaQDqBdNKoHGGN4jZLc29OgB5uaDDw6\r\nGS9D5pDOx0mqRv6bS+ikAH6nts4jFd4msOnIBGvNaBd/uXC17CbwrqWsAMwv\r\ngINb+3gts6ctEvh4sF060I1FAbtEkYjfL9W3MXF301FekQrp6pD7YzV8hmIl\r\nvpcammgZ3bMamNG9BOu/7ZOR4z+cKSvnKQIZX+sn9z5sv8DoSTe4sXTxJKhU\r\nbyEw2xOktqZrcxza6lC5nwHY5W9uOATy4endHLMMK9N6qF3umGCjOuOFQbCT\r\n86clhDd3iRa5u53be11VCJmElXWISTxnv0m6k3h0zS6XAkWMy/XvMAinFNaR\r\noFX86d884QLx/60qzsGu4nrQbj0WOVc25C8GEpv7R1ogpRgiruZvl0Pn3DkR\r\nfs8UGfWB4ivntWRboES9bnvk4P2tDNw3wREYfSV9elPLgkKh6SS44OiQ+Npo\r\nlW+oY5dKEgXDPH7sUwfM3zvwu4yT87NmrGXMP5IANcWfIwFaTeBAwr/pY75Y\r\n+18gzXi/tg6c2B/JCwIhgTECjuyCHOKUFIiCs2KevDctTq08muEJFE1EqR0p\r\nrvbHetsBJv2C7e3mGzHuqnECDvXf5zVvhNU=\r\n=HIFR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"125921cea459cbed7dbe3e1c938761a0cc03a263","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b01136063.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b01136063.0_1668557690133_0.9595113654835756","host":"s3://npm-registry-packages"}},"15.0.0-canary.01da0cabb.0":{"name":"@material/auto-init","version":"15.0.0-canary.01da0cabb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.01da0cabb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"38eb9c1dbf9853d4aa10d7162864a2ad4384af19","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.01da0cabb.0.tgz","fileCount":13,"integrity":"sha512-R2IksGhcsFc67CRRnheIv3PljCAe4a9tlfLIwcEziY5Pn5MXRHNyO8obS8UpH2oqLGaZK8csGQNPadT50NfIuQ==","signatures":[{"sig":"MEYCIQDXZ8rXQX48pEJbbUjBho7ZLcRLoPRdo6LVMkQisz4cXQIhAIXZSVt0wyHJdm4zz9+wjt6MMox/KHhfNVH94gNLvj1V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdKlxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrivw/+JA1y3JXY/asAAy+oEgFd5gLHD6/l+ecN6fS5iLTEhlaP13Iu\r\nRbwyz/gZOnmSUlUkujeTas9guRkH1RXROC4XM9FtxU06aXb5fubJ8rs8KEme\r\nguYO9YaKVhqTuYBb/7XG1XnV+bsUvb2zXBOd/T+r0JQOV2WRacmyulJqdYS5\r\n0rNkgI1gokes50CnseJG91RM5DoLF/d0TaIEmJMQzatdKQ1DqosCbu3755lK\r\nnEjsXE4+8Y9olLMWmjqpXxmjX3IU6e6A5yjtVNtY+Sy9AGmss3/uQKOr1mwR\r\nLe9zgTy9GF4230DvaPKy0P5thP3StgatNpBrilbZeKL4JkCpkfs4W97L3dm9\r\nhNS+mDPJy4QkeIe7JvATpmGC+3HpxGNWmhsX6BFAxwKXDFyPLuGgWf6lEltD\r\nzi4mOYAN5VlTd5E6R3Da0PDA6NvFq4Y45DrOESzswxF71B6ii2jlIJe2waIs\r\nj1krhBnaAgBrivlns/t0PSt3jMBjTSW+3BumU/cPwVEPqkAWJPwC5cKve9m1\r\ncNp4PoYyAdyPGIHk2MEvL+fKJPnWSijXjdISI7L6lP0Pf3X1QAEX9ru+UfWc\r\nUVZVH6QgtgsivdyDc8qGTzbPCgJYt/oeOXl3+3q5jGtlQ/2fd/2SdIaoNtii\r\nBsyIYoNMBADv4anGYcJj6r2FZU9Bo/WVBkw=\r\n=/7pC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"63a5ccdac9b23a6c70c2bc776e20ab703cd1dbfc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.01da0cabb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.01da0cabb.0_1668589937397_0.09429332001107649","host":"s3://npm-registry-packages"}},"15.0.0-canary.4ac393164.0":{"name":"@material/auto-init","version":"15.0.0-canary.4ac393164.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4ac393164.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b3b27c74507678800fe9ce5fd61c1008fc03120","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4ac393164.0.tgz","fileCount":13,"integrity":"sha512-MPPn8wG211t6wcWpTtf1XMxH/8Cz97pntmFQp+2P4Wa0HxfNnOAX20SDZm+ysdS/0R38c6nN7o390bDtlhztcg==","signatures":[{"sig":"MEUCIHpHotaNtjAUPyfPA4DwBSvmqSPmxPwDFrTTHv6vqxkgAiEAl4rnAPtM3jGDAiJe653i2BeViZt95Ox4rcAe81pGtLI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdQxZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQQw//Utg9EKlZQTAA/+MGNrWpvaOpxV6F0c+KZvJolgC01yfMwfoc\r\nAms7xEp6EFK9YaztF3vhAuhvGi8lJjDaPmbFTZvYDW0R7ya00Ln8ljHZQhJl\r\nsdXis4J0AF/giPWCzKNbu4YxXGhyHipKKNaK3AUMeG8KdumEgxGWYlsIasCf\r\nlioETacuI/h0CZyZsTFvoq2hBdJeYcW6x7k2bK5N+9vq3VG8yfnhB3oGxPNS\r\nNRr2RD/jN56g6fN8CyRPtjGDQJfA85KTbRtzGxIeV6QNQx+sY2AFqqM08kFB\r\nBCJ4U0d2yPPEM4nHO4HZq9KCJI4Br8JBCZbCQX3fjfQJCRY+A/wzW3qUpwC8\r\nF8fqAnjgkwFhxkQjiXZET0J95I4BPeK8dJb+gMFGE/a7cnDHLbjAhK2UUgMm\r\nI2jv+lKkkeGcz7CIUUO2MCyXA7OC8RSFsiC/DWvBEvCaQ+pPgjKSJChemSOR\r\nDKetyWQ8VROKObURq/9ws/2aOrtUHm4jIpYjqqU8dReU9BWQK43iR+rllKBk\r\n7/LYX7mQm1aMrFr7pFBQqukNXOJkpBwv18n/X7NBPpQ7fFD0E47U1cmjcWTF\r\nB7s5QxKEHYWFKI5eXHvCQ9xKFHM0YFxX5XG18vcx0YYDFYFxZ9UZovQ9O3vo\r\n1gYY1v2M5ZibcansqTT7kwWG0H3QeczcB08=\r\n=yM27\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f14d3444d266ac4c6c92142c377275be3fbc5d0a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4ac393164.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4ac393164.0_1668615257631_0.9875154107328417","host":"s3://npm-registry-packages"}},"15.0.0-canary.6048fb563.0":{"name":"@material/auto-init","version":"15.0.0-canary.6048fb563.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6048fb563.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6182a7709ba5ae3361001c7b2d2614dd7f999a07","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6048fb563.0.tgz","fileCount":13,"integrity":"sha512-p5p3kK224tUMo4CsicJPDfUc5bHk7jlKCA0H5BIPuBjf4rW1Ow2I721lGhhNv/rk/HUL7deVq33l/d0AVt1DbA==","signatures":[{"sig":"MEUCIQD92hDmYZ4cX39jbNA01vGKMl5ow4sdeJHd09D5PNqKQAIgVkjVe23u9vBgmH063pkLcGKsY8/Ve9vtCWUMO6XA9Yc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdQznACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBGRAAiUqzTI4NaM5lS1ZIwFM8g9RvICavxwvyZ8rMNk6krGrOaZkI\r\nOIRawcujtmp7v/gs5REIpvMTut1RIAESQtAU0+GhB/MAZk2iDMPi9Q9UrEgX\r\nZpr0NV1iXeHIcZEAoURgeGLnJn62QPBEHc92pcLieLQm8NW9HPOlU+jLAGcL\r\nybU5g16s8+ghuVqyDNMk8fgsPhsooJ2+8TCWFvgDjYpbVccgI471PRNrrcJ0\r\nT9++Huj6xlX+pzvgCLeOVI1KmoUVIOwsDBa0mZGqnLx6Pwe5YbIIj1jjRCm0\r\nqaZS3CzzLu95CXrEYUZCYXEkyPlm3IpBLxKNSaTiIpHneGzNhNCaaL9cPZF1\r\nimaibtnLyBXkoUq1kVRmirBkp57Vy81wGgSDHVH88/FikfF4Z5kdBpVxrBpS\r\n5v6fqKEnjYej7k9JQ87XXl6gKNJAvSoPdTuISoz7P4Jl5WysukOVBnwAPkVI\r\nh6dYReZQM3zTqAsu8wlkZ07rRRwR7sNBj3C1qVP3iLA9tLag7iU17G8nt7ep\r\n18D5ochC2FmQRqWiII65f6Qauwm034aKMT6qr7hOrGWv/4orofBtfHtdBSFI\r\nQx8FgwGN4DiujERHk0LdltOVIw9wB8bsFL4rHKnOBAd6a9Aergd2CrZ2mufU\r\nKHw20GCgpxhypEA3dV2qxa8T+0UxXqqG3Zs=\r\n=B/Ri\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"590020431978794ff2128a91f19756dff9dbc37b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6048fb563.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6048fb563.0_1668615399066_0.2607269008136366","host":"s3://npm-registry-packages"}},"15.0.0-canary.3777b03cb.0":{"name":"@material/auto-init","version":"15.0.0-canary.3777b03cb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3777b03cb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b11b2f83a7ce061c3aa1ddf53666b42385e0a9d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3777b03cb.0.tgz","fileCount":13,"integrity":"sha512-Q7AYp00B1m7Zs/KYSLURFFgBvnPktOOIqCaDS1cN8IoqUFVQqTaQBDDeV0XlAARiz6d1dFiATabLGQSjWkKjNQ==","signatures":[{"sig":"MEQCIFrHLhTw7w/5xUv1o+r0mFZu+QShHWpRaaSg4R4KhnJxAiBNWSk+L5+29FsWD4VtC3nRawqdgOfFKP75ULkbiEZgaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdS6TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqicA/+M6ezOqYlhKznH0SuTXDJF/Cx8ITT1TT2Vj9xnqn+M08Lt3+V\r\newYa3JcycSJ9k0ifyAnuaeOOPnaF05BqsR4jfeZ5npCk4rE2H0LXclf6Vz8f\r\nvQjv3MF5LFkne3njZD3dQwhL9FoFiZZ4Lzc9ynlfueZagapOrOauLvAOu4Qx\r\nEJv6HJKgYiPGzFJBEqB0KWk9HisBJHd9qMLGAdYR/IRda+/t/sGzrB9jWtbO\r\n7zj9E/wRyth3RVuI2ZXkIYx11eu/YfSvqZLQ77RXHKBxfWyiF2FZdz21+J+o\r\nHZfvm63y30wh8TebuUKT+dU9dUVmcQTEtGL9uvTqagUIRStG9FtNTRUkvk9n\r\njxiRsP/RFnAVNCMrw0Hl8Nnklur5EC0xzP4qV0s3q2LX6DHdXSmUtU1aPjLP\r\nRe9FmTM8avJfwvsrGqcKgHnMlnZZ2Xbf/MC/tWMTDH9SevaldrmxVDVW3v26\r\nS4iOhPCr9B0syL8GqwCBE7RNGtiLLl32uQ4Zgv80Xhg/zTM36JbclL5+NJ0O\r\nLbFU2oCqrElzlS70X/tfdWBCyXjKZq82NynysPG4vKyEWAc4wNJwxoGxpby8\r\nhXvPVJKGM7ETEiMMJUughR7HVF5ffS05l1Rp8cqyIUmxhWnrP8eI+FmN/Rwg\r\n1crwvqs+FeOllEuwU5CN1gorGC24wAzEu3U=\r\n=JUcZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e02f6251b19559b874fd1998a9f0bea7d651e41f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3777b03cb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3777b03cb.0_1668624019520_0.24428461632132348","host":"s3://npm-registry-packages"}},"15.0.0-canary.f7f56fff7.0":{"name":"@material/auto-init","version":"15.0.0-canary.f7f56fff7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f7f56fff7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"82e6fe76c6036952d687d17775ec92c907057318","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f7f56fff7.0.tgz","fileCount":13,"integrity":"sha512-1k/BsZTVZJXRDfNvFYlhc563bjzhcDLHsDrAZYb/wl1xZAvvnvkkvCF2OHTq87bZQlwTUKq8ffJvyesc7NMzIA==","signatures":[{"sig":"MEUCIQDh/grsgTv5SVhVTvupu6Sv12ZMebIR0eFiXEJ7874RXgIgNWBJk8bHD/Hw0X2xVK4zYmp33K1jtkRYehP3EmxLZAI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdUAaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIuA//fXVyk9UfJg34ZAboN/ufeL8vuJ1CrpS5XF6p15QFzJ6aEzER\r\nXXa7hhpahPDi5igmxnT6chMxRtZCZJBTElz8brW1B1iZDQI57QYKB0U3nyvI\r\npQnw9fGyovYRcWBei2liphooduxbwGrdHA/X4Lxvwbq7aoKvvc1Elyl6xfEQ\r\nU5eTOt6ENnI99XIeNuoS0PehzMWftcWNrFiqTCUPAJtx4H3GXo+Ss/JzcqS7\r\nOthZ1Wc/DKzx3lU/yGbRdsuy4bBry3K18CnKWiWwe99aHmCQMqDqxFIxRN3I\r\nReRkNpW4KJ62l8zL7Tq98sbyAztLZ4fM+BrLo7XYFhXVhBdlrrPpV4v2nSP2\r\nrgZFILN47eKTfJVtaqfa2yXWDdy/DYzfIasbKtSivL2I0zKX5ZPfnbrYHvA6\r\ntdfv3oh1/H2M0iYWZjjP+GyEY/nu9b4zxUCofQ6UoJQiCDk7Fm9P6j10yOtN\r\ngOFx6S+ZPpbLgni9o/SPAcDoOz8MNH35ftmosYnaT5b/LiChPKBI5yFjUjD7\r\nf0IF2lR6Gp4p/BP3Zhnkq6PapK8KTVjGhxClB5WV/HbUTr7KWUp9zxtYQdVM\r\nIr4n/Zxnr/v5C6rClgwoSAE0lvkHzHkElj5LxmibaqdSmsFEMb0JNpcQmtNH\r\nee297O0nlw+yjACNzxxE8oncAPqUH0vy7eM=\r\n=BHYu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bc90613e754d04f738197ec3f3f4602e9b362d8d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f7f56fff7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f7f56fff7.0_1668628506198_0.03744519983916117","host":"s3://npm-registry-packages"}},"15.0.0-canary.7c73f6134.0":{"name":"@material/auto-init","version":"15.0.0-canary.7c73f6134.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7c73f6134.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2c3ff4ddd0d9b96acb55b4835fd0f0626e493461","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7c73f6134.0.tgz","fileCount":13,"integrity":"sha512-7zUHXZ111k4S2r7U4gg4E53N3KmXE/56dVtc5wXKgmGvX1PsNxQfZKcUNOi36DnsrnZXY5SwiLXMx0coIhbR8g==","signatures":[{"sig":"MEUCIQDM5ksMb0gOz4Ty44RBYWy88UzpEtSJaIc8VPxTymzE2gIgDSUTcvMI91zIYY+iGoFjQvN++HNXDba4koG9llpUjzs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdUDvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOGg//U3TXRiIn6CJRd18Ixh5px70r63gsgyQXi6/+dhdF9C2EEnTE\r\nTo4zfsuGrHFyllQUiK+1A9zDV6JS+sN8stoSwAHteIVF9TmlsS1tqLxBDLES\r\no6CkmhDyR10qrvkcM0IrQBWjsqzVWj2orGohivxJU8/fFZuzOoK3GJspK8DQ\r\n0zY/zwUj7iuIyR6tc2GXyjnBdFebWCF/FsbsVek4fywWPkp5iDefZ/rrcBrA\r\nfjXlWhrLGAgbxaeBKgmZVC71Rkz8vcol/aj7Z8vAs9SKe8CzBoMMtojVZ/us\r\ntGdUsWXgZMSIbD5gkTXuOMQjfKtOsP1RL0AJl7UcV5x6LejKcOuPmfgJzUlJ\r\nDx1Rk44swPh8MNJ/W1hsdD6EDoJc/1SSbKUvw9P3pjhPC0EiUbtv1S7jYktw\r\nYZfwvYI4CozSvqsVO4MVSzZ9u+SNSo7Q4qVgA9vX122QZig+JiQSBLnJxWu5\r\nrVsglTvtI/a4RRu5vvEU7UxT5cpZ/2UdSfTeIUHdpFDVCahdLIuYAhF0x2kP\r\nDOhXS+xF8RQJ1tWF7A28kk2VbuoWof7tO7Vu/2p+932K/D4tgQXBLn65D0+g\r\nFNZXoGvM0+wHPbqrSAVXbKu0BHp5mPMOs3ZHlubWE8VbekU9HwCQ2pj20ECy\r\nPIemnr7j958bym2gE7eGYlHZtiS58KbSmLk=\r\n=3BIB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"14f53e565ed77defe907254a486b9ecce4b45146","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7c73f6134.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7c73f6134.0_1668628718902_0.16350656533160368","host":"s3://npm-registry-packages"}},"15.0.0-canary.f1e037150.0":{"name":"@material/auto-init","version":"15.0.0-canary.f1e037150.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f1e037150.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d4018b8cd55baa66757ffaf36b88158bac673794","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f1e037150.0.tgz","fileCount":13,"integrity":"sha512-32kZZeE+NdqaH0OEiHDOb/WOOzYRdxZ6eEXSvly0K1eg94GNv1fSHSJ0bvoRxg7w3vizNsbgiLLT14EkMVZk+Q==","signatures":[{"sig":"MEUCIQD+HrmRncR4Qtup8YuNCRrgUJ7+utA2gS03+2a1Po30lgIgE8+FxxSq56cZczEFBMNmt2O2Ra0KsQyGGv04rPR8zLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdUI5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFCA//aCGlFafA46hlRkYQ3jUby6BDki2WbVHfuj4hWO1pGn8gUCat\r\neeDFdam3LlzMFwpxhFPkfTFP+IAb+YT9LU0gmUN6eyLUWzKTqBnsUDjavs/1\r\nNkImTTDWmSeGDqhPt2mwEWjcrjdrnDaBTf8WsaXq/v+Brn9bON6I2lPAqJDT\r\nMZ6Nzqk52qazWhVn4idnkuVie9OxoxGv/zMfhDpELpMZCufLhipj/fR+y6ce\r\n1lDpZFxD9RLFuBtAbDI3yEG4LS7noGqi1NW0JW7KSN0zs2tdjtjdq+jaGPO8\r\nkz6YlEFJzG0xK6BO3D9GHoiHYoOrDa8AzG9BTQHEeumLeqMeS7UEcj1lTaUN\r\nYoiz6d7BGn8YNocu4qLZOmuYfJ+w8FVAKRybkkT8ayk2ztBEc54DInMmd1en\r\nkQESVxOVonSkSVy5SqKSBJ47CHPwOugokgjdMsd4fjPcoamgmAT/aXpXN909\r\n+RfILLZrbVrhmxXddhoQErR3g8ucPjCzPMaJau4HILnquPZ3Pm/o4BMhYpTa\r\ntGoxpebz+q3OrwRVREzYFEeQyYsJGT7LAYBcpIg5zClawTJBeZ4Atf1pceSP\r\nvuJBxYToO7NqLh7i0JzZhoFtE16WwLZSJMDNQzzqOHOgwTKsfT3x2bz8E/lv\r\nj/ptfmAFeBokjHaxkI9k8HUOcLtpqoZ2RoU=\r\n=7LFb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a639195febefa28bbed957ef46942b3da6a4cecb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f1e037150.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f1e037150.0_1668629049096_0.5098114356765648","host":"s3://npm-registry-packages"}},"15.0.0-canary.40b18d043.0":{"name":"@material/auto-init","version":"15.0.0-canary.40b18d043.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.40b18d043.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a1a6fe6cf39269be568d6f5799813732a5b7b1b7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.40b18d043.0.tgz","fileCount":13,"integrity":"sha512-5lCX3EFAk8FVHo6QRu+pL4Y3jjJSIVGvbczwCgQBjCmLz+cAakIXbwuY5S+wOzgKF5iSCndoHrE60+kq4EOlRg==","signatures":[{"sig":"MEUCIQCYe9jmMljLVpK8TyvJYTsd9qRX7qK1HKl2gHIy0eoW1gIgMyXtq6oJSAe5EBagdCaVMLso2Nr87hKfBeffb4jq5D8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdWrwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqV4A//VVKPhtcWwtgpXGOkZUiPNPDjdRISRpx0FFqv5ptdKc/Q9LgY\r\n6HIgTAR8E9XHZqq17J8upQA5xh8O85h3TIbtSjkS2bq9fIGM/eLOP5jxGJGX\r\nQSCMwESFY3cML5BuG9hp1Tp5oLSBZ4alC45KDlJuYl4o3TDV+/XbAtiLdJuR\r\n7nopQzAflA7QZP9l2tuypavr2R3N2/BhXguyZCyyUqIMgnmSn+VGdXwDPgkG\r\nGxZ0Y0aP8zw0YVlEjXlmq7vpAbiDisHebgbckaE6V4JOPxCQDaFJNSW3UAii\r\nW7XBsbTN4LdHLaHCA4mWhpoN1ONvX1IyXy+2fuPMM7R1NQ6X/H3YtwXEL2fF\r\nT/5cFg37bGg2Uj4Ukz2hSiDvMtb0twH6H5L5yFo2GtCE0nbAtLHu2RMBCKoe\r\n6t7aNf0wOHZPkY4a/L6Z3zhE9TLPRQBmo8hez52/5YeEDX4zvQUj/ZirAaY7\r\nkLiqiEh/SGoPGGaSwKMPZZMNIP2DvTWRpbJr1ADVXM+wAlh6FCg0j8HhgXbK\r\nDnh1a1PC5HmG2YgA9SEs/o68fOHikcULUEFS+EVvT+ZhQNYwY1sJ+XOa9hbd\r\noUU6itpGOaBVc06pNfewAqxC6nkP9Slzz9Ebuz3Il/oeNamGeArXDaXTTpVy\r\nkeq2IP1SC4Zd2iOTtz3T40NFQzl8vHsYR7U=\r\n=jxD/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9ccfc97518c89cfcc2b5e776dafe81024d137f31","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.40b18d043.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.40b18d043.0_1668639472252_0.40217695802452824","host":"s3://npm-registry-packages"}},"15.0.0-canary.86bde5c06.0":{"name":"@material/auto-init","version":"15.0.0-canary.86bde5c06.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.86bde5c06.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15796607b591f9936e02baf10e153732839d6624","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.86bde5c06.0.tgz","fileCount":13,"integrity":"sha512-V5nkJnrYS3LswlnH4k0hmD7hNzbHbqSpPIMDfvWcf4YYB7fYD3wg2qGdhjX9J1X+XYnXGwjEPk9/kBNvziSWoA==","signatures":[{"sig":"MEYCIQD8yZSazHmQd5A6Rw/1C796Adsg0FDP3jG8XGb0Q5PyWQIhAPi2WV6/toNAJ+JCRnlzEjNLKWSsaldM6LrhcvCDl7ak","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdW1XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSMxAAjcC7bBY7Ba+rVRUlYGwnxLGkTPxOakPg3n32YxNtD1aRY007\r\noCut619BjTsglvLrIGutiAtF744XU5xy0hORRDtsCnk588RAvIkKoty+FlhU\r\ndXMEn2t4IyWwHOxtL/hSI67dVDaFPQ78Fq/f3HsQi2dwjaDgNP99dpISB3q1\r\nRSx0fAZqSLEYOvE57kcn+Ka2t9wk6xESVQUeJTznVW1mleBUDHsshOT+Z8E6\r\n8Dm999db7pCUXyrnV3uM0wOgJ2g4NQky5cMB5jwv4Vql0M+uAj3CF3DpzOeJ\r\njqbbqyjf8JeuU5BpYd2kwX2W3hnrHI6B5Zaaeiqi3VT0mVc810o97ZSRktPx\r\nO+eLCpiWI+E8azfO+lOUvq9rcha21p9XILhjNmwEjUVQZmEfS9qIAVRlR65U\r\nQuSnIFLOoL5uTt8BouWwYq4ZootcL9JWeoRg5Q5Ugkf1I3jv0QcAx3OSFsZc\r\nVjKUvTunTaFLNKjhP/v+2RKlTzy1I/7teJmbCzMyN11Ohb13BzSZKFfLdNtY\r\nFE2HLuSRIsLhdrY4Du4N84Y2EZGmQo0aSF0wUtK/zzO1al1Ytl5O9JTS+dqv\r\nbMr4uyP1cLmeOaErwYl+WmEkqwPH04qpWaebGaTsLumm++5u3Uv+DslSjvTA\r\neCzvjXhCyqColnC+7fPk8CEmB0hUICBIkow=\r\n=VRcp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9cd39d4936a1961536e39eb1df855c5164d5840","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.86bde5c06.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.86bde5c06.0_1668640087428_0.6139805164189382","host":"s3://npm-registry-packages"}},"15.0.0-canary.bb7751002.0":{"name":"@material/auto-init","version":"15.0.0-canary.bb7751002.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bb7751002.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9af382fbb09ddd18698759de405dea837ff4b425","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bb7751002.0.tgz","fileCount":13,"integrity":"sha512-5khvDDaGYUV/Lwk950zWxrt9tHl3CO8/1yW93NCiF+0ADj2NTVjGodI64fDfcae/vvnDWADh1n+zp0chmyGQLw==","signatures":[{"sig":"MEQCIFTssx7vc7n3w8SRg/rJo5JEzTJx91GpYvqQkq1LGp/GAiATxX9weEsES8oItfi2h56oeZLTjlFM0P6IkU964IMU/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdXlVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxpA//bW2qwISaZ+r14j8YKHunOCwakfJkgS8I5waqBUo4LxlJzZYW\r\n6aJRg4zZnXqScja6EVUn5PlTs0Zuq6QZ63RZvsv2K4FIbRXgjDxQ2gK7fPOE\r\niOVwpR/OsjrhI/Y6QIW1Mq5E9PayLYZHyZqbJexhpTk7jJNGOc0311BBPoyv\r\nxHYufI7bPGxmRrRyNjVnIMNgU36W7762gx2yNDzi1xuLVUx4YfCFzV1KuQb6\r\nxHtZWRfY5WT276+GoXym8yged4jCocD+VGT9smWCbkQGR4SOEY3n9JGKbv8t\r\nGN0HSHWqOs9DI5scZN5DODGBopS1ejCAb5HH0rAFJ61e+qbs65rGy3gtvYao\r\n78KK5X1tbh7BtmkNiXK2zNfwhnPk2M26O31MvqzY8gBQgbTEbrh7/byQRBRi\r\nY/nQfUfAV0MROZHGR9f6R6SqwfnioI+H6lgL4rtDkSsdmJ1ZYJyzg9NOKC56\r\ndytE//fPDCyAatkawrNYmQtxIJ81qtkvzEi0JZA1kYQpzwclWR4OFi8CDo1+\r\nsXWRhYb7k5X2NFc+GIxlTJqvwEs/AU6FlSromAmDe0IlfI7sYZ9Zo7M0wHzD\r\nzXK2UcwacNfc+aDmPLVk2wPkWLgjj9hMJBy4NtUD2Dn6rJedeU0pC6ZOlyfw\r\nVZHtCAxkorSUwjhLu2eEGdSmRRYPvkAMk8M=\r\n=oqzE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f83cadc3a1330a69930926dacdce7fdf10432f98","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bb7751002.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bb7751002.0_1668643156916_0.8792883641415823","host":"s3://npm-registry-packages"}},"15.0.0-canary.63aca9af6.0":{"name":"@material/auto-init","version":"15.0.0-canary.63aca9af6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.63aca9af6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f21da52dc3dd372e554695d59013331ce0d44e67","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.63aca9af6.0.tgz","fileCount":13,"integrity":"sha512-aSwmXkkGlfDFnjqBt8GUrME7QqkT6rx9zZWqsJO8qEmzNonBVh2JTTPu+wdfTKT4uE9YtF0mBI4bD8hSI4yKQQ==","signatures":[{"sig":"MEYCIQDQDpb8fe3X4JVSWcD2k8yTVvQGdY+YZ8YKPw/XHgc3dwIhAPT3Y76auT+Dr3QZTI0LQq1W8wLfap7+RMWWjOemJcPk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdoTEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUoQ//SDXhteVUi8HXWGWZct1h2WtB6GYqhUfufuvv0Xz5rFLHDzMQ\r\nL+eSeypvETlJc8w9Ln2TcXIeRl4uFFAcaa+MKQrM+I9QMva9wUhNgDo4ZKZN\r\npAkd2Mg69yYTlSp8TU1YzIDiJH6OMCAqnJiqmqbTNR7KXSdxdOoNiMEoDCS5\r\n6DvBhkI3ximZb+A2j1kcsOzqxWEsUy+5aD1WT1p9P4GAaU3Z5U3TD9W+++gu\r\n7p3unEb48qSKa334KaymVQpSJQkk7UbsJ7c59FBeKQ+mRetokF3K1lr95ayA\r\nrim60F1jUJbqWZQeLmU0VT0oexeIQZVVocwbPUe0H+Nf4Owq3yGjdScLzraz\r\nNRbZXKjw7BV5P3c7Pns5n9FdGAwtMvDuyYKx5jtgejIRt2Kiis6p3RI/qTOL\r\n79oPdGl9yT37vcDOiAkM7Mb/Pv4pNYVuK9igvUubyKrtf9YsmLWx9XNtW6A3\r\nGB4+Rug0FaXBnUNou+atdolfrKKEZ2GGlmSoP5NSIwGIpWo5FcLXZWj23bDR\r\nIXlHRu6c1JkTij4pbItt0sxswmXessboGdxJw3RrtD+FcClKX1vufzwu197I\r\n7MLTCtm1IOGKaWBOowxegIX6gnaBCPgxDJXJsG7/svIwUqRnjMjG+CYsUl2v\r\njh1ASP4y7B4lfs/FMY/4e00VLnIXnn0pNSU=\r\n=6rY6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c2c841973403116b6a405bb9aad3ae8476bc028f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.63aca9af6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.63aca9af6.0_1668711619897_0.3412732224119315","host":"s3://npm-registry-packages"}},"15.0.0-canary.56482dc2e.0":{"name":"@material/auto-init","version":"15.0.0-canary.56482dc2e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.56482dc2e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9302018001c19d7b0e4cf6e733a036a56c57068a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.56482dc2e.0.tgz","fileCount":13,"integrity":"sha512-u3gK8uqoivxvnRTkU1jdb+VAXRBSHDWpjgwASP6nvhrT6sKycenPq1/SNMvEd3MAq/zNbX5RglPAZ8bLwwybog==","signatures":[{"sig":"MEUCIQDqkwb7Rwp3mWHUMMo2b5oNcBTxCRgnhh9og9dGSuyARwIgLRYAkcXMVj1ScYlATKPHbraXfEX7YfU9ZFFxy2UHhwA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdq2QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4jRAAmU763vnCiCDOc9JdoEaVEgOKaQeHG3vJMTiBY22lCgOEZxOl\r\nDtnon4bBW1zUiQ8igsc9ux4RSVlkGn5hgtdhaqHjPlzh9aut+hVU6i6Z1jJC\r\nQEh3M9qkN0YI7Oe9lGbJTmgHfrwbYG5XtKiseJ3wRbGueqXHYBlrq28xYdDv\r\nzLZQyRjubpZhM020y8zFYYrazwXW3d/tYwLxswA3vNPYp3iWxJB8xyjrtIkI\r\nqTpqpVDgNnME1MjS2DZQlcyfft71VAQpYFPd/deSHWlu5r35D4u0k2d38qLu\r\nqN0UuAo92+0A0wJ/A1HTbFeoh8EGbNL8ID31XD42AUZkz5/4pwyIYRLr7HjH\r\n7eZYTfI0EqNbmZTGquZUw5XeJZmtqXffqik4ivDDSN8JRcf3R41lOpUjtSHS\r\nzr4XWqoY7uYjn/NIVVNMb3yGs0KwLYxu18p2n25hjZnKCqpttH+X7YYMJHC1\r\n+LGW6Mg/Lxl/tPZRzM5tsSu2HqfThJuG5OouXDlLDrgpqxITjZB2ISQKvIFg\r\nHWl5N5Q3AMMLHrtemBz6m+o1D7nHEQuFlgesizoj49dyE0LlhTHFwJCY/4ip\r\nFxK0aiz08ZJ6vAYJdoDP50y8CInByxxJ39bZLc5awYKYSgB5evMAY0NjTrXF\r\nVc2z1ooDOh4NoM7NsIHwv0wiZ3fGfWQuTp0=\r\n=CZ0b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c65945fd8948c8e5ada035d0f2538dc2ced7a28f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.56482dc2e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.56482dc2e.0_1668722064461_0.4081273786877495","host":"s3://npm-registry-packages"}},"15.0.0-canary.953e689f3.0":{"name":"@material/auto-init","version":"15.0.0-canary.953e689f3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.953e689f3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"30310fd48db5ffae6cfadd57ea0a048ff1ed396d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.953e689f3.0.tgz","fileCount":13,"integrity":"sha512-br7TBXwqG0O2keIyO2avSqg+b+p00Xz0w9GJCg8O+S6MHnAGYfPeYlYkPGUmMnglDtfpM2WJUMbZ2w0QsLjEuQ==","signatures":[{"sig":"MEYCIQCHy2lijW/Q6ygn5scEmEWmE+ABVdtWw+1s9cZpS2TfKAIhALvRhWsJaf2wFX3YyHAnp92eeINU01foUSGv4Rbv/OGe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdq/HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMOA/9GxbtONTKxqY6FCEHFAZdNUfTRSI5XKAjTj8S2Sia2gHeV33K\r\nwppDW+8txZKBUN38NDnR/El/xGsF6zH6+CPc+UNnUnISiOjLNS9WWjGvQAj7\r\nKRCT2an7rTLFpW30BHodCkBv0aqOsNZNHFsfR6ULzahKP0lPYyX4DS168PXN\r\naUpRbdaCIqplmUHs3gXqYl+32kz73DQkgHZPkoXsCegaUQPNG+88arbQzhZp\r\nHo9SIMR3ANH0gGSeeTkVJBXAyEGLDvnrdBntbx7cY0QQHCRY8EwdCoJ/FfKH\r\nAmy88UyDdX+SFa5YGJUOMAYQHedQzC5kUnSmDvcmCZtDI0vvCxRu8eB0a9wL\r\nwmCJWoxE6Xvo8buTWrpTLIqaQezf5fcu//WmJnCKghxWTqFKr5ljQkSlzx8q\r\nHJqvW7mkQOgOs2Oi4XZrQlPQGQEv2BUKsq/mFQe7DU7pGFeRg5RTIJBnsq+s\r\nEe9O5D+P/o7lwmtfg9yfaINkwibgCOdmlgF6++Wl+/CaHOBWrv7dhFL3Q2yp\r\nGt5EtNu6+fPLz5EpZsRCQZ9LM+8darOBA/iPkRU+LazCGDbeCXVnVcgblk/o\r\nrlaqQhQ8GsMpqVPS8XiNane+svTTEXPBVJwLYV4DyKvTKyCizbqAyNkA6KUK\r\n532a5r25tYpncbvP5rOJu0j3Ta2eRi3z6ZQ=\r\n=Y2MB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9b9adee0b4f10a2d6d77fc10e9291c3aac8be42c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.953e689f3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.953e689f3.0_1668722631548_0.018575780935041752","host":"s3://npm-registry-packages"}},"15.0.0-canary.b5606a793.0":{"name":"@material/auto-init","version":"15.0.0-canary.b5606a793.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b5606a793.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f55ae01fd9742fdd69897196ea785073b4d108d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b5606a793.0.tgz","fileCount":13,"integrity":"sha512-Vt4sQe8C/FGBgeBLKPo6o7q5GuBpWF/Vz1B4TJDfBrxmCMgbwSrpQLuWsgnm7J+0hcBOJE91CZ91ufT+pu1DEg==","signatures":[{"sig":"MEUCIHXelfCi95XcfOOzWnS3Eeq4tySczoW2g8bgcMT5KKAYAiEAyBWLrMhYZFy6MEB79hXrdKfe8k0CHOIJKRX3uAgRjAY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd1xaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHGQ//Q2ue+5ExYfRb6j0vHfdE5W8XhCGjdufKRkf7mzmdJC32ejNO\r\nQwL12Z8fceWIxis2HNSXeVCRc0XSSNdQTD8669bvkWBB/JwyJA9tBCIDBn3w\r\nYRqAkTPbokHj7YLDYTmxeBfqHSbMB17vpvgFgo/OHyb6jiQNhIq7EfmDIwIS\r\nPzwTEcqjj8k3e2kh9O+T2o6M8/GQ45n9//HWKgrW5n4Uxvp8VtpSxkH3YPos\r\nVbfqg0ogBlAGYLOHE7nVMijeagDuUV2Cq2ExLisD+c5bil998U4xw3KA4rvE\r\nkHlsOIiRpjqmaUQ7SrrpOovvQr3BfMplmO38KAHtwSptno4n1iUyGpxUfQE0\r\nld/b16OYx/wejLCR35lH5pMhX+PWskiC9K1L+kdFOe9/pIcYKhLi5DbSMkP0\r\nLN5u+6Uo+yPoD+owu9xuZY3530MYNwI6veVCuaRi/7062lLHIF+B9tNkiOwv\r\nq/AC2Mc0S8O7q0sZ3vx2F3iSpdIHhsBnMohxK2q1S251yGDkMRr+PBbUyvh2\r\nSO7BxLouU1eAug+uYztrqtM+X21n/vlP/keADP7OV8OYAWi6ai2Aqf6kQ1K/\r\nfvMKDQ0yMzV/khTxZuEo0N3tW4Tw5XUv4xOXDKxwN/W7vP3sG6JHFB0vA9/F\r\ndORB+RqYFQ7r2GyYs80AifxtahPG7lsBzzI=\r\n=kedW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"681685532cfc9993a6190aedd85bf5cd1b3f80e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b5606a793.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b5606a793.0_1668766810294_0.1800924718690764","host":"s3://npm-registry-packages"}},"15.0.0-canary.8c5675942.0":{"name":"@material/auto-init","version":"15.0.0-canary.8c5675942.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8c5675942.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca39a211603235e072f76c2b9aeb5e6d894ab0c3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8c5675942.0.tgz","fileCount":13,"integrity":"sha512-wjvZbolajgjSTkL7gzGRKwG1nuXqA3Z05uVykrHD4OJLPLiJsf8RFz4joijB4o/BfU+Ek7VPvnOQc5Gd1tbRVQ==","signatures":[{"sig":"MEUCIAYAlbe4oWj0vooypEvSID6/yC34lFvs0A29q1fXXLNuAiEApIgO6eW8ZuStZL7NwujVGZviCmUOt7o8Mgy16I+/6oI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd6GFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmonfw//YU0fQ3AtY+r5tYKlI3TyLtTkyCcd0btsiMBiK9mYOWr/exP3\r\nIllP3+iVY5CFajoJPTwyuYJUqMo7i9WopwYyjBinpUmYzvTOVFKnTHdQRT/f\r\nATAaKWrypwNrz9dfdlcsEW0YRSBuiVQIgp4iDwqELWgzJHusKoKsejS1Ma3p\r\nlVmWRDMQmnIpwgvkrL/gwoV9fII8XK7B07Vlqm6UhLtSFmeafOSawcnQDo+T\r\nBvFKsvCAzPx40bR+cBQPmAmYKhxskAVWK7kRxyKQlbH37Vs/C7Zlf1uHBmYI\r\n0VLObM5OMRO6kAgNTVTqWeD9KouKEQ5kJ8HN3WSSca7x/C634FpYgL8OwU5Z\r\nFqhzBEPLvAAVkCLOXhM0R0azMlPwmHhfJI8ogq4SlgnQm2uDwMuC2baoIxyV\r\n8aDlH7xE1kAxq15ggMgpchkthlPRVj0sXYmdt4dYCh+vOE05UXQ3UavYX8Ip\r\nrOnykS+OiDFBhFBY9OAAyQ0Fzg/y9Dkf8QAtNJWjX2g8mPLiwWJ8W0+c7MpT\r\nCA5HsdUIBsWe477RimWfFFlXzdDfcU6lJeIjxj3ydySsP3fTtvghJQkHlq2Y\r\nCGxA4GaPr5wqXs1Xh0E1gb6vWDaEzecJ5dydeb8i5u/rj7jGCYlmnxAeP0OB\r\nAHWFi/+tqjurWc3vpcFEybHxo5huEiE672s=\r\n=mUA2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"46367ab28a14e7ab75dbddad4b3a00d97443debb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8c5675942.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8c5675942.0_1668784517030_0.18322501493854904","host":"s3://npm-registry-packages"}},"15.0.0-canary.697fbdebd.0":{"name":"@material/auto-init","version":"15.0.0-canary.697fbdebd.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.697fbdebd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0ef29667267c18b5b9b9cc47b3540649d694a39","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.697fbdebd.0.tgz","fileCount":13,"integrity":"sha512-O2pUlY581eRkxaBniuibVUXj+EUNq3bLP3yGZV++wM6OVd2v/i3sPY8Srf6oJ3p2W7irKh//9zNDQp8Cm4Z60A==","signatures":[{"sig":"MEQCIELWM4WdxGkaWAOeGVhgYFsolK1b0AB26FyBXHJ/L6OVAiADEgC281EYEnMPDwBTGZgZnp5ew+knj+yg7YZdc38CYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd7n/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZIg/+NlFhsMc0dekq+4ChOwOXVrly6HKVg7Toabl66sO5Q5vPIcfe\r\nTN5biKmoQd6xGZ0/R9kQISFRn+FFxy4SPUOlpV6jsYmD8fy7zlEyrc2PiCZC\r\nI/rS/X9BqNycWIbmMk6V6zukgTFZC8mV4FWVe4X+yoWJ1KwKT+hM3sizcAIW\r\nHL7q/V9NPjr5diV5euD+vQ6quIm+zDmlPq+9aBLfeKgtb4adcHFqjRwxGVDt\r\nBMfvnOR3Syzc4GYLnNUQi6KjjvBjszft3cm6/lhUpkzUCWw/wawIpblTvTR0\r\nsRIG7YWn5C5goYiZ14arJvZhWl4t9Roo116090QvfhNchkGbOSxXgClFwDw1\r\nbh5kqB02jp6KQkws0dZzEhbsAq4D7+4RCOA/aviA+RXSHkNh/bzXh/8US3nK\r\ntqM5yeiUUf7pSl4Zj89Hcj3mnyUvfdgtxTuHUNEY3WO1RVnee630v65ysopz\r\nJlJMv1srvlyLCC9EX+Ka1V0c0W0ri/LR82fWNyFX5tky5wzJa6iAQAjILkRb\r\n4nONAkbMUJLEQJxsxV9yyQGRcdCg2kVc2MYwsQqZ42DMb4i11qn2vaIBZB90\r\nmkmMch29jidDXP1/nphs26BLjCRjddjp6RDrxmQwlNmQiBaLRxdD89rcvkgX\r\n89wgoa/hqCZvBYPRNCq5xmshlBfQ6hmH6QY=\r\n=NofM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"633705dd01d68334d80bad5e354eb7e71d9fa30b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.697fbdebd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.697fbdebd.0_1668790783135_0.6506457626325128","host":"s3://npm-registry-packages"}},"15.0.0-canary.d58410453.0":{"name":"@material/auto-init","version":"15.0.0-canary.d58410453.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d58410453.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f78ccd68e0b5de16606f4ff0244ae5652af84e74","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d58410453.0.tgz","fileCount":13,"integrity":"sha512-paRG/U0l9e34osTjIEaU6/tgpNzkcNf8B8R3IydIq0wlBVOKHoP5J7Tcdh0XkZrun197e7vNRDXLAY0IhPyvNA==","signatures":[{"sig":"MEUCIQDWs4FmAJN/447cN9TDWy2cqUhdrtzgYfMWmqLBL0hyNQIgEWWPUusj4aMHlzShJ92DywVLlwUU4uv81titapKlZB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd9vSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5zQ//SSxwEo9AF2YJjTeQ9axtNjaFNxwOT6pMUR1BjY/XFg9jopzl\r\nQFDTfsg7QeLH+AUogjaZofdSHeI6GRKnTDL/TAXl0TzJhOGbucpWA+UFiTd/\r\nnojQBxvF6MvSUHi8MAJ6YA4z3f5AB4U5SAZJOPfuCBXRSX1gLsnBXrxB25Ha\r\nLmeNB7h5hpW2HS0ij4Jyu+Yqrv3hTDcq6tQQrcJQ85W+//lTGrHLVmg3Pr6F\r\nZRoGjb2OMZDyQ0dZWGvLBo0g2esRJjtnsTXzgX93JZnR0h4rvswXbIR59mwC\r\n4cxgcqyeIHPeZNpAftnKgGmop8BOYW/BYV7tOnvgOwmehqPmzuuA1y6SCn56\r\n/aqhv4EeXg2LWMnskgyececTs4W+mKM0KC7jgtaIYbIti8XPBbFh0k42KvWG\r\nb+/K1V1pChNoet+f8Ffwy3UbZfkq/kRbxGE5Aa39/8JZfZ0mUZnA4NcyyKTb\r\njRh07fll+H/oj/KitfuSedF0BNIZ5xZXWlb4WK5fxGF56MOYTazB5tGw/qiH\r\nq22oLI/Qw5BMAWLJrBu8RY8yU+SIkrPESly/Vl74nSAimvIa8jMireCqEZTv\r\n2kaXrU0G6MsiQhfSzH5AoOinenfqgQGoAMLWSZiFuAKqzEmOzhjk+uUTny1O\r\nNRQv4ZEIRJpqJAL+EDrSyq7YhhmF0kovpF8=\r\n=WWN5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"65248afd9a1318b7afdd324f3def6a9c8e67c90b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d58410453.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d58410453.0_1668799441958_0.8122880410988642","host":"s3://npm-registry-packages"}},"15.0.0-canary.7971d6ad5.0":{"name":"@material/auto-init","version":"15.0.0-canary.7971d6ad5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7971d6ad5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1b143e55937e6116fef8ee20c339104d95f58500","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7971d6ad5.0.tgz","fileCount":13,"integrity":"sha512-JmST/NkQpdJ1+nyAU8qbV1eRXbOwvpaTRy096Y5mOK1CeUsagUyrKkCeLsO56pmvayxnOIkJCOhH/8gzIsmiJA==","signatures":[{"sig":"MEUCIQDJ72TVuxuVmQBdy4yKjgpWpVaF8bLIm8lNiZvj/B0HxAIgHdHXPqJ3/rXDhGRGYZn1Foq0vssfi3Ug6CI91IeZR68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeJdpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYGhAApGbNKYPnABN1vBsoIVrKfsYRmKSFdth6t6jRnCfyFSeRopVy\r\ncAyKPykV5KRDkFtMQlGSRk3xg8hN5Vb/NuMxuVIXT+dYEW0WPrZl53yk63dT\r\nRRQo3T2lWHqWoAY+Omklpt1sbBimF3fCxAVgVuS+/SQRgTK0qPL/GjRndxPB\r\nB12hXCplMJycRbWFUcMZSpMnitvcLFKrvYHnywxexn5eKfL6h0mOytRVY0k/\r\nODYJgM3L9nsScoeftfeepHC19GhEY08wDXGE76WYAqkf1JT27z9YgolD+44/\r\nus6CocHk/TCK178VDrt1Ku4IWeqyc2eMVZaUBeUX3J7w4pOkq5FxFxIMibIf\r\niQzDawcJqvNEdQdHagQUMd3xGvVEyfjPkYk2aX0zpZO8dmJiMiq/Kd2sOXEH\r\nX9lNfy6THzEz/NshbWp42cniU/NQuOTsHB3Wnc5Ah0Jq6xK4qXKzpb3iU6bU\r\nVCHOXBbXDTikJsXC5zpF7tKJC1mSH5iNykH+AhZTNwVujoEaFUPOMofeO5tT\r\nM3n+uecf+FkVeyzndsecHBXZLvb5/5ugu8UHfXkOE3Tjm9u9pGC/f7FJMNV2\r\nj1RUCwZUwum1/ozBdWMWbqyy/EzFWs6T/uLrXvLwh8pd+KEvH8rChrMLdm7P\r\nKxCyKpDETKwVa9grrmEzh6Olw0aPzsI2hhc=\r\n=97Sv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"caa68cd6e7b5cf4d64e037521bea18e312048e69","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7971d6ad5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7971d6ad5.0_1668847465680_0.8670155713852441","host":"s3://npm-registry-packages"}},"15.0.0-canary.a0ae73b0e.0":{"name":"@material/auto-init","version":"15.0.0-canary.a0ae73b0e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a0ae73b0e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"87f3471e2813ae99aafbc72baef76677d2580aef","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a0ae73b0e.0.tgz","fileCount":13,"integrity":"sha512-fW5+kak6+yeCRP9Pw+audztilQ+XKlN6IMir8Ii1OgnL3RlNBH8NPuhSHah5mk1vACLS5n1o9TNkslBQeMb7+g==","signatures":[{"sig":"MEUCIEoaSDoyFagNIePs6M8WDRBhfEtTAVF+cQA2EX36CJlfAiEAsRFwYD4ZLZ/8/LCOA7SGmNIrjexIagPdxTxV7ERlVTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje1iFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSjA//c1022OUAu6GzLgQCfGM4z/5NZq3O8MtJtwVq2d9h7Ad6lFyE\r\npySlTkSUs3A5aWYyY0OmF3xOz1aQowghouHD4jlHQRweAc8DlNGDh+m9Pwmd\r\nrAMcv3zfO35/vWHgo6/9ggCygwDdcKYXvpb6DdpvKmWKUpgtWVKzZYyUE95A\r\nWzIP6WWeqYeLQ0G/Jd+H75AA7V9bjYwhMft0Roktg/1zd0KsilAKVUkMPvkR\r\nRL50nYj4J9o55gXSDZZAJTGJr2ByW9nGiM/FUq6m3marnClc+ABnyWFa7DGd\r\nzhUVn8dmZaL3wANYVgVpJHW7bWQHscKqKnbwvDUfbBgyb5g02eLt7R4mA/iX\r\nca++yMIz+GvkI5MfzKUzbM7RpoOPsqD9/ooGa1KUq/bsIZKbEPPBxdmBxseJ\r\nBFhPRp/e5tFydUvhOD+3Z1cSp/Q9C6dc+VqEwJWq+9rrmPzZCia2Tpp0vjKg\r\nmtpA11mrauIlNLyePzN81mPjf4PCOI7hpaJXJTAzDOULk/zMD32DCpa0e528\r\nyx34M2GCXLDpmhp+A68HMwwzq1b4tj94RLW8yZYwF9B/LWJoJX4tGnvXNRIM\r\nNCnMk5DjpBvyAQii53P0nz0iFwIfdk1HqV0NCyk1q1d5dbhOQSE+WPt5kthT\r\nl2t7Sf0UEDAEDeMwCcZBS3DI7feE7maR4hY=\r\n=ZjLU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"92b496120a9385203165ec42657a2edf41099000","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a0ae73b0e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a0ae73b0e.0_1669027973207_0.31637652550203543","host":"s3://npm-registry-packages"}},"15.0.0-canary.96f472604.0":{"name":"@material/auto-init","version":"15.0.0-canary.96f472604.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.96f472604.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fa3bf85d4b0130d3d946501d29e4b50375afb96e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.96f472604.0.tgz","fileCount":13,"integrity":"sha512-PflCgtINL0YT2sgP3e3G1uqYKduiVD3nfrMgd5MFukb3N3IEIuTJ0aTqMVnQ5zEDzsHeE7543+sAB5o92t32Jw==","signatures":[{"sig":"MEQCIBJDEFL0w6zumRSEMOMxD12bTi35pnqobreW7kRIO62FAiBqHiB2mrNM5dgEFQe2LPKaWr1QRoGpMv3EHZBRieyoCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje3RlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqktg/+LhzPSAMKI7B7WP0jrzyNMGnILOcP5o/IX1xbCsgBuVKkMgtf\r\nRz+9MOiOO8DD+tLCBaG2trCGiBZd6el+LWzbTMUGbxUlkrytIxR2dWKxY84w\r\nxmfiQCeky9CPOfFq8Fe9VhRxxyq7zStrTqcBOvRUCxBVfaH/+prjq9hPgqmd\r\n+FiLC0hVbEqkuIMnPbdWeJWf/uyoxGIyS1oGe7Cir/8JstTYrT00mCKBaLqU\r\n/XT11ehi/FqcXt8+9LKaFJLcoocFgZh9Qwefeehgn9x+65FR2kq5gX8EjWxE\r\nthmu1GRY+zkyHIalvHC7MO/WCaUdrBHD+0Xnj4WD3a25KCm+VmKQ3JSfKHbZ\r\ntQG3RSd/gd9fb30ri6BWnqcd6pkL/qrntCt5zN5DNkbPEelaLO8uOPOVgAg7\r\nx5GhCGCXZmwDJU46Ve0G0ysyIVLbkrG/Q+dQoP8jWgeVE+k7JSY2YwQasmjt\r\nTs5fZIamsdphVFNcpWtI1B3yxGr/cMT2ZEMT/7SMiQmz40mMhc7SR5wqVkoq\r\nv2GM1il+W6aU2GNwySL3Unq+cx0qEjMituHqVBGeM/GJcQqoF3Jl8mS4a7h0\r\nvqnDCeuiwR4lSALC24tLx70rIVxgehGtGkA1GjjpJGKvVYSSt7m2aw3/nZom\r\nIMUFVPmH1XhQmszmlH+paPcDucNPvjM07fI=\r\n=b4kP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"28f313542547c982f69fc57b98811983600931fa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.96f472604.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.96f472604.0_1669035109693_0.31008534722937653","host":"s3://npm-registry-packages"}},"15.0.0-canary.18b8f31e1.0":{"name":"@material/auto-init","version":"15.0.0-canary.18b8f31e1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.18b8f31e1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ea8c38e584e10ba5adbd919c847f3ab4a9eabfd1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.18b8f31e1.0.tgz","fileCount":13,"integrity":"sha512-/qvh/nRn1r0HTg5N7qUGn6bB8+kHzZ1bcKr4i7o0KTdof9BYHPdQa90rhFQTGpqrlE6AKJdMtnhB/fxQJA6sHQ==","signatures":[{"sig":"MEUCICT948U3iwNRuC5+JyULOeZi6ISj6qDZ+YO0ERNQDz6rAiEAl5fGOj062GMW3OJiDluJJLtXEO4MVx7jNFtvTEXvFis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje6DZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmDA//Q3KYdWabxwo2v0rR5uLaM/JeWwdc43L1hG6Fwn+D6w/DkxCK\r\n1aQKFslSJ08i7DhHgig/b6g+v+8A89noMYSDjVd88bY5/zYXtruj3FLZXcR+\r\nRytBfbPynrG9RSOgcR+FlfWwWYjGtes5WgnDVtsSzPdM+Ri/tUMG3534nC4w\r\n+ADSpKRrE/10b4zq7/zLyLqqo+KiY6W1vaqVBzkFFf7nnsIfB9mg0U1IlGl/\r\nUlvCTpCEdkdJXQ3MCeqaVHiJffsjs92Nd1m2IqvxwTRbPKMxWT0M9fq9Y/4J\r\nBXOkO7m+lCup7X+HHQqDZu/J5VekMxcPXIECkFeq7VT8XYOOy18U7WLXmx4V\r\nCJgBaYpVRwgmNFEbdP8LvTmxRqVtpKVX+WkpA0OBJjAdhz82yu9ToOGuAEIv\r\nlrtJ/vkfCCgGPGHENfn0JB4fynfQDObpyxuh+p9B/OyKz30/Hd3/AHVuVZsv\r\ns2Hf10viTgNyuNW4S5whXh4L/mclyTjDyW1woHw4EFdGCa38I9wqDJD4xPQw\r\nQhXur2VPMh0UYhLG+MXoxWoYZOQ6PG/lFOSGt+FQs/EhUP+Snil4XkouiwMR\r\niVA7i0+mo5owYMBZqE8IGrc2s3KwVc4nh1o74UeNtDqoZWtg6x+NBwjxnvoJ\r\n+wIZPQJ58lWObA2wnRP9m5v7hX5HzjNPAMU=\r\n=N50P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"99a6c50dcaf8c9db8b49ca9378d7bcc70fa3d276","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.18b8f31e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.18b8f31e1.0_1669046489598_0.5935953695181613","host":"s3://npm-registry-packages"}},"15.0.0-canary.912f33ce4.0":{"name":"@material/auto-init","version":"15.0.0-canary.912f33ce4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.912f33ce4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1d5491b76a96b2eb510bb38fc28e0f4edac34066","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.912f33ce4.0.tgz","fileCount":13,"integrity":"sha512-S/SGMkVWxqqn0MHufC73ZeLgkX9DysCd86TRIr/6k8v5ooaDzR56u2pTZTsrscCXZWlJTwBV8V9HeJmQZSACzA==","signatures":[{"sig":"MEUCIQCN8J5lDisBOQwUXRccfPpv3VgVUCX0MfU99rYO8Wh1pwIga4Mo+0YnrV829RtXQnnMxrGxCUi0LkIsTgYkGfmg1m4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje7sCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplFg//abfK7IXWIi5LnH+xCWhUp2i31Kr224tZtkxR+5+Cmijw+odn\r\n6OIe3WyoHVNsX8Mdsus03MF6ookO9qNaZ74ZHCjCzG/3zeYawj7niAxUoaf6\r\n9ZqgNlXrOWy+VXRKzfpbOblYTV2qwVZU5zckP6DNbwCdKMqe3LXuya2ePCse\r\nKNGJFDH0wMSUoxfpYqxycf//CE7dKj9GrRvb9Rwq9Ixn4XwcvEi7jXbjl5MY\r\nIGA3MrOwl3GIfGtHPcTeetjL056nmkB9cYnc9Y4tKUCV/pegWz4s8BVjfc00\r\ngOeK+VPC9iRH87hwjiMZu1jm9HyC2xJG7FDLkD+e0JHMzUy4QaKm8xISeSkm\r\ng5Ek3qShHdXB9mNsHhHVp86M1vRf9OOD7bprskHcHbHLvj5PkKfz/wN5Hy/i\r\nHoETYvG8daC+rZw+0A/znsQHW0kVlgxF/7DMtVJEPEXWBE7orDcG0df8VRaj\r\nxnLjCLn1dleOdkAkejatEd7VcJDyY8VCiP1BolgoEdt+n1CiBbpeGrrA56We\r\nAuTOYcnxQMnAc77HEFGe9gPnl6wAhRikrS8yfPADAPLnjItRL3TP05eCRCsp\r\ngu0W0FWIW8ILtYYUHEyHvrJvX9ukh084SFdmVnMZ0/0V7WGUoPqNSShAyW6P\r\n9FO/4mmHYw7mdvh2k0jKWo3cZyF6095QqnA=\r\n=+QVH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cbdf5145fa19b6681004b6c2d5de771b50f5b6f9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.912f33ce4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.912f33ce4.0_1669053186272_0.34490660231189363","host":"s3://npm-registry-packages"}},"15.0.0-canary.1e1b1c369.0":{"name":"@material/auto-init","version":"15.0.0-canary.1e1b1c369.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1e1b1c369.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"16d9bd0940610b7dd4155096556afef5de8c65a1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1e1b1c369.0.tgz","fileCount":13,"integrity":"sha512-lF0WUY8tU3QIHVtF7/0rsViZlOfhy4pSRBJLkY4blgLj3mYxYWqkAMx+Pg4qs2Wa+uu5H/iQeDhAmX3AyOzezw==","signatures":[{"sig":"MEUCICUX2S9KCRux00n+iF3R9KkAdSlgGF8sKmV4qZ/m1ZZVAiEA06enMcHwgkzwGSw9mwsQhzbZZ1NXQQkB/0U694lUBag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfm2cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo33hAAlRO5MLWz3rOzIYaDloy5xOcGnmhooCwsKpAjk41yn2+NYUQO\r\nOOroEqEN8+s8rwYscY84ZxS08Gub7qpi4FYvvXjt2BGxfD57AWXioUYAottw\r\nyUZy4nHEWin03uoWzgHfejpiyLqIZ5OUt0Tc3HyG7my8yeyeYH+R7/3sISBx\r\np9Wtxmef2/R3wlduLzWH0c6i5IzXFjayFB1aF+4uQMbckVU+yY2vu0leIewq\r\nCFeFQTE+dyrta4GeBJTcMKOwOhL0m1oE0wNwqyH/LVY1a7AzZy0syD921VQX\r\nkQuJa4NEAcUv0fHTcafU9eUM+IhKM0TK5tw2J2Xb9oiaZlFyLHlwWxWju0/M\r\nDkcgkK8uiSPcdytqukFH+/bdAS7cnpD86WMA7pSiDCmOKTPuFUhDYPIOzB+V\r\n8lhXfB+B4yb67taHauvdE4faqY6/zpr0E8qlNWfqkzHo2DCj1E1T9hX5fiYz\r\n9IsiDlbwGzxQhKNdT9kzFr+QSyjFw2OKmHyD9UgVN9UAkPIDEpGOyuitLy13\r\nnfqCocHa05BsAPvRCmr6QWSCiCmgm4g0xNs/iMnHaHODRW63nK1lFoL+hy6w\r\nJyrF3qC/lS7qx3rhWTBWK56AHQg3e5MRpHX5dFApxBAzZveBGC6FRywPrDGa\r\nHEW0TW27JxMz1Ffnma32wQNngevaqKvE6hM=\r\n=5ZNQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b59baa6ec6a8114401e616de0c9d3675a34e4206","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1e1b1c369.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1e1b1c369.0_1669229980210_0.650775211672223","host":"s3://npm-registry-packages"}},"15.0.0-canary.a2ec49244.0":{"name":"@material/auto-init","version":"15.0.0-canary.a2ec49244.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a2ec49244.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3b21d6c53e05257b9da1e026e9635d1cab90f610","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a2ec49244.0.tgz","fileCount":13,"integrity":"sha512-rtd1EtJNI0VYBU/X7MXMM+K7VadCQlbSboLD/RRWsZr2x+iFBtwEsytbrV9SZ47eHNIOJOKzqplDCdqY8Q5Epw==","signatures":[{"sig":"MEUCIQDJnMJhDUlnxPLuW20FvzsP3q2LL5U5ufmjyzVAyGSYlwIgKzmvN/tTzy62m7iaPxg+Fu+hTENgrfkvaINTFUzXOdw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfnS9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Mg//V6sGzmPGbyE4TxkdO+PAO0/+XKWqrorRh/Z4VuVj1z4M2smA\r\nRnzhTwz/vVGwaS0XnB27WV6aVrvnxMBdsA8UI//KnLHvDCip08Sf6DMmPgew\r\nBo2pxqL8vsSfWdJf+HT+Reen2zHAC7HuLNqugsm6aGJUk+YUu5zRio3kAYZ/\r\n8DF+P916xAIF+96qZ3/i/IRDavi3YVQ8zl6r61XwmKLxRPS5BKonpM9sGRXc\r\nGgWnC6Eep4PU+K1IoCJAHIwUNPk9izpZp4IPp7bpjvXXPQO2NIbgB21RgJdq\r\nopRhCtaMIIh5V1KM5yAH87uHvcvlVI/9wlbElB8NowTyZlR1k0wYRGx6HcLe\r\nmYmP/h91VV7N9B5VLHfZBWRvbyc8iZwxTeyMjrdpCXXgBX3J3+ur5RhB2c3Q\r\nzDdUVk+PbXYR/SeWOc4rSpI5sAfXT0xd1ZPrYc0C9hRB478ELutuui+rnlTv\r\nT2tHUdtWLIwJI1z+2mfB94E5prjdNMFE2vwsZbnrhXOQNRmjSIFBnzpT6CUx\r\nHLJRlgVVt5RKvkBKCit8kssrpT9N7rvDEtvLIiB12eqf1wAS8yXf2N0BWwP9\r\nE5zcNbVG/eovtlrtMg9A87ore5P33yavtVuihB9FnysfzDh+03hkDIat7e+a\r\nbLzg+alDNU18OgumDcxlCfZw+HZomr7QNSQ=\r\n=CsJy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fc59d471222d0010e05a636e8c3a9a5a9abe2b3e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a2ec49244.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a2ec49244.0_1669231805052_0.2885527837678705","host":"s3://npm-registry-packages"}},"15.0.0-canary.a7458ba0b.0":{"name":"@material/auto-init","version":"15.0.0-canary.a7458ba0b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a7458ba0b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f5e81f6989f94e4b5b37dfbb53f6225e4a7487c7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a7458ba0b.0.tgz","fileCount":13,"integrity":"sha512-dofXKhy74ADDgb77/TO0UB15jOmB8rD+nfjLXooexnmyny3aCiC4R9eCDOzK2fisuxk506uMmb6G3GopI6UvZg==","signatures":[{"sig":"MEUCIEwskxaUVRP++9K5H4uka0NrVZ0NjbWDsmr6k1IRPy6BAiEA6KibxmBLzxw1ObzbMdz8GiUoToGVAwto8nH6Mcy1zGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfn9oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0FA/+NY+Mgo+m0OGhpl6ogJvHq0lFz5Q+60qZ2Yotj8I8urEkSouD\r\ntz/uXDWDvXez+zND/n6FLT2M/ukPf9mMFdjCWYa6hSqcJGou1IE4FiCErPRe\r\nP6zSqtihMYyjPIvF45yBxUKveBCI707lLE8egISJpXV7/YErwPgBUTQ1FqT6\r\nIMflA/uv99445tAbNrlxKWTt/3/KiwFl/4pUmNiAUMcfO3qlqX+sUoH9WEy9\r\ngl/+BGbPsCH6s2T0pXo2y0mPcx6KxVS6WT0F+6ox8oR4Ecjw2YKp2Q+pBDIX\r\n7d9sWccRYOdOzwA4pD4wNj/ub8WsrfEKe+28qqvEhagiVnXZNYy0xwhoK4gD\r\nLLoFu8DhkiZ3PHW1aFZeofqrXDV1DT2QZRn/3lpSHl6HEF0s/eRAW7KIIVVt\r\naEaxuNg4cyAZMYnjG+jf8/SZngXPr50ynK2ks2kZq25Wr8PXAhsWCuVawz4n\r\nhaOWdiZ9asQMbLE6NDW8l2dt13kBFU+4uCPAww6cQqTQk6AyxQjnvJA/GVy8\r\nQgam+8+XDuem0JGWlWd++ky9GsJIdvqZp8JgO0n+3sQGUfL6ikKHQJpywd6r\r\n2TrtQg5l5SM7MlSEna7ec4XzzIlVYVIWdRejn3ZwVWXJvopZPjY+m7xi/uFh\r\nZmz2w2TlmHGrihP+V2RgampcomRETW1GEGg=\r\n=mT6n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"62e6a15e0784982b77df0a1d824f81d5a15cb6f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a7458ba0b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a7458ba0b.0_1669234536139_0.7830121143798168","host":"s3://npm-registry-packages"}},"15.0.0-canary.7c35e5036.0":{"name":"@material/auto-init","version":"15.0.0-canary.7c35e5036.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7c35e5036.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0a873672f204e38eb1b637c87a56e721c9f6e230","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7c35e5036.0.tgz","fileCount":13,"integrity":"sha512-dgckQmgd4BvwfdyGG6kYRfMgtU6jbt/Q8Yzbd1wquXfT/IX5byuLJyZG1WVdyV1VM5pQrx1UruxZDoaOQUZ/UA==","signatures":[{"sig":"MEYCIQD4Bhc76PyCf/9tOZlB97+/oy892v1u0asitzEMRL62LgIhAPzKrjv3RDGFvej9WXApQ0fdJKojzHHQlC8FthTuUJQJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfy2GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBixAAocMb0ifHsSXzDn4XCZa6keyBAVmnYlwRMYp/61m/8brMb/Lw\r\nWtrssSuO6bul2N4OJKbijX0Y2kyEC45s3JPjgVNSWT/vRoaEY1TgcsPhVv/9\r\nY0Wqhuwd6IIi3raxyajooihhYW79oU90CrmBeH4sLtMvhyjICwS/JIbN3yjM\r\nfLmEyJey0C8sM0cliCGtnk7pS+4pzKPb7iOVAj7zeCB7R137aCvMhsUkESGs\r\nFfyN/HVQrjb7qNr+KQxDGSQAb9mVrkoBslL7sqr+0FRzBpwlYoQWgnUvCkk7\r\nPozVQGk6UZEc59GwV+tGX5TJyAp9+tsvIY2Pt5mcxCV8PpN3H4r2Kw09EYPq\r\nU5SmtrL9XuCkU/PPRL5Xgzc117NB/4fxLBx1+3CWmrktsWQ1lQE2Tdd9sKrw\r\nobOM8x9Vc5x0WlpItfi6+0UOi/TUjKvfX5k/P6TC5ndZjyi0qN7IIzZMXml7\r\nyk9YK/dWST9Qj4Dc8e5bYmMlaijFRl2otqM4eSYViEKn71qZw3LHcnBHb8a4\r\nmzObeYdXdAGBEzxvck8Q8Ky/2ogoj5+fm32b0Cn+zpJ+nJ4BzwgYLmYjIFc/\r\nlqHhHrFgOmTeP5N8CUCe3PtZm9wiZiwT1AEf6AusXwh19ytwy2Ugtfj4L8+B\r\n9lVyVuT7FutU9X/7VomFiMRJSssliLMDSiU=\r\n=vASA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bb1e9aff747feef28ef92f415776fe33dc1216c2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.20.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7c35e5036.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7c35e5036.0_1669279110485_0.6124958872453423","host":"s3://npm-registry-packages"}},"15.0.0-canary.4356e05c5.0":{"name":"@material/auto-init","version":"15.0.0-canary.4356e05c5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4356e05c5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2b894a50ea7dcd33b9c5fa28d86633cbbcdf195a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4356e05c5.0.tgz","fileCount":13,"integrity":"sha512-GaCqW5H298pJTO3W+6ArHy0nOfrieGh9U8CTXSFyXEewTcNw42uOTfuA1zLMR4ZtyPINr2yax2VMdDfkxD53ZA==","signatures":[{"sig":"MEQCIDBloIdV9giNMf4dKoUG9hE92HNC1cswIYyjjL/k3kg1AiBqAOLmnI9fis05D5a4Mpjg+DSMvoHWjWKvY4l5nB4e6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfz+qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGZw//RKR9wcS+4QqgupUxo1HBmK6SR/mvo11CXAHZ8MwMvArn3nKA\r\nxI/TvaffK6hKCnbTy7o0J0eF4AA07efltCklpXJFh8paLivz1BrYegwyb2at\r\nKSfizAR5sRqFk4ZgBpgvD7dbhdl4n6H1OFSmVquHSYloOMdKNosBmLyMy8Ua\r\ngo6zQuscqQ/yvn5B0sqwBa4tVny0R/rwNVz16oaU3dmxZwItKdnrfRaSrI5G\r\nKVNuLRr3q2rz9UVar+lMRrHSdTVJl44FJW4UXvlCOOFlnR0lUeyBJq7Ix6Mr\r\nAswP8m3MnNz60Z2B18WbKvCL+zaoxvl0ctsdzYfOzybKR22UFQ5Zwq/PZ8pW\r\nJKJ3uFdNDSW8xdbBiW1vKE5zeRKOlm57MOZcoQr5fiJU4v1YT39KvOA2RCoh\r\nltzSPF2VDJwjCUjD5NNbJcXM4/Y1h8BP7c4y908MAlUPDZCJyr2bvcNAspkZ\r\nokVXjKnqEQX9s7dkytxj2hZcgg40pYardNlmuLVVTLMm6WX55OMHaAG5f5Uz\r\nuaV8s7lAdzvxMhlyNB2Er5LcD/To6xfPvC3lwG4fXW7dGlfbNNLvsCKEOeIN\r\nubBonr0w8fXQdWtSaYBQPq0F7ju21yI+1qz9CarTTRX475WOyd029xNdLI0d\r\nsJPtbBAzfwOPqmh2lDAJm3gr1iVioHTn5OY=\r\n=SpBK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f21a6abb8b52fe9aa5804b940eac0cd94256fd9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4356e05c5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4356e05c5.0_1669283753815_0.328436416798229","host":"s3://npm-registry-packages"}},"15.0.0-canary.cb605f8af.0":{"name":"@material/auto-init","version":"15.0.0-canary.cb605f8af.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cb605f8af.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f0c5943ec252c0408a22f888570c787fc10da55d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cb605f8af.0.tgz","fileCount":13,"integrity":"sha512-nbKgzggaLzc6V64II+2rX1J1YsZzdr9ew8d+SAJOJ7foSjqxIdvBy8axVtz7adBz1P4wDyOEYuLaBwytDNsQww==","signatures":[{"sig":"MEYCIQCzp+OnhpZ9vghMqetP1y2X1PFwyeuczpQr6F7/jBm9CQIhAPkReQGSmDiJbJtYYmqiW8e2rRPLx1AWy1SlwOpvpejd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf0QGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmruww/6Am01U+BtR60PRue5v60xDsd0WaZ6/n23kUosdeJkC61IQxtO\r\nYboRXWyOU6aelaPSKa87C+v5MCnCgzF1W7+115QElHSWZLzHOzvYrFqo6dYW\r\ncMEBRbyJgT8paloEDNMZN485reTaoYdVB10UH+rAaU44f4thrzinhp1uNuQi\r\nL0aQ0SFXFsKzu8fwT8UTTXyCjBKb00ZvZOAhLcHlijr380ExGk80CjX4Jmk1\r\ntjSOoQEO2KM+XPDuy3ypt/6xKJ0NN8HPZ0TxvF4kRRyCFW+0L4dKBJUrRNEt\r\nXwlZJwc38M9hOFFXLYTIzObjSdAJWBsPrQ4Iqz/UXF8fl7t95bna1uHbnSKP\r\nr4GlbZt0KsDRw1GTTbh68fexomWHVYTKOqrYKVOD7wOw6rK5hYMOllKiw8D4\r\n0cWDtG/JFKL7y6ivAUy3m0GW/rGyM/G8qyv7otOHHycWPdNDLSoGPtRP2qrJ\r\nk5SIqTUoKXjnkq42i2nnYOhp2OHHREchz98/94yGzAlwZ6GJ3JZef0JuK9uh\r\nvStD3c6ukSI9j3XKMT534trgYj9sL6LM5sDhnnDFFN13RmjTTBdq12yUp6jP\r\nNOAO2nke2vobGb+xmbLt5ovA7cWekhNAkeLN7TH80Kac7uvj+wP1ph1kTYEz\r\nkqhzvjPKXhZIrIv8yR26mBp/DD9JaOe/kvw=\r\n=v3js\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9d617d11bc1506bf595e8a4f05413067775d3880","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cb605f8af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cb605f8af.0_1669284870340_0.39312945377111186","host":"s3://npm-registry-packages"}},"15.0.0-canary.05fb07f9f.0":{"name":"@material/auto-init","version":"15.0.0-canary.05fb07f9f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.05fb07f9f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"57b618bdf3a46127e7ff26e9376f8143e8485cd0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.05fb07f9f.0.tgz","fileCount":13,"integrity":"sha512-ZZl3QwQ4V3wQg+Fz+ETMvtWe/5cJrkjzEZfekAJ6aqPAoYR5qPs08Nsd8lINPv9RC1QhFqWU2e/pLxLyRzcUVw==","signatures":[{"sig":"MEUCIQCy7pDfr+S2nNTh127U9fPgu8eIncuRGILjZli2OiOZwQIgU5WMEDXSv0VZTkX5as86WugXljogi1qSxNOhyE8UG4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf6YbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmonxw/9FwTocQfMv+zX/MxHlyyMhU+qYezoS2Lwn1BsSJZRHDe3HwAx\r\n++K3psS/FqJuYvBHEwLUknn+4zpnETiYXakCg+KbCaw14Ju25Wpa2KrFR4yf\r\nFv5PcxvAIoRcCk4igHeSawzXuZBJpn5M9oDUd8RBykKSSILzAYquvURHCvHG\r\nDlYlBoi6bl7vqft1J+4z0nfQ3D1CeHAO+SLJIccHH/zP7OZgjlY2VIiAFHKa\r\nTV4XkR6tcget8ZyVgBsVQbsqUj/I/LbdJOQJJ+ShtQ5F7MA25nsc8JcipRE2\r\nuDAFtoo/I68Ac6SRnHES0Cx+PVa6FLFldNofM7gKdBkUqX0E+vra8KvfPHQn\r\nvHuGtF76dldNni3KEilhxNtJcxlszeE2BQWqu429NFqQ+h+0HZsFZcn0YGUE\r\n/ljsxemT/+UYH9QboW9bDA5Z98NSlGNbeluKeb8dk4HguwKt8UnUI7irgQK0\r\nIW7nklqI9Yt8q09GrTV4u4JuPRn3aub9OjUnep1mSxFcWNIY5TABgiF6LXRi\r\n3zxF+OgGPHveEtIa555THdkB54k9TzSM4uoliMRUVVOfRmbirFDuX7m/tlE8\r\nmGs6rMLTrB8lYASSznt/bJxq9FgtEOSb6yW4sBt82amL+uN+h6YwmwgkOL0x\r\nfmmxtcuDheqne0ya9wW/lTBBkeahzN7us9k=\r\n=tLZi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fbbdaff1715be513be46d4628f7aff9d8f7e27fe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.05fb07f9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.05fb07f9f.0_1669309978939_0.4648820049034832","host":"s3://npm-registry-packages"}},"15.0.0-canary.a911b386b.0":{"name":"@material/auto-init","version":"15.0.0-canary.a911b386b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a911b386b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fb7e62ddc95975b60b2bfdef1e8d45c066790066","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a911b386b.0.tgz","fileCount":13,"integrity":"sha512-057LLWNnbR/OEKH7lsqGqdA71D8mLb3tN8DWSMXX23IirXRI7/+8Nw8DASrudnpYPC9Fek/m4ijz0UnFQQ42cg==","signatures":[{"sig":"MEQCIAhdYjSQ2H87ydxP/3bIr9CRwlp77kLyltJPKJW23nSiAiAna6uXcG1F/UHoP+2uV09tf4QZ9oh5KWrmvbAOJ7S78w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhOXmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB9xAAl8hkaMShv9ZFCnTRPovBfik566jj4blBjS/dtsgLSkz2O+/D\r\nWChPTXdnlEPRKPPcYYaSjo6D4gdOCYoNXAtbdYoI/BRQhdsmvA6pAodOsDWF\r\nmkVrdpBpUHsnJRQX24wgi2KHnzSf7MFn0D4GyljaI65aWem98g+EIQKhMtwv\r\ncibn4Blw7gvKRAvR51D99MgsZDnBsxnW1ONdwjT/mSvpRjiB82jcoOMsSsHb\r\nkl4J9RivepWpPP6jIU7I4JWlc5ZBlFIc+uh4VQoaRxSsPsfAZLy1IfZyPakl\r\nKKK3QVuuHI7dPQGquzPwjCI18MN9glX59n34SEsqtv/s0eXWQjY2q+xkACdY\r\n+g1RbREFGkuwLIp4o3qULkumoZtC6yhV1KnV+JR5agJOHepi67i7N1IH/COJ\r\nR34K3nsmUtuuCMk+e7e9gHR+6tzpAmiBubiTzqTB7lXXK6UKS9uUifmVj70M\r\nYhrhNz6SpOjYnheeyXymf2qmX/j99TYJDstRhSKKhJNIX1M7kcRe0d/8Hob+\r\nOlphjGJG5Ek3isA70YCs2hD4zCppjlMmIsiA+4qBwJ6qgyii4MuicHVQj2df\r\nTLcZSlCil7hKRBEVDvzg7q5FHLX6j4l34cxbls2aklqW2SnuAvGh0lmO0+6X\r\nlBIy6JM0oqp7atM04QGbgRjsAGT6LoPJIVg=\r\n=BzF8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2487492bf1103f4c82913b328eb64ca5b71b9f5b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a911b386b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a911b386b.0_1669653990722_0.3537379851469169","host":"s3://npm-registry-packages"}},"15.0.0-canary.2aa8050b4.0":{"name":"@material/auto-init","version":"15.0.0-canary.2aa8050b4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2aa8050b4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7235114b7e196bf7911065c9e64d7444c0f504f5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2aa8050b4.0.tgz","fileCount":13,"integrity":"sha512-YcFN3syqa+Zlcd0lF9Rrb07R1qZ3ai6q67JLvQiBV0VZJyAZ/waJi3WAfAYFFNQtVegD9bbVBj9iy4OZezTE3A==","signatures":[{"sig":"MEUCIQDgVuvTGvzv/Gr6k51fcBYJElIjKmN0g8SgQgYQSiYaawIgVtx/Q2D2fmUHEjZE3twytG8EpPLVr3XB4HLtba9+zyI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhQe1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEAxAApDMvBBIIithh3+c4fzQ9z7OGo1GW3/9WKgryl8HjHNcBvX4E\r\nbx1QnCH84IX2F5aK79y1YhD1WMxT3MqWhtGTkDegeYtdGfOj+MmwBhTc+M4E\r\nYXoegq79czrZDAR/pplQnmqgGtgGhnYSSpESXeJnSbMz7/+NSHNWCfMKAs01\r\n+lVO92xtYVX8IlE/15yw4NMzhyEDpbnh2xmTreQddfs3LJe55pqr9Y/6rmf8\r\nVDHvSYo0UpJ3FmtGNtbcwZASJLKnOuy8RJBihfsYV3uoDklWL+fQQX2uOa08\r\n4XMiCfy4PTG+0kLwSNZfsgV9+Zwwvko5a9KaXbI+T3uhsyZxAVAVUhYZ6aPJ\r\nryMrRQ0EyX9auTIBE49/Zj+nnmIzi/qOXVzror5hme0f9TdHh5i5DtlBqgoD\r\nwgr21HJEEbZVTZ2uJtFcUEBlMYMwDOyLgWJSMQkU4gsVMPw3KuzcvGvUhRUm\r\nEvK69Rwhul9vta6aC8Agyj8WeaMJ2Q0l/tHbL5u9C4HQrDIXQdfjRDqInanE\r\nN6FL46YaWLhS5Q2cAWvrpXfhPXiwR1JGbAzeTc9ENRk/BQHDTI3qs/SWx3p8\r\niw1XQaqBZ0STh4N8A0mzLk7nxlaB7rKzMcQpF3nTW5Jh8FqBVxCDSrf/Roqo\r\nB4tWeZ/4nftmqaAzxc7usDcrkO+JyvDAMgc=\r\n=SnEs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7ea9b47d90d470adeb6f1cbc0c1c98b88392e56b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2aa8050b4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2aa8050b4.0_1669662645152_0.5271053493872271","host":"s3://npm-registry-packages"}},"15.0.0-canary.323904a9f.0":{"name":"@material/auto-init","version":"15.0.0-canary.323904a9f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.323904a9f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b60a1a7b7d70f1bddb499786da377cccc53d1574","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.323904a9f.0.tgz","fileCount":13,"integrity":"sha512-GOrLQVyXot+n8qzEgOUDvnRfvAlEuMvzW45Hzaz/t8/fGBFVsto9PV39pMkDr/NtPUcv1A4S7VCol+lv867KJA==","signatures":[{"sig":"MEUCIQCeTnpMcHB0Kj/jYKq0ZUgOZqGTwzUHXnYejvZq1kWFRQIgZNzd2jztl/B6F/QFTLhcBWXuc/jCYmROABT81XbI6/k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhiYtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHJxAAg3PIL0HJmUPZOmH4Humn/nhA0rj+w0tf/pCgmeaIv9YEv8cE\r\nOchjFaSNPqPvUCAvSsWfPdjsnpbdHXweXzFpe8kkNqPKSiwn/Sti81NFw9Ye\r\niN1ryzaOCShLbmjeFIVt4gvbr2OfAkcD47+uTdY3zq4SaDcdq2lBqn3b4CCM\r\nt7jOFVCOn9+uao0vBgzVhmymA5890G/N6oToBeJnogmXx3cQn4cDhcQgZ1Vn\r\n70RUiyvJORnSakgCe32EVFHxdf5NW0NOzZiee70gJSxofjvTO1F9d4ia3j5M\r\ncFlD7vNfdagETCes2cGPrNGjA2GMgfJUoy56i/en9UEndAkZZOl+Ez1wqEWP\r\nk4wuclmRaOCzR/qkB0Oqbb6cY1NTX1Ts21D9xi04gNRPqRhwXI9m0oXAHLhg\r\nM5JkKCQ/3GUqO+lBMGOQITZVxCCFpP09mHOOCG67BBwIOA4wM/ZvrM/LwGbB\r\nKdgUVks7LxnUuqlU/uLFlABJXFDTuOUdljJtnRu0353T76zoInLzSPaOLH3z\r\n6yZnqJl5mpNplAf7GUr6/LpMF12ZL/O0j9BG/dsFu3Ek3JhWbAj+rijVYwfc\r\nOHPe7fqKz42emPVPUku0cnt3eswncpPuSRM82miv2bUyxhQPZDhceEuwNo3S\r\nziuiPU8yLeB2HFm8kPCChtU9/i74eof4Ezk=\r\n=AwyP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a69fa8c7160aaa07d868f5bc365076bdb159bf99","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.323904a9f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.323904a9f.0_1669735981063_0.25864869021790193","host":"s3://npm-registry-packages"}},"15.0.0-canary.168a629a4.0":{"name":"@material/auto-init","version":"15.0.0-canary.168a629a4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.168a629a4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"76adcee69ec9483b257a4b47c729a0cb325e9b7a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.168a629a4.0.tgz","fileCount":13,"integrity":"sha512-F8TKNwMD+mDQ9NcvPRTGR/KAADpERl7sf3CMTVbQRU6twVaIuFc9p27J+TymMzqxs4xZ8gwZiU89hA3D5itF9A==","signatures":[{"sig":"MEYCIQD767gn6FWk/RJofoNK+75grFd5ELlf+V5/WCRTlu3b6AIhAI1Yfc1UqWh83aNgdnj1DTGLcdnPiGYOEDdTro2+hMdn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhje5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjrBAAo2BvQRFKP5/pPJmd7dk7FD0EiskejzKDUp8LgURbO3hUgO5z\r\n/hLR8suIFMTq6acIF1onFd7CCbyYhm50DiT50GmMFPKpEct259ZF7XrjwZ3g\r\n3sxUjNt3MaQsSsIci5bKeH1MdUMlCaQx9R6Lz8AgZ9oCjlp1BhrnHCA0N1qw\r\nSQqiEQqy5nZtmgp/+wH4rx5MsqSE82NNhlkaV3c4y3DxuK7MVQ3OFZsfC9jU\r\nkGq/fWBJNLisXNpNaMhDFoXs3mhc8qqFgs9luA9NJ/srzLtaXDVh+dZmCeo3\r\nESvVLRznR9MElciPsp0blfV4ZHZGRwe1h6WATB7S49JR3c8hIEIpNwUK00An\r\nUbZ85v26Wc9px6VKscvb4xetneDkkDuvjf15NjfIw1kDhYfe4RTS24Ce+RE2\r\nU04NBtH+lLIRpgzgU9mx5o5nSPpTFlU3wEbJ19zcaSPmhadjO3KVz8p9mCQ+\r\nzMMWgRg6LXmXS2bkBaHG2o8nCrMS9dkPL/6KrlCX5AOdLiVEjlFNhi057yxU\r\n3/UzrmM1KvlLA/CExXa1RGuaLo+SBRBhVXpHyPhqrLsV3jkydoLFOX7K2MZt\r\ntHesygz0zfjc+coUlDUx/tO8TcLF20TsUGTw1GIHl/lF1gFd6uffVCM80ZPe\r\nmP+HHNaWXFsgKjmLuSn8Ov4XD/rJnrlrwLU=\r\n=lICL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3091b344799132cce493f92839da8e544fec7c05","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.168a629a4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.168a629a4.0_1669740473151_0.2286588110894272","host":"s3://npm-registry-packages"}},"15.0.0-canary.65c411674.0":{"name":"@material/auto-init","version":"15.0.0-canary.65c411674.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.65c411674.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b39df8496f52ce46cb4a26f3bf388848a5fecee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.65c411674.0.tgz","fileCount":13,"integrity":"sha512-ZZMvjziSbTQAWHs+ceomKsR+luK4ms49r24tPXHFaDj+E4TIbsOBoyKQkG/SKb/07tmq4u1m/1tVd8Jv4Js34Q==","signatures":[{"sig":"MEUCIErdKst2/CV/KQYpcP1x5VQwI1SoclYgf/9l9pr3onkAAiEA8By0lzxXqsaKRJtDOReePM1rx5kPi6vdYGvRtg13fS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhkNSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9hQ//T0FrgSXFW7QLQojIetnYrBm9Rm7kmiMpYOu6qY6C/zMi8nrV\r\noTtJ3Pxko18VGlwNWwFCRlBr4H+L7cTXSzgScKFAGwNBOrMHHkvYHRtAjopi\r\nacmYtNyvtfKkKzZB8AMHer2VcxjnHokkvI0OyaSIMYULVwOyvbPS3v2mo7Iv\r\nIes6bsUbbV48vkQ2izvzgx8cSkSukKe9u/d3BQ7LdDeZqx11qTlSUFLZ2aBK\r\nXIOmAwLB+ZzgPyd+rAxNnCPgkpX7r7cUwnuYNTt8EjvvVrHqKhhaargAPZGL\r\nPDJGNS63Q3a3YqiMHIdfCfeZOrTM2KyefwI+PKcxN9XOnXt6e2xNsKddOPmj\r\nkMrok+1547c14f0fCdv631NgfMMXHukftNTRQkWes6HGI2mO78r6vqCTeqUB\r\nVGzoz4NV4ICNNqdNUzw1b/Eyu/0lL2qlyIIxTS4jcFSWueY7t4mk6zAXvcT0\r\nddqmZsArqOoaEbQFPQFkmBTy+yWLRTUXfK8Eu9mnpCM7JGH+qgIAlE2/WpE+\r\nFCeFv3K/30CeILs6nSPyTN0s1E0WARKMk6HfGNWEhRJWLG9RXNAFUQ3zscBS\r\n30pt2wbDwoTzZyJyxNhJW3wl/F53z1thIQmwClpxENOes2cokHCyImHAX/hT\r\ndAXB52WkNtMzkxSuMWEi5bJ5OFefvqHYpPA=\r\n=GXNN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d80879a8c467caf0f52227ec97481bf5b7f2cb16","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.65c411674.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.65c411674.0_1669743442714_0.3329645790718019","host":"s3://npm-registry-packages"}},"15.0.0-canary.a86d36fd2.0":{"name":"@material/auto-init","version":"15.0.0-canary.a86d36fd2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a86d36fd2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8eaa89faec9e3e976a1b255b5ead4748aa9cce1e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a86d36fd2.0.tgz","fileCount":13,"integrity":"sha512-hXKarfK74tiODGWgsL21DuonzWCaQiA795JShkLak7QdnL/6NHcgkS+AAQRgOGMMCnxlui2382M4g9m2NWkFqA==","signatures":[{"sig":"MEQCIBq4AS4vUvxqi/6bjWIsxujwnfc1qJl5gtx005SBKgHrAiAPFSYWI9FYbRGsFEnOx3Jz+moiKQVOuXcc+zo9PFLw8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhrxBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrs/Q//UsbciITi7EQoMGpj2QeMm/321tolpjzLhFZDgF6sdexIGgUl\r\n/wl6KHuggHOBDt5/R1Cm2pLt7BzxPoE038/9TxA45PbgtH2bPGZRabnlTr9q\r\nfCHF8bhH7A3Xj2JLE3LwuoFWgjMMyr7bTdqydNo/zH8G5SB4vYcc91XuxOlv\r\ndYRDyA3EqFOTCNpv6TPDjpEDF1G1itMD46sVtgDvfwzN6Un4Pf0QQdLWajsf\r\nN/KLlqSNG3efzM/M2TuDduZrdKjmLn052mZOW70mN1Yd/YHDoCZmf9ONIos2\r\npV/Qt/pIdQseUZbGfGsybOZQZTiz+tlKG799K3/G8ntSsI2I0E8Mot0MI56F\r\nzxTaQ2D0a4C8j6IEbTkIcls0yUiDDiNqD7jzYfKVXRb6J/kK30Z7dNeD5Gf7\r\n/j1zd6hlPkl8N79Qwu0gU64JzR/3HmJAhk1W6bELSYfES4C0oDzVc5DTeXLE\r\n63f+ILrg+QMMV85Mq3v2R175ohQzm2XWAQJjLKsf7xw1NZAvnwsoNXQPlm1X\r\nFzV63UqeBmQqpRidvkHJBIBcVc7S0z7UDONS8gCPbtxchLA/674g1ClJC33S\r\nLr6ZXLVf7lTIQPZtZwhU4+jLvG4uz8XmOaM9cpZPq0I48aljBY4D4W/mwa0i\r\nZONwXBDgpGN7SEahucumNSe4N4f7+MIiUeA=\r\n=y0AT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85d3ff6d42516ecc839fe336441543c8df62326b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a86d36fd2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a86d36fd2.0_1669774401117_0.47215583789776994","host":"s3://npm-registry-packages"}},"15.0.0-canary.3a1f46c66.0":{"name":"@material/auto-init","version":"15.0.0-canary.3a1f46c66.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3a1f46c66.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"42029dacb46691ebf80ac28ba3195e28146478c4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3a1f46c66.0.tgz","fileCount":13,"integrity":"sha512-dKO99lS35bMRB7CDjJdSe3NOGoN6MVML3/MEF6n10Gk7E+IPgsGv8IwqHAMi+bPLnkB0Zmnwg5t5g7e5eDLruQ==","signatures":[{"sig":"MEQCIGcwyM6prgOLYqIBYU9dTPlqvhtc6Pa/QjKSGQTIvwKQAiB+PgD38tl1MgNGZexc28GfMsS8PM5gBEXI8BeplzyEhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjh0crACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDSQ/9FUS4kTXchlfy0VEgt5KzPFLWqAaZKnMjeIFk4ssuSSvRRrBq\r\nb+euso2wOXIxKhq+/6Z18ysVvoSDdOza/IXt4cvgsP7Qtc6p4QsF3rwEcWny\r\ndjCIxq7Q8hAqOTYJNH4VQbd5CjgKYG2JkfBBt3mR1xTqIJwv6+8bsEN+U3tm\r\nBjj8JVjlXZ4FX6WxeB3XTXYSaT1ag65CGoNtpF/3eeQUnzd1qJV901uXJ4z0\r\nmXT470rI4NV4KZL5C0Fe3wChVv0fjrsTIOKPuhVRiPauYPlCUz/bzI6mq+GM\r\nZKjlGWLLCSwz+RkJemQlb1xoNwA/1hxlVKpqHxkzU1RT5Vmg0WbIWYG6FrNs\r\nUWP3KNmHQNfju09GglJ198DIWBQXG4JrthfJlTfXlEUQWScZ3zXR0npfkRhr\r\n+Vc61ywh1cQb2b7HcqY6I5l+qbs7T6fPbaHHgBp1Ro3jguddzw6N5p87RN1q\r\nklsc+a+fL+TJ28WBv8py+Sw4HSxfOH36XlwmLSreLE9NOWiuDVxsbwaz10vt\r\n6nsoAaNPQhtnGIgAQVHzd3boWdTfPV/mg1RS4AmVECKBt+LrONvlj1Z+5aVs\r\n7Z4xXAXGqDcSAxNVl/n6+6lDE9dG5ybIUQf+ylwDbvbzKS5G5uHQUGYpSf5k\r\nPBMAD83CdsOZViiLBzoUQ9CAdn6NO1/pZJM=\r\n=xAbL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c3f9c47a1b8fbcf554e1fce6da44837b6d412e2f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3a1f46c66.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3a1f46c66.0_1669809963125_0.16198071519971968","host":"s3://npm-registry-packages"}},"15.0.0-canary.32d8a9648.0":{"name":"@material/auto-init","version":"15.0.0-canary.32d8a9648.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.32d8a9648.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"470a4f52c2840c5ff1d5d1fdb95d599308fece30","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.32d8a9648.0.tgz","fileCount":13,"integrity":"sha512-uZ+ZrcQ2ho1CD3F0FS1Ja7a3CxZKb4YbSIbU3Z2Ou143el08Ee8jku9qTapbtf4a5StR1a3I7PEac5l5xTGqlQ==","signatures":[{"sig":"MEUCIEBs5ZZgGpJtcQ4M04HvXLYqs8+u9kmpF7/4muZf6XKwAiEAscf2N+daMGueSb0NnVRiBxzfc1aNOa4jjG6FIGfRFoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiOQqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquUA//YgBgv7EJTAjHRgPi6A5QJcACwIhx2SZotnELh5D1Y7I12gOE\r\ns9vjNiO0bgbvd8xc2sVAVxWzLxXQAIUAFGE95GEWAWS7qbPhFeQnYaP/rVv+\r\nzTIwruYycyErNoDDW/BCxjRu8mV8hGmchPOCRG8/PYJPsJLOkiufQW3rUga+\r\nKgwkIBGwZBvPnlnvVYLQG34zGLnMSCQll1CFy2wMh0gsy4q3YB/qcDf8yGXZ\r\nSqYLpUuiY1L9R6EBekLO5t9xO7ZbUp5c3DHG7wjrLTEf+hpkQPkZ8b+9rV4O\r\n+8s5qTkgKT3ppR5LM2ifrpIBxRiJkeTOD4tQ4BSyrW2/u/ZmJZZQCf+x6Zyf\r\n3VjVy7BBMSk+ER4IqEj/bENpGxoktm2z67a7F67HJ7/anmT/wEuLZ1OySB82\r\nGmtLujzM19G2vPb+tZOP2sYmJ8JfJ2zvqmztlezooImnMSSWTDEPKA5w3UOa\r\nlSIT02ffcTC0xRwj5/ez3ZRu2ghr0ykGioR5c617wBSkbGPPOiALoqnT89yU\r\nT6DjCHAiW5JWxZaVxxEwtAomzh/PtwAzcHqKPn0ocYENVG1RaLI+RTYDOYcp\r\nKCynLtEFv19c775mJj1lRe19/FL5RfKot+mZ3XCqzoh5FYkW14XY2Jvb5SW1\r\n63/IO7cIUa4t2how6kKoxvOlydzddsdlmdI=\r\n=0Fz2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5833a540d2f362be3d86a707323bbeb6cee2c627","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.32d8a9648.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.32d8a9648.0_1669915689934_0.9542470840755635","host":"s3://npm-registry-packages"}},"15.0.0-canary.03618ab70.0":{"name":"@material/auto-init","version":"15.0.0-canary.03618ab70.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.03618ab70.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b2deedcc90d4a1a5d34b9da44c0d53c1c5248325","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.03618ab70.0.tgz","fileCount":13,"integrity":"sha512-CCZ/IkRfUefM7GU3LfGohEeYPygNpzG+OFhxP/2nfFrOuXGB7v+ypfn8JD7jyUxnvOX2zLTxre7sLToKb6yiMw==","signatures":[{"sig":"MEUCIQCwHWLLiP1/QY+uiF31PSI7l1nMIjwhRCwt6Mhy+n8GRwIgTuWkEmwwURZAorg+/k9VGJ7Tpn12NfXah9oB/itrAcg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiRRWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoylQ/+O8DQnt5dZzU34xivs1+1JgU3qnTZhoU9TnXLZoXnriOFRrYH\r\n+XEHLbDwTiAj1GqjsOrLTf5/jh0WlNOsCklxJqZZ6m6hHxENZMKlaPXVIUxG\r\nvyWSOdRS4EG1F+5Qa208GgY0vjmD8+50Y2t/l4Q+dMfu0FJXfDdV7EEsSMem\r\n0Lttobmz8nds9tLjQeHvhe84hhYhpOhxxASuKeZLrlfompMCPen+S0XkuAyd\r\n1UmNF7NM8Zw3kSJPiGJKpw7jj9uNGBf8xoZfPE2G8iPA6inoKuCDUtklw0dn\r\neVUVqE3P+100Qn+MrhUJHJztx124ZPfr9jl884Jgz4D1Vr2NOFS9u1gN188f\r\nDY0Vj//Rmk4abxM8zwEtsdmC4h5GUiCPsImHTCwyA5B/AmVdFrup6qqLIBqu\r\nOQqT6yhsyumQmGGKZxHwdmXV0+YgDknWP30xm4slUVruxYCRQar7gGP3SX0A\r\ndwOQitHpbK+wv1MEoaLPZFEV3ZGM2qURJe/84gVgvAWBLLQgc4IaFcecu6Cb\r\nQXzd/e/8TJ8NhG2P1Br6aSr/G27EmwEoVpUCxa3FbhojzYe/P8qHAJQTeLtR\r\nGCPuHjc0ngpTK1tfH4t/aZhePApmFxzC91nEEJkCeJzDnq6qAqf35ZLcJBjs\r\nYzSM4fuqcIIW/MQW4LlJSyr93SclYi4PLoU=\r\n=+mst\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b7755627c14a2cf095b6ee87d1ad15c14430ebad","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.03618ab70.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.03618ab70.0_1669928022524_0.9990409719291677","host":"s3://npm-registry-packages"}},"15.0.0-canary.68aaed940.0":{"name":"@material/auto-init","version":"15.0.0-canary.68aaed940.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.68aaed940.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b47ecbce1d53c148b6fc95c917c4b404b50ebd27","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.68aaed940.0.tgz","fileCount":13,"integrity":"sha512-OLNrR0l4xhl6evKUxcDKDDowCEso50OGYyJXk+pMP9mObYWxbbN5MDKkhAP7fDg8kZeVf6fV0t5KXHu3aZg6og==","signatures":[{"sig":"MEUCIGOe+Ktfwq5atHBd0QfAxOWOJFosQmjRJPJ850T4Iej+AiEAuBnCVKJn1p7i8PG3F1kk9dItLfPo3iz6UE0jWBkWYCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiRs9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrP8Q//cMtzcWw6Ds1BQtjV8hXVomBIja6Xoq6FnajAQZcGTfg1TsOD\r\nHfAWyBmiBl8X5w98CGBeFfQ1C1pSUAL53JUs7wyw8dvsQ5Qk4vGAPnmIciIB\r\neFg83WROqDZKg6nW0upO7tg/duXyuvYbpeEbpYrwv4FTUdfoAQm9Kg2oLeCO\r\na3Oqw/llYeZJaBR/oqU7INZWd/B9gc1mn7VER4oOagD7lxB1V0VugRfLSTIk\r\nVIe62Rtni07dNMG44OseZAAh49mNaJd57uKMkzDBX8AfqvfhP1ZjXEv1l7+Y\r\niVLdBAvdU8YJxzrnWHUu2v4HM9SM1VIsiPKO1u/ggjCKjI6qDAZBpzq3qU5l\r\novNY2Zu1LaDcHlTqBzHR4CX7BbRH15C8IoPq4odE2QpLKcB3N/VKKugynBpq\r\nZ72oK+ln9PQ9OUV4B+Br9Yl34CFLu5SuxjBIPR0Oo2o8XXTD2BdZrDWJL2WD\r\n87prV7rFWtw7dwP0yNQCpiDixIAElWyd3XBg3B7d6UM/DMvkdZEiEpnmUDff\r\nOmQ5tzuydxS+Le7/WJn4S2mYSx8LWg+8Vuvxlh48KofxCY5qOCd0EXtfzic9\r\npNZuTtFuyHOofwWvsRhvWqvf3NY/dEfb9dcAZKb24ezmTo6s7HHx/UdNwrXN\r\n+zuGtTpSnslIWbU5lgiI9S9pdB2PRm2WY64=\r\n=DDOQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6092c4f3bcdf41ae7f55d37c6ad51793eb8f040d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.68aaed940.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.68aaed940.0_1669929789512_0.5426966423796067","host":"s3://npm-registry-packages"}},"15.0.0-canary.f0a0bbc75.0":{"name":"@material/auto-init","version":"15.0.0-canary.f0a0bbc75.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f0a0bbc75.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a0a212b73e117550388179b1756ea8682df28bee","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f0a0bbc75.0.tgz","fileCount":13,"integrity":"sha512-Vmrr7BnzTIpAYa/SLr4NKKokUUWFrQJL6CT2nWP8JtjxJkfgjk2ZBw4+FL83suDd+QgrOdCqQ0sML3yusVS+Ew==","signatures":[{"sig":"MEQCIGauiopUT4sfjTmvJcKG0XVqL1DtkZU4Tj+E30al0Pf3AiAjTRRXag6L+ulmoIFsYixW21DxGDAEToSWQvZrF5UOLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjib7HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTtg/+Lx+jJKu8ACTwFiAMbfKEqMqYWFf6tISHWP2+nzlwx6uB/h8T\r\nFT2DELK7A/MMIB+FVebsKt5NT1qmHZefI41zemNkxSdjqmvIdFYOSpOOR0xO\r\nVRaU3o4mAt5TauUp2DjEC/006vc2bPkMhPTnGcy8NVurnBKrG3BMbRowfa8i\r\nLvQaC+ezgb5i72cplPejP+jqZJhUBr4I6yvi56VJGJ4CHt7Vm4yJBbjnZDwM\r\nIqekiU7ipNEWZhiMhXZDXuAXLV3Mhy0RbdR8HxHjznN/Nti1FXJsxQuyMVd6\r\n+B4yUzvckbt0X2UotuLjK/FawFBuVM16MF//oNbjIsHL02zGwP8VHIaDf5V4\r\nAcPuqSRjoMWQzelHi5xkyO9O/Zm8pnEdpZvEb6ItrRyKfxwXYoKCbX0qZURP\r\nruKuLdlQH/kO3n/kECP7UzHwTkVsrw9of9rRq+1d5GqtTCZltSpSzLT5BM6t\r\n8Xfff8YvLHqeCigAstu4VSDeICgR0Qvr/MQc32KtXobPNww1HYlGHARxTuyR\r\nP6e82+K4Ji56SctQGt9mZJa0kTbviKNtyFQTeSyA5oT3TxLQrERe5DQ+TvOt\r\noA3FpohVmA9DQqEJft41o15fZHZEw58KSfP6iNkiP9Kz9X+EsFKqgQbTQGaH\r\nBocGa8VQiSfrLPDZnICpeqxBRL+4iwQLBE8=\r\n=UCvG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5111125522be9e3847929d9bbaf323f31e9057c9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f0a0bbc75.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f0a0bbc75.0_1669971655368_0.15965892868118003","host":"s3://npm-registry-packages"}},"15.0.0-canary.dd99c8764.0":{"name":"@material/auto-init","version":"15.0.0-canary.dd99c8764.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.dd99c8764.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3b3f3320e110b9b3ee58accc3eb334e1546c18e6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.dd99c8764.0.tgz","fileCount":13,"integrity":"sha512-9Cfce8NDvgV5RcJ5fmHKhBg724ujocUXWYVKEKYyHskd5tqCT/XEbXmLHYGlMG81lcdCPQYWBz2Z37zyqR5HbQ==","signatures":[{"sig":"MEQCIA62xyZTyrZY/xQ8D1Yn4/NOBsZHap098kbSj29zxrpRAiB+9aCXjdB50ng0jcRzZWdu+4YJmhC45zd+4HyJOOkAuQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjigToACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTaQ/+JStMLvlfkUNmHXaBHrC0EaGyrEo2dozyZ5ESi9FHDE9LzMEj\r\n2aGaujdlov3oa9o/yRYeaelcMks5pAsaf06I3oiyDz1lyyoyHpRHCQOFV7qI\r\nWUbhtezPQcmYPWipPViVl5vQLPNLq/RewGU8tNdGXxOmR7regiTRMGQWivKe\r\n75h7ZKOAk8CZsviAAUZpwzYv2+n/0u3DE/8/46dAs9E6V8RbQzagTquiJaWG\r\nqK7CbhvPmfvmEJ+G7e34L1IGokAjcr/03HlCL8KhrCemEz3gkFG+fGz1F3Wa\r\nxMTToG7VXXkYSc23vq2+MyGnoYc4uhM55/MT3GSrWgGA74eri/LEXLGkHvMk\r\ncWdvQDUxueNVAQhS7zuTax+eYfaGsebiZlx1/nmEwZGAgAMC2/RWEQJxl8Eo\r\n8ujuGlbK87u1oILEDhyhoMsvXuNs7KpH6Y9MYkofwYA9eZnKsds7EOtqu7Bt\r\novhAH5r3OTb2m5NoYKyjEXwl+jXxBPLg+lS4t5v8n9rUXMQJ8CGeOqoJyJ2l\r\nQO+XEM8af6vVcv+zUD8eqUTZjmYbHOevk3HeLDe975dKjJ4EaSPKLR0bAv2N\r\nBwmS+v9dCcHA2rZeRS6W2R1NWgQCa/AzXjCRn/J2PM5CSdMXDZYSTcnLY8eA\r\nhlK4I0MTuYlsyrgtixKlOxS5uFpLOdb3n1k=\r\n=Cq7Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a9ff7973c7dab53b620d5be8d56e0c491cc5e7ed","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.dd99c8764.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.dd99c8764.0_1669989607982_0.3000600248064562","host":"s3://npm-registry-packages"}},"15.0.0-canary.fabdcca3a.0":{"name":"@material/auto-init","version":"15.0.0-canary.fabdcca3a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fabdcca3a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a4247c7584d9726980f6874222977b05dc180a7b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fabdcca3a.0.tgz","fileCount":13,"integrity":"sha512-gKYkwq9X25lahH5GgOaR/T6PYM1AQE7bPB/uBCPtTXlM9tu3Mmoevjgqm9w7RgmL75c294ncXX7Xv7Nzl9PYvw==","signatures":[{"sig":"MEUCIQDvZcuHzdA2v+YZ5X1cnOw/xGN2AWJPQxn1FNfNMloGPAIgBSC1VyPDMcB1jhr0soKL8bAmMzA2LhD54y3DMza5Xj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjihRTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQAw/8CMefACjfu6VNxzeiCObA0jMq/Sei5WAZDVvYtkHDLAe7r6Ui\r\nYdArOqOkC391esH+lDBF/crHa520fRq2aj7RC6yHfVIanEnQkAk8xvc0sKEi\r\n/VQ4nR9SydFwQBz305r9uGC5D4SEFmWec4M8WtJJoSnvCqmgubLYYZ8K6aSa\r\ncAgyujumn7o8P/NkWzG0TqSblXTNNWRVfkrPsfCAcQnRb6+lezh7bVnRtiAs\r\noNzYwVgUBenEhbdtSCWFqwZuYRVMRg1ESPZZBPjSomGBulKFifwa+TQ4tKn7\r\n0jr1VU+EDaFBN0hMVQCd/eVZOMQFDj25u1meMiXWUPODkeMs5mHZQvxhxQwo\r\nE3fKQGc9QuGLBFsDVlZOyskXc0mHQuAgX4/O5w7WEcmJq50FrRS2FMvQhLLB\r\nYHLOfoHKkY842riTfJN10/rx7YHSsdnfrCbiiPTGTDgv00pel98rUQ3ls3RA\r\nHwTRvzkRqrswGFB1y6rQXc5YuwGr58IlQ1l4MPFOmk17OcTqha25PoobWWaX\r\neK5Lgf8+0lV/U2zZ1YO50nT7B/JB5OQ8jvt9Ybt3xB0aSgNbjz7rs1iYihNl\r\n31LdDOF09OgUbZ3ITruu26I6srsVH1qMoYkqI1QaR3gT93TfZ9/2YQm3J5FG\r\nHdtG3wJ/unzLc/Bw1+jvBZRNfP5yPqv/t6s=\r\n=fpJj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"18ea36a1261419acae3218fc917dab4ca111bb9d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fabdcca3a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fabdcca3a.0_1669993555333_0.6770868710273394","host":"s3://npm-registry-packages"}},"15.0.0-canary.2d26722d2.0":{"name":"@material/auto-init","version":"15.0.0-canary.2d26722d2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2d26722d2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bf2696b241fcd110d8a672062f3fbac3ebde3c77","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2d26722d2.0.tgz","fileCount":13,"integrity":"sha512-KlyzFhLJ2ScD9iZO/40dgoc7Z/PYFgwtcmZIBmUU2DCa2cvV5Hfklg1dD6uOiICSzCCQ91eys+Vgk6E38xVStQ==","signatures":[{"sig":"MEYCIQCkXMHgoMB4V7giouqgB4Cjn5YyiF9/gaT/6m3zk36cRQIhAPzab9jC7kO7vt9LJQwFYQJ47z88jT4gtOngdJPguKGn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiicCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfoQ//dtQXDAkq+ueb2y6wy243Rqzt00VoZgp2VEUqxAJDEjNr2kgb\r\nZ0HniNYEp01gnWQgbes3s51daFozGc4PR9JiwYy8NZMpZgrztft8ssYgE3+c\r\nNUMv2aSHSVw0gH2CuXy0dv6Qc6kUpphzUwb6nsvVei9pehXOYGygb6WTwdQH\r\n/HZhao8PbixnEX0qz76FurjhEmSX2HM66RyMkwo2d7DdweZRjuF5ETJ81rga\r\nyBxPEAM7r1/uBDZ8dXjyTn5FsxcMGzIud4XMNCc4d2TEagwbWUJoP3Uj2Ysw\r\n91Sx7r4Gb2ua0xfzguRtPJVbR0I0s/37fEr1oLiu5AwWvWhh5sSoWVmsKhgn\r\niWCPTsVakfpj++Nzs3iXaXwRarz1sfSnYzNmV9jSedRP0FJTMShXz5QTROF3\r\naedmyFH9eAgR1Fjs1e7UlemIcugq1AORJjUxHLpyJnl+J2yL53/vzRTCCBL4\r\n9ZMwMURFkVJXAfd7mQl2Qs7idM+lIhVj7SPKxfaegkRcWZdzeqdxHWJpK+Dp\r\njvBXfU5fNwsJ0fAbrZrvUhs090pZx7bn/1LZuOL0URAorZ3Qi6dkCGf0ipQm\r\n91/zOcUzl8JhTg19zrRjn0d/92DsHofc6fk3GwX7rZWbYbyM/RM8TQXYBJ4q\r\nbo7ffo3vNkOzpxnjtO6PXre/LXE9YxZNiLA=\r\n=YwCv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"76df2659d7f71f74a86512b38245422ca356fe12","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2d26722d2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2d26722d2.0_1669998338778_0.6399711190068442","host":"s3://npm-registry-packages"}},"15.0.0-canary.eaa0c3a86.0":{"name":"@material/auto-init","version":"15.0.0-canary.eaa0c3a86.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.eaa0c3a86.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b404998963bbf321702ce260e28ed5253e5ceb7c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.eaa0c3a86.0.tgz","fileCount":13,"integrity":"sha512-rHIzmBJte+2XMansOLxxCOsPNviIP0QdzSJ3vsUm/DenNvmcikfTcDxK/F4t2qa9J0kL0VKfke2y9bXUDlm0bw==","signatures":[{"sig":"MEYCIQDmpML1nvR85HOZp5gkaDn0LtMj7wU7Y/McP2s8oJ0hkAIhAMUWa1iOS78FgFNYedY6MGQvtG1yGx0Cd1TeQPnnMNJQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjijjXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqa2A/+Ox6kuQYzLWYcKLItevBv2ImCxkTiy6gtfhzRsUzQ+AH9LwRY\r\n9m9ADODN0qBm1WIZQtkqfAE5Oqoviix0EHmMr7vxbuzg5p38mkD35WYZIKhv\r\n1PVkMbcxDZwe+8zfvLQ78tlPdrv2+8mFhKr1pcpYUbqTNWa9EcZFmJWuTpGv\r\nlV7OiZFqibHiMPvrbJ9vnfESoCmHDKrxa08geY5MsYQF2FT3VwlxaGKi6rcF\r\nMGOHFLV315xVbpdJuAO2Dh6eUnVc837ywkXOgFQVh40+4IixMPhmE6zuB1Dh\r\nfwIiWb/CKeBvdNBJ15NYehp6td0sT27/Xq5wNqKM+E8DvOUWGuBRUysKRIO3\r\nhGm1W7RBhoPTqh8dvYJ21c1ITax9SMqAZAm3cXUg/FvNOz0lW2slbqlBT0eB\r\nJBKPxXsu8/Cn7KZ3f9g8yPCZucxppcY/SvB4xaXEtm8qYaEf1OEuulDlQwgJ\r\ngT70ePrInjjTbfY6M2fuOHT8aJjI/i2sl9vuVjlbJdZsmxZraJnOI5srECcF\r\nIbPZ+5yfjC9gsrAZB9m4pyQsSv4xoLivQuuu8OsGZOHyO5TDXf8g56wMbNBy\r\n0SMMS34Kn/7agGXIzzPPFGH2nIch6T1QE9OvdahyiMYsKwXzL855WQXi4Um6\r\nNXedNgZxuQ22UxojeA1VBI1L9Dt7PMOplZI=\r\n=ufKb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c54316c7c60bacf8254758124c9235dc48d44064","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.eaa0c3a86.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.eaa0c3a86.0_1670002903402_0.12962623783076332","host":"s3://npm-registry-packages"}},"15.0.0-canary.79a613bbd.0":{"name":"@material/auto-init","version":"15.0.0-canary.79a613bbd.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.79a613bbd.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e4d5a139694d4925d0efb14fec30b71f422fa90","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.79a613bbd.0.tgz","fileCount":13,"integrity":"sha512-o0E3P2lhw+3G91ux+Guwx4OoYGhFuCS8DnOLu3l3WmT+LaEyUUHWwgUksZfB46+QGtYptWgJsx9aee4YMX4dcQ==","signatures":[{"sig":"MEYCIQDAqbvSS/GL+QjP1lwxreUNf1o387kgm1hl8uO2m+uFhQIhALcq+GyRAGQdFJyZUF6myecWk75ScPDq2SfzXMNa8b0L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj1CxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppMQ/5AZZCh+IZdNc2tLzeIn9ywRztOzhBHw+3h3hWTKypBJxIlFq+\r\nTA4zllkhIDWOk1d3b1b0ws7cfPRjAO1Q3KgkHf3gaW9shtnbNzeOS53t25Id\r\ni8bt9ImXcNWCt8s9bhuhOSyOI9GqFO61YbjthayMCT0LBLOn4sLQ8L6qQ5A9\r\nGlW4oP/af74wgPFJUUAfv1dvPlWHubmkL03+MRBc9fQYDU1O5AvR5RSZfShD\r\nxYdRksyLu0VPPBCiFQinG2+69APP6uMth/3eIsbuvJvYhZfqP8oVnTA6fogS\r\nNDpvcQES3+AeigAtH3ArtphTtqh7wA5bjxrjlb9cyuZt7+mMqA8L9PGnmLIx\r\n4BjYWKILnpUuP5WwEledWtJLweekgxmgpwp+0PTZEvUZOZec26YRaNI9L2n3\r\nwzSuqyLee2yOpFfSvd+Ryto5gDSR+gKBgFgDEVFdhf9Fq2JVHtGWV45K66hb\r\neJEC0NqLq1bs7WEGBHE9hj54qwfZPrbYTCXXQPEnklG0h+Owr74GjMgYyGUi\r\n/8hJx34ThzuvHs6XPz+BadGPD17YmrpBoqj4kbDJSxTT70AKP+At45dfyjAx\r\nvzCXOZ/U8GMspjI9nWseKHTRq+OKxhIFd+eQIZF0W3cQIQgH3mbTcd/qnv5t\r\n5FwjaImMqKG9xPLfU25FbGMBXL0szgGZCXs=\r\n=iFc7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"755ec1ef0b2cccdcb0c8b888d199b4748e3ba10a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.79a613bbd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.79a613bbd.0_1670336689244_0.6236515423141122","host":"s3://npm-registry-packages"}},"15.0.0-canary.c871fe61e.0":{"name":"@material/auto-init","version":"15.0.0-canary.c871fe61e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c871fe61e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dce18b106a2952afbc492674b8066723a3718432","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c871fe61e.0.tgz","fileCount":13,"integrity":"sha512-c3CqFsXzTpPTJ8yyCgKMwouYRv59nUhFojE8PX9tfYgudgwV1PdaBj1t43oxfTpUzsT4mTMH+AGa1MSv5SN4tA==","signatures":[{"sig":"MEUCIADZHouqYzGwZR7K27DYMBzvUOuCUUYYdDvyeMeoTY2qAiEA/q+bsiW7pJwtZ19xtm2MPseXoZWWUZn+gst4ljbz/Bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkEXuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokOg//UF52+mOKtjhAKWeKrX/98zetBDPZ4SquljNY5Tj4xcA6GNT9\r\nDe3yCuObsxpefkNevf3YRzkB2FZl39jSOBALh69Zvl7yB12YLzUdPlIsbhx+\r\n/uSKcjgzbuhcgEXaODdvBth31b22CiNLN+l68Jy127x2Zs8M0uamyx/4I5E+\r\nyGVJyyPvkpc0iNephgPMUWur28iKs7PLymmAIrzGd6bpleQuoAjfyWCKmldU\r\n6IADeWeFcDKXeYmbrSiGX88nNJXzumBosQlF2yfXjtd/PuXfHsplxlCyVG1l\r\n8ilxoI1eYhUD0jl/+qM+IHVQ4hW+m3UckMSnT/Fq7lX/TVKTNCtw4POorY0m\r\nNE38KV9g/9b2ZMZxm3d+6FKnEVN3qPQ7R7xij9vdKO0Mb028rIXtJjWBO7lS\r\nyTP9H3RB8g6cFoCiTM5grSMfYsdlhWXIKCU2wIKihItX0uuqOjrH0WYvhurG\r\njsBN7BAAhYjtfAaVV9ACiq/e1Haw3X0fQa28kn9J92FODCnNwkCJyfpLyzyv\r\nbJK9BB5dlkcMD1Ys7FqUM3+zBnGjvnbw/oBVTroCsP/b/0ZKwyXCy3XGPzpD\r\nnd3FxllhqCtuF14j+JAL7Wa/NL3miq+Xfyd9nH4ydEdZkdeLuiAwcb+3netJ\r\ncNQoGp8qd6tIc3LY+2zLnJ8AXZFLw/nNauk=\r\n=mVDt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e69be4936d1304c30ff7b83af8488b43c0ad5fef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c871fe61e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c871fe61e.0_1670399470170_0.6819329987811515","host":"s3://npm-registry-packages"}},"15.0.0-canary.9eaee7936.0":{"name":"@material/auto-init","version":"15.0.0-canary.9eaee7936.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9eaee7936.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0015712743228921fb5ca9f97e8d5bb4e13fd439","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9eaee7936.0.tgz","fileCount":13,"integrity":"sha512-Xy1FyDGQr9rc2CV5A9e2h/bAxSZx48obkPot5mgEviBWV3IxVbxRuM9K5vXuKPFoWtxNSLze4YseCO68xP1RKw==","signatures":[{"sig":"MEQCIFrP8U3h+f6Kcl9uXdsTWMDKJU3SEtoYpE/88H8StevgAiByqyHVH/hN/dMLDLlfvYtj3nWUkxb5sU/s496AlvzdRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkPE6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJRQ/+MReF9b8oEwndHZAQbnMRjKt2rod3CvOdKz2gj3f0hN6VC1vQ\r\n8+NHMD00g95YzS+1b0Kn7ZWsRy1J4aVndc9OY6t5kNZMHJ0VIWSAMsV4sy4M\r\nGveAk0Oy7aNZEhu3RSi067AFgMRYjtKne7/Cd/uquQWQ/JCtoMV3bQGyvnD7\r\n42qa2u9cWRzUeaJsrcobYtge1mMaH7QVew9tr29UMhjIIBOsqewNIu1vc2Sr\r\nn91CyVeF1s4XQWalaQlrG/VlINUmv514ktuCURTUcgo3BtcIIBgNK31hFrSL\r\nqVMQJoi5UcQlHWA3arCrVW636/26Dfw6dC7pomVqkcBnRDeBAwQ7xSk4RTK+\r\nobP450XDewBSfeAGeXyUnqO5JRSr8AYMkGuRQp1xhqxDLLIc3+d3ELQBS6aU\r\nQygBKaf5v1IigJ+4q2dU0IKv/uiSbTJx0jdSg41/pUjZPFPNxos87kpc0QoZ\r\neRf0BHhAr2ecj1jwAISgmP5P3WjYIgEkOeJL2vLz4lAaYsvZBz6uwatLKzFJ\r\n3cKLm5ppw1vwqOc9/08ZFbQe1hKHd4T24yZx7nNRitZ8C5xBveIdbKoRQRRl\r\nhA71viiK9ALDteOZSyN+ixTmMZjKq+3zhwvCU4n7M4RgZMa6+fs2by71bOJ1\r\nZdceREtRUyIXECMO4Iar4w+wU61OfEqPOzw=\r\n=LEL8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1b576e68a716d1a80dcdbde7a572c11ca937fef","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9eaee7936.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9eaee7936.0_1670443322166_0.22832055247614935","host":"s3://npm-registry-packages"}},"15.0.0-canary.1d37bf601.0":{"name":"@material/auto-init","version":"15.0.0-canary.1d37bf601.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1d37bf601.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d238540d56134ce1cbad2f0826cc027519a4c6e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1d37bf601.0.tgz","fileCount":13,"integrity":"sha512-h2jgol602xQjzQDNqef063K31/weeTmtLzZUITdIN2eslHvlKl6HkBA8TwRCA2BRcC1zXig4fZ37iMY+ecTUYg==","signatures":[{"sig":"MEUCIHArOAozaDmG89QRlm1QcFniHmqVHBma3+qBrKi3iuPnAiEA+PLlDyXb6zJyn67tGHS7LGJgYN0OMu5rLxKfAm+hp1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkPo8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmPRAAoM4+HhTTqQKQLyRLdQUGNcozhFYDvjJWh78Ol91433yfvQ4L\r\nQ6thwHnpAZYQBJkuthET1Aai6Yws5jOwto8CANkd/SN0UQ9eDcsYH6Gp6/if\r\nkIFV1oVy4LLzx3yA1/eY9QRiLGT6Tdk2OR1PDK5UpF++wA2T8t+30y4V+SLA\r\nY//fRyFd+0aY3n0AQnvWWn6L9s2Xj/u1QfzCXjRg0TQYUDxSoA352KFhMZa9\r\nlwb8ve4HvTox5htgHLdg7pKHZn6cGnYzVuc9BzToxfcOxihNLudLn+ADLpmx\r\n+isPenG814HuPRlT3cvBQEU/NAQOUHA8+MXUQdbHoYnZPwH8rliQfGKWnSFW\r\nK3NjegD4wd73mVcXP7kqvpSUTqUV/m234HeFzzE4nht/MO21Xu3V8bfX7ORU\r\nBB4qWscxrHPH0KUHi9E0EckZX6JvIXuy+dD3KTDWjQy1Rn9+IxNOIiyo1iJF\r\n5WHsdmPcOvkyp7fCGut21iwr/ZZv66P/3LGNfH5d1JM19xYTij75myIleLIo\r\nshmZkwGW3FFWiu9SdLso3BlXelEV5MUhANJDiNYKTlfrFltQUuZ0xIANEsU8\r\nfzlRE97Xo86zwxOOjDUbqSz9BMyllu1/vczaVQoJxqzIn8lvX6nkSDmXln5e\r\nEeLtURXYdzn3OM2EgwOa/tINzNihEJ1bWyE=\r\n=+Gp0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"747a03f19fc88f7a2358a382989e729013e06df4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1d37bf601.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1d37bf601.0_1670445628326_0.655468927256347","host":"s3://npm-registry-packages"}},"15.0.0-canary.a5fe069d5.0":{"name":"@material/auto-init","version":"15.0.0-canary.a5fe069d5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a5fe069d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d0e69549ae78f00d588194bffff6065c7e38cfa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a5fe069d5.0.tgz","fileCount":13,"integrity":"sha512-EXa8Gug2eUzAJXfsNDZikjme+MEbyluFziuFk4/PN7pUXBkSvPeHjLqkUmdreXYCHd+HndL7QO8EzMKsZZyNjg==","signatures":[{"sig":"MEUCICmt6FDdCLUWxDVXMiQ1S53izuXc8nEztBgslZTGusaEAiEA4+mvO6jurVyt3DV+Wrxt95onWfFC5GagqJ9NSRcDVgs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk4HEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkWBAApKcGE5om0eN+VRmnWov+s7rTashiMMjdn+EA1n8NLeWVbQhv\r\n0kzPEL19M3HPMgHGj253HAGjaHOk4AWNcH+g9rLK9qvNMjkHPh6YP+VePwRY\r\nuWp9endDv3WLce+w+YBh/mM6kIZiUsb2ktv/1xdGyxZIPpgA3LJApxieEds2\r\nrKBxKiHwvsGWqt/lEZtGqFD4VGR0CKzjhl0zAzNH8Fd5VIN+kQ2284ZmAEq6\r\nvN9HFIFxhVCh7BX/yIGVYaXfPm9TybjJvAZEAKaBkR9ZCDgd0Vs4bijOPEEg\r\nCI8w1cYLCld60fr0tQpfJmdnxtNKs+GmfVCXC+EMP+CFqLwuxF8c9BG/owP1\r\nnplOTA9dH9NASRJloOZ7AmQ86ltcP4lRDFPvx48uUkjt0WMI8ZnWeBD7YlJq\r\n27haqHkK4TXLNHJyykNTAnk+vOtKnlmKwELNPTa3ulb1Vk8JA1Pi02iW1Y8F\r\nvFFWs6XBDjFIqlebvyhO1DPTOmf/Tjufz/1bpPzyxHgANFSRYiRMofXD7UIZ\r\nCOpmhAG+RAgVam+2fYcVb+Ya2V8SaskHqMqJ6tjGhbeV9hGqXMy/SpaJru/O\r\nYllJQA/1u0fnVTNwwe6SyvTg2xGMCtAtwKQWeEnswq54f2KcywA0W0mxlvg+\r\nMthGg5ux4Eewfcp8E4KLHuYFMiZZj4EZe6c=\r\n=9keK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c41dbe93704a7d03ea10d8f1b4de13fb8c6e19ab","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a5fe069d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a5fe069d5.0_1670611395841_0.8948311692870536","host":"s3://npm-registry-packages"}},"15.0.0-canary.ce8b5326f.0":{"name":"@material/auto-init","version":"15.0.0-canary.ce8b5326f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ce8b5326f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"55aee364de468cd5f09325cc83a9f081b234b005","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ce8b5326f.0.tgz","fileCount":13,"integrity":"sha512-JQIxuchIEReVTVoeVnKMPmc8baFBM4MuO4UkIAuPVDfQ+7sQjya5xI1UEVvjQCTFMd58PsBUHqHYk9AGQWHlkg==","signatures":[{"sig":"MEUCIQDj0zQEjn5PqpONsaVuLDxdB1ED0mwIPypgsFMZQRqbHwIgFpew59rAUhZF6ER9iccMshmD6B6i2LDa9tf8zi2XmVE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk8T3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVyxAAiSuTpp4r8F8mg5lIIuiIoMdDDGAq1AyFFW6wK+jSJZKB3ny+\r\nmL/gwVdi/X75jeQ+cQaDwR0trXqlQSWfCeP924QAtL4gjUngvxlTpyjQsLiN\r\nlIdfb7BYEXcJUXzc0BHZJjFoNR1wVDqhGlbd1BN9nh150TmuwXj4XE28WAMH\r\n0+KJWCBCWlIFY/Lpy05rOugiMtANh15ZaoRnO1mqpwQEW8bh38/1gkFvNiJG\r\nVT07enORDQacV14wSM33CA5q8XUbA+ytO8WECudJlW1uk3wZf3TKhOqWDeJc\r\nkIMiNr5sd90L45AsJob4X7Y5gDp1UllvTJRm4OibYofN9IcmFDt4XOrzcFBn\r\nBYdEizNLmvu7g2RMi3fbn4xlT5vfEMdyfjWk5kfJeUNiD8pLV/9ko1SPMk/C\r\nyRBG/9A4gSPiDVS7RhkDZWOzXqfDCTAeOtZBMGFJpJiHkRIwd3uiJmcdKkKl\r\n28PnpI3ZFXsvs6g9CWyrv/LlMahZUTSXQqgNLCcamDYP4wUzYqC5uKYkcrTh\r\nd2zrGh6O6Fc95aYiJIf6G0dnUCBBrg2S7ORavARX+50+bCX7HNAXlzleLRuF\r\nlHsJNnFEXep1L3Z8mTGniUq3A0UfvqGKZTB2RNGDXeM/FbVHTq7JzyQ3RloD\r\ntuF5u9giZU8CyAeyQuN73HtvbEYAE2AVyoI=\r\n=LU0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8ff7f9974a16b8178376e943748356193d364587","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ce8b5326f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ce8b5326f.0_1670628599265_0.04313435917922259","host":"s3://npm-registry-packages"}},"15.0.0-canary.43f5323bc.0":{"name":"@material/auto-init","version":"15.0.0-canary.43f5323bc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.43f5323bc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9de5686e1ee78befeaa0d168401279bae4b1f5be","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.43f5323bc.0.tgz","fileCount":13,"integrity":"sha512-jhGtQfYt0Wkw6zYY7N32PDNXFtwW40IJy4TFvOdMs4hXzlEsdv7gdfaL4cVSJzRnnxmk94xAVC9sexM3f2SU0A==","signatures":[{"sig":"MEUCIA9rserT97bJBNvXStWDBEZnQvaouacYGBU4pHNqxf4RAiEAw87kYz77h2Hrq5ayhXFVVHDLFBI9kdTnbM+sL+nU/wA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl1qlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCTQ/8CStnJAi6f+8duC0D7smEoYP6SSpkrBHZmqWLQI8MiTE+qAf9\r\nV18GQX269QUWbyOo9bnYQBSX4P7TiZiT3oero/ZMGhHhizzN/BqNQ+o+saa1\r\n37n9KkjtzTHzLEIPD+D0kGU3onODxc2B2iZCIk1n4WcKsw1Da1nyQ7URjLKh\r\nQlnKROJEqsSpm8sZgD/y3fiaScc+APAbehIE5wIQD6jvUUPvprTMBTiiNoep\r\n2iysAt1CBOKDPycT/T8OoAkruPwyg/ID0VWgGdEyV+5/1NW4sGPbu6YsASBP\r\nCtULaTiX1SaWHVFbQZcD6t861FxIzTfi/uIcQJ+hz8IuYHJ6hnKs1CcjaZUJ\r\nbrJIVkfPbaNvTyZnAux0Wj6EP0rduK9phWuZ/E57JzNUtVnr68ZerAt4K840\r\nn5/Yh8yrwFFGdkBsx5WPByGsVbHEhqLGBV1gWODcAVKzJlf/C4FXv2TuQ0rS\r\nJmAtQjB2YM2vhSf8lP597v+FzznJZ52LzOAWeXTs985XcsQyiAzvb2D2V66u\r\npjIq86k0G3DFkgmwikGyCCHKapAUde+JnsB0OBwrl4z0nI/0bKYDvT6W8X5g\r\nwkcv2lLuWzjWEGc3It6/dcBdYqhqaFJt5uklvzZ2aOyxb8ZOkvYXagY6sLJT\r\nxHr/Nyroj8uqhzxVFi6EuXL3XrUnnYaM5zA=\r\n=b99b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00be798d56184d5daa74ad6f53d4992db90688bc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.43f5323bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.43f5323bc.0_1670863525257_0.6149446814670048","host":"s3://npm-registry-packages"}},"15.0.0-canary.5490e32e7.0":{"name":"@material/auto-init","version":"15.0.0-canary.5490e32e7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5490e32e7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f37c61713612c83d41a0026faa5e011bf464b58","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5490e32e7.0.tgz","fileCount":13,"integrity":"sha512-DvjyXBVKGwB+W8BMtHJcEcwXZl9bmndyMvlolQSkEC4kyxl+7ywYanik7QqROVxZN4DhdH9lHyr4aRsdD84aIw==","signatures":[{"sig":"MEYCIQClWT0PgJCOVO1gnkNFWRbzr36mmhH0pDj6VoaZH3LlzAIhAMTUYKWqgY/BAzW+En1G2mrnY4TEAQpvB/f0MzaLsMLG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl15eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Uw/6AouQMYSJQ4kxgr1Y2jwGqpUzTeYZIf0oDjI/HvzGzM+YqYkm\r\nujU/9EXC2r6Xee3oUH7affRGb8903+QFFEDY8zCz6rNSosBIAqDiPIigvcLP\r\nNqd94mdjlQgNgvoxj1ea5KTVdDtaX3gg9mEQZN8KpZrXAe9qXHrcnwap2M/H\r\nrtq2G4lv24BVT2Vd07aTrx5bYXyWmjMGfEr6QbI7yY8IH0FJ9/w/GCKUfp3L\r\nSxIR9ZhOsI3QGLu5rLZvcFUEF2DE6SvHf6fiPABTbT8B+2BSO/5OhMVnipNw\r\nBz7DZhM6SyLhpydL649racC0rGDC7wb8AaLTTTozhy6VkvLiPsm8Cv2vb1gQ\r\n/ChVYhFMM5tuEEZC7dCaUcq9+7bvPQTkkoZk3DwdCirwKujDy6YHACOZT7qb\r\nBRv2LtyN0j5xaDoQ2apJhScbcNgk6dirMX7ADA2g2W4ugqyKmeem0hgpdmFL\r\n2YRFjOyiwF0hGUVLNvbLRS7Qo7XgMKJEBagdVOzbl6uWG4iaT4z8YTJUya1+\r\nKsEwmxnoZ+SBD1vIahho1LIUln6TfMEaNJvP7ponT7UEfPex97fUNeu9xN64\r\nedduwnfHAxHcKOJCKhoTDXSp7CAw51lmfqYSqdZxQ5ldIUHk2DEk6UmRFOb6\r\njFoz8J1ndj8OUEari+CGquV3j2mWuKftNmU=\r\n=uJiw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"968b84204c7a8626355569e2b90063abd574f7a8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5490e32e7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5490e32e7.0_1670864478153_0.8092995862994301","host":"s3://npm-registry-packages"}},"15.0.0-canary.817002c29.0":{"name":"@material/auto-init","version":"15.0.0-canary.817002c29.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.817002c29.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"52a9308e5c529c940c98a29a015c637a6641c61f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.817002c29.0.tgz","fileCount":13,"integrity":"sha512-CkXiMmjStz3bfaw4gazRWCD2e0VRz2A4Cvcw6uMBD5bCDaF+zUz0CpJMon1QLgaJgUKqD9JHWkQUjxLl0B8YjA==","signatures":[{"sig":"MEQCIGdubcOBrIQt1Q88ODC2zKejTMWormvPqMSHImu/DJNBAiB3fqvu7NrAeu6JXAPP1YeNWQFGqpTf25KWfjLeQ/nIwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmPRGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqqeg/8DQR5QPm2VBWlZzZCQSlQ3XowAHcmFysLucncR5wD5eZRD2Ss\r\nvle0SAILiW2N4ljtiZKmnrAOrhrYjCninWe1ejyxwX4ykhtPfr/zhRaeTi23\r\nZmJAt4McyBHOjUuH3BCDGkQmHqcgmQpXbIL5tubPsV4Ta60OX/s6F5UcCEtF\r\n827VXtLqBjSScVJUfESfpsdgA9vF/jqCkKuekH7sSysU9glZ4WQu1DMgVuMu\r\niaPCQdZsXMzLWusDMWYU3UzL8X4YQYMfM9Uu/voJJLdGJOH+dN3dN88P0vwb\r\n33Rb2YeTbYZsf4J+5vLC4gZYaw737afzYoNSc2d8FaMdXAQ6V5bXXu+CSyLK\r\nHE4lko1Vxn7id6LSUHSjTaBND4EviKZx+whUJV/zmDSj68ytohCPoBB9Mt7O\r\nr4TawMNX2pi0eRd+Y833ZuiJd2ARlzS5kWKZMM8T0HVQOvoM4yXypTk5w33i\r\nTw1rOoEywkQivhGobM8r/6Z6KoYjw0DGybhJ9V4jJwkWLl6rJhVbfAfl8dNW\r\nU0lJmKPv35y/epq8m6X4YfBoAGuozzukg+2lFzRSTTV23KuYhrLKMhXzQUyH\r\nmRV/G0gOWWD7vXf2DbaGN6HXyTEjy2Be9JTppiaui39JCd1YCa0mfZMFsxDn\r\nFfGMh/FKINN8aoa7QnI9+i5zkywEwBKHhXw=\r\n=snLa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8a85122d0f4bac7142c66fa54e2fe9a569e7c4a3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.817002c29.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.817002c29.0_1670968390380_0.9172688654329924","host":"s3://npm-registry-packages"}},"15.0.0-canary.313a1326a.0":{"name":"@material/auto-init","version":"15.0.0-canary.313a1326a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.313a1326a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4bd08275dc2a2de37204576e2afa4e68023db859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.313a1326a.0.tgz","fileCount":13,"integrity":"sha512-jzAYPBJ8y4cEPP3R05yGGq44b92UuN1gjEu9lB8Pn+a/4i6ZF7IqSClYReIkklGazfTSB+JbAQI/kCG1lkBekQ==","signatures":[{"sig":"MEUCIAJfhrLrMFqlv+OGDPMnCv53/rYOrIAcDhK0i+QzDpozAiEA0k0NYso6I8eTp/smt/MS02Y4lJL1DHVhB5wRUdAfukg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmaUnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRWg//RBcBQ5/B0axylpLRPhR8vFanTXEiW4tiMyQ6BlimMrwd3jZs\r\n67RlzSp0UJ8McgCVOKZ9pQ9+tZVGCpWoOr0HkRMDCbXJ8f12gZporccJZAum\r\nbKbRCLlzklQNQ52SsaAHtOD+0Mlj7ZulaLSUAA6zmrB/Zsju4F+Gco9Z/pW8\r\nYZ/Ug+m8HSklZU9JHlJ2oCDa3fMMPTzjkjETn9CsWWDYIEm0rXV9Hx0tnvQ0\r\nOKWYwKDSZE/6Sfp9/na0lGcbkThuMH8hyvcCtYcUjkQ0TM7FAImPUPCLodQw\r\noxu/4ghVnDlG7xKRNpbduyzCNoZLmQtDttFT+oaqCEoE93lk47tBNElovT5M\r\nzkV/IInua05DTw7O54MYzuBEGsSpYyjKebrnt3nSOi8T34P7OsNvuGknOi/9\r\nHKmOqimRQ79BW+BA7mWqVoVVrMh1RLJdDVgvCOfAN9BisYgEtHtS289tc5Wl\r\nJt8CMNd01gXEt80Wh9+5clKvFFvA/MNemuV+AXICPJGbnfMar/8GCjempDKW\r\nhqZwv1y8LD1IhvgIe0Nhspcrtgqe9cZYXbe4mfNwqJ1qY06cOcMljkO9V0r7\r\ni/E7DPQzYW0RJ1eEMtFXqmdgJHtWrKYo/WcgKd9L6nWZOPficyZ2M1ZEPZJX\r\nerVE3vS4cM61wYMKZiq53MWCOGgJmUOH6z4=\r\n=sstM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"899522d523dc8a23968f530bb4de8698a5b0e78a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.313a1326a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.313a1326a.0_1671013671223_0.5220031676315116","host":"s3://npm-registry-packages"}},"15.0.0-canary.a69c14e10.0":{"name":"@material/auto-init","version":"15.0.0-canary.a69c14e10.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a69c14e10.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d21b299fe2b027886ffad774a71ff39be6160a01","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a69c14e10.0.tgz","fileCount":13,"integrity":"sha512-Lvr7qrqz+W/S2vW5wpUykuhT5r4EBM6LRzjyKT13VZyBniMQzGRbt2oAbBJBIqnUq4xUgsAbLkN6OC8bvuNHHw==","signatures":[{"sig":"MEUCIByfeJzkM8WkgzXGFRattU8Rtoa6c+WU279612Ga4QjyAiEA3/wRgn+sYl5BB1ltOeiYak30ss97ZGUaKsO3SC1nEXg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmbDrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOfw/+Pq5a8cCQv7wXiil3tpvB1VuDpJWaC5IumeAEx61YHSoAjGgi\r\nMkp3qJZ6Rw+PD/2VSLL6E099bSkObsmckSo6pRhZ10VkzoDDhCsmzIBkGNHN\r\nrajBhnXiUQTczq7dZd8mA3XsNnT8RtbkMQVxRcA1zIe2CPuCe/rOOKcIBOQx\r\nws742yrTcRRyD6W6+yknK6y6FeDpGcJr5tvLLa8FexwD5guddQAZz6Po8SuL\r\nk78kWZvjKLy4UjcAIsq8MEW/3w1I0xEqwGKjrbd2jAE9wFkeBjDK1Pfr3k93\r\nGicrqZ22lod8ytDk7n3iDq1e0DShZPIuC63KKF8ftwzHrAnMdccsr+SjaRrV\r\nnr8qktoEEA5ZBeVgxNxQdy9u2msoV8CfKO6rYuHL2ntzGCKF8xPj4x07bEiq\r\ngCx4nk4sASe7ffXrdjZ3gW1MEXV40tN4/AXrWfA4UrgpxhBkxbMN5dy63FeV\r\n1j2+RM6x73hQsGXAEFBpUjCH4wzwS6w7Gx2SdS3SU/6pJwDf4zALMK/YyaOb\r\nr+QlvCbUAK+Du05WbSxQRGunFF8wCoFsq4gq5Ot98+dR/MYLdpg/iooMzsbS\r\n1dFZHVYwRk0At5AzEqFnCc3g5EMON1oq+ESnwRH0RUHr76ru+fII1OviW8BN\r\n/ngElZYYBmhlt38XAt1Hhn7jtV3l/8F1AMg=\r\n=xYO/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"39b456415cb22d1c1b4de3d505f0e2412c1f5316","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a69c14e10.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a69c14e10.0_1671016683402_0.5199448130406867","host":"s3://npm-registry-packages"}},"15.0.0-canary.f43e0ceb5.0":{"name":"@material/auto-init","version":"15.0.0-canary.f43e0ceb5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f43e0ceb5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"85a6591708c22646a8c506a0a576512814f166b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f43e0ceb5.0.tgz","fileCount":13,"integrity":"sha512-mZ4BsX18mKeYi/KxLVi67Qfgzn/fjQ+IpwFcn+GS2qXUX2wxOT8RiVuPZxKimij7CuOZqij1NRHVPPBqfTpCYQ==","signatures":[{"sig":"MEYCIQDNLP/fWdEyguStjCZ8VUqkG7j/7qXVIIKW13HyoD2u/gIhAOY9njmc10hQdc0enPqRxLrEAzhw2lwloQUOiKsfEGxb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmf1NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIqQ/9GZ72l7m1yBeWwvKvMm9ydbffrTiWZw4himZhwBke5LBRHjCa\r\nz5vcRTr0oVKFouY9nlgttAb9qGRB1drQNT0kAEBIDvEwkzo94wuiN0UkSRe6\r\nGHUkfHP2i4GLq5xfkZu9qb7Siu00rvteflpM1lkJ49v0cFv197HUxn4meffM\r\nCqfMXsAHNzR3PQSM9+Nicjhlm9q2cTtHK74iGARD0KV9BicRzHow3kDNHCOC\r\nD2xQ/faLv5dDjlNzR9GDsg9owdKR+lakfT1oGNdXM5yn5ZIHr+NYwNNSmnEp\r\nzmmWv5mTSYRKLN8kZP1ttW0U6PUF9Yp8whLLpKNSZ0nJo53tRAujf5UCgG0y\r\nDKxeugUsGyJCNLlOkPUKxGK1mmV1OuuuyS2g39G3GQ069+HZmXZlLTrET/ku\r\nCl+P1SC9Jv+26MIOTFbozw4fGQdDVvT7CUFWXA/P2iVqCUDvah2F4O7KMnGa\r\nijwez2GNjPvPEb/rIiFiCeAbxn3tWAx6cDnVZJgTNf9zFBM/Xgo1vgja8KUm\r\nyv7OJuhoN+nemif8bat4iRozSZGgCMfRrEUVXmqp4x0xjxJnkUZvrilWEnsE\r\nzJ7/79nPhEJQ18Znhtaxhxh6PCjeTNKfn20U5d9Esp7QR5y74ZuC3lm6SQg7\r\nwPMDWBDhtI2yR02ZJgUGpykeLG3g6hX4gBw=\r\n=RwF2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"35662ba23c37e102fa09f72d61e38e5ce3b10881","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f43e0ceb5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f43e0ceb5.0_1671036236887_0.20478400664701701","host":"s3://npm-registry-packages"}},"15.0.0-canary.34767110.0":{"name":"@material/auto-init","version":"15.0.0-canary.34767110.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.34767110.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9524ea339f36b1386a18c1ece0a942f1e9d069c0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.34767110.0.tgz","fileCount":13,"integrity":"sha512-oGqUGj1zLNzre8o0EplxdJhtgvwAzY/LeHMhogmth8qbnoJxFV4NOuOYm692mfAevMTIT6/cR6MMusALE5p1Rw==","signatures":[{"sig":"MEUCIDVZoKkd3kz8H41UmPPBhSwzGtVUQCESVYQsXqP/mVHkAiEA00qfhfoomKS2HTlkKVBBnR+7ZMZKfLz8NUxh6MibfCo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmgWaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrosg/+O8fjBN6duol5LNtgRa2kVOqk33O5riE0NzEP5xRzN6HEXmoM\r\nWcWprJI0XFDE2MEyyb4O3lTOn/MBGYL+rmDmDhJvtmlDE3twfksRLJPRmeFe\r\nYXhyflgerK0Q2PW8XEHFymWwRlVMCkjETPQLDvJu+7n33yRDy9IitNnWP5UA\r\n0EVm2510OJK5VKGfpZA8K9IId5CJ446l+aOu1OEqQ4VeNX4SAagxe5s6BsJa\r\nuo4WMZbnGK2PLiUSk1Pr1eZXdyKHu5x4dmf0GrGHEyaPFUZ8LpD2f6iXHlOw\r\nwHuUtdy7AxgDVLRvrzQQMs13PtxHl2Ice20gid05GhaApumvSPhi4ddPa6fi\r\ncsHJoLC/KfM+Oe4TYiLBZnP0Pe42eVov5OiUMFulZzBo9gkHR/+0eSBJx9sd\r\nACjBeiC58kR7OedxlfsnamynmqOiCcxW55ms0xiWJfe0Yfj/y/xTe8faPG1y\r\nMF/ka+HnK+r67AvzC2w1NFJ+fnSHzgid3o3k/eKwPPtej1KB6Q/pMzm6S1b7\r\nVAowCHWnQzwnQvfXVA0isOLBU+UnWAwwLzcR8/XLLfv/wTgcTWm5/ZYPbcRJ\r\nDj6FYG6X1mPcozENLZ3KPNSQJeqDhxDPFmhsIClCGGFnswEHYUr/N8MukC0i\r\nUh745sA+HcIjXgBF+kiquyUu7sDT0aybkL0=\r\n=cUfv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed8adbbccdff96503e43dbe6291e95b5d2bca2c8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.034767110.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.34767110.0_1671038362589_0.07953394366410604","host":"s3://npm-registry-packages"}},"15.0.0-canary.1f99f3c50.0":{"name":"@material/auto-init","version":"15.0.0-canary.1f99f3c50.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1f99f3c50.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c7f77209a0e88229454a2e9ddc3426f57c6d654b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1f99f3c50.0.tgz","fileCount":13,"integrity":"sha512-01gz/gNWZdE0YqToBwckstyXGkx35Ryc7OFCIB5/JPJcylLgathpCgfgZQNYAq+D0zGVUSWZRB6EbmEAXvFyww==","signatures":[{"sig":"MEQCIAQpbCA7iRCv/NFlmZq2gESDddBlGkMu2k4hqHUQPtSDAiA3xFTZJls37q27qYzbsnfMRzYiojkHcjtOAhgwSfce3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmy4nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5lhAAmoK86J6AiSshNgIB46yn7LnQG3STpClBVyF9ScN7fSyV9S/F\r\n2CVRyxcjWeMYKXa3d2VjtRt7jiMcmSUcloqm/H/nOwWlpEBaFcTsZbqSadDD\r\ndEXWqnDSlQfDbeCkjyHskrK4sYNSTeU+C2fKL7rpv1DTIjBuqdTEc42/GOLS\r\nZmN72zOOMK2KvVS2zaNlo8PMJ0MWvgB0Eioch/A8Y6fls4fLtRt6N1ZRvzbd\r\nxBi1Di1ZBte8k282t297az1KGQ8i/VUkGBmowl8t+uncPlXxF3Qznr9gSczl\r\n+pun2SYHD9PpHyq3IOsqTQ7ueW1WyqZVk4ECFy3/LEu0KtpsGWm4JJ7xkJP3\r\n3UlPYS4qcJFlfFZbFh7lnnoAYvzack5c98EF8Q/kGSusJVANJ588YdQW4GOk\r\nNcCgqB9iz53+5pTnNRQvN3YPehb8IaJ0U0flbJlTX5Pyj4TNEQjARs68I0d9\r\ncb6+6OgOGx9aKSnFLEF7sfr/LvaB2131hvu4CPSHqpaXZ4CJIsLGegYeLPVi\r\nCNAu/jZspHsTlo17oNCN3aBp8YHdsqIobUIgT7UFBbHZJcwwJBKgWt5S6qV0\r\nxMKynAPfKdaIaM2i6hkju7hWVxu2nGY68sSGZ3CvyQz2k00Wi3KRMxzDHvai\r\nMNEKnSntL0yKN7nEhikXnF6SIMZ7GPDnELs=\r\n=9hvI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9094e8faca1eaab158d26f7ca8ee4b42fb54bdb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1f99f3c50.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1f99f3c50.0_1671114279554_0.18122678920338053","host":"s3://npm-registry-packages"}},"15.0.0-canary.cfd69490f.0":{"name":"@material/auto-init","version":"15.0.0-canary.cfd69490f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cfd69490f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7b396f1fac220ac6d0dc7c03ddd10bffa3b4dc37","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cfd69490f.0.tgz","fileCount":13,"integrity":"sha512-JnMyLu2mwp7+2R78kpnIOLjoNQm0G1nYg+eB7PIZ1NCK8Rqo0i1dLeWYiQTF7fxvzEQvK+xcKHgJr2utofJ/JQ==","signatures":[{"sig":"MEUCIEyQ/r7OUCfAB8o3eKO9qnvXBpqdqgCvE3MDCvSJzqfOAiEA9SZJHavMDvdZ60Xhl1rPZxMuxET4d3i0E8Lh5hyFtGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnNALACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzXg/+KG/1qPVkxmhg6o+EVEB2yABg68JTFmPmqeySDBVbBdfrs8MW\r\nNacEMXR8i2DWul3MCxpnyT32VvfjuewGedxPOe3Kh9wGyapmvnDZEs5tOoPD\r\nkdQ0f2xdWxp9H6dOyN9iDSNPT7kNe1Boyy5lNr3kdxgWWMzNSN40kDtKRNB9\r\n72N+wIpjN/W+/BW/HQxCRhacqaz/Iay8pGpdfFtELyquKJo+Eq5GE+SJbmsx\r\nisigTyQ5DpMd1eHDLh6AskitqntJVD0ayyhloTGSGJJibWWQ9ZXnGAk0IoQi\r\nSUx5sHjhnWnWgc5ov6y5UxlUJyAmdCTN5oA7p6nQGd20SUFyqWbl2kXh1nvH\r\nda9zjf9HIJVTKHxnjR1cY8rpJHb91QNA4zK0kLI6eapySMQiJPS5TKIOMRtx\r\nYVkbRpx2xUC+g50fUbSmP7xwagGOD4JyPOfyTuStylxMkIUSLtcZWi5oL/19\r\nZbdE5EZs+X/d676gXb5+kRFUkNed7Fih6E3/zI5J42lO4ELY3WYIdIduJCxC\r\n08ZMowkxX0Zrs5JpMNFLhMz9a1l9VkwPbTlNayLcY1geALp2j+7A868FpT32\r\nXDyt2xyU02iOzWvyaafqVFy4lkZsJAQ3fbnQUOORaFNMqPgXKuTk1Rx0ettK\r\nOCWB4Wfap5raqBZ5+E7RUvpouLHMJemyX94=\r\n=hufK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a7b9218e1ea7572b08b54629159e6f3a98970096","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cfd69490f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cfd69490f.0_1671221259241_0.1339080108442665","host":"s3://npm-registry-packages"}},"15.0.0-canary.94ad8d986.0":{"name":"@material/auto-init","version":"15.0.0-canary.94ad8d986.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.94ad8d986.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"02b33b2888b6dca6dff93ad51ba2a69a5695be25","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.94ad8d986.0.tgz","fileCount":13,"integrity":"sha512-2tI5jpDWVZJV9j4r6aLZZs/v7prLI9/b71vuSN1AeJ5t7xvr/fokQJivp69t7q4sbbGqP8tj5CHHJHjjt5RFeA==","signatures":[{"sig":"MEYCIQC5oqbqu8iyUjjmc7limRxZuo5ufHbL3msJuZ51AsTbnAIhAPe0Em411tdgkxZ5ZFb6mXZ9kdgdgJAWuLogaUnouu6o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoLrSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRxw//UcBOwUaZjYDOqlEohOheNDgQVKVWW9jsFoqqIqPZoHjYLgOh\r\n5DXz4N04OSF7DidIR0FTRJeJMeoU0QKjL69hay5urp1plz+JcnbbQ3ngoce2\r\nhpNYhyhwl1rihFYxA7LZ6q1pt2fW1q14EDxgDxRTqHH11B498dAkOEtR5yqU\r\n04SZyQRVSAUnKbTd5pHqbBoe7qCiAM4cnFt5Qei81p+3trHmvFMNTLzabLyI\r\ngqj1qczdVh0ya/gP7meh8We29/1p2rtrd4ZtmIubVKkGmh6edI2Ul+oDKfH7\r\nNzEFtXdHc7r5aronkDEvwmy6Xvak0JNhln9uS3YldyuoE/gwVduOlksMwvfN\r\nqlL19eqY6QFQL9ObhnfSoL5c/Acx/CGSyvQT/gE8fEa3Y7AT1bIESTK0ij9s\r\nTjMZAewgF5lnGgNODaspsqP2uTpAqVtTSLhuIt5Rw1DcR4mR5yP/nZVuKtuG\r\n1lt1s1U3c/iYIUgDC9nSWhOlUAmM20rxVN7+iY+q41+nRzQSulPFLmPEPn/M\r\nAiSzZOWW2XbB983lY0Um6WVoCASWLMbXlG2pdoI0fi5dq5SAlY6vf26GcPGk\r\nGmVZx2CK71WJtrWHsPcdZiZ6QPUdQEpa9/qtTmdZiGP4CF8Cf9cKZpmk9/xr\r\nJ46D0HAL5FIyfjlhgcVEQcvltjdkdefO/4M=\r\n=vvBp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e8a69afb313ffa8badca57ca15ad4a464b9f718","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.94ad8d986.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.94ad8d986.0_1671477970255_0.39142876227006695","host":"s3://npm-registry-packages"}},"15.0.0-canary.604264203.0":{"name":"@material/auto-init","version":"15.0.0-canary.604264203.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.604264203.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e86857b9e625c5da0a3c2d0dab20fd4e67e68ec1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.604264203.0.tgz","fileCount":13,"integrity":"sha512-s9JxHccKpn0FFyAy/Jfb31ISNdQeilsQooP8Kyaw12DlpQQkYB9IKtPtkyJLjrD3EEKxCRS3jQmGjIUcgx2MTA==","signatures":[{"sig":"MEYCIQDhChCN7zy9UAzgAzsqS0Xx1EVLzRUt7leFP5B819K8SAIhAKSahk2JkkozzCCW6bUiS/iuIZHTUX44govFeXqd/eUx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjo30vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqxxg//WNU67JGdm6Nir+sESaNwc0X7KT/0DfNCtEQjH4pkkht0lUdG\r\nR/RIDHeezE+/g0NKQgJSQDjWriw1L/4oT7TGMfdmJ1EQydNUYMqbDQ9twE2B\r\nbUZDKr+d3k0dqGL9sZhfHS8LmpNBEj3uZ7YkO5n7vcZCbPMuGynck6TPhN6d\r\nK2BxYULo9/dzI78LKu30LnY1+XmGwj/c6qhycKvObESRgILSFjZ4C3wU7hU6\r\nW9R0oLZ7Crzhj+aPpfN/PnSLwSwlfju4CGsuGNX876cAduiriZaXox/4b22j\r\nxip0q3GaQWnNuArifozLbUjku1KASmuOO1FxifbJN+2j2dzmuvDzpAw3sPnx\r\nDiBYJdPYwcKD+b9v05cU8FBiNfVX2WjF1qlO0kAqr+p6NC77tDc1+sFRGGNc\r\nlgMUo5pL18TIjDuq4ZjPuNv+I0Peh9nkCSoNZgDMc62fMoWRwHxzzfaZdaHp\r\nqbYNi6HHPCJt47IOoB+6awOY1WPeu1gJCbzuvrvlJalPx/uu0yUXJQRTNhur\r\nAEiCOxd9SWPsXZ6kIOjOf/3+utRmYaVJGklj3Ifh/4hCLL6EPS2Vngvz8HV1\r\n/GypWpyI0DD2OXmN8H2kLU8h0aifTPhK8t9mKIk93UukQS2ePoR7TbZYqHS6\r\nXCHKBwpbL/DMmeA2sjDKsUv004zfWj7Yr0I=\r\n=IRxc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e37bb80002397246ad3ebd1bf11a465b2eb763e8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.604264203.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.604264203.0_1671658798929_0.4463916029967945","host":"s3://npm-registry-packages"}},"15.0.0-canary.85bcff6af.0":{"name":"@material/auto-init","version":"15.0.0-canary.85bcff6af.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.85bcff6af.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dedcaab1f952d58f2e389f879c5078a8a6af98d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.85bcff6af.0.tgz","fileCount":13,"integrity":"sha512-5MR3kFssuvckJIm6Petnf7ru3oZBR+wQZJ0nvQXnnYHTsvajaWlipbQx4tMP2EvTqItrBlGe59Qhq2NDxU224A==","signatures":[{"sig":"MEUCIQCy9p+kmadMdkT2quILkYM7JJYm8wf5eEgBq+fODvZXRQIgEdj3fZJUY4GwLZdgEqj5WiLpoErd9HBx4dr7n1QzGLY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpDBRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYcQ//YSVgycnBmspOz82fiMIeIepxHnZTclffzjkUwpe/+1LCw16Y\r\nPTOsT0oF1AlKzX2XnwOKgBNVtugeB383WaLBQpjS4h9LnaBK9hzYyqx7YZKj\r\n9ekqzdruSAkEiNObIikxFp/HGnbbZMfanA3i47mh7C7o+xgilrHlAL9uJxSr\r\nj8Y5HthgMt5gPSt7XjPIye97RhDggQOgwbC1Noev/9EqPdlDuk8R0coNz2qN\r\n3yGj/AjP0MmJQK6fYnThE7DrYABzroDYXCob1B16LHxOoU9R7311BBc/ZcjB\r\nXJlf3ptxCgixBbrY7ZTTeCA6bVDvU5OxOkKMuGg74Js5aiz2BchMqSINv2xT\r\nSrO5HIrWbNjTj0RNv20Ecpqx12ERk1E5bl/1PKUE7D0BMFASf7KzDdJi1VkG\r\nY/wquJva7DqrZwZU29NLf9d97ZV8hnu1O79A15+DC8/7ACbX35/w3O59QjR4\r\nib9iJRva85mUDOYBcCb35f/H+Cg5jDmljZaLIjUvM+6L1h5SdYuBN/fulZZ/\r\nHHBPO+AE+Ae7xqVh4pJtKP6ZQVo7/+5w+zvqO+sJWLQz9LY8ifcJPr7tsGP7\r\nMCtAGnHdQn+lX6HNyOYb1D5KmDJ1v0sZX9GULFgdJObbrmESwUueb88/sHCH\r\nTOaJmmIJtJDK4aHABU+2h3zi+uY/uRMIPlA=\r\n=NZ8F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ccd1f76fc7f93266cd894275969c05a833a002b0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.85bcff6af.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.85bcff6af.0_1671704657745_0.9376246575167346","host":"s3://npm-registry-packages"}},"15.0.0-canary.ece3e8d21.0":{"name":"@material/auto-init","version":"15.0.0-canary.ece3e8d21.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ece3e8d21.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ee0e5670eacf0debe874fe738a57f36041f7211e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ece3e8d21.0.tgz","fileCount":13,"integrity":"sha512-+u+Q/3H/DmAJAWwCVBdLNcBU/EgTuPWR8iy++of5THnOCCY3K86iVThl+MrRYenCUEilKrrjmpPsrqKX0Z958w==","signatures":[{"sig":"MEUCIQDZzXt5Q6wyzDReBYmaqSNkaf2lNxs1WiFCJTAgEfFmdgIgEHUNH0Tb+YYfqCYDdAk2bTgqgMoOSJmSJxlD86uV+ZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpI+8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLsA//eUyv0ENRWYOfeGPPz0o8mEjoIE3Nt3FTrWGWMIpO3jTr/Sid\r\nyw1v5lQJUa+Ox2lORbueP2Amhflvy2NeelVWugEtI2AMZP26rzTBzqt7qAr/\r\nYim4DLDnOeQPz6ZOahpj87nDjINeEEYbwZpt6mWiKE9ckwuXdMPmQcqmREo7\r\nYdosVJ7KvhmZ50Zc0nmsVz9ImgnFM1rqhycdiqqfRBzsnAxRU0Oip7eQyh64\r\nlVOmsvDSC/C9Vigx1NK/mweItW641DRU2tGHhVH0b4H3C5n+qpGAm8kudLvj\r\nncW6xLrrSxHa7iKiY1iJjSkZG1znik+z2DjwGYXcOLfqXwPJ9nMzmiFfgZC/\r\nn28X6W6V9e4GKJCc7cF1dL19Drsu54hbyUlspE8l3+lTayWrZQvY/cUlKZNV\r\n6GduB2TH7nFWq3R2hrCemxaKv3gVbHo1Tz1qmIusGUpD7O2y6D7rL1yInjEN\r\nFy6vG5K8QhmC5xmWEgU5merh/I9Rw/ss1QJitJ67W/e5lzNMgWTcXexBJm/9\r\nnmg0XgbUwuijAAbaZYYVATWu4rfdRBSzrd5zxTQ8DUYRpl2RUDwdv0z5+X0G\r\nRxldxeUezLDKl4sd4Ikuda/kqZw+QTAflDpk677Umgld+rA036UBORCYoGgc\r\n6NSDmDANIQV9i6G4BIyyWITlnIEo5TzNHHU=\r\n=QQs8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a4efd7042befb584384fcbb35f1ca445adaf1d4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ece3e8d21.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ece3e8d21.0_1671729084709_0.1589396367689382","host":"s3://npm-registry-packages"}},"15.0.0-canary.278ad53d1.0":{"name":"@material/auto-init","version":"15.0.0-canary.278ad53d1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.278ad53d1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"844f1d08cd1de1de6ce6d02f17c4c27418cf293c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.278ad53d1.0.tgz","fileCount":13,"integrity":"sha512-0ExopRtfAnpaRx1Xg5VoU55ztWv1gMMtq+r3C8zkkr5g1AppF6OPuJJknOhE6vlqTFamJrykJPf6GyJRhrGLXg==","signatures":[{"sig":"MEUCIGQIXi2UPK9raudIuBLz78g0qNE/4b+FZeNXiKSF7qh/AiEAx5gXY2dyHslDdc8xLkLCSqRS0YiviPHvTVl6xAt14os=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjqyWIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMlg/+KuronKTbtkV4Dr9JIMK+nBjHtlp97lpdLU27EkDzzMXwMxMy\r\nds5KnDz0E6GFR/HsCgYFve59/BFRfdpvu4E63Zd2Y8pSBQm2GCumpjt7CcHR\r\nYW95dqKKDfHElytcD42PAhCOMD25O8nvVvNRLG9860BWWWMFtYdurLyyrJ80\r\nwxBjSIN5a8/hVYgTqJbNmrE4xIzl7N3UXgfToGlR4eLhWi9PsvB24O4BVJLf\r\nH9VypwDMhxWIWnumSfA5vVJjTDKrWK1+uGamyaBhPJRSzFdjlT9T4YOXGjdV\r\noa5rxmKsZLOWyF3bzcQM+yU0LA2X/xRB1F+DQOJ5T+v0nOD4dpRCq4xptOGD\r\nV0R1pALXpl3NQty2rGb9m1C50W4G0XspUiIySHuyT5uwiivT7krcXxQxif6y\r\n0o2h9nhJs8RiA6+XL/lkEC4KK6wvrBJkfibg/qdQ/CaHTq1je7YNaeeJq0Kg\r\nYTYf5j503MimArlXYS+QbXUX9Fe+1ssIZ0TCiQsxPZWL0oUVf8obUQUP96ly\r\nB2s/4cmxPcPg12lJc/ZfEyzXcIuApHQTAT4xmGtE24ZEPpeXftBQrDVDU0Or\r\npBOr6e7tFMNBoF/IFSLfQxgX2il+bN1HwtHUPNqWCtOol6XNczqBYVTy9/W0\r\nT6Q6vY4S7iS+K4MJaUBwHmoJ991F3eYdjGc=\r\n=wu5q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"967cf83d2b9fa8a3e6bd992aa107c66182e0c65b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.278ad53d1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.278ad53d1.0_1672160648328_0.5484813405829967","host":"s3://npm-registry-packages"}},"15.0.0-canary.a7d8389e1.0":{"name":"@material/auto-init","version":"15.0.0-canary.a7d8389e1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a7d8389e1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8ad0a859f801614d12cb6c473da45176be6fc384","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a7d8389e1.0.tgz","fileCount":13,"integrity":"sha512-XCSLwN7F4o1qAMG8NfrACSsgjsaa+njYI8qP1j4qIx8u35zbDn8Gg2WlvR612AqhmbIDlDN8JCwp+OMv19oTsg==","signatures":[{"sig":"MEUCIEeRvitzgK0A4LBKZ1W0k5XzsK42ovRQtFJ256bhAMEgAiEAue2kCptC52P9IksdDbKPSwyTT50ea+BubjXxiReVK2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq0FdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+LRAAjqQNeHy6vvaVAEgODIC9AnOs302+Xrz5COWuIl/NqQe8NMu+\r\nMy9FPoVP7MSA37ASMC0LIYujfkkGITZfWyw/CeggjbaOD6hh2+IxystXyCo0\r\nxQjMAVlQ/ir+F9BnNfaZ10Gb4iAD+92wytJcWMh5W4X8TyOYTWAHOREmonRF\r\nPHMYsOoTjwR8WUi6WKES7yMVPMvGSbAk0AK4sx9PNy7YttP3ldB855/iTL0M\r\nr8bjEhHgznkKP/EWFVsb03s4E4kzt9DGBKr9CO02cKkDD2bcmDdP5EGlLQi4\r\np+vzpfV8VuMc20jvaOkNbuLUDdzMUDx+l6MicaY+Az1X8721dlGZxDyk7ljW\r\nWT5OrpHAaWDxzejOfT9HZU9LjcrG985Mc4XUp74H/RSsVJPKKZQGgG7N5rCK\r\nI2bq+N3bxcu1kv3ypUKZ9a2uKB8mwRJyWWKSk1sq9Vmn4bO/rEjxNCmXKL3J\r\niP+BazhzK8VupO/OGVdfS/J/sCxsBWCyGyeuK6BpXcCoXEohaVIDf/KVylcC\r\no8TrNRYhpM4lLPMKI54zjXphPsOYKYB/j4MieunCwinR1FOi0WV0u5MW/2UR\r\nCLoEAPkPJWdh9P0TRdEbPFEPZd33t+IqWqzef1TfYVJbUuasFtUWMKDsCVz0\r\nei2DHfXbcPzSV2Z2tvIWUgMqVWeaML0S7Mc=\r\n=pO3S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9b27084bc44ecd4530cd2252389b0dd8116709e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a7d8389e1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a7d8389e1.0_1672167772906_0.3933606152131639","host":"s3://npm-registry-packages"}},"15.0.0-canary.8175d5eff.0":{"name":"@material/auto-init","version":"15.0.0-canary.8175d5eff.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8175d5eff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"172dfe3719625b81702b7fa917a89086920e9e1c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8175d5eff.0.tgz","fileCount":13,"integrity":"sha512-FlnmGOYAzGqpnZmvjzcwpLgAABUJnhvrgkAMFd8boG0f0LzJmt0fClja0cir508xWsGS7Iri4AhrPbU/NDa20A==","signatures":[{"sig":"MEUCIGkfgDgKzEZ77Dk94QJ7x5V6w6jqH6faoXYBx+HsF7BuAiEAgpIyLlMJNoS6kg9h0d8ROCn4mGbgiqqMwHwORh8+BHs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq6D3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDvw/9Eeer3KMrq1xz6pcs6kjlqJQDD9wJaTt+0zqu08uEZGhsdkXA\r\nVzpDcY9R2nJLkj2nASlbSOMfsoNRcfzkx4zAqbD0HVSa1Oy0OOm+RjPlHrqy\r\nnGwhkF45LkvEvVVHOTDd4BGKkhnuYMErDGrdweI6dHDxmRGs+YUyZMKjsFHA\r\nUXlSuPVNp8mFsAJ3R3UP10Yfq6196htbXe+nqPx9uICx2znJwTT3rKTtzm+2\r\n69Fr91kVVJRoOeyCbJb0ASx1LBcaV0VQiBVFC0QKb2/V7YIVnBdHvGPOCs6x\r\niW8Cjkc6aPU6yCdyGpG3ZwfHWw3pHbvrvPyc8008P/IXuKYcjwpB01E3qIxB\r\nc9fBgkObtEj0tzDHV5xJMQmof4R2BJ7US+bJvjThIkb9Pcg2vRjzReJOHE5y\r\nHSRZWrn7JvxVDb5GCCRqSrghYtF5qLf4Fh4MUIVlttfQQnVpIhZMTRTJj6eA\r\n6UzEo5BOsRqSNNuDdFbGvXU8proj7Y33KFUNR1SJL3NbfLljqdN4VB/BeTrM\r\nh5Aw1MQVaFpTWqc6/5tDpjPxfDo0SJdTNdx7EGImYZfuUdZI1VcgBr6kHTLI\r\ncPcOTWkaSJvKRVY9L8QFfGb8GIZrJ0nVTeWbj7PGRlQWt6vhT4ekQ4N2oaxj\r\n7tVxTELKMeDmK+8gUdoitgxlk+8/dF7XWjQ=\r\n=Gi7m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c3bb551a6b32480853dcc8e29f7f8513d62154a2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8175d5eff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8175d5eff.0_1672192247295_0.3919973145031228","host":"s3://npm-registry-packages"}},"15.0.0-canary.16abb41ed.0":{"name":"@material/auto-init","version":"15.0.0-canary.16abb41ed.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.16abb41ed.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e6fc2103b22197934fa3b0e6233ed08d993546a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.16abb41ed.0.tgz","fileCount":13,"integrity":"sha512-H+KrRBJuLykGSqpBh+NG5ttsYfNKimpAI0FOrXJq3/0vSmtl9CSjkygM7zTYOKbxwcgtq5GiKCqGLovqVyGzHA==","signatures":[{"sig":"MEYCIQDRJn6WtL7+DO57ucCi2ZA9xHp0jvYIAZQVPqf7JRKNyQIhANJH5I4DlZtA/8V6XqE0wfDbkHc3vGC6jXtq1ZBsuohQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrJsDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxAA//W/mFvg/asO/HyzPzmVNA0paBRIrpSLfFY/Ig/5StkeNOOKWj\r\nNVBXiCm8UAQJEt9atfwnUcZZEdJWwppVluGUA0qABJESJjtadr7hGRm9U78x\r\nmZQkJHcWnMijeq01yPFNuqo29TYd/WVUrJJyGYpY2qoGDIbdzdQIIbr60Cyg\r\nIczKyMRPvemW+oHm4n5tJsjZELy3DniVCjajzf8oN2g9qi+mloDO22jU/9on\r\n49VB23/UCVdX9OJCiswgrkwkmvFXU1ZMcQd8ZsRFiw7dqbClT/QGBqcr+JN/\r\nNKCAubWChWJVbokudmpdfQSZjT3rSrzKDghbhiRFDASsFS2B0N9SNDWv9ndT\r\nbt6A63BewH+pGIUCfuyD6viI4GZpodfWWWP9ca99yEEIi3XrlJODOTmc+Txd\r\nHJl/Azxj+oLMDVKvwJQOULy6iV3nmtbZUJwIBRxqT3q/JJvxOi2BYsFVZtx8\r\nfWtaUFIrAbz7NieSVBIZNlTgg2zAgrOxYPjujLRj7jbwd7dPfwtrWm1r/xUe\r\n9KC9mlLxGRO0DSbfLFActPz+se0RZiB6ejcokFMXbeBbZUlg3LDRMes84Nik\r\nziwJTkmfgaOQSDNJ7GL2q8mLx9wfiod9b74oQ/p85atjlL6xU9CwNxGPmcpy\r\n7uqF8zEX7gZvXTvXsUyyZOT4snvD5eOeVRk=\r\n=+uCa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d76b7c826f30ccda72f622ff722cc7585648dc34","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.16abb41ed.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.16abb41ed.0_1672256259411_0.43849071109050475","host":"s3://npm-registry-packages"}},"15.0.0-canary.e21dcb86d.0":{"name":"@material/auto-init","version":"15.0.0-canary.e21dcb86d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e21dcb86d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f149fd257d5e5dcbd77aa7dd4c61bd1a3187cd1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e21dcb86d.0.tgz","fileCount":13,"integrity":"sha512-xJJF6dSPj+BmdfGQrhNMERZTD4qYhbD75jlkMEZiTWkmPBaH2PbqGeAqWAW9wsA+weh3WcmFPsaF2yYs3cThlw==","signatures":[{"sig":"MEYCIQCmDyycerk6lWoqXtyaSkUYf15gU5D1tqy2mfGui/b8WgIhAJSAUYYtg5Emh/AdJY7QaWMKHEIDrAtJiiaE1vMYbSI2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrZ2tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrk/A/6A9rm678czIrRxEalbmtpLCi9ZwNhj48iRgD74a5QdVeG6KGj\r\nbNOkwkZmLlgmzdLAdsDDxJNY1eRbmZVXUoSjpFhqxY0ZYoPN+nOkNi7oRzFi\r\nMh2kYPoxfSA4haCHwbeTRWrOtiny0/C60/DT1xLVoB++ZQGRbVhqUgE4TDO0\r\nqs/zPy7pLjgb8r9NXTElxPcswfmBQTof7enud35P6mWpbwNABpYMX1MsUKwN\r\nyGdqmKMnOeABubWPqbSW3i2e6QpLnQeoR4FOgUqE9vlftTL0a98YZEL/SRFi\r\ny23VD/HR9uXo9H6rTxC69/+nRGUo+mtM54mdeEaFWJzgAyJcyVSmltkFy9ic\r\nZlnpFFwTSFGtSfNHJ8Mxi5pvGFYvdEHbZNIC2jdecOFOov9U1jSdfM50e0V4\r\n3ngYstPaqLFzoRHtjJdyA3c958tJO/Jag5EF1TS9p7UcCONT6W3PV9ADg9Ju\r\nLk/6tX0IPECkxRxYP0cqqMBbx1RySjZMlcVpGLVVXSQ4B7e2cVxtaCzkBRl5\r\nlkeUiMdu1r5kjNwX3HqLbCxrWo2mOpVDfBTaWKpi50jI4JjhF2cg6QMsJpAo\r\nzeRR1W0eY1D+IdFMjVTd9ix4myH4IS4c/UaWd3ATj/likeMzVwOzJ3MklQ4q\r\nXwAl1MBM8S42dyrFwH5/FUJF5oyYLiSCnj0=\r\n=BmOZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a32b4ac6d2bad60870533296fbc4acf050735b8f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e21dcb86d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e21dcb86d.0_1672322477388_0.4473666731786461","host":"s3://npm-registry-packages"}},"15.0.0-canary.20ab6f5a8.0":{"name":"@material/auto-init","version":"15.0.0-canary.20ab6f5a8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.20ab6f5a8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d256066ff37dd4eaf7262017006cd53d5d47b0cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.20ab6f5a8.0.tgz","fileCount":13,"integrity":"sha512-zv+ct4yrTHv6YTQiGpTFHaslrGg3fNtzP6aSwPI4smg98LHbhBeYK7YnK/lQiK+WmPXyBXOUf496/iEUU4dULA==","signatures":[{"sig":"MEQCIBRRBQGXLlzTglRKtZTjrSVJTpa0Pa6456dSvthQ1E7NAiBmAUh8p5hpVFaioECwOQlZn5OG3Rg3q3uagU8ipePaiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjre0YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohLA/+Kmco4vdCiRbK9G2nv9ax+RfQS+tttDCh1WOwyaIia6vMhpQ5\r\nRIOXWP4hhywPTjGCW5J5mEpV2eGx7l3GVeqhWJ7OWeGQ3kKhy27Zv6+ChGQE\r\n4q6sccxrHUJlixiJXbg07/kqJ0sClzNMbpxOs8daK/7QxZtAkLrxfv1Z5MD2\r\nqK5ck1/EL2GMBJBVLSfOkapXTwC/n7UNYDKu7hsdhsIT1dZwwESWngM21CxX\r\npqTDcY3FUA3J+UyN973Tm7JxJRRsFzR9cDOas46VSMynX5pKF5SA5zuDVu62\r\n3QEYZ2KZRrUHw6yMjU2fhVAV6zD1WNT28w6JVTeroJx4tEB76KGqgJyz5GbL\r\no9Ec9jEcHTG46pvu1qdc8UutoRKfDYx0JSW0Jww8Jc+DjHZOBSHZdeQmk5UZ\r\nPFktzEhJof0+NRUqVXJEaDd13yp4pI7ayL0K0i/bAb1Ml1K2rPm9viRzKr9d\r\n2j+aqFIvA/Fex6gGOrMGNY9Z/cxMv8IrVpeVykDYzo/1UAByoxUkXEP4vRW8\r\nykguFuH61Dv+erYlUb3lU+OCMjiScfeNvcypLoK8hLWOGHDYsaStZYcy4PAB\r\nYL8/Ulf13DdqLBBlJ3N5ua1nt57Rd/s030x+WjjEK4WSrWILgOLtjiEy327J\r\nnjXoRVhyZNm/3YoqTz5pLmtXsW6CL6Sd7uc=\r\n=kVKA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"abf2135af6e71ea44b6e6a4de17493e5923f7255","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.20ab6f5a8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.20ab6f5a8.0_1672342807944_0.3893239343382171","host":"s3://npm-registry-packages"}},"15.0.0-canary.b9806f623.0":{"name":"@material/auto-init","version":"15.0.0-canary.b9806f623.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b9806f623.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"101322780ece7e176843f02e6e1387ecf0cff46d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b9806f623.0.tgz","fileCount":13,"integrity":"sha512-PL5WGUlFdQZbUT8lyawzQElAEgSj/Ac0ISVutrmy35x5ZpYCndmlUQEcy0izn8DL96X4XlNTIZs2j7EbFxMJkQ==","signatures":[{"sig":"MEUCIHP5hdD301Fq4w5n5tIKR9x9tGtkmYCaySdrp3PggH9iAiEAnx13r+0UlrSLLsmaDS/HA2TgjrIQOKpXNCU8MDRLorU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrh0gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7oBAAgTgqGqCCdDZIOxqGj02F+oY2AlTVox1Rn5vQxsVbi7WwEzis\r\neaY5YR4U9girtBu2MSBwaNztE/pxIUnMw+hS6bPiFAhf97K9BmMtIOoFDJPg\r\nTIViiIasnay3QHTqzy6e6xZgz/NA0quLCXW/5Z7vpdSJkAi5aml9AIX2AAjy\r\nNHzI1cFz90UewNhMvX3L5brS4PmYBNjkh/CN0oWF5h+HFjrec7lJB800Utl/\r\nML6rcjI047Ge65wHrYTR4QTNLaGbtfcRwA6+l+V/5mnLq0tpkVdjHbWIEAw/\r\ne46I9svJwyIdJj+jN2ZPltmKwjzwQaO+MhIrZa8L/qIp84/rVk6CZGPs/k8z\r\nVBwy2MI8THUsWIPp5MJb2UoJUB0DjVGiGf7LSboeOjE6CRIGXxbJasY7tWjc\r\nku8XT8i/xYHo/TTBTCi7u3RC9TemhNfocKLlnqoK0yWc5f1I3VEYCNsdqFYP\r\nEJWncxOgUvzKw48uFwZF7qofJyIXFxEdic/Vk1o5QBaD96/XfcaQElfLE9bp\r\nhlwP0EHr5wvjs0BsP8sojhrJAgzWq6vN/4VBPYC+1i8g547KGAv0A2VkpKO1\r\nLVyd3FuhMxtUVak4T2kzU+rg79BLYzyIodc0vajjQriAxP9YY1h/8v7+W9v2\r\nFP4NqBjNrSpmrhMpsCUEN7+Qrg9q1NZdMWE=\r\n=lA0m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0eb4b8fcbfba4d68dffe3a2b5c7478e69e2e2eb9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b9806f623.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b9806f623.0_1672355104202_0.13888787924784274","host":"s3://npm-registry-packages"}},"15.0.0-canary.50c9f550e.0":{"name":"@material/auto-init","version":"15.0.0-canary.50c9f550e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.50c9f550e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1933d08b3e7816fcebbe07900d21a0b27dbba480","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.50c9f550e.0.tgz","fileCount":13,"integrity":"sha512-FtLt0O7HU3hiEtjwWOM4kxHLcBBeZaRfOamIKFpFLDeR+reeStShgYi7V1cErVSFf4onCWbdLeFgPvA27qviPQ==","signatures":[{"sig":"MEYCIQCLyK45EXu3P9q/rtwfwZfnZB7fFux/TPPhFE5eWASLsgIhAPLxy2d6J15X0x522Z4281PeLtSP4OSObZt6GqisLth1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtE3xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXyg//bF1sdaV44AnnFBXDalQj/pVyTt46evSx/h1VEa5Wazg3IuAL\r\nM0mMSmrXC38rbs39yNJPd/wau7cOcAguBQWAfezobzWMIMeT72+bxxkybTdL\r\nFZ0drqR3ffIMuOoO+5pSYbkxZP7bw/rpCYY+MdsH73XElLzPCH/F59rNoMK+\r\nvsdK7uTRMaXn/1wfEbge8MxViLA0ZiEYksYrx3LkUoIhHXcIuOrrPbww0+mO\r\nwlOLlHMWcLFyeVvnUeSxrcZStUyPevOAtiAtaANq6GPfauWO8xaYsfPhRa8I\r\nZzNpy48lzOWtRGg0N51g6QRT7dUokXbAGHky7SVPZ76PR21TyAr/sktg3OuG\r\nVremVDw+KGJHtnq1QA+yWcLBlx5onNSDNM2O8QoqQWtwjJQSKWZiGzLWkWfR\r\nhjmvE2UF1XTLPuByp4LDB1eVKn+QYLZhgKpSzk2bsU+DmUTayqyoPTi7YQyI\r\nk8ApdZJsUIZqOXpoKyyH9QLqEORVBMsd1RQKsoNkR/vhfgp6HjfdFzpCqypw\r\nD+A+MUVqXAum5vzCY+e4wu9yyOU6uOlpJlIGRfZsh+4kepnzdBkSnaFjB4ZN\r\n864RKLV0SScWSg0zEFtZoAyg6h4xjgqfwva1Hmvk25Yiaobm+AWlcWmvzW3U\r\nFCFlN92G+KKDpa0moBl0fTqkVEl3NAtykNY=\r\n=KMat\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d020b19d0ab5525ccca1f803a00e184efafb15e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.50c9f550e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.50c9f550e.0_1672760817059_0.5390071605048281","host":"s3://npm-registry-packages"}},"15.0.0-canary.af490a848.0":{"name":"@material/auto-init","version":"15.0.0-canary.af490a848.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.af490a848.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"44fd98230db2b07a821564a3b8534fc6ee24af2a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.af490a848.0.tgz","fileCount":13,"integrity":"sha512-ODAW6gtM7s7RaAnkb7jWvl6MWvlbPVlb8r0EbdUwFzoQSu0JUm/KRkPeNBrDesJtdW1LWK6i/z9+CCYLdvbGJw==","signatures":[{"sig":"MEQCIBl4rWZFIebqHA1LNMWLru8UGltN+IHvM4PGFw15gtOyAiBP6YIf0W7CAEqhwm588KvWrbHCcK0TDedMMnD4v+/z2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtFAVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2CQ/5AfPdYQwq+fZGumWn6X6GhVO81RhD5iSIg24DyC/pzZ9VGbrR\r\nA7QWa4uYTMelKnux48YmbdvtVpFbuJmFv+FIwRoz1osYKIMBzjK4lJZHEfo5\r\nBbjJmSCu9xd51IxxI/1ZXH+F/RL4CPn3UMc2/vuKmA/G5gy0DOI1ee6qAEQO\r\nMjlA1By4VDareYYWYxv4OPVSHxZlDtHHATiV6BIWBlj3WDu//muxsCrALmPI\r\npe03GYSkH9oZY4jmMqPsSRXfofTBnHp0xy133zhbAHjHvZBodhNF/vNrb2Fd\r\nMzDIwDXTWVBU6fSUvoAlglDksUbbVJOaFK8LBdeYpLMk0hhbEoy96TeZdHMA\r\ndQ7C6vI0hTzdIbxqwbCmApvEPGh7jalpwh0VRdWe2XSuAUMq2NLx2BRUm3oA\r\nSLrGBEL/eBmAPgw7g33E2QNNgAjXKMflULuzAxTJet9u56+HIGleIJG0YRg2\r\nQiOBNBoi9NoYch8JCHym2X0UYOctPCkf2o05/SRqDYk/3btCUOA3YYuqDYeo\r\nw2UTtx+GbCEatoKkq2ewU/aXu2kGpO6rqMQt7JbawPo/4d9/J7wQw7yGpOFx\r\nDDbeR+xuwy/ZfJ+d6Xg6myffiQQC3ygiyf8DDB6NrboyxuPvC0guN4RJQJQf\r\ngXT4oMIDznxhWWkJ9PDoqM3PaChDl5Mrxcw=\r\n=fkDU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"95f5499a3dea1763e53574fb3b884e8e45cc974e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.af490a848.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.af490a848.0_1672761365731_0.744077289370547","host":"s3://npm-registry-packages"}},"15.0.0-canary.7cf487c98.0":{"name":"@material/auto-init","version":"15.0.0-canary.7cf487c98.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7cf487c98.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cdac4029f565d79e316cc6521243e8122d4ce4ac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7cf487c98.0.tgz","fileCount":13,"integrity":"sha512-CfWqU3s3vN4U/cRK1YWpGYz/a5mo/2y+rKbD8Q8Y76iHDm9ZYa4ge37BdxZ0l0njlb4dARIK4et+4I4D5HBz5A==","signatures":[{"sig":"MEUCIGixiu6WTC5C1Mcqohf73as5YHmnFNu2U7KDNRz6aFIrAiEAnxasGBjoshT84M4kLVDLQp34gVtTSBbmkpSC59pnKCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtGfvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqI2Q//dKA2Xe9cULHluMCC0mw2QmfGgEM/fMlHBJkyU+4XWvX/Qojt\r\n1eEvjMHQLNUeYp8VFJgQ03w1kZ7AUnMiTYiYFf0TJZ34RxQ7JlGyR+7vVk5o\r\npZWWNwlZ87YTXQeq6KMVum5+P46Nhz9C8ShML2YurH72hbeHErNDekg+0q7j\r\nyvLkkovGJkDeNgy8aufu2iJsnqSzWmZYbPqE3oJFaVUCvKjsFaFgkjK6sXXL\r\nRUZU7CFO7qW/Pqrs0RH8+jd8HQ2Ni65CbT9pLqypEORm7jHJh6PnV2i2vo30\r\nDOVavNvh4fkL0KcDp6C7qj6tHzOSHPuyU7+PaKhrNdHF2xIkwJ86GIet2Huq\r\n41CPTmaHK9rnu56SwBPDOWlJOsJNV09rZMvI5+dULH9F2qcPPgfNyFYtu80+\r\nWQwo8q4w96/u7H3ma8C3ldLRwaVJWJe/rvJtklWND7BhKuXTX0054i6hwt/v\r\noiw1nwt3uY+Wcu/L+eluFAGO6aNL8OlXpV7Z7orKRxKbeer+3lUdXKwuf3KN\r\nh7CYyM38SHwglzBgAL/TmhY/67u1qEyuRtITAnfharGcNOjGW+KQNm/ngL22\r\nfbwylTUXYx/DsCVweOjn4lZM+Xp9C/1steE6P70arjEhK2nF7ouHzmgmG1hy\r\nvWkQhPBHGA0e22sdY5r0c5GUEF8AAHYzhxs=\r\n=vNnf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8d246270c785ca072651213aa63882309c7cd5ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7cf487c98.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7cf487c98.0_1672767470907_0.5151420503639461","host":"s3://npm-registry-packages"}},"15.0.0-canary.a52be2d5e.0":{"name":"@material/auto-init","version":"15.0.0-canary.a52be2d5e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a52be2d5e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"79e0167975b0462fbe74415e81428dd9e6901b7d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a52be2d5e.0.tgz","fileCount":13,"integrity":"sha512-3KxAz6s3P84tEUOFODljN6mQQrtT+AT1cyDFLxjBDwaYvHAQme0gD4eAtvmbHicXDfzIqdy1pAlEe8hf8v9YVg==","signatures":[{"sig":"MEUCIDqLIgQ8rOKXgyvO39iyEAZGzYlINtUz1QZyYE5qDaaLAiEAqVhqCawRRCp9mMRRrP2BFxCH/qpDp4F1WcC4aLXxJNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtH4WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofrxAAgfvI5YHb3fTf7y7zUGCbM4keaE7EoZge8shoO4/c4jI+LvqR\r\nRMQjvN2Ipph+/VOuAwm8pgk3d66mT6HuTMjq3VXEf41eAG0bhvRIox8MUW+j\r\naA51BP26y7+ZUPD5yJ8SV+8JYxfjXYARfJ7YhwdsGGjXGuHSq+ePCQzNYbWm\r\nuGl8hlqBBdNUxXj98yqPSi74qe6sDvpbfo/DTE1cOkaBcTG7z33pbHwhFiQ4\r\nL7b6/41SOFInc6gmjFnI8y/YcSq8qctD70O5drrv9GbrTkylKdwyihY+FpQs\r\nqHKewG0kVPXRWWMcTnL/IMEJXh+NvxwvGSqGXtcFPkAhgrnquBaUJ136fdB6\r\nWuBRfl+JjfZRppmWkY9Aw2FX79IyhXZWkcrQhboOLFFQvtEyU1sDbv7UuVWp\r\n880gzjFTKnyO1yTfbSpn1diIe8PJspq2yis10PLZj5qJfnFUo29RSfZW2TPg\r\nYyYPB3zcWZI7XbrQLfcRaIuFispN9jrVUebq3paBE0Kzd239I0Fk92pt563n\r\nBGxlMfqH99W5ptvMKsX5kiruVNaQ4Q4fFactnpgYxvYrfIdX7qsEvcTgSDA/\r\nBKczXIK63A1mFLxTJw36nVNWsehyL8Cg2N4cr1AfccSouaYEr3X/8XfGea7k\r\nxIBR2UG5Y62Uw+8ez00sXo1fYAaR+3mn2nA=\r\n=iHCE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6c2c2b2b16d0188fcfc620c5bd95622d34ab600e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a52be2d5e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a52be2d5e.0_1672773142565_0.786219381271521","host":"s3://npm-registry-packages"}},"15.0.0-canary.e38ba17c5.0":{"name":"@material/auto-init","version":"15.0.0-canary.e38ba17c5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e38ba17c5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"034133d00acf30499b1008746d4921bd6bb55b10","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e38ba17c5.0.tgz","fileCount":13,"integrity":"sha512-TO1202wR7BLDoViSxA9IwrdXDCPeD4JZ6utSp9eb+H7jvjM6/blYcOsCmOBsVgCJH6H81rO7mZOtwykSOoff+A==","signatures":[{"sig":"MEYCIQCq3oJVC/XqgoApQQTiIhb78pa54mbJcHVc8QU6VaGhbwIhAOVYjlP4GXuKqLebAZldpf9Oe2ORPMc0iIsONG4hnakj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtKzNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbRA//YZjGMkPtCW7ZjxJ1GGuxwNVWFNMmGdMH/zbi/1GAWFq4N+dZ\r\nwms5+23hnNWdB6MnZKVpKeYPMPehNIVRqqnJGci4ECl/y4qmJtAUD9W2LYZh\r\n6MnyB6vs1fzia8jUupehjY80IPuLtELL+XPU2cTbRfUd91AjHWtnQFIrofDl\r\nVdi/GPqEyhJVoAkqmCasgpesU4D1WqOuYXCdvjUPu9YHTwI0ByAI/DHbbvHO\r\nG/eixRpr3RxiBg81Jl0b73GRI+jlrm8isD0B1K3/eGwkiH847t/lB3NHAx9K\r\nhx/UpkgG4eCL2C4osYYvkDMq5k0kd88J85NfzZX/x5zVF2XSS1GGO3ucNkK0\r\nIahxCi95WBXGNFE+o2gpoKVYaF+yZGvNgeLQxks7jClO9a6vCM0Hqikdp5l2\r\nvSMiWAs3nKlSo8xPq9z4M/zzqJU/UNzJ2A1v/WHfSuSWz5cyW1HkNG7/k8DN\r\nZNvPE8JkdwwqNKdUmTc8KBzg3vgfuJasG5EmTG/MNzTexA4nbgRxrj3ptwj1\r\nORfPrUik54zrrissByvWxthH8fEkaO622cOqH6N1+RYntrOEQmyuSI4d0rd8\r\nC1ACz/uaEdzNDi7sb8flykd5sAAydQMMVe6GicCbnMuVzDEpwl1spIzUzOmr\r\nLrAJkr5ZYrdYHyiFHryaK+LKIeFvxCge9BQ=\r\n=MHbG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d44100693c450240b468ed28efc3841fdde62da4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e38ba17c5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e38ba17c5.0_1672785100944_0.8400563619971726","host":"s3://npm-registry-packages"}},"15.0.0-canary.49041a6c3.0":{"name":"@material/auto-init","version":"15.0.0-canary.49041a6c3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.49041a6c3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3b81eb625e17bcfe8ed05cf1a774918c0d01a6ac","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.49041a6c3.0.tgz","fileCount":13,"integrity":"sha512-fuyXHkrXssNGczpfFhclQKx/7cP9r8dMkT6DmytLE7UrPvDEIdnvk0bxDOUgr0yxJ57SYk9JZZ1cWcgkXlwUXg==","signatures":[{"sig":"MEUCIEYW3NTqwhbcF9Hcq3nxMs2NROzpCxNHQ1nVn7Qtb4BNAiEA1EfBRExqet/j6rgTM6oQpb2xMMULiM+yodZCW9UGRog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtZhcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpfwg/8DdY9uVS3yQdYjEaYFLtoa6WEDidzsqYXNOupfSjCwFFcWIf9\r\nHD4/p1Z7D0dF1pE+COEczEaBKTBDz0v+HDzH6KqnKQ7oNKnUvUff1u+FX4Rg\r\nTnWOx868wyV/yo+t9PAhVYst3F41GfvvufFxg1Hy6uh3Tm876d8d2SfP3ZOl\r\nr/6GslqfmgqlUVF6djgYw/RizmGAIg0PyGsZDj9OOpBugZYiQpgr1tW9IkCH\r\nERWt6YDxVi40fVJHeW0rkAFrOpHnHw1WT+6t9h30S7Nl4YgxjGOV+g49yfuX\r\nNcoccfkN1vi2wF6JSpCTOaxl0iQm6j9luYfLmQxkAEm7/zTAEDJFwylJuqIB\r\nY8n1NPudw1cUbUBJNDh/M8QW9pU65j9qNqx+y+KYr/pfjVdJj9tiYkQ9GTRg\r\nNZTlzTY85fxn7dJIn22+W/WHk5RX6XHIlvFkzN3bPLsLxlF4Z7RXmxmpfrcn\r\nC6yghGf8khX5PX9nPhnQdPxHaymVzC8HSuFNSOb098UUNBCwszh1POvZeJH8\r\ntHE39bBmB1+GqUdibYHY+PZGD1bVgd7bRBuU1J/lv0R8sMaT63IOyAWOThmr\r\naFVAEU73x0Q5NAIyzUMjeTEFZUEFHNhkehAuImEPuL4z9er1oWpYSn/BaycF\r\nwT5WW0qtmo1pZlBSPBm63abApUkXEJLD2Ks=\r\n=AqbM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f012497ba1285ac3de691b5e25afe7a21ff62bdf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.49041a6c3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.49041a6c3.0_1672845404669_0.3592234375376582","host":"s3://npm-registry-packages"}},"15.0.0-canary.c492898c2.0":{"name":"@material/auto-init","version":"15.0.0-canary.c492898c2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c492898c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b2b4a9f05359521849685fe26d7522e21a40f498","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c492898c2.0.tgz","fileCount":13,"integrity":"sha512-J33/pxFq+rctlcdH5hzeP026lA47v06PX/V2gleZUfN5Y0JylqzoNJsn5m1RvRdN1I1+e7PRbz9NBwBLLKiZqA==","signatures":[{"sig":"MEQCIDWoKdvUJp68mSHSoswElFiVfEpsjoMj/ul5k9qNPoNtAiAVxqucmfYyMN2d2rCLsRN0KFcz5LhX7KwMCqDsTJCtWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtbkUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl1hAAjSasnsTSu07ZfZGS7ox2wc6TiECfUh1wOODeKNflOWV2P5o4\r\nG9wvZpZoj0uWaFSm11sfVvSh4cYAM9FGIwgRyvqOGvjU0n4Tv4XGvEX4ZyUf\r\nXQ4NSSM9I1gkfI/OLRLG/EonGGJq8ub/RIopcFBeAl2F1i6ZwoWCh7wG+DW9\r\noPixaJjQD5HzX0Hatv1c7pGOpzSJgmHkyAcfJmKrpMgbqvCcHZShjT+ahiW/\r\nc4IC8M5osEyAxpwOheysj6/ok0oXqFrxhVV5xfwc9Fg0Ds2EZU4J1lfbVnaE\r\nfg3y7L6tXV6iim/USkNJL5JQ+fExdUuMm2aNPk7Z4EV6TwPH38LCEuTiZ/U7\r\nJkFg+07fj5F1nQgVsi98ntO9qfyzcWG5cmAML7vrlc/An/eXY+LwDdkn07PI\r\nmL4OmccgfSmLjCFOByxJOm3d0t4SNIwH09+fZKfLGq1TGWlo+h6BaHWxaCN8\r\nMG+NWh9D2wJzGzYpos2nr7iIJsBKS4W5xxQPpmtSdfTSkTDBJ2gEOiMzL3BM\r\nVnqfODn9u3wkNX1C0zIj4/ENHhOX8pJiGiv7fkhFVyYiGJHLOAzXYp3KCWZl\r\n+C/OslEmq2J6suMTz14EN94s4enX0lQkIa5VA8MsJy4E9hwSnPViCI+kIfFQ\r\nPM8MrWAXeVnQ1K4ViKBoV7voj266JiCUYD0=\r\n=bByo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f57d41cc546a15258de2fac7e4ddca48b2987ee","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c492898c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c492898c2.0_1672853779915_0.6671976387845677","host":"s3://npm-registry-packages"}},"15.0.0-canary.d7a2277de.0":{"name":"@material/auto-init","version":"15.0.0-canary.d7a2277de.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d7a2277de.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b905392501442087efe54f05e6013c5500930ab","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d7a2277de.0.tgz","fileCount":13,"integrity":"sha512-jsbObh1+B0k1nnlDvq7J+ZRu83w/znYA1QgdZ8TcqifTf8TrTHt7FHBayzmcQ2WeTMlvKUarD92+yHl30NyNkg==","signatures":[{"sig":"MEYCIQC0PYIIs/z5HTbrpTO9s0vBUgH6DSAXuC0zNo50p4k8vwIhAI+rS1tX9kN7KeweDFw+HCXIWcKUngv+NSHEt5YsIsdI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtfD+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlVg/9FV9MSW2TRsY4VkMhpWd2K+KiaKuFmBv8iqUz2wEoWXy9VHdd\r\nsBPbFYdIeU4fAMIWOTVcN0a2LEBIBX2vgST+2t9BUBDVbDil/Rdru26JZhb6\r\nKuw/ltJqPAL1SUxRkI/VfCo68sBYNvLFAaQ1XL9fpgFDbCeOPybOef6Uq91P\r\nkA4Yq1BA7LUKdoHWtNMtPGQ3bMblYPvvb6feeOxT+HXF7U/iXFL+rtPzx/Yc\r\nTZe0MbIOon7OK1F2SOgR6oYZZcMFEDjflrij8IQqpfNuYvFqXeVFGnNczvu2\r\n+TP9tR97v1Q+ik7MJa+TgkyOn/Hm9P2KGN59B7DhNSdo4sD3FNLLI6VLVNKI\r\nGJFfqVv5Me+GffRLc2xoUHCpswB0i/xZskhNrr+Ad5dHGbsKjC/MTP1aDUoh\r\nk/jjpg/Lsg2goGrTbWOIF9Xw84dL6Kz6MFau7EOXYZKzK0mENEkxZr7K4Tat\r\nrz6kj/71wd9G2ZICdk0yLPrR8NucxEGfqYE5P4i6OGNnAOVQgsQrL6LGq1Iw\r\nbHtrowpYBZXoGWNnTWSdxXmtov8iPpO8miPV51Dcb0XF4eSar1JAduMbibGu\r\nVvTNvhf/iJpAdtLgbrxYMqygK/IQH0IvF4rpl695gCpDyhc8HNzvNuh5sF9x\r\nCJG7177qnNPxG7sW9xHERuIdFL/F22Aan/o=\r\n=WBr8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f9c71e947019fdd0ca8837669de0401f3752d1f3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d7a2277de.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d7a2277de.0_1672868094500_0.4567900260704998","host":"s3://npm-registry-packages"}},"15.0.0-canary.fd95ca7ef.0":{"name":"@material/auto-init","version":"15.0.0-canary.fd95ca7ef.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fd95ca7ef.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0d095d79c27b7a557e3a1fee3099e01862536b59","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fd95ca7ef.0.tgz","fileCount":13,"integrity":"sha512-CrsCatcRWu6MbZZ83wcA2e591ag2mrqbFg8lioAkOU/XypGRgObVH7mK/Jih0LTHsZrvjIq3MNJZirkpZifb2g==","signatures":[{"sig":"MEQCIAp4kyJpFD0BUOXY84adQ3qJPIt7rqGDdxV83Ft0DOjyAiArhx99l9YslYst0xAS+4+XRNtto6H2FqYC2MiVb07/7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtiGLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXAQ/+L9kG3OcudD4hJtdgDgOpIVsC/tkVTyvDda3rcKxKj9/nqfCV\r\n4PoZLnfVGx128XHV0IuIVdz2rQw+0r1Bf3FBPQGw5BsqRqEmlReGxqb2kh4m\r\nIxJj7xTlzzqf5R2DppV9+LBrXBLOm48BzxBB78m2Xabl6lHK2jodgfIo/4xZ\r\nNQJjhDOEQbGEP5LeladWAzKGymN85aMf1DIGsBhxA4fddB/2dRir4BUIxfpa\r\nwhsEVPCSerJjSJLi63zEHTXBh+r3mlEYFTvyzlnRpD22YzuzIgSJ4C46AHmZ\r\nYDx2gWl09OtXkoKkbOjqSa8tYOpbExcaZTKHCyHsKlKr1Po/ssQ82rcapeeH\r\nETw6jJKYQOI7RRkwSXsajOXQUOsnPBKYnj5ZzW0Q6PvBF0o3B3gL/E+lmNCU\r\n1/9MtyGGWiM/uSRNpVGDemk+wawkT/VTM4jvl7cDD9BcxG20IX/jcrpus7ql\r\nw0R4ZIRTeyiwDYskBTSOxGe/M+OqPBFJTbBG4nxfJWamDFVxg5LSRrpAI1KZ\r\n694ldbu9+A8geRTfmtMp8aEan5KQuiR9tNUJbPl/8dd3vhdx6zClYKAqqF9Z\r\nAYHZ1kytSUut7mnEHqb7k9vhplIiYjj6ZVGwYn1XQ3vwjnYwUXOW8n/yP0QO\r\nHNQYeDO5D8awc9zvaWwuj9CyvI/UgcEgxCc=\r\n=ukqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b0d2fa371ec4a3d0a8a11e19d9753b1af5d2d62c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fd95ca7ef.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fd95ca7ef.0_1672880523326_0.23909863973528123","host":"s3://npm-registry-packages"}},"15.0.0-canary.1eb44faf9.0":{"name":"@material/auto-init","version":"15.0.0-canary.1eb44faf9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1eb44faf9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"03c5e8580f4df610d9fb248f673af07dbdcf047e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1eb44faf9.0.tgz","fileCount":13,"integrity":"sha512-UX1Fpu0D2dzy6KC6zgneiepZ4JPNjkuutsPlTHSfJ8pREABdixWFD2F81sFeuEQLE6qD6iUQWzCjHdwXwrIVqQ==","signatures":[{"sig":"MEYCIQCPyT6oSiB1OijBMbiPkYnU2IwRPjWxC3zkbrEi8goe2QIhAOny/Mbxy26oYBKvaE8NkKslY9sj4OPdKXAV76LgWqhz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtpOMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouPw/7BArbSg9rPAlEQCpjwvv29F2vntkqKOtjZJms0yPzmQBHaFjZ\r\n79xhPhsu8Fou/dqt9gawfCBmEM2h5PdUETWjHVGUH+rscpG3v18VB0Ch4JVr\r\nNao92I9hjzGY3p9WOmKLeHbr1W+x04EyiJhc/fRRE/P7LYPfiUfrthI5ZVoE\r\niSEJqjbtrbRu6RCw/bIpSMl4pzwC3AAAdSyJxN+MIq5u75tR0ABDbej0yygd\r\n2ZcRk6I/+umgtL4f3I1yhKrq89h6R8Glawa1aBAt3JvQ8VjxLP5ljBwCZghN\r\nFFRpzOYmral7vpYiFl7xgHelHUm2+idXsXxXJknkcjRMPTfLFnWM8ClzVHAi\r\nbj9zrq7kxd5gmOw8Ltjynxm7KQfajqRwUrafvTRdIT5yRuh7R4K3o+3LYG8s\r\nUBn7eTNUYkNryNq5A6jhcuMYZxBhzAgkm8WklUkDZJJ8QC6J+j3I9VZkPQhL\r\ndi/3HYUY5J2kyvKJW1zt+VL0p3NfanFpNpUjY7PYCErqhHJolL9l5zR12IQt\r\n6SUwWLQCuIK3aMOuo3TMvH5JFg9D7jerDkcN0y4ajRhRsTAsbGXnjefiJF6Z\r\n1w1/C5CGML0KCl3b6ZwKEif+UBgC9Juu5NRQsbtBrqhjxbhKG53r5jHzKXKj\r\nVxs4mPITYHtc2cmGuAuP/Xu3IR1FbOCrj3g=\r\n=U1K4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e0eeb94598a14217ebc97ec3e249d126a29a13a5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1eb44faf9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1eb44faf9.0_1672909708531_0.8622334653556611","host":"s3://npm-registry-packages"}},"15.0.0-canary.adcdb7db9.0":{"name":"@material/auto-init","version":"15.0.0-canary.adcdb7db9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.adcdb7db9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a12a3cea15e66144c0287ac6804aaefa4cc9cea9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.adcdb7db9.0.tgz","fileCount":13,"integrity":"sha512-QgvJwXQ5LrwfA65imzO4UieHQY0PCB+O0S1AKhUNqg5/GR8kv5Nk3GWSGeyWzAqqxx+Nhy9hvvjRXAfH5gIlXw==","signatures":[{"sig":"MEYCIQCRgQQ3az2W8h0oW177p1yBiXM4Kvwy1wXMzDnf5dKeQAIhAPNTO0OiyHT+OyZxrkvL/p6Sg7TA97Sy5rgHr4vxNzth","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtvjeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHUhAAn0Ed/v2yMVeH3848oVR7esKuM+ub1DmgCmKvjUIdKBaLW/Xz\r\n43TUZqQixHrgzT961Ernv/+6vjC5A5BcDO277TuEQwSVIe20hXPW7OMS+0WO\r\n6QQXXiETwW+Qp7D8ii+x/tDiBLg1zXv0TUD5WYaI4v3db7hPiDLG+Ht5SGO5\r\nEUlixEEbbw+f4ScF0vl3BQPVhOEU2sEoz+864I4unWWX6Gzgj+MOna0W1CA6\r\nZtUvHzMDXpCLtVzO/JF4e36u0X2iEZM7y2l0NMQPR68jPiZgQ5cT3YgtueYA\r\nMwyy9m0041VKI3xx6J1gU9fLnnGcXeTJAYkOmBqwXD2C+clHdJQAuHwPlBdY\r\nP7flbxybMTGtaE9xQl1xs37dZ+m7c09nULvDcnQ4z6wWTE50DX5hg3nYfw+F\r\nEzGxpRz+luvUXwMbR0CStpO8xSMge/ebbqiQRUzpLtwdshgJ9UT5AArrnDWs\r\n7AbB+HBaXyCeRR6Zfziq8P9AQ28m2gx4tAw4Ary0JkWrDzLeirZqKn9QQSEI\r\n2XISrtzdK7jklAZzZmzsS0/SC3xE3IzRzdPWZewHXTsTqfw5KX5Cz9mQ3XaJ\r\n61SJk1PV8+Qyt+27lKsItDPccLGsuxG9u8sqB/7qLnbjQIosCWwbMFnL2Djv\r\n0GlUJLjGv1zo4b7ZKAhZAvgnMf/VIsRoU6c=\r\n=cNBb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2bb419da8b7b393c085616b6c5f28a3eebf832f6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.adcdb7db9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.adcdb7db9.0_1672935646339_0.04631370352261022","host":"s3://npm-registry-packages"}},"15.0.0-canary.067af7eff.0":{"name":"@material/auto-init","version":"15.0.0-canary.067af7eff.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.067af7eff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aeb9a580517446bf303766ecdc43a64d62771317","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.067af7eff.0.tgz","fileCount":13,"integrity":"sha512-SEuXbzMqdoUfhqEWQNRnSPEavF4MN1RylyJkv7ijRKb45YniHkMkSMBmiI4c45VePyoNP1nXuDC5pRzn3m/S9A==","signatures":[{"sig":"MEUCIGXpHcBNipIdhKoB5CmC2n2s5TqR9f1YoXaWI8qlhjK6AiEAiWMt1X+vQRRNU5gFMnA1718kkSsISGPLhA3//VIveV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuKuLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmokjw//cL8A7F9x5olvDvmpXHOi8p07KTQFUBAz0KTi0pRLrMZoan3o\r\nNQtvILHvQ2n8FuBTaoT2964rwtaCoMQiwN6PEpyiJq2s7X6EH7jqxdA4sn/G\r\nPxWDUIduV/u2t4GFyET8FP24+Dooppf+hHV/2HH+8LaJ3Onyi2TAF0w77Nvz\r\nkW/3ED7sz43acDh8hM/aBEbdbIx7dxXvAbAogh/tORz9ftj34/AkQi4iKkN9\r\n28mgRPgIN5Kmc5TFXb33IZ/VNhT2qnQiLYbofCDmwp3lvsRdJQoBcwtajptB\r\nhbgRJ4oE0J97/xCxRT9fNGdGLBVb9d/38UJo3cKXHqb+8otbIPnwbeneDfrV\r\nvBW13znj48uAVKpVi/l+iNDsH+RdttSl6Yj38w43/EZTePwOXTxC58kotwoZ\r\nuUwstFsx7iHpdoPdv7TUnx7G4GvcsJ4BglL/NI9SkpTpHn/P1HkPzvSeBP6l\r\nHI01u2mk8Q7lRBMgga/NnYBC0k4ADJ5ZvmkRDKBjw/J5IVeDGXTua3CMara4\r\n2ujBs120KDqUtQ/bwjGrO7aFBfwSJHRwBJBwTEQ69iESdw2E5Ahg3OKM+H1k\r\nSzs8xhr/by7Dnnnk5BVJUeyTXiW1xhWvGW/F36nAYcjMB/eSJdjfETkfQNnv\r\n0pNKzFRTQKzs92iee9Uttd/nTzJiFQ1oyWI=\r\n=P7Xz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1fae2c792ff8ce557995a8d5d858676b4355c7ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.067af7eff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.067af7eff.0_1673046923307_0.5991161832761935","host":"s3://npm-registry-packages"}},"15.0.0-canary.21d1196a7.0":{"name":"@material/auto-init","version":"15.0.0-canary.21d1196a7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.21d1196a7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cc39efd33ed2f25450db5a1a54b44ef189301ea1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.21d1196a7.0.tgz","fileCount":13,"integrity":"sha512-zzerZogheh/XBOJheFISWBrwNcsRxa98+RkX7+vcexCBMFv46iV/UJJ77oCEPKwKtosSwCyKaEgxFLOOfq7Q+g==","signatures":[{"sig":"MEYCIQDCGcXR7k7lrMh6J2kgvysN9qUHnzDJc+qBiyiQWqLdJAIhALnbO3NKOVfgGHXpiykbkeN/Co6vWFuewkuUg5lnrQdY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJju+9/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTcg//QcbUtWNlGPONbtDB0UfdasHHyL4TzvOe8JF+WmU8Z1WW3uG1\r\nBRtXo2i+zGXjqlReit+GGxs8cXjtdB2ew36f/8yBVLbw7RiRPz3xFBl/nGEH\r\n8V5ycpvA8j7eZ+ZcGojOJzYYXBSIC+ykgsN6Pcg5l2Ivy725DAcQyQ0a9khE\r\nBeE90KaqalC027eJBAtcxyqLvqF3IExBQoBDZyuvFuk6RHWsseZ3qfgNSns4\r\npgxu/AN5BvpW9ZtkPDKY+PzNjwv5AlzmXddwPe5afhxsUEToCbh9RaTJMeHn\r\n4kQGwnG3luI8Y/r4BHam+ira9Jsgw6Q50rHzUqFDmZUY39Y3MSBvjDMXXdDO\r\n77oIvJYvJ88bcE+eTiLiCHoKF/aQbelMsvCHVaa3MJV1/0OML6mH2C+GaDGr\r\nf2wJ6Cpxuro+WpzQI75VZRLEyR99e3d6j9auN48ZQ8Q4sB1y0YT7ALOxO16D\r\n56OvNaBDSazyiw+kfhJ+i+7E8vq1Vn95QK/SeYabTolYcKzMhkZPB654Pbxh\r\n6pY2KL2jnCTT7lwMRZ0QbP1iJPaoMOIgNDP7nhG5aRqM4CaMxCVsHNg/llEQ\r\nI1s5FNu7cC6Q3ByOl/14ZLFUsaxMe7Ik6lVxQ7I3Ro+SmJP4QGWy5VEy4CDt\r\n3cWKkARjPsx2oEjz6QXj9wBTexz7S9dNcYI=\r\n=o43/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"361e536c54e276112f021b419f666618a20599f6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.21d1196a7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.21d1196a7.0_1673260927160_0.4419900540612871","host":"s3://npm-registry-packages"}},"15.0.0-canary.8d2d8d3c4.0":{"name":"@material/auto-init","version":"15.0.0-canary.8d2d8d3c4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8d2d8d3c4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e352bf030a3658e98640e14affad93cf5274a25e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8d2d8d3c4.0.tgz","fileCount":13,"integrity":"sha512-ZgZpulHdwKkzpfDKuN/Yk7Z8YjbrExt3A0uE5caHzOH/grrvCweBv0XtQkPER+TffJGA11aSPQX53rGxCLz/BA==","signatures":[{"sig":"MEUCIFGsAozNGESFWUKOQjZE6KadCoAVfB/KsJZs4k0a2WZsAiEAu9rNgq60Np3IQwiKLD0j4JOQHacYC5LldC4S979H+tg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvJPPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmGQ/+IjHdiBRkzeGpQTv8pVjkoyzXbLUjc1CNfwCb5ParGLs2i7Ey\r\nzPdUmrt2viwQ7YjWeAsvYZZMcp42V80lKaeeAiLqXLlGFAdmcmj6FZtTBiv3\r\nXj7X9lrHZwUqdSi46tFCMSe55FjFcTIHPJSC47lGANIIb3paXyuU/iwf9BP5\r\n/RGCQ/d0EQeWKkn2N7HQ3yNeTCKJHVPoaQJIsiamX+RMUO5+VOcr5G9QcCb4\r\nsUMYlxCEE1IDTRW3ejfu4nu1RY4qU+eTTMDwmIIhYiPB6L4gUntv5YEGCP1V\r\nxP4qoSGQtirRnIyirGkVSxvam+efZ+5FBewpwiWhpux0X5Y8b3MF2koqueI4\r\nlfdhnMNF5iltunpkZ/YStRVJH2qyZmajpzlmtl60ie7nCsQqSDGE9uB/suP/\r\nF6crtaMKbjATDJS9Tb9FdUHSnsr+TOTvMT3kKU8X/3+wQmOS7H2DnUFUiLen\r\n1EKSpiISyaPXPSCSyvWT6Z6L3CW+no9kWc2JtYT24ImHeI7e5H1YIdU4v3fN\r\nqn+66xTGuu6qoKyjtkLojOiU+ZuON3gQKiYBqRiir6V+LMj1pWdEJymp3Rw7\r\n+zjSTTbOz3PjARdaS0tZeBNefsf7aL/ULL4kMwGsREtZOh9NAM6qOCyjHTXe\r\nzKz3T7dAFgA2YSrnKY4HWxeHQX9Okl2HqLQ=\r\n=CEmI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c2df4624468d99280d9dcb0894d04d839fc8673f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8d2d8d3c4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8d2d8d3c4.0_1673302991174_0.0537228372524432","host":"s3://npm-registry-packages"}},"15.0.0-canary.f476fdece.0":{"name":"@material/auto-init","version":"15.0.0-canary.f476fdece.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f476fdece.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6810dfad618996812529219d03cdad456da433d5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f476fdece.0.tgz","fileCount":13,"integrity":"sha512-cJv/LJyWsDGFkDUmpHDG97DgNkaoN20Y/cU9/tlj6oNjMuaPyYi0g1mLm+eiRcz9wjjoNwhGl1ZL5aGwcFgjLQ==","signatures":[{"sig":"MEUCIHWrtBFVOqE/RMgiXw2zpM03sOl4RdaqrutsSLNJADhlAiEAhOQXJsiZGxlGzRRBTwR/jx1nWpWCdgDReru9iYClVPw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvY61ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoeTg//ZPmk+o+NAQ2iuKfd00hPCgPmWN4jgTKfoD7gNNRwOedYWFYw\r\nQ7LEkfOT32bmo0j0S3TYUYlZE8U3CKXoKjmpt+mh4ap5U1+8bQiur+f/STyb\r\nmsN8xR2djDRMJb+RSLdOSt3Rk+c22GaYaUZqhW6lDLDHfisKsDeL3aj0ASWS\r\nL6r8OikirOX0ShbxwENH3ZZF3U4tGNZiVTsetsCo+KaqzAYraaE6D6DPupRk\r\nJOVDlwcvoMdDGtMvQO5XTiYUcmaVr+ohXRQ87ZwlFbu6BRxQrCRTA0Ns6639\r\n8cxDQneaWK446VGTNFNBkQwFToW5U5M6OY+7/zoFVcKxCsSnRwIirYhcDajD\r\nbXruuZNrwqrPJfbaxuMyUR1Vm7EllnIFXcyapoey+kCr6c8JoM3cur1bWBNC\r\n85RjpYK8Y4W6o6btvvEhiFCxPAROpLc4QLBZf/1zSxpGt7TNZIR7zilaGL0t\r\nyyynNjUWUjIGKQDXUx55ieHAdhcK0DrQXwJC9GMXcutND2zNynJp2Vpp2RE3\r\nIGCBFHS6LaYtj++sD4LOIDYGAhrH09LDOHFlHgLVCStcaYFbwPnma2AEoZTN\r\nKBtmLCOD+PiratnriYNfn2nlUnGD+FCe9tcniYFwoCatvjqppR9LVyKPB5ml\r\np67KiPFjNcJ8V/QFWKl9uKKkRdX4mth5LrA=\r\n=4Da/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"672d5b55da7c88d57180edf75e7ce65ca2fefe0f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f476fdece.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f476fdece.0_1673367221544_0.323039288609158","host":"s3://npm-registry-packages"}},"15.0.0-canary.fc6ee6c32.0":{"name":"@material/auto-init","version":"15.0.0-canary.fc6ee6c32.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fc6ee6c32.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0339ee4c3119d7a462bf27c0c364ad1a6fe02b7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fc6ee6c32.0.tgz","fileCount":13,"integrity":"sha512-11EtetPud++GJ+evYJzVnEB8eBGsGj2bhtbPJqS2hv+S18W6gZ2Sp0qTaQfPzXAjQOn4aAwmCmWM1tI+9BYhDQ==","signatures":[{"sig":"MEUCIACTGj0j4cjG2gvq21Xn46fN+sodiuccDUb23BVFAtYlAiEAwXtpG0apyGbXtE4x8uOX0kNt2k5Xibg7uyc16c+CBao=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvZHfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZug//SAVDFGSY7PMzRGobm87pXgHubIoI7jAQbKEFPB2Gg7m4flNj\r\nPNBQR5VQu2TWNKNz5p6m2Vz30ssTww7/fwbBVkEI0HVZMPgzpNB5Gzx18IIC\r\ncPVGzooJr/w+PKRnDVi8/bSHSjUwLivtsBcUyxeSzRmFtknSe+KRcTPlptr5\r\nZLiOO68rrdRjUE9xUuy5L38fUx8YkUDveRQUaDTnQkELGjYu+SyMcqB2hUpw\r\nTkvT4YyOTPB0zqnBbDExlno+pgrJqj7ZKdZPL5PLE2CyLqVlWXkclJvgqpqY\r\n2x04tVMAs1F0SY6kGx9TyueTwa751xSRHjAvwaI6waKKns37FTxJvrqioVZF\r\nJnuCBSLgGhOc/GGEtjSJpr/DC7r/HJmFhNO6ey7B/fsIGKIHyATSEsLRHWK4\r\nU86NLT1vlGrOgdY5jHOXIRAjXxxEc118poFvhI+JhzMpnQ+Lxujnnmwpn+Ow\r\nURjIN/oB7CgWpBo3CxvGc9sv8CSSeXUfUch3CH7Ir6pm2HyqKPYk7AO4FQ7r\r\nU82dTVqzcijbSLbNeABHEIx6FOSbb8gSfW/6wyhtjAz3nqRDR5eg4QRwTr7g\r\nLzm+KG22nIQ4GjgrNmMKS81M7HqI+pqC/L9XbNmsNgU6JPALtNglVMrefCsd\r\nxb3U3jPjeNnSSZ+dsZPZg8UFuM8OxZ9l/QQ=\r\n=yJaT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"225aabdf74bdefc3d2f70f268ddd04c501a821ba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fc6ee6c32.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fc6ee6c32.0_1673368031714_0.6809857841172975","host":"s3://npm-registry-packages"}},"15.0.0-canary.73537ab0f.0":{"name":"@material/auto-init","version":"15.0.0-canary.73537ab0f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.73537ab0f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"59362bc166db1e97a9a1ffe3ea77c2d419f419c3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.73537ab0f.0.tgz","fileCount":13,"integrity":"sha512-L42FZKPqqD9xeJetl21meKC9U+T6uEJ59Jnx70TLUW/QNppht1rUVrW+ij5Tz/5yktRpWYhnS6JTbfjwYwxHuQ==","signatures":[{"sig":"MEUCIQCyyoo6nPXhWcSymqp/lweJnaGORX5lBPv+MV/+rCaj/AIgenAvrYPDyYLR50CdywMAnlZ8Ew/PkukrGdi0cek1cdA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvaonACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVUw//eK+JhCWXq7g1tIwMy2Ur8QBkrvvOmB5g9B05jsniXTFm6J3M\r\nq6TTLlCpahdSfwSP1Mbojynkj/Re95UORzZd0ZvA3xGhUVdvBbMAobf9u39V\r\nrXTYuHCR8ed9V+oPmUY4zB1uSyx0wrVeKWW710AAcdaU6Si/WPkvsRzSqgDY\r\nOpHXON20BJtPdIthslBV7FvNwYhUSgybnBRbxNyx3GIWyzCo7RUPy1fGn+/e\r\nDhND6lypQSlwrvj5WrHYe1WUS0x8g6la3k6OYQdwnuub25LBqV8NWTR9sKOG\r\nJ5nzNeRYwvRnC98ZA/vyhHkhw8E583XcigeGbKr+vxJOXH5BRAtIz5faTj/z\r\nHmrPSxpDStsecj2ODX5oaYle+qKa2ydFLMjTJ6H1JaevTYeREmkWWWVNf4Sv\r\nTdq3JwNcNNX9AZvLZCptyTWbIi8NoBDLAUGwDFlZUU44PS5i3d6q867eANaq\r\nTXhYk60iJA6E/aoHncU1WqtLP+rBQCp/LcM0Q+XLq1zLESRdBqZNmdtjR70E\r\nctUqBoxBn8kgwSKoc4eDz+wfJbLe9/XPus4vCqSLqRq4b+4dbN4DZcgFNn5z\r\njvuJ08eAEeKgsYcOn2Ctuh49zWo5Sb4BsBo/drH+14ufzsDFP9pGZYebnswM\r\nZSBuiYR0+fa7WIoUxe0ET4l1TGrtu6xhj38=\r\n=JONA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cb3a480e7be3c8c7bc8f8ee0acf1ee8145f266b3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.73537ab0f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.73537ab0f.0_1673374247348_0.08053809859321936","host":"s3://npm-registry-packages"}},"15.0.0-canary.684e33d25.0":{"name":"@material/auto-init","version":"15.0.0-canary.684e33d25.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.684e33d25.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"39caf04e5647b6d73a63f8d90a744a92d3394f31","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.684e33d25.0.tgz","fileCount":13,"integrity":"sha512-OigQTmrVzkcGvxNjOaIe5oItTFPgrO9xLewvharDI6m6yvO1z7OBnkcW+sFN6ggLNYNxd0O1u9v64vMsmeDABQ==","signatures":[{"sig":"MEUCIQCcOKPtqu2ikV4mKsfxLO8btrwYHjr3ROt/QurjA+mr0AIgDxRioJOeKpMxjo2A4N7rUbUpK2BmTJfK4YGkpjRD/CY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvbnaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrX6A/9Gq984Gjw209Aveh6gIU8pqXWt1WBzrWoMzpfPShlW5Z2qLsy\r\n9P9Darphplf+sRbB+ss6gP2/nNVuQSDTmgI1zFFvZi0YHojLOSAEeooVD8wW\r\nmY+8OmYr0sUjglDhL5QvJE+JjrYRTzKoBh4NpS87/jpDaKz6hzI3Iwo0ScfI\r\nDuollpgWQzKrf9DOJjqo8LPPHxiiw8YYi6PL38sM/l5D5gCwBJ7TSJq7CFBX\r\nFjZExsqgh26lj56EjGZWf0p6Ivx8sizSK3wHFCKE4CSCQ16dXMRz1RWv5xjp\r\nDgviH2W7xIXk63EFYIhp8m70tX01H2LBzMxLnqIplJ2BJhPswZhKO5dKvojL\r\nAfaD+H8SRdseyfYxwUkgtNR0ASkrKOQJnpJsCJw5qQj5S0xxHZ421i342a3J\r\nnZIpagcZ4+I84vindKAGWMTqHUBg5K1kZwXUjr7d31D1ovnhXAS26p25fimn\r\n3LcM73KFHb28UjtlJptVzx0hs/B3wKYEEJRIeolIUlYgGBlqRR+k8Rv2Rv/i\r\nV3uVM5CLk8Wwn2DErVFZvrVyDiAEUZg8R1yp/ZYOAbpisKNCSP0mZ2rZIkRg\r\nSoc+0cnf44/JkvtctXifQMk26wwZI07oexpLYrc2YPFjeHVxjAkPBkWvC+RT\r\nzNGq/5Il65UaV2TndgwyyL+QHiOZx2sDvV0=\r\n=h4n+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"518d26a1e091925c1b3a87f4d4f4dc828580a863","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.684e33d25.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.684e33d25.0_1673378265912_0.6854419190514474","host":"s3://npm-registry-packages"}},"15.0.0-canary.0e89aab6b.0":{"name":"@material/auto-init","version":"15.0.0-canary.0e89aab6b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0e89aab6b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ac3536647e043bba8f76c45a3d17fb3d196311b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0e89aab6b.0.tgz","fileCount":13,"integrity":"sha512-eM6S9on6D2HZyTfUOJXiayXxKfzkj2ReovGdcGo331osN9vEiHUqjmg9dsiH5drXE6qbzDKmpJFGa17w8wo7gw==","signatures":[{"sig":"MEQCIGb9limm/KXVZ1+SPUgK6e2O5hp0H827l237uwHOTgzWAiBXMVINydTdYM2KtUTsVOhSpLAMjsx/AJ8d5tey82PHHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvuDdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqXQ/7BFYfw0KFnUpHarqXdkDYH0AHrnAsfBlsTtcwJkvsSmFlD6rC\r\nQrQJp2wDNH7R00awtEOgFTX1zKG4Qi5ZBfcyKDORPuwPA2+FUybaOrKfY7NH\r\nURqlzINfYgHsoilygfl7U5V+iSEgkitfaXy2CKr8VzbzpEEDLsD0IYMryGIG\r\nX2z5tIK3TZiQ1iwwwJ2WOPZaPWtG+hEUdE9HO102E/LcPCyD3fim/Uz1t6VY\r\ng3OB5wSGX/1HAXMViBvsFMkpaAo4uMCMr08LITDTd0jIp3qgGrxeupKFtI/n\r\nW7qalytFeS3RzzV9I3jzBO4OJoLjPC1UvzDe8y+c1M95yKMcnICHSkuwPOu6\r\nyZxFdfB7qzk0dd+tvsGqQgo37quvtT4G96cHqwfy5XnFeXi13Wq+S7AJsHOs\r\nvLG/hunOuXIon5+Zu9i97KHSR6JjX4+I2JMo7PsCxGyAceddVVIzh5LelZsj\r\nOb2QlkXFBR4YfX/ppKbbRTKyicyl7lqHX1RgEe3+YNqx+uBCm+BWuFUU5P2z\r\nQX1xCqcnPBlPJPmwiqIchlLKB5T5PdHxqLEXh9uk3SrffmGhR2ch0BI3626u\r\nDnaQbgtnKQe1xpQi7EljgLNYcpkzkKdV9ioYM9V0rjPC2mUk3IZ3fGJ8WeT/\r\nUG6ccWkE5VSlw35JG/FELjt6YGxQLY8+g1s=\r\n=zDHW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e4a9f0d636d7f4d6c0fbbf49a7016627715eb3b6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0e89aab6b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0e89aab6b.0_1673453789194_0.21549147855426276","host":"s3://npm-registry-packages"}},"15.0.0-canary.b0103d10a.0":{"name":"@material/auto-init","version":"15.0.0-canary.b0103d10a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b0103d10a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9be7e112cac46aa1c242a11ba08cb9e2ad2c0a06","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b0103d10a.0.tgz","fileCount":13,"integrity":"sha512-eIaBNoG+uU/yGWBYq5HO7INkM6Slpdo1NFG+0D6rZGCHwspKp/+2RaFR+9GyBb47cx2/JXFgrg8N2/Qh58T6Jg==","signatures":[{"sig":"MEUCIFRRDIlk5BeDHZTejOs5MfIcvRlufp7rNlhvE9wr9PZPAiEAg9zAZXno0US5dSHDbSErIy2TG1Oedax3gMY00Gf6AZ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvwnjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaAg//c+UUpETta7H+C1L5s9cF0Gzfa1XVC0l0EE/oFsfrPHrExUFm\r\nTiNNywV+vDcrVdsGdiIiohneeLd6XACxNxxbnquCP/9vdVV8xEpqiPd34z3D\r\n8+rMrEF8p/e/D1IewuGaGTu6B4uBIZVXixfUSN/lJeKITowc+4RWeOGPvCjE\r\nqj5V5DFt9M3OXLOvxvc5K3lvCvEMejUvPr2xoDoMuUJR8oLoupeMTIOnArqX\r\nMbE+4My6rmPBnzDBO57GwCtYU2rdpV2OOxQX+DkWe9/xwFBuJ7LGC5CIiVs7\r\nF9QfCGrzMuL/eQckwq1k2gx/pdZQcBn7I8BoAAdMYRt54GV/oDNPDa4WFU4x\r\nxI44fR7sesqoErZX6fvKBRnCLnQOiVatWUe0aQB2IFk0BuUy3ieSYZ9xPsWQ\r\n4CXv77q9643EFeKx/f/r5Qmq5SE2RD1P+rDQ2RDgdWbNySV71kOfJsWnMlCM\r\nmyMWvcu0ITlF/81FnInzmSYBke2F5bFG+J/9Zp2q0DACondhPARCE/418Q45\r\n2OH4zqaeCEd09j7Mw1kfW2tMAO4VhYaHpBzxENkOLIJtIW2CIaseWFlmaL2t\r\n1/tUwB1VAbfMYvJ4fTAohO2IbxMCDGTg2v0Qq9URQ/Mh4PpKTyA9BIfUKr8S\r\nw4RBcxKw6ZGORSadie/au6vqlLZwQN9Jl9k=\r\n=tcKH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0e133b89a4afcc8020dbafdd4d22c734080d2d17","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b0103d10a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b0103d10a.0_1673464291576_0.9564993146838277","host":"s3://npm-registry-packages"}},"15.0.0-canary.50e7a5312.0":{"name":"@material/auto-init","version":"15.0.0-canary.50e7a5312.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.50e7a5312.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"99859324cd5ea95a059fa6165adac9e374c19593","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.50e7a5312.0.tgz","fileCount":13,"integrity":"sha512-mx+RCgh+lLEOFUV/eE3IAetzoFjfpQvzGjjhwx2Hmmh+xsXbbAe5fYO8Jm+jYLFtIWqfelNK9Zh5lsUvxctNZQ==","signatures":[{"sig":"MEUCIQCjtLn/ZUE+vK40zf641agjrM9e89jXJ+72/PrWQU6c5gIgGQCnVrBNG9frYPPzMUkqP4il3QChb8Z8Huwt+kZZRwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvyG8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0VQ/+Mplm8xKaJ6Y8i0vQd/wRnU28+R1kjB/qUVFGhIBgXOvK8LSS\r\nKlfL7teJELQEucSIcXUzNmqC6/fCIl/grJOUDLU+zmwFN+NQTMHyyFEGmXVA\r\nH0tI5sPNhparsnC3annKJiDYIjW9YrHzI3duvfY39LENVL5x9SVMp8EjrjZH\r\n2ieOaffNceoPgM2hJOKiCF/OfQr0IoWX+swR+0WtkJCgQOsuX15Pk0lTHR0n\r\nAHcu8nitJDd+s1CyphGD77r5oAq81ZxF6lsalxjakUsyTVmkByB3CIpS6LKD\r\nMFd1lltrX522SHNBHdP1LzTV8HvYcbu786ylg8DPDLBNCnMuWC3gr09q0CRI\r\nzk4UM8b3IxCFLlogLzf1366HccXoBKL+5Tgxu/2/jFyiNhoX+a5+A9h3Ny4t\r\nPKdpIuPkOiaxtciyVamxVqpd2QnYecUG82zjrpd0xhw3IM7+wW61J1gXyh3N\r\nDkURtJZtoZQmtE+xpx8ZBwIPOgAx1H2gRzJUVZm257RP7A3ZfAuSxTc+mWci\r\npV9DNy+VUBp6/OZo6cpU2b+Rx/Y442z8o7fN2mmRNrE1cBQKIrjF4B0AXgj5\r\nVjDd3DcE3Tk7uycMqjTOctKp854e4dBQd2Cs1yaYxTPTz9gH6hctbLDfwNb8\r\nAuAT+BNWLh3AmZtDXRwaDEgQPDl3YsM95Yg=\r\n=XjEx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2d4b8df3edcb9b5e9fd8d8b6645dc9519d92f376","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.50e7a5312.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.50e7a5312.0_1673470396612_0.5348627122914467","host":"s3://npm-registry-packages"}},"15.0.0-canary.202823f54.0":{"name":"@material/auto-init","version":"15.0.0-canary.202823f54.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.202823f54.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"02bff57cd357fbc979ff430437a4b96e9c906830","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.202823f54.0.tgz","fileCount":13,"integrity":"sha512-0ULDJv0z5mo8KnYl6ILE4ESwsal3Uitx5XK4qOcjL86yHc44bhOxjjFZkHr7HQ450UkxxqCBYVxNDa08LMXg7Q==","signatures":[{"sig":"MEYCIQCZClDtGtNZrwkzgsmdjHhcxGjtI4fZ5sWgYULK2bKkFwIhAK9Qka+/+Qd/t3kPZhAHrcbEBUlCnn9ipowLRQEDE0Yd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvyt/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmol6w//bUb+B8/egWgnGwGV2ZtdewQ2zd8SD7vK9oO5ipCpWxTYMF6x\r\ncUof6V3/W8i60sHLaQgIFUyl0KEgbVwpfcnHWqO6o9RPckz8DeOEIIpOYJYE\r\nTkGQycd41pK0kX8yrXt1mdh54wolm1IBSdpFL8f7Pos7rvadJZuDF19fsJwj\r\nPmWU/cSm+FTtcJm5yUzTldnrOz3bnzxEWeBJ+gNADpgrLGpE8hVpy8jopb3a\r\nec7HDp6JAGdNx45ifFOKuZv6SYJDWEikn9N34WFtUigNkj4TAF9AslqfI38W\r\ngG2cYmNnVzpic3XqJz7uDGbl2x3ejMUIq1n4HE4UvH9FrvQUkF2kkDekISVy\r\nkdr+iXDOyCJDHI9RVVmI+a5k+4n5kDWmT5TvBh6DpUq2z8AKoJAcZwPGDM/z\r\n2j2y8uq3blvPJOOwdMn2elvyaoaQUdQCSKMHPsmcboX49qrjkdoSG1+CPsZY\r\ngh6wBsxo/pyW1l8h57JNP8lYdBVbZV9TRPIl0sV7JWZkLEtftZtOHOJU20ya\r\nw/VfCUpP5CDm4itG+dJxcluuozc8qS61L9gaXsl0tuzERyzHx9daYzqMVhPe\r\nLOAyyR4P/0Bp44Ju/CV/+GfaxbvBWTbrUChAHK67c3g/FFMuCs3X+HbBmLnD\r\nC6RG9a/QewhpLPEEZIBx+FN7V0V2lFMrrL4=\r\n=Foox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6a4dbcb0b4c7d96a85ebe59a5ff66d2469e177a0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.202823f54.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.202823f54.0_1673472895707_0.08003942729737323","host":"s3://npm-registry-packages"}},"15.0.0-canary.199fe2a2a.0":{"name":"@material/auto-init","version":"15.0.0-canary.199fe2a2a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.199fe2a2a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b364245e50a1dc060f0655bbb1213ff898a40b0d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.199fe2a2a.0.tgz","fileCount":13,"integrity":"sha512-Bi9X/JxiHgzj0lAFMo3rNprVmkRfyu/8HgfGrb1dW9s8mcFHFdSVEN1rALWzmUXqhbPTeT2MzREfp5WZBhYjFw==","signatures":[{"sig":"MEUCIQC17QWbeNdlzyRkr4Tnu8rWcbTIfqg21qedI+nJdNkdVwIgWW1HUyxMttN3GKLKresRSAFN1UflZtEu10bvnOVY0QM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvzAlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZ7A/9H/3Vr4bqKGIFOUv//vqZipoHtKevmEGLrGc/ohA+LVMBA7cd\r\nc2NNNLZhCsuz3hnXkHeq3w92cmGqRu2oOIaGrlITtmh99XfBAH5ydG4BME93\r\n/+mz6XNMlv1hnKMUuWptZ29CoC0m+j9xiEQtyXEGD3anVYwlLavgFpIWZb8W\r\n2DyLdR6Wk/txkvsFkXy4+CJ4JNcpotKtdJm5QIddjn6LYochVklyBA4X5co/\r\nQDlHn1405LTUigTuQjhqKnA4t/h4wRUMzL/roc6sWPTLuSkd7TGXAWqsW8y6\r\nfjYg8koVTrMn7V7WXeeZGAAPA3zFYIQ4X/yKo5yUuSI0bbXwFkENeasAsUY7\r\nhYHS09O8x1SA75gE1roU2E9FDnJBYnzIwVgR1MlXBboiY1sc6FCiub3QkKCm\r\nyHvGCYtTAr8tOiJdLxC5woii+xZvtyGJLffIJg4elzUYRDstS44lg9EWLFPA\r\neMKZrnPu05SLekWwetHtRr9jFCVU9RxrupIpBa+Gcn8qM5ghzI6NeSd3jP0M\r\nw2c8SQoK9BDV73G4aR37zxNSur7BmOudX9QWP6MmfPVIGQE00Fxzsijl1zHp\r\nlG0abmeuDO65w66o0kw2FTafL/h7Z9wcqQpwb+0E2QZsy+n/hF9Gv9a25pm3\r\nTKrBOYXD8T5Dv8n76KppNZzWz3H3PqVLEwM=\r\n=VmLk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eb39fefbc3ca102a52db83ad19b42f1a2b52ecd1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.199fe2a2a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.199fe2a2a.0_1673474084884_0.13667665431150744","host":"s3://npm-registry-packages"}},"15.0.0-canary.8c0786d6f.0":{"name":"@material/auto-init","version":"15.0.0-canary.8c0786d6f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8c0786d6f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ff059d683f678544284beb79f658983156f26c5d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8c0786d6f.0.tgz","fileCount":13,"integrity":"sha512-dNGajDdtD8QtkCLwH7nHQzOWtzVcgXTiNgI2sVy0EG6MgtY9EsiTMJQrAmZvDFlet4mghhW0gX4O3OqkaRUnPw==","signatures":[{"sig":"MEQCIEKVlGDYpfMgoPRLsxqhtNQFe1E4W8pCbu34ANhB9r+0AiArnFxoKy2wfiyMr+ztbtgK+Uu7XW9e9jPgvYiVbAep+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwBqpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoshg//frikT5sDFWYCLHM35ledr8o4/sxP8Ev4+gY+zOpotSJTUXmG\r\nw+7EYNTKdQiXYQWMvWnlBrC+yVNPaQQ6mRmEPD3nsdtlxs9e66gJHZ+plNIc\r\nBi9K5gXjEDbgDIopadvEuY4d/Ur5Zy5oORFUDCGyQJxcwbPDWgxfznCzEwh8\r\nUMZjHHZYq7nTwvXu6i0Rw7tRNZuCaof2e2UlWUK/dY4b40jcGeC6LVgBs9/D\r\np7jF8IqFSq4G/o0oMZT8HrB/ToIvjNFjHvdmDOvosr0gAf6WUTw4gKSNOyAf\r\nQpc3AYmg/HZtQcrhQjW45/bhh5/7ZgvuBlQipm3XOheGIzpodw8AP0H2uGMN\r\nRZfRzHyJysPvpij+qkemohXk5SpiAUrztK8pj5n4DJOcVUCnwBHEanTF/0Oa\r\nEhQvE4dAPq7CK1qWtrWBOXQ+KBTbgswJVHKo0nBuqUntRxlotkgvBsD1jQcM\r\nNaTmWfONuX0UgoawxWSGdaF+f7nYLUal4MIiwW2LEH2zll0ZkMhVZgtK5EdH\r\nkZTDnTYvEdnjnZQJsS+liU+HJq0ODd506XSYAsi22RQ0qTsBLMYf3Hk0u04V\r\ngV0RrETAQ3fC5FWbVWKmaHEyYKtwydNJLimiDy8MVI0vFwvP9s+QgldpktMe\r\n1qBbEg/1Y5J5fKmruP1Kuf6t50Of8J58QVc=\r\n=lPlU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9016794346c3c3cab2cf31154ef6a35eb5598994","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8c0786d6f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8c0786d6f.0_1673534121807_0.2520426619659515","host":"s3://npm-registry-packages"}},"15.0.0-canary.8a74f7c6d.0":{"name":"@material/auto-init","version":"15.0.0-canary.8a74f7c6d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8a74f7c6d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6b136ae6c9ebc775ea88d859e70ae51eef609523","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8a74f7c6d.0.tgz","fileCount":13,"integrity":"sha512-YukXJriG1Tzz1Le++wk88l5ctfYjolSTEHYhcfD3020VOH+NSuRSnOT3HbfDFauVaLLWi/MehSlf0A9FpRNEiw==","signatures":[{"sig":"MEYCIQDCT1TpXvTzdmpvupciPIFtYJvJJJoFuEU8IL3uVkUQuQIhAPi/cqitYROq2fW5yoz8Ty8zOB+qF8Xl9oztEEzPkk3N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxvXBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraIg//c73AUb9hX9I6yJVxat0U6SAR/N7asURITkDGNAA/lbwy8Slx\r\ncHUvgS++oK9pshKMKp4n1G7+FS1dFlltd4+U3EdWdLl4TfOq0aOlLtsFm06q\r\nkmL3121QcBJAgQxDYwVK+MiTi39bQmd0QUj1u2wJ5BJyBmPE98a/50A4diIt\r\nL1iGafSHgRtJ/58krIfxE8hnIcrB7ZdBboBzrJSn0cro3d4R1wl1lEMi/HUc\r\nuACfpOuLAoRisyhG2CeIOeJLZICTA5o8vgoW73P09hsHyBu3OmaGTeMdXC8w\r\nY8L+ztw0VJOBEPewwn6MsHxuPi5NZ0bCWZuZg3qRfP3PWsns+4a0XCm7HPjb\r\npDo16Fym4iZtO1Fszxyi4HbrwTCAKI3JbGf7EXSVTVJcrZfrTb7F4R+jO2Rs\r\n8r72nhgBpVAytY4l0OeenL4ry/52VSrNs4qrcBd+BYOVtiJm4AurSeo10vbE\r\nPo3ec1yOX+W9UW0aWAj0/TBZpArB6ImCi8PVU09Xxuu15AMt8JsMdLooKwRr\r\nhSFb9SB/PcmcgSuXNWWOPTUf0kfaJgb7FNIz/LEo+Z8PJMcVcrmqFbQv+QXz\r\nxaXuM2m3pspMedUjcwKgYu2lIgvWXEGsiIaY7PnssRVudPk2gP5f4IbWljJR\r\n/IQUt8AcQxtdhcfVJ/RlDVbGCtGIBoegAew=\r\n=yuds\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9c676a1e4329c32508a9e7110198a336dc704f58","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8a74f7c6d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8a74f7c6d.0_1673983425145_0.21205073944093167","host":"s3://npm-registry-packages"}},"15.0.0-canary.b4687fdc1.0":{"name":"@material/auto-init","version":"15.0.0-canary.b4687fdc1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b4687fdc1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"04b3ff2fce0721738ce603ea405ce03e65c58083","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b4687fdc1.0.tgz","fileCount":13,"integrity":"sha512-Do9H0mPCJsaLeOJ6xq6gs9QfIXkS/xBk49TRwcXVX9RW5alsnzRDWJI54H+m9XsGC+OFOiLr1EwRQjTY8fs1Fg==","signatures":[{"sig":"MEYCIQCv99YjjFVn/Inejtew847FNnrvz+jJpPzUtz1x+3fIXQIhAPllzjEbELcBb9E2s4sSdtoyPIHe2LIqvvMnKxzRzv5e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyZ6IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgPQ//dLeC+Z9aP+RZqUZaVO0fhNh0jfg6WGqaJeaUK0ESEUr5mVy3\r\ngJ2XVV8sLQPxZ0xjdcE6PDImLMzBfyPkQiZpy7SFLBfRujMps06Nm9X0cRr1\r\n+7x1esHiRP+LeyCTDUUNTgFOnmhgmXRP7gxx/zctF21SgsZ7+/1ZSSu4vflI\r\n1QVlvZfe+SiQD8QmazJSbJqkithUYi5FJoY7soTSyPsYIcSlYn7oyNkxlVRo\r\nBaOdTr//71saTfboQUya7aPPUyH40pjwTATWPYmyR4TfWsIBbxM/l6p16HXN\r\n9BnUfvDudgmuUkdb0xfKvmztCPGDW/1J4RysCESYJp558Gk70zaT1AwHDlS2\r\nwVyrUryGTc0YNmBPchef0aVh4r9kFKmALFkVqNn1pk8UOefQ6n0aEVw7blZ8\r\npNiTbn5fxNu1kMVoMqFgX6B/RmesapjrTtV2URSxFpu+bjIg260MLetv/3xe\r\nsC+YHrQndVjSiwH14X0+OIox6Gut6v0FK3BOqene3aclqL8BSkVRESR8ewY8\r\nk6XwI09nau6qiKJA1lA7e6mXAnhPAiSUB3mK3I3vbP26AgRq0qmUFRwGMVMb\r\n+SKtCjnTsiKqHxjgRaL8myri4wIYp90h2itVY93WZNghS8sRwxtTbCy33tEd\r\nIMZSc4h9jB/h2BggdrGUkajuOqwEqC1llz0=\r\n=zFZS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c9ec43c7d66a73ecf591f982a42a582e639a50b3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b4687fdc1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b4687fdc1.0_1674157704614_0.014481644268482974","host":"s3://npm-registry-packages"}},"15.0.0-canary.b836b9892.0":{"name":"@material/auto-init","version":"15.0.0-canary.b836b9892.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b836b9892.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b6af4107973b5d86511031b1f8cb93bc4141abb4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b836b9892.0.tgz","fileCount":13,"integrity":"sha512-SYjfm36FmVcMCaAR3rPQY2JX0wkR6PSwRggVT20AowOX2iYDtXa9m/4bf6ildjFtjoJe3fqVjndNZcJ+l+BnmQ==","signatures":[{"sig":"MEQCIF2z597CBvXUtTS6N3yJf3jZd4byEyd+J6rqY1CN/FPEAiBFSopKexowbZubexBnc/IMjxrnxhEyFWlNrvspVxx9NQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0F3hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqttQ/8D01A3kzdoZZ2mwgmtEf1C6lRlGUGxIOifkc38XMYaShl9j6d\r\n+0F+BvIIYjE9pGXbTzZQ7SOIXa3V3W6+Vw7R710LzmTFRdCdJupcBxSWyfLb\r\nxd7Mg0wH1RrSrL4egKn8Xd7ubx2YwY9sQzMTChii8m352FBA4Lq0NHKKuDjL\r\n2Tit8FPx1kG3ZOK9dmUeHSFR1D16LlwUGQ4ELRGwTRPWI+/733p/EleX6xl6\r\nCCMAyLtZbibk11gv7vFkOntWKkXKJ6GX/9KGwdF89keiP9dVFUr9jzr4EW5P\r\nNzGSTezZa8BehRJNMDPguB9Cg7LsipCjrl8/sEkpF2a8fTCQRj0AG/Qc7Ywk\r\n+Gui6w2MEA00RQtWrSWOY2LhZ3Tte8j++KUKSDPjjnxvpJuwPh+Fqrs1I4Hr\r\nRGW9DBvGOGcUD5QuSlVSKGQU0kh4Ve3hzZelMuVFZrn/lry/xa9gvrNhQS+w\r\nsABpsaBFdB81gClb6H34tGVDjAUtx0SsS4YGUi6u0tp/HcoQRVo5Z2DDgcNm\r\nnWhDP4iDvvwUqrZNcsRs4ZBIlnG1v2v6zYPnTbN2HysKceR6uzdhpLiNSrDs\r\nYiFOLDg0IOi0J5lc00A4n68r6VSYg4/TpD3guezrqrZEeUUS9kUvLQVIt/Wz\r\nQ8bUfpxlZTjBpTkA6Gp8Iacq02/Axkc5S3Q=\r\n=mqgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3a9a0b2e64227ef1f8979cd5b82be3767b100551","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b836b9892.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b836b9892.0_1674599905080_0.25210195601857044","host":"s3://npm-registry-packages"}},"15.0.0-canary.e8912fd37.0":{"name":"@material/auto-init","version":"15.0.0-canary.e8912fd37.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e8912fd37.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b31e8744a37ea8828fa46f0967bbe486bb9f870","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e8912fd37.0.tgz","fileCount":13,"integrity":"sha512-oGcNxUjmIDpvJGUiR/WuYEQeFEtyFC4GwKRO+9djAFi8CVTMtyXWx0aK48l1Y2exAVCMrsDtKc+zl/XJ8856cQ==","signatures":[{"sig":"MEUCIQDyyd8ZzhmCrepWnG2O5AIRLifKcxYmR+QZynLSTqyr8wIgSv9S4mhFSKKn6oGP6rdaUPy76XHKKtmmrV1ob5Aeuqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0sZoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvchAAifYkgKMGLDlGZW1b4+TaqkiHqabJVa+5qiVsXDViQHCgLR5a\r\nJSCBmX3Oc4jdxJMMw+0khAA0hpxw7crHHkW8ovxgmQ2SisrRoRw4sLxaJtKk\r\nIS44qk3wJZb1QbUWd0VIWL84nFPSiaAmc6QJpWZcOoBtfB+KsxlXNAe6SOfK\r\nuLnQCae9O/Xs/6t8lktOZoLaOyblJOGgqF2H8x/8gRSkCON4qrOKbvz2goiE\r\n2yDMxlYQdtAS5wR/3OHIc0CGCkoP+WztwVVKSy2gcNvV5DWVd+sNFIxu3oLk\r\nyMkipwLEe7NA/Or7NeuoGnmYwIqSpSI/7550o2saxC8+iialw4BUPmEQsrMM\r\nd9WgLCqsBrFLWut9gK4/njCeq6GlL7Mx0QsjxzPPxj8uxrOOkh91ahmH8GMx\r\nfpePX0yXFSa4T0dFRudabjvdKsgRWw8gPwUI+uYEXzJOsZ1wi88p6Pwii+9/\r\nOsQKHkp2V/2b5HdkPPwCqwyf+N5BZMftqJndFaoIeELMoTGFarilIyZVjs5E\r\nZIuVfiJzmD3hmmM4EGhQJmdUQCuucAvsHlA9cUt1KhTQRIWT0HBFTSZTnAy9\r\n2ziSN9tHuLunUoI4KcSHXbee8Qvm2w/oO2wXesD5bJkkHHJPo4jObGIpcW7z\r\nM/Yw0DUXfAL3ihp59y1k05+pzg0YKxEmmSs=\r\n=fJPM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"72b44fe55689bb591aeaddf242920ba73a6e5bb6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e8912fd37.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e8912fd37.0_1674757736464_0.39850177298759726","host":"s3://npm-registry-packages"}},"15.0.0-canary.16fbd30ff.0":{"name":"@material/auto-init","version":"15.0.0-canary.16fbd30ff.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.16fbd30ff.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c3639c9d44061da2691df1be24a8961353e9cdad","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.16fbd30ff.0.tgz","fileCount":13,"integrity":"sha512-gqdpnbYhqdaQgo57mAclBNOY0Y9qagocuGWnxWNlwQS/Rrv3sKuYmio21I27yZE6b04/2A2OW8UL/9UFPqhaQg==","signatures":[{"sig":"MEUCIGu2m5tPNy80cfUL3W5+RVNplEXfvk1ToloDDifDMfgNAiEA40JytlL1zzdvZ+BVvOjRCogMlhb5v1zyT24xfZqL+ws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0seaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEEhAAi27lGkL2yjrg/MNupgYZxT4/aLAbEOnV+rwjJjzHJlEoNR39\r\nVxoqr9kcczbpJ9MgPPdrozQ+RcR14l5leOTgHHc9l/9w9c3mlgFi7dYwZtNh\r\nqLTHZDw2WxX7wCDT54AXluWcFOuos73axuUq3y/Db+vEO1mJQwWKOrPZKYmR\r\nNKRgWmM+k6oRLvWzhTlNhJAdXzP8rykLZyvo3aXXnWMtPC+AoMBDEn1KM5Jd\r\nfuRVYbNdThGc5bY7/hz+dfHBHnpi4zb3OZOq5Yn5gYZETAiwdEycL+F+AaYe\r\nQ7EsdLprM+TA2FdGmfoRDqE+t913+wr7FGsFfhCPi11R3QJCJeAB/PIWBNN/\r\nuFi3/FE5PuE6dFv68aTQjrcTeGpCHIoHrcUJ4ZJczxznBa0CmcbedGbyLTsi\r\nga7EcRgLNJYcRsB5E7azZW/wMsgDI9Cqe389uOz38Oh+86dbP3OQ1VjEWQ1E\r\nt2kzFjuzdglBI0jzV1wPNDLvu9YBpyuadsxJGYWa2CZlJ5D419NMqmdK8O1p\r\n+G9MiSz+NoDeR2iMf7AWRGOL9pLB5s+bb6KdcIqr4IEgnHJTHqZTLu6KUh8V\r\nj+QC35ajEbJObOvokmcGR58GgqpHUuL7E2gB7vP7Lb0lODG0AIHVMHqUOYM2\r\nn77e10A4DF4/+3g9oexLhN/95+lGaeUbvBs=\r\n=0+hV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f4c39ff05bbd1045563670b4ea50b0be51a91d01","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.16fbd30ff.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.16fbd30ff.0_1674758042356_0.3839176190920712","host":"s3://npm-registry-packages"}},"15.0.0-canary.033ae083a.0":{"name":"@material/auto-init","version":"15.0.0-canary.033ae083a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.033ae083a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3ebaffde3c1e1101e91d93a86f4f286230daef05","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.033ae083a.0.tgz","fileCount":13,"integrity":"sha512-sYLIDEENXXTZSn8riRteIfa35UQOLHELoss5wWvMj9F22ALwTVsD090kjRj8PcieZuKCXMjo49QO0yfzQvmqVQ==","signatures":[{"sig":"MEYCIQCer2ovtfrq7+/ugkMNY/UKv9LHF+eyekxHyDiufD+1WAIhAKFof7LOVVej8iIqrj9hu9h8TYfM343bxg+zjsnkkHuY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0tPJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOeg//YD6zrpcGRdQC5s8b3kgVe/oashNyC4g++DhDKcPEcwe+ZDUg\r\nqENAUyBODMk1XNUzfdN3RJHYZj/Hk/9gvGgIkw61/WoZIPxd+Kn1sEcO0YUM\r\n1Hdv5Jw5fHHYMW8/fA1MlHJJaUUZVNizeI0F9KEwPRWJ822WAmVtKR2RzrnA\r\nMQMQuXCstEzq/+aXbRFI0Vj+BlyNwHL1Wh70btVMOoNO+aGgNVdkty7488Pe\r\nftrHohR6b2m3PLqCpdxo4mjf1nZX3bq54EXPSubRxHY1l7ZHmarcslWt6MNA\r\nU3w/GIMNrmGb6dAxX99MEzIwL78G7jCncIN5XHOJ7UDX88c19GGyyi6mcUQw\r\ne2uP/Dvsg8WpxlqSGzNmKws0iLWBgPWcQGoxjqpn5Xb8gJbk7DP/omTdLHFS\r\nEjNcbj0ziinRaBQVk6SFF1enRZk5aoLNwJ7Hl+VRqD1KE3Vgoy68l7Xpss1D\r\ns8A+pXNhzqrGQkyRzDslw6QfAGJLMrBCuk64uUk6LKZleSRLAcbliajNxsfD\r\nV2yN8pLd9zRBmL2D/dOsSmq0a1E9Ti3m+YgLXtBZmazJAfMAKm/lypzHWzc4\r\n/opWGwX0tKp8soRlTJVWY5EnfcLj1A7NCipJtja5WFURbPYVH00Q41R9TuOt\r\naKUmgPfalE7Wr+b7fbxVY3loPbqWzUn2Ltg=\r\n=MT1a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"89ca938c110806d9150a3889a7d25689661c2fdc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.033ae083a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.033ae083a.0_1674761161093_0.8360912655870241","host":"s3://npm-registry-packages"}},"15.0.0-canary.3a705fa1d.0":{"name":"@material/auto-init","version":"15.0.0-canary.3a705fa1d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3a705fa1d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a6d2962683c9205aaec88e466bce54392da8a117","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3a705fa1d.0.tgz","fileCount":13,"integrity":"sha512-LlpgRiy+MvIDexY99pUThHPiATzM+stn6bzbkgHLI1VkCBsfX9i9yydzaXFeyw4NROa7Utj+2Cfxrxq8V3CHOg==","signatures":[{"sig":"MEYCIQDaLwd1VArs6ftfCn/BNh8FSC8vDOXhpgF6v76MtwPrfwIhAK/mNn3kA7F5ShHfcYopy+dm5QbT00gzyyYN73XEtTUu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1FNqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBHBAAk+socIscfwGnU8rnHdhqrOse+VnRYl1+GlD0TBZewjqpXCdW\r\nlYLokwwiX1jagcpUSl9Ntnhj9FhfLAsEhi764lUBEEmQDFj8JSm4TVJ7FaRS\r\nC8NVXgx+v3jgX0X+PizjKa4pN077pEV6L4PIiF2kJLOWZAmS1uQb3DT5rJzv\r\nzJnocE9K+K4v3rRBCwRyfYoFvVqr/0e04NLuGfDbXU70r/EXidd3ZBa9G9Is\r\n3EL+HbxbBThEThiuVPkznWdD+Y6MftLKvv+jNeo9eX4pP7kaCckULEyeudTo\r\n6oN6OpQIQwQuyl89SLu383BxodNXWi2sIgShLo9X7HGdNEpqFJ1jzyo/nXFI\r\nsshVsqTIiqv7Fcxyy2SxdLC8tuCjuzm307bqfXNLyRR/5OOkA6HbA1FtPIcr\r\n9sA6+f3aYYny81Z6N22GChYFQ+NRNOnGCW5mh30lhX47Vu3QZ9ZQ0cQ2siFp\r\nUgHjjg2AVHA99D+VW13M1Y4X/tBvo2QQYO+tDzP9f0ppG5RBKFqaBPrn3v/z\r\nmphvLppzxKeKsbiZV1N2rZCuN9A3x2L8ewWcYPDsOQD3FhB3Pzqns5ZLAjy+\r\nFBRzhwyG4pL5kcxhjWe8iL0JvfHx6xNUrss0n+3o+Iu1UV4HcwIL42hMExrU\r\neETLwFSiXmORm63NJEKpmumOCQF1+DlrCbQ=\r\n=1xk4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7e0f3737f51c1319f66762d8021d6aea33391733","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3a705fa1d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3a705fa1d.0_1674859369759_0.38582056714127955","host":"s3://npm-registry-packages"}},"15.0.0-canary.d6bea2ff2.0":{"name":"@material/auto-init","version":"15.0.0-canary.d6bea2ff2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d6bea2ff2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"563e8784ffa48c5740e153b30c5130372eeba17f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d6bea2ff2.0.tgz","fileCount":13,"integrity":"sha512-0bqkWHT6xGFDRwEHSyZ7iEMjXXr6+rQsa9EEfrVqqJYqmta8dvjR+4TKzGJHvT/hkBMrdiTu+lBganRZ8KKn/g==","signatures":[{"sig":"MEUCIAvaYOcsIKmEc47Y2Ncd82XcbcMKRetlv52BWbCS8ZUmAiEAzbTWxfOgsfBp6kqpYOClmeu/ExcDUhyE9JGxqMmcDhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2TO/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/ZRAAl3loYP2xX1RW8t1JjT1bq2iRn9SyKBbb3sTXyGzC0f7UrakX\r\nnU6EjAXu3aPVULXHxVgvf0Hohp0Gx5d+AypOSQnCQ1lUSon/05awqqQX+F2H\r\nrAJTH3ZBUqYatbV10RCHjzuHHu4lw2GYZqhdZyv5K0tnrLneRssYiXpTIFSX\r\nWucvISv3zNNHRPFOvJFznwy5ZFKNoenAtjn5ObKwF/a8j6QD/GuoBeJbWWT/\r\n9xCv50obk8JmSqV/wYMIg/eOrgOVRkfjont8Wamg4IkQ3WKljgxySIFabnOq\r\n6Lm7dW0JhDXcEugoDSsJUtbjYDbIQo9K268awPEZmyjsRBjGcWX99vuA6Wv5\r\nS/qmPDqNAwU11PjDoMiPyC4oiKiTHGp5kfy5arXmQxq/OwT3ztqtk5FydWe9\r\nDCdgJSz9eoG5VyJb+uEyGIB4nj8VYJuLQ+YogXVdN8hk5yu2zP+gOFQsrCrS\r\nHsOgsWzlh4bqPff9ShdIc1vtbGynTDyl+e2mYEVBpmDo3H7AizKTsnHIHFSn\r\niW2nuAYIr8A1so+I//grqgttSDIZLaB+C1xeHXpt3kqEwKAClbedoYaXEGhO\r\nLzwxfw6OkUsGBY+yi0M4MYM7pNr0/AalnIWCaNBowEZ4xqsWDY7tyuzudRp6\r\nZ9i03Y13mASPoqf2W45pR8SSD033ljRA6zg=\r\n=efiE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e4210a9f21a7e6ee007d475d5bd7e229dd7bbc00","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d6bea2ff2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d6bea2ff2.0_1675178943772_0.34231105466508027","host":"s3://npm-registry-packages"}},"15.0.0-canary.0c94182c8.0":{"name":"@material/auto-init","version":"15.0.0-canary.0c94182c8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0c94182c8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5f23264f9018c389c6120d047053b36c6bea10a9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0c94182c8.0.tgz","fileCount":13,"integrity":"sha512-K9GU+BJyFhPxogQTtglxfh0MF7XEVMLBwkpOniYHo3TjONhcuci/rKLl02kkOcGWPsYrSL18lHunKUsD2fy4lQ==","signatures":[{"sig":"MEUCIQDs1DrlIqDiwc0EriCb4XCLh6QoBfZ/nCfNoLZFMuGdkQIgSygP0G2DxtKexCOSoWn8IweMmTptDZpA7UhWLtRgqzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2qSwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqq3A//QOMbJj9vElKsh0hQmY+wAcesrsNoOAfOoFg7NnSXYHhvVwGY\r\np+CdykhJt3ORQC0GA+SM+edhuuet3FXvt6bjsq+T8VJ/c55OPSr24Jsh1q7P\r\ns5upN62tWv2orvVwwz/VT84g1KVM6bD23I6DqAuQzW1vg1AiZ6u142vX6Vd9\r\nKoNArlrW4pbjoX2GdKH0xxvWB2kwm7bU3iLiwtDCdk9J0lAfToOYziNfSF3H\r\nusi0hU81w4jKcV3hbpGpqQXQFCCC7+rAA1PVFVCiG0+1x2QT/w8E48slbcld\r\nR/QJ4ROrej90BoE92E/9uIPTBsrOmQgwNv7NMjKtiK0yP/W53e7QD2WjaOlX\r\nhTC/gi2gdlnABaWWR2vpY+J3fgvdBx9hjCgFAj5GGTnPtFBBzAI3d9r4Xh/6\r\n+fgcqWlcCzI59oX/b85VDRF5ey8RyTiAE6W7yvyF+P5Zhl0WB4EjYzw7UntZ\r\nSzFZjUZ8ZiZ1NuKBbQ+W7fYXYQ4h+5J4527ljtL3LKffK2tX8aBOU88byY0u\r\nrUlgVf8iAfOLjyS294YAIz+lj/oaA3ZoyLaXCsc7gV71kXHHGMPJ9mpxVNOg\r\nGdwFZymKeAsh932WINfQDMwdm577W74jHhlhrMbd5bxkOQupgWnqJewiDGXU\r\nCp1z7Oe+8/g9d5XTnuZyx3wqdnGtsg5JWtY=\r\n=1CcE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9e58d1edf6370fb6c26f762d83ca31f928149e41","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0c94182c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0c94182c8.0_1675273392745_0.8761611843140054","host":"s3://npm-registry-packages"}},"15.0.0-canary.15b221540.0":{"name":"@material/auto-init","version":"15.0.0-canary.15b221540.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.15b221540.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"960b0243d1cae36c3df2020c881f62ba9bf04994","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.15b221540.0.tgz","fileCount":13,"integrity":"sha512-WnqWCi7Z5k/kf8TbjG+aFLwSxpul+LS2VOJtS21F6x8TqNBGzKtNODMre9eX4adjlsXaDGWYUJaPsJn5vs4dAQ==","signatures":[{"sig":"MEYCIQC46iiQek+et8vJDBN+z/uf+XJWFvLWmua9zaq6+bNl3wIhALkAje1smrIrV8foFWH3VeZ7D4IDwo86Kq++fsupavdV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2qaiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+kQ//Y0Eq32oW4GRLAfrgUw+11YRUSUdOFLSL6JWjzoWRH2YZA7bR\r\nQuVjJ9S2sibW1oFo/Awbx41cImJFRK6q1eBOFDHA3VpcySRdctxc+EYsb1rX\r\nyyTKZ/qgFtxOwzcJ+Ak9UF0RjjXz8/NioQPx03PECBa9lprNGjWi2qxh4LAv\r\nlbzhyg8S3VldZMVwRGK6xwwIaFetLBWsu+caG60KUIXhjbx+hK1aLXzkYciO\r\nbNOYDhGZT852QYagXDglIJVp6r47FeLP5+ojsZydcSjitvKjZktPq0aTdXMJ\r\nwVcYnmjC6/AqiLFOArVEJYgYzERO+DFi3jxNy0rhu/fI8N93qCbCdBMm1+EL\r\nLovBTIPv2zzsNLIuXMoPzffs/s2t9HJUzsObjneDWtaODrx38Coee0/hYngN\r\n+1LN5MHYmTQ+tpHv54A3newhFUmuMoPIDv8M/LraJwOxOdJeCYoEOj55AK5o\r\nE701uOpj/qtM8QQF5GQxlqPHW6Nse9B+Vm6NTz7nIqQu3gki3g6TL4dVHf4A\r\nA4K9ZKrU55qyqHwrgEDWHuttd0w/kxLwCr5I0wS1Eky8SXjMMEfayJ5K7Ayd\r\nQKpZWdTsz8FCVywB67GYFHnR6xdxBi7H+1+GjS1hYXO4Zdi2ZUxKqt7HDTCZ\r\nZVenoecmnCInuWM9/f2bzcaLI35WV034A2Q=\r\n=eDHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4bc6d32435d33a7b99197f32b85eb0b730acd30","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.15b221540.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.15b221540.0_1675273890289_0.6075140858554093","host":"s3://npm-registry-packages"}},"15.0.0-canary.eeebb8bba.0":{"name":"@material/auto-init","version":"15.0.0-canary.eeebb8bba.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.eeebb8bba.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"925408dd8fea53b281f7d67b2c739c8f14172abb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.eeebb8bba.0.tgz","fileCount":13,"integrity":"sha512-YGYhX/h7VqrcoGCmQgETEjL7o7Nk3iXUspxohdHe1Y/1Pd6QhDp0DKVGE3UgyOgBeok/bE6pkHPoQCRHArgl7w==","signatures":[{"sig":"MEYCIQDF9l/PSjGNypl7JwEQHT4+NiTtb/xEbG4OWy1/jvRN2AIhANLlQ2FeYgOuEnMy7zHVWJz20fTulvRocxjscD8L/DDp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2q2fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrpTg//cgCHQKdgEp6kWZHFzZjPh63gecZKRYMZiUbtqDBDJpv4KfC/\r\nCxjiGMGSFoyiXLiDIyQrTsQbNm+4RCjOTVwkdiN9ICLAdbCrpfj4dWKvQ7Pu\r\ncxz3MC81lKjAfSgKZ60GF6lPWzDTzSddNkhplzWLnXC/T0LXhnoUEFof7LyD\r\nooRw6NL0inadIokFAwxE2qlcB/KQ2HQp7IykyIRlL0TEJPLkAqdpg2RkJLkt\r\np0NFJ1OVCjHsuASoMWvhJwx5KsHSlIp5Glc5x1+nUdd8gtpDlbGJ8gRjy3ol\r\ngLzJjkwLwoi0jl31gJT4oDtiY968WVCMt8PGI8cEeIBp8PD6G+fdtoGdydS6\r\nXrFexW81MOYR6LS0jep6zYJzIzCA535pjGnT4/WFoAMDqRjZOi2HRpql7e9T\r\nNq7n4TiA/sn6xSv2QfOVTuS/nXmDBOzgc2AY8zd4xbFXcw+0sWZaHmsHZ93B\r\nqbQkMxTPekSwUW7ePwr7KR9A2twIbqymKjuqxEGhaKKjqCpyur2eazZR55Xi\r\nPTQ3nnY4LqApz5NrWDXt+kn5hrEsiKkbJCFrHkBIm87y2jqA6xaLCwyl4v2S\r\n9ugVa34zixccAN9bsPplLjxSL8Nbu2yM3vV7sZQ0eQHYYb86m2loEEa9plaL\r\nifNBPYmHc9nyPaTg4oLcsHS1571c0GFD8dY=\r\n=C+ht\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5c8d0d2ef793b8bd564888fdde6b97e8a2502cdd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.eeebb8bba.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.eeebb8bba.0_1675275679033_0.08979296801461834","host":"s3://npm-registry-packages"}},"15.0.0-canary.6a4b3f834.0":{"name":"@material/auto-init","version":"15.0.0-canary.6a4b3f834.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6a4b3f834.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"06aa2d4b31ad3cd5ae45ed1798132f8da6c95baf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6a4b3f834.0.tgz","fileCount":13,"integrity":"sha512-w8IOI5nwzvZQHRwYip8NYJ5Sg97ojP/GLRfhGZ7ISY1TSYzYood4ESbcd+2pUBQzdLbAE0SWDajXXz2uiGbyfQ==","signatures":[{"sig":"MEYCIQC0NvCeQxGJatpX1EdJyPqMR0ht/b3KNc/xy18zrAlGIQIhAOzmrSrXNZWABQdZQv4/8BkFGZqNsY7vnsFPkzchZf89","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2rYXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIRBAAjFwxPZFJilpSrNwup7HOFXXh7PqZa7K1c7Htk7fpCJxrHH5y\r\nW5D/JNf9Y4gYPSDszqJ1Zm4OZ0Xy8e1OU80HNspppsCEO2xwDlHZ2PVxkfr9\r\na2BUTMmMj+QstgZhZyaIQDBaIC4ue4KtGgIUx97/FPay/EAwsryME94ff9zA\r\nucwnb7AUGTdE4C1pRDjLJbm85gY318eC3pTETWDJSlYVs/TiQKPJyfI64dIu\r\nmD3dycMRMQFJWuZc+hYumsS66u788/NaSzA5/3By06AaLpvUkdMmJG9wzBcY\r\nQlY8Wp09MaMyjzpjKsC0+D0CWXdgZrZxFBrfWpk2/QJdlk75RHA4qhkFHrVC\r\nwr/0LOMZRTN3wK7deJxPghDslkYct51WVbV8cf7Vwq8LqOQ95KacNLPwHvA3\r\n6Ck694SGlhaikIDbT8mYReyc50EmWk5OHXiuvv2WXp3A2Qn9JBgbr2dp5P8s\r\ngex2QSG7DNS2vHhh4eUdQFZOTW+ZmuruTETO1HHJoaYjfeJus/xXhk5tYJEQ\r\nPMBqW96C5OQFbDHl7mXkSI4vAA+z0d8wQenIsiB79hl7mi5+Hfs5TaQVTXgj\r\nqzwlhycTXFPjf/hXDlOJQNCHGANMzkCoAXW8MO75VTM0KpZ0Q5UFP+T98izr\r\nRAmXtsLcxrubNzaEzhIvph9paSyAOzngm00=\r\n=nZTb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b1f2d06637869496d98898f4cdf709ebbd279ed4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6a4b3f834.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6a4b3f834.0_1675277847491_0.04009063135844815","host":"s3://npm-registry-packages"}},"15.0.0-canary.b177b40e2.0":{"name":"@material/auto-init","version":"15.0.0-canary.b177b40e2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b177b40e2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b6f924b449b582933988dc0aa262fb4d7ae1278a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b177b40e2.0.tgz","fileCount":13,"integrity":"sha512-DvGGx8ZgtqzAtog6K4hVh8aiMGqHI/ULzKCPpUd6gZVBHO3sosG8yu1+JLpLgcO4RYoEUcDcPZZ3acRXVNIPjA==","signatures":[{"sig":"MEQCICGQmZGgpC5PoeTNrkqAfunQp8gOgqnZdWyFaXGV1RlkAiB0u3fiOpaxsSJalB3a1bAfCeL20SUUwQjEGBaFIY+dFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2y71ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKDQ/8C2Rne39Mr5e+GEjIfsNDspghFyk/OeIiHia9JwJBw65xniQK\r\n9lfaMC6ikjn5DInMkgGhj2x9fc/LKWHogd8g8CduUy/1wzq+6LmGq9MFNzqd\r\nZZJ+BkjLESqQtP8Ukr2TNaLpLCuafmusd07rygNeCje4eGbKX/4hZO3bN0QZ\r\n8PlSdw7XyS+hYwYfQggGOJ1YLJPoU9pN/LrsVidIENe14KiWCc/q3MsySJsA\r\nL8HGZ8C7/YTRawoM4V3pYxpiIO3FH8UqFEnAEXMKUUM/j+LmPhPzWhAu8v/R\r\n+6vA+S4IDlgh4SuB6as7NavtbnzjpBC3uYId1vgs1Nk58P2OVyHfLXE2TWeq\r\nvYF6WBV8LKu0i2e6M9LjZ0lUKMWRU/0aPL0PMIkaMZj9+FeRpoeJIhDvbDyw\r\ndaXVmcFmxEQAb4HWxlbL/Rg8pcP9jLnszB8hEqAl2qrTjb9Qd3zpzUfsEj8x\r\nDLWeenxnYxS8/ILL68QxT7qMvcHKUFWxnAbsAeQC7TbhMPzmTGQOsRN4vNgP\r\nSlMlD08VcdCYFcDIQbYg6UBcn/4wT4yJ2+tPpLE/aufDi0xLzXdTN4abwhnz\r\nUFGQFBdoBQMHOZNo7SvPLVtZtSTr/uBbc3A/YPgkf1WfpxwG6sweYV0QXa99\r\nL3uxWPPI6NRK11x56tF0bdTx1xPuqP17rk4=\r\n=5XFa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e3b49a7dc72f9c88710ba68c63d4ddce56a58fe7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b177b40e2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b177b40e2.0_1675308789745_0.4043331064788256","host":"s3://npm-registry-packages"}},"15.0.0-canary.d9f821042.0":{"name":"@material/auto-init","version":"15.0.0-canary.d9f821042.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d9f821042.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c2d6fddbcaaba9a811299ef1fde6e18cf6faa875","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d9f821042.0.tgz","fileCount":13,"integrity":"sha512-Jjh4oCU4ZvPww4Wuwsr7yZ3y1BbOBK+8bDF3jk2yZHQojDUwNXXCKqh6g0Fei0o7chT3zNtMNu9L22yRy+A1ig==","signatures":[{"sig":"MEUCIQCiEsctGBg6sI9FO9pr1CapiY7gRoenJ+CoBUSc9f3gSAIgJdm/I3xzJLH2hitqibZ04VNFqqRwvBDoQVOTIiT2l/o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2/SrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonEhAAiWX9mzbscYMttrF67x76TxL4FdSNe25jsSI8FvdN+XAr+3TM\r\nd9opcD33AAJ5+usAEp7ExKEOiEwTXQD3+IjIZ2xfz/0XjVq6uUSxAYcp71x2\r\n/JWnvTZwtIwszSZDL7/DC2Ak3o1FMn6cq8mVVpKnMsSc8/a//Uo2qtbBTT5M\r\nUxyrqg+IhZCFP2vevusEhVwg1RNQXTj+iKSDI9m9+XslZDwSZ007J5Ra5RFn\r\nJ1TiKx1Se4UeN6JI835GXYcHMxjvmizLZwQoAQs7rSaQYyN2lQ82MXE4CRF/\r\n9Pzigt004mTT7mL6BmU8PniLLnIGSBYeYEr9sOyryqafh37MD7c5zkGpp0vg\r\npg0DMkf43OxxA6BlShD7K/4SEo3KOSqQ46SpKTjZ0KpE6S1ypVR1bdHAZf61\r\nWPkIuExisKnQ8ng9ZJHY2s+GMSwuo0yxxgJZqvzcTnrcXHLN2etQlOsJV2yk\r\n8jhSBHkB+CoyI8j1ut/0F9lRRWKH2HRIWY8FsWK+9OJh8fChS5x/01l1AMmi\r\n9T89x4WThPSkDm6K0Tc6j5RNwWoxtQovMdTvv+/51CNfIU4r5k2MAGQt+mTO\r\neV5yDyQvWK2zVaKO2OWUpoyIT6yTwA/dnXw/NAYYTHGKMkMQeGSGtrwqK/fs\r\nbxrFWQwiCsLHfyOjPDiq/hIKZitc3NwtY0s=\r\n=ni3L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9748fa2e1dd5886715f422f644830717544192ec","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d9f821042.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d9f821042.0_1675359403013_0.5164310425672682","host":"s3://npm-registry-packages"}},"15.0.0-canary.47c7deb19.0":{"name":"@material/auto-init","version":"15.0.0-canary.47c7deb19.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.47c7deb19.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a9db8b4a6aeb4d868cdfdb2d481ec4a5e1ea3c5e","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.47c7deb19.0.tgz","fileCount":13,"integrity":"sha512-zW6lxTUaic0rFdWneMpig8PyRUFXJzJFXoKvGYpsCmlWqyE8qUE1DFK2lauoVZfwOddCjxCX7A6R1vxtbj94bQ==","signatures":[{"sig":"MEUCIQDleh8R9Rnrce19PhAJJgCyIjN9wtlufy9D7RY8p07VFgIgBcrfh/WDj0XBMMjJvsBfvQAeY/uz0NMBLdOE6v4L0LM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3M72ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3dA//eMWIRK2z3OiKerM1Q6WoIqL/2JZhU4XIf4J8EQqUjmkVGCWR\r\npNNX37swimF1oeUesx9BBz8LgEjJeg3wyvMwnSNZ8xI5mqso80NUPDZgPAZP\r\nulwGm+2uxjSVKbfEnyj46QiFhJ/cQB2difKSLhO0u4HcwSCyhUS1VM6yLVbX\r\nvL8/pda14yESPEj4dUO7HNTgrf0dKVQRaiLV7mPQVAYcWXJ/EKdDzGNRD3pC\r\nCm0w6M1xKCiEzRlziILues2DsxiwUxxp6uPqwLQssu2tP7LuT8f/RV9bmjy5\r\nZ+2VGdE5dtt+83EVHtIKFWQSbvlQUlopR1Qe+4eKcCNKf77Uzxg6hFVQYWGP\r\nlIZwpa04us2AGG2EwBKzcS1JDmR7eTMxwdz6Ek2BWtcxOS6caJjXSMbQwLJo\r\nfSaNtNtT8u1mug3NAzx9Y234ZKem/jKuA6pTdKBPnj2bjRGBNWvNlf56tiXB\r\n3k+bh5sgtLHTZ6RSndFSm3RGDG2xkQlc4fevAgCFNVqwA4MDuvXqCFk2zWz8\r\n9VIOosMjxiC2P+MiwgH2EVJfGIAwAqQCwKK3i9Ci6IWmE19G3dcPNijRZ40f\r\nBWljhpAZVXq4H2LS4mwo0SEMhwIUk+k2Z9kPTRHoe+gwA0q/tETNGZIawhKA\r\nkyX3eg3YFLbQKkbOTWmeQS81ZLkDElZlZ/A=\r\n=m6iO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d5a6886a0dce343fed87311107975111f62309bb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.47c7deb19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.47c7deb19.0_1675415285987_0.5442656322801738","host":"s3://npm-registry-packages"}},"15.0.0-canary.a16dbd1a6.0":{"name":"@material/auto-init","version":"15.0.0-canary.a16dbd1a6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a16dbd1a6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e90edd85a0c9352874a97fecb2e5acc32b1cf27","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a16dbd1a6.0.tgz","fileCount":13,"integrity":"sha512-XWkzub3VCgOFd5DVCzaE+YmtAkrYiLaiySC9JTfsPpiktDjCt5sEgN7ATEbu9lwwFd8w5mcAmNDC+nCCzTEhLA==","signatures":[{"sig":"MEYCIQCoTWdOQeNsjUMTsAcZS2X2IFm9CQ+mMB/vUsJz+ISvKQIhAJXlDySWinf1owI4Fz7JamxHIZnt4VMDtfkGcvbJ+eWZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3feWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiZQ/+I81gcw5VZa1l2M7JM9HHsRP9TEIdsKvHnX8zSbhNTUmfpoJp\r\nZf1DRo+k0c2Axlmkp8OM0imGKy4lWJ80hgwSxsuE9ozeYpcYwF1jNpUHcw11\r\na/YDtBVPzOyiCcXtZenlXNiyqMbuOZ+Gq25H/aEzcR33XdE9ukhfevSsti+h\r\n+3S5oT9yszt26Cyn4A8nhOO+XIeawrkUHzL4qyRLf3Ky3w4JHCkvPs1jCpMn\r\nb6qlXVVodlPTXMJtCXmOGZR1ehwvv2pEB+MGaFJTSEcOC90Zi3OEMEVsfpsM\r\nq7EeW8OHOzOfeVnKv6nl0ehYc0NHqObAfcaqSpKQvyqKy2raMUgvAIihSMYi\r\nfOuIZNfle5rb0DEQxs+OU9cUAfvI75gvr41MyEm6CceVYlbO1WNrBQN1dEzT\r\nvChOkN3UkeMA64xdo8OTh5uNd1gQumPgIjo+p8HjSy/TeNGrm8SeOjiMVubg\r\nGo6cnRpJ239onATTWBHTV4YkidiYZd2mfveE33AzeprDubP9tzPrsi68msHo\r\n0fsT4IHrZNpI+XqDrbiaaTmTV2Mghk9a65fsJ6Rsw1IpBRop0ywbC8X9VL5u\r\nPokvKioS9XEfYl38qxU5+xva/5BfSUSVPc79USGv+Q8dcGBPR3Wcd+LtG7ST\r\nIBI9oKKyiD3svnzjJB/qRy3WLOHyuQjBsHg=\r\n=l+PR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6b1923aa24f460ae50c61296787e46f524bcf15c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a16dbd1a6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a16dbd1a6.0_1675491222733_0.03130387410124613","host":"s3://npm-registry-packages"}},"15.0.0-canary.93416f87a.0":{"name":"@material/auto-init","version":"15.0.0-canary.93416f87a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.93416f87a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"eade9f6acb8bd6262522762dfa9caa63af572929","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.93416f87a.0.tgz","fileCount":13,"integrity":"sha512-PbOlzQh9pdeCfy6LEsl4fN9coiSQng8bgbjXhhl+VZdimYjJR2rdke6NSg9sFbbDAvHxkRDrCwY+cZbI/XETAQ==","signatures":[{"sig":"MEUCIBsw3d7iLW4/MLVCsEWNXoZ5X7ILdGLSlLPtbUIzaKA7AiEAj8R5xiaDEb93tj/0Cd7KafCi0l+e/WE48H7sEJv2L88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4lC6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/Pw//VZMEd5D+sGTqVmW2gCuCqvj6Hr8xmrsbn2M6grlTiccX+keb\r\ndOPVPao3kfm24VuDMc92o5d4wLF5xbf/q0wkAfV9wKq/ZQUYjtoPvt2qeKqB\r\nmeJCpQej14lx6iWL0HlGzUHfgqWAFJKfeXKWxVz/kI+YltiFYd+oXBOpFs5B\r\nO0xjMMMjljKApFGEBDfxt0ZRKcnG0dju7Suc3sphKVL0dA1PJcLNwG5D7cNg\r\nkeRJQp+hE7yxbEj/6ib/5LP8DudEcWTXwQOaJ/m5XaOpvUR7X4dVN8quKjIZ\r\nPQe+3z7BGFncGyJ2e+bKdiIEXuDYicOBUqvQ/osPfWyG/uQKzDSwLWpo1q5n\r\n66tL4DpM8a2ulMve4jqsm1yg/8kLWI0U+cM3nsW/ZrfhhkKgzNljFK94nN8n\r\niwhdUCxTrE9Sx71+kVIYWelh/G03ciNz88d44dsii3Lo0KMLc6JCrHzqB77T\r\nVbtbisqt9REsrCgRfbXEC4jWfh32OXMemGKTYHoM2KqiAL77lhx1wT0KkWe1\r\n2ox3E1vrXMSyQuscs+pQr6xAjUqH4IsRH3MZgxZp6tdmZYm24oKvzlQacQ1h\r\nvNq5V1HaSabxUk2GFOcNulLfUc5R2fqNSnT2GpZVArCChbrfqWYoy5hclx98\r\nbNf1GROtkbpSAysg1WSs5WO078qjG3Y4uTw=\r\n=CaaK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9f82375a462288f01ce4e4efe6047a3fdd9f9a9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.93416f87a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.93416f87a.0_1675776186398_0.12000258830731214","host":"s3://npm-registry-packages"}},"15.0.0-canary.49b8e7442.0":{"name":"@material/auto-init","version":"15.0.0-canary.49b8e7442.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.49b8e7442.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"01f97585cd2f23a77af5397e76886fbf088f0639","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.49b8e7442.0.tgz","fileCount":13,"integrity":"sha512-SMm7hZet1JuMySwM/wlDN7BoP3QFrR4v3SnivJ30fOaThIr0W+u8GCfnaPnRqhEECLmQeHar1cs7PP5kHx4i0g==","signatures":[{"sig":"MEUCIQDggYGTLi9tALhyBp+m5xcAkBXEGXIvNi3KQaRVEGrR/wIgKEdYWkqDJ0NZyfkzpA0CP7rhIy8N26W3jzUTR7VGL5w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4tn0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/GA//RPTT94c+gPEbK3FOQU/yFnHy83gHZncHn4U7awpCaNC5tAOY\r\n51ohVGJl1+OuN6PzIPdp21noT8pAq8/ZUuK00ewaHPPUnM/Wo8KrHgVDEsic\r\nVNcLI1s66VrxSySumO98r9zTQdSKuxVe4h1cyNpjs+45CCMTEfxkSJy44nC4\r\nq5/opOy4xmQvCGhGPrRBH5YApLiV7HK8omNYOm/+783TJOlNYDhPrkc96cSJ\r\nPr9huuSc1rnjbeZhuHbcEXep+exZi3YgqHeth06LKjoZLBbKD/XFf+uTaOXY\r\notL9bxSwCoNsFALy6r5heTI/RcNodmsWPiN/WmiCg+3W3P8ZtGHfA8wkAv02\r\nPAjvbfSZTJGoI98BIOOm9fCsaqbKk44gd4Xr0ZRpOXNgiKZO8+Kx2ACOEj/A\r\nV6YjcXZYRGMdhioyt6Xyg8vDDR9l1+bnQ4MtV0JhhMHHFgeg+8W+sRfIghZV\r\nZ5i9HvQKfC8E2PvmUOwfk52XPHXrhGU3peBdgJ+LQMvRIvacRi7zorydBIl7\r\nTAg5QsWpiXdiTwuCqLVlF3yjJIa9xxHYmw5EynR9NDsQBvqK/xtcZMAmscjP\r\nsoBPwhljomZCF3JZU9e0ykNTLjhbtta8IGOASyNdElqkhqbzrmxcA7h5wuom\r\nkaVulK9ppgMe1Ha4fX9Ob4d7Xb3Q2RW2UGw=\r\n=/UHv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ab5eaa3ea130a4b79ba5511e4e46e1f99b9e662","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.49b8e7442.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.49b8e7442.0_1675811315983_0.07326628299898963","host":"s3://npm-registry-packages"}},"15.0.0-canary.de38de758.0":{"name":"@material/auto-init","version":"15.0.0-canary.de38de758.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.de38de758.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c9eb84318428c4ded1a1160202edc600a2e459cf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.de38de758.0.tgz","fileCount":13,"integrity":"sha512-+QPAKO36Uc1jeU2l4PfKS/gEJOBfRNkIhhNIymCMsrzRwY3O0MQrN4+27fiAxqo+IkLwZyukADM/txT6ljlpkw==","signatures":[{"sig":"MEUCIBDQBoVIxQKH/s6C9BzWkG8YHJjZzYWO5J98Kv37TpGEAiEA007Tr9bqgQSJQ1wTJ5/1UDhNnrBQ7cFd4U4Ee75T9Z8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5RQfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpGAg//eBze/wT5GuI3SxO+z+in7fRpzHAEbi3C1lIM3A0CYDZ1Tb85\r\n66pM7RjLFraWssFksPw0zCYz/TR3PMqY66KKuad/W/+BFno3wlfj6dOT+dji\r\nS0QXTDTAhEKl7BtvTuOBjcS8A5lN2H/LbzXgMWHopxJrYU7UWK6kqmt2fLUH\r\njGtlnuiJX8X0Tf7D9Mp7H8TNA3e01mNJQZQoWyF5xP1BBVgOwm6WdRVJ9Zbz\r\niYq6ft5ovMY/QyXObzIHECAXljwS+qX7bOIRMIz8kLuBG0wqa1fbvA1wpMNc\r\nBH2LcR93eLWQqN/91oF6gv6x5gfCdk+a5k4GpSnOvsZpad7PSAEwGWdIhfg2\r\n6s0rYCVzNqMNWMMa8MJQRiDOV6NNAaOs3lFDO4PcM1CaFC2tdzj/UcH8tGIA\r\n+nQe+ZlQJFoxDIZsfNvjaJb6il4OFf9K+wxjargh6Aj450zTk7MmCB6UGl2F\r\nmdW12umgA8I87RM713PHmBGTqKXh/hQEFNRin1W4tt9UDXRgmP15wD1T6+wW\r\n3MwEkr8OmjMXCZmDnQ9HjLFvM0/JbXDroHQHDrbyCGMFnl0nwRTHMS8gVHKC\r\nYurgg80iD/afaJHW4lGO7uCl6xQmqny9XPOuOpQvIsy7T7Q8iyatB1UoJw6e\r\nM4c0qf1fKecoyi/zUj7tOwDv6RHuv8Wo89g=\r\n=XivT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"72df173af8eee38e00bf9af0ca5a77d5b780763e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.de38de758.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.de38de758.0_1675957279805_0.5583349043342714","host":"s3://npm-registry-packages"}},"15.0.0-canary.4d62de70c.0":{"name":"@material/auto-init","version":"15.0.0-canary.4d62de70c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4d62de70c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"335bafa4231c00131c89a0bc0ee47d1523b4907d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4d62de70c.0.tgz","fileCount":13,"integrity":"sha512-OJ9Qa5Ux6Gt8gaKTb+2tFiaEZPw0XHkuJb3vpVRmapfIwsl2PyNqdvtU0COxuKjEKg8cSbCHA3Y7CScGD2dmcw==","signatures":[{"sig":"MEUCIQDqxEIJTppbUdVOH/aKaUQeKp1zZUT2lBHsdtpX8CAw+QIgayVviNgZ2IIqN+EJKJhsA9Fe7+sPPrOM2sYWaCZY5TI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5W1dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTkRAAgRPN8W+Iuvogcws+WSL88E3USZyuENV+ijsfACd6LYjF68X4\r\nhOq8y90AQ7L5xFKCEXZhMYigautZ9ZnK589JF8YRfDKeyM9IdWdcOqz62ycy\r\naPaZ7jnyihj/eaMeds7QjEPxC6mLVLlb5+u4BvotpkDuodxQbjbmx3k2yl6E\r\nKQUurQ0HnKT8PNZforRZEZEOqkQgjJrRnwg1UQoy2q4YXRjf8ELB6S2zzH2p\r\na8/eQ0rkHbbAVB8nkNPy0VD5CJE387XLCogD5QLuxdx1HUTc83I+opPUAj6n\r\n1g9dfSCIrxzLdj8KTaINNAKj4sC9/0LWgsX1lJKYsjJiy01BuhXReR6d74Ik\r\ntQBpV7tWexT7iFPwxI65AlgDJFgmHBi2KPpOCKi+LC4Jx0r14Emp0P2a5Zje\r\nrB5bhqVnNfGyXIxcyB4F0Nz5RohCCZioY9jh0IiuylH3G/F6kh6apb1ijGD/\r\nGIw1bzQvQ50ObKQ7aB6hk8jokMkdDRKXWCziDoDoNdklUsXTM4hyaixeQV4j\r\n3HmTFANmrfy39gDJjHBynw/5ZLXcEobjKbcMybP9eNB+mNg8ELkXrdbad59i\r\nIm1j0Ay11PrNcDoSPgIi/wV1YKXP4JZGSZPwBbfOt3lKrZ+y7Ncz6Ydi0+W7\r\ngwqURyCD0awQW5oUtS9UJpIsDVWd3DXozns=\r\n=61jZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d2081b5045fc9871ff56b0d31ddacd235e2316d5","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4d62de70c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4d62de70c.0_1675980125267_0.9780874438634379","host":"s3://npm-registry-packages"}},"15.0.0-canary.6fcd8d418.0":{"name":"@material/auto-init","version":"15.0.0-canary.6fcd8d418.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6fcd8d418.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b0766080a19a5540c985c07701062e68cdc35f90","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6fcd8d418.0.tgz","fileCount":13,"integrity":"sha512-tSLYNQwD0imtq7csjE9Wh4WfJ5hJJb9r1wvG/fUulQRSOn3Mza1iL8J3PdGg5hw5IKXNnsOEUiWfe+nkL1LHug==","signatures":[{"sig":"MEYCIQD7qvuNd9GSKdvlLHw2wBvc2OS3I8LH3nOqwQCnHYqw4AIhAIUAUODwrrQ9GqM9eqIynWj+Rz4KiL0bDzhlBRxu3XbH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6iOsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8Hg/6AsxAbtM/p7ueeC5l9Cp3qvE3UV/NUH+MNQrzxTU4YiUVd1g0\r\nKYKQy0gqLNXhPcmzhgXrF8P7VKi1+qgo8Ejo7eRGT3SYKvO6IHn+BjVneN2h\r\n7Do0FlMyH1Ys9iHxhrqAdSzFl611rhReCjYBHDz1nE7HjxjzCXIBZOdkH9cK\r\n0rUbItvaEoQkTwegv3pFuH6CX+To5eGdRcqTlviwJ8SvlU6we5riiHhHzZvf\r\nS3Onj2H09MhY7N02OkqNARPdz8Q/1K8tVUFFpza3uM7XcLQGjkoCQvoGVN2W\r\nQ2+RhUwXiZ1BPPtyUpwAsVQRDPhjO9DWhM2EPcNAdGTag1oYtloFwXAIH+EF\r\npuj2/hyh60mPZ9OnNgIC6fxDd2qv+inyTiXHWYqrB+1bAm05iTiX80ULlBVd\r\nQp8bCNy8PGiVNZf1vzM0nEI9W6g20DJ/cOtnONfgejTuiuWZov7ufgZNIZVS\r\nRynxnPEIlN3GxaI/RDyP57yPim93jDSfumlGF98JDTaxTA8YxJuDAJJbdy+2\r\nliuzXnERdvznkfgBoaf5GstEuJ+SOWaILD2po74SJTZRQVpdvAhWzrIciaEt\r\nNbxnxOO3bfmsgepJ8zVNnA8e+DMvUfGBUDXg5Mq+olsOx9ooywRSILHxyhmL\r\noO2USM6pLT3Wf47TiehYimIUjeYkxUzcoW8=\r\n=rVoa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"39b4fd2a38e7ab9611f614a59dd1694de0b94cb9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6fcd8d418.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6fcd8d418.0_1676288939860_0.8891156300672711","host":"s3://npm-registry-packages"}},"15.0.0-canary.066d9439b.0":{"name":"@material/auto-init","version":"15.0.0-canary.066d9439b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.066d9439b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7c8fd2a7c65fddf547e0ede2723211bb11aa203d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.066d9439b.0.tgz","fileCount":13,"integrity":"sha512-NTSpX5ruw7D4KnjGxH3sVfwxNdvtJJCU3c1in3c9PMsc4hEOb7FH/VysjV4BiMHah5008XqJ/JTGMqSQ2wWVIQ==","signatures":[{"sig":"MEUCID5msJ0E2+LFTyCX8MdElTf61p8BFYRsjPSJubw9Z6PaAiEA+yU6b4EbBZiK/Syip7EvYuqgSctypdx4nv4+o9DQhnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7Tj+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1+BAAhpnQ7NV19u7TuHO5UU4WA7yOyO/I/Zwz/UUJI1Quh45FYi8d\r\nsXn8vSOZZa9mH8UPZ/i7zjsDaFK3/c4DWD8Ab+gI8xEkjbUBIbtXYgPf428o\r\nWurRDC/qlPMjQiUWjmZXIW+nml7wtv6SgVlcrQXd5eg2OvbMStFJRMVzRZFC\r\nUXfqQ8TSNdM8ykSERWVUbk4paHOyPKh7N0tQx0UIYkqJxEvsq0a4B6dxk6Ay\r\nX0Dh/ApuzR2s0FIsFfnmShdifHDp9bqN6WjjFjrHAEJ+4a8j6GZXVVNi3l4R\r\nCIaNspIVGi5t6WIoSOnzQRBMSh0ZExSaLa7I/QBsgvM/u9HCEpHC3EIGsECz\r\nTJTf2h9mxByBo/bK8SXPssTn4u+b0JuHTVU0O6+7tRdv09vI7nSjXtqEVHxm\r\nWCzuyk3uHL0s+X5lpHt/erWkocqalndJ9ww/wtjRbiB6f5hyXCfx356Gc7QF\r\nMIhdX3HyLknOuoSqBSKRUVIZLLvwAjnTCZfL2elPJBLdgACfPIVssG+BPW0d\r\n5y8s0L/b79uffXgLR/iqR0MSq+M2yCM/SALGpCj4kEvJN2m0hxIevIk7lCNB\r\nrZRVbblBIAP53+reklwC3wnRNj7gjbR0P1EWWUdXg3jcKQKSKk400tj45hNo\r\nuppfqB//rAVyrjUfZFOzD+45ZR/T5rhFkoo=\r\n=Fo5r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cfeee3e63b3e6330deff033d8054adb710498810","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.066d9439b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.066d9439b.0_1676491006706_0.030991366788688968","host":"s3://npm-registry-packages"}},"15.0.0-canary.7ab32468c.0":{"name":"@material/auto-init","version":"15.0.0-canary.7ab32468c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7ab32468c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1ab22060de633cb1988c7da860a535309a342678","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7ab32468c.0.tgz","fileCount":13,"integrity":"sha512-tKjIhEAKDQSYu3ECN268j0OCoJJzncbFByI2D7CIRSnjb7dUSdC13cxn2HOtJ0ILZ6ww8qM1B5hBvMgSIQTvyw==","signatures":[{"sig":"MEYCIQCQPK/VSyhmw3kROT61kEaQD2EiVnZRsXU7c86qXHR8hwIhAJLxY0bz1XJnghbC8EdD3+qHSRRX2dqA8/qeehSATey4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9Q5cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrciRAAoHb7XXwpm+DTpW0u3aQSJQ/QpCQlpkZxzkTdp8Sb6/ZNqBGn\r\nh+AD0Ka7kbmuBmLAQCnehkfBxHmPXBqsDris6iXzNRDfb0wQjPsK08syu5Kl\r\nh44pcDH4n8I5OZCHoEQAGsMBkL7OfhW4/0Y5m5ySiwepgo4UJkbA8ZK5R7ar\r\nch6rQLWj8MK0jCrCIjZWRdFZBJVyUIK/bLbbC1Phqc6k4RBbEdGl06ZhC7sY\r\nCuIAM6/EZQlgvP6EEnNpR36arAvEOoQFATZceAD+9DAbGF68AdR98/Z9O6Dt\r\ntS9vte54Xs+kt2NT+mxXGLj2JiQoyYB9Km4LVBoTOPuhsRl/PzlWFYhWI7Cy\r\nyUULxihjayz+Lz6iswro6RVcg1x9Soot5miY6pX/1khh3/U5b/bkTco/eny2\r\nH7+t/J4/DmaoUDztqMT3hSMI/gtWrGfOHpD+GUj0Z67YaGYfVJwJ2j5NB7iu\r\nn8q4goUEgONNp11nrtYk1hcZ8y9eicr6arWooBLtwRUn2r+t+Itgk6GuNXdy\r\nMqqDv3cLGgTpVY/PxQLFaOgnWjXq8NPKAxyTbebajFp7wqOpLqm+VCU5w0C7\r\n6k6iGcfH/6JskeCXvVBvlY6hnmkXDyz/KpUKzDD6vB0JXd7tdz/l4HJWqjTk\r\nwcFwI1f0Ne3D6CDV45ULCsaSHjYNVdfJOmc=\r\n=E/qx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"08b12f363223d69b2eae5d2719e9ff0da773381a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.2+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7ab32468c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7ab32468c.0_1677004379800_0.080997350222487","host":"s3://npm-registry-packages"}},"15.0.0-canary.fa27ba61d.0":{"name":"@material/auto-init","version":"15.0.0-canary.fa27ba61d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fa27ba61d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2970177d4c2686343ba99d77c45b96d125d607c5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fa27ba61d.0.tgz","fileCount":13,"integrity":"sha512-o72V/D8ifOXyeYLDc+3RyGWzHZUdE3VWFpAujEAvmqkeEbQt/FgaimFds8BCacgi5LmGImF/MOhE7g4epHCA4Q==","signatures":[{"sig":"MEUCIQD9hgdtSKSwH+cu5WJaxc3AHHvsyqQNIzDeqHJHGHtIlAIgNANAi4sx9b5UnXWQW4HxMVu1b3MZNBIhdTXkh3oSOFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/NfGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGhg//XVLe2R0NZi3ojfWwFC7QnA2rQpKsy/nAod0S9GVGHKin7c1H\r\n1JXNl/9nudhx0actux+/QEFTS/JW0bjjtNAxBLjlSh4s3+bx/5vN9I2GMV75\r\nUxZeqDwj5/2PzdcxaBPldwOF6bNZyydfATkzPuCaAkGN3y2k3fDjaxSmlBMJ\r\nPD3lpPsizLN94Mob9m95dZ+hCxjiytrSEb/ZM1hFah9Y4A53KOgD34h4PIn0\r\n5VoE7bHE1UyrisKU0JgJyZtJPfQfLY2+/uThxD5HlLSAzkZ7Ov7jAmW6cgr5\r\n60hMmRwxB1Qj6z4WJ7u0KBVc3YCLgXCugV7yDxW2EGjIWMQsp3F0Zeg2/UcJ\r\nDCehJGuUAXri3NX7A7m7lH6+vgS0AYRcdGpNOLqnGw2pqe9INWfc3Pzx3ruA\r\nbTZVCKggsRh3fA4qg+YPdi4Ec7QOlqBGK9OexNgVRbfB9mDrrgwQMJUGbLMg\r\nIbbmmto8wkY2m6VsiGT1rrp7fHxPLZuLqkntVczNYIjsYOp8UtTVFlmTDfVW\r\n1CdHlpferaJSbh0qEDIm2b0qPwzrGiJ1oYNiTbgz83iLhMS4oPe8UiDaYJoM\r\nuY2EMi0uYMFQ8/TXJuc4UwDJIQE6GyCqrmnwABvjGQZ0JsXwv9fkUNjmU5lu\r\nDIvUR/HWMs0IjCkaU/zHGgeFSunz8SnrMMc=\r\n=z4La\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ed40c112543fe3ecfc009ace11a6f0c3f82fa26a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fa27ba61d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fa27ba61d.0_1677514694573_0.6585531860801828","host":"s3://npm-registry-packages"}},"15.0.0-canary.311ab4d4a.0":{"name":"@material/auto-init","version":"15.0.0-canary.311ab4d4a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.311ab4d4a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"65af290a46947977ad1d8badb8f4add7448eb098","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.311ab4d4a.0.tgz","fileCount":13,"integrity":"sha512-UIYIq63vvEqTsZnjBgLLaWwmLL+aBXfeRWpe/K7vgZmcH47MImDKKrB0VJsGsTEuTs6abGeiiCntkP5SqcYf1A==","signatures":[{"sig":"MEYCIQCK74HumOD3VSkmrlA2zhd03CWSwjWvJqpl/y8MXBMshgIhAOFGiYeSBHTdEzXI681WIDgn6ZkzWNLvVtVS3nyyM76J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/Nz1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqwgw/9Gcu7lyPysFMXzlnvh4+otqH0+AczMO/6Yaln2GtvoJGpKn36\r\nfXnbJzdeUF9niJFyZIujatrmV07Ad8Tfo5DpD0/lUBjxmKmE45kSU5YwVVRS\r\njdZcFlWJDIkOpC+7dyj7teNTxnh4o/WfW+z1jDMt0FEtIgDem/fZQ68CZ3c5\r\nLVWzJ/jNMr/8/ok6GJrvKu8oZ/T9q/DVrSvZSeYu5eSkppn2ra1xccGFvXdX\r\ng2EG1Cq5LhT3OXcsN2uURqKJvPkXU0yUcrAnbTAsY56APrb8+U2zO3u0tEaB\r\nTeors8sGycJ72eulQB5b2yYvnhKAyAPlRiIhAmpHn/p9dmmwK3F54Z2p+AAG\r\nsLM3vJcyMMUjhHSmuGFsrvi12BtWMvvLBPeTrbo2ydDxTdtJVQAUxhFg/CE9\r\n+9k45fQYcD5mleCuJmEmeW5w7Rasoe2mrNUBFlaQY7Zt3IJF7LMW9pGoW9vA\r\nay9N3baGmTZBBpp1rd6IdlJwsR5eAUq6i16jq6/1pRMzvM3If2MPsos7uALz\r\nR51/jeqb+CMD/xpH3yxL2ERCwJk6gr3y8o/o2MkCDkYqKeuUFwvSOFkJ9jiH\r\nvb8rU3e7HjsdwSwpE1MnMGIH6EBwgl3s2/ncwPnDTaHFunGHbUMgbmaPIrcf\r\nig7Z9FPKnzq9jjm83ksxcug8Uhqaj2glJjA=\r\n=vCJQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"07f8d2f7bb4b2f30e60a6bd8739befd9d17bfbfc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.311ab4d4a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.311ab4d4a.0_1677516020854_0.9081417332488328","host":"s3://npm-registry-packages"}},"15.0.0-canary.901c83e77.0":{"name":"@material/auto-init","version":"15.0.0-canary.901c83e77.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.901c83e77.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9775b1c9fc3fa13491deec3c396adf422f49ff63","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.901c83e77.0.tgz","fileCount":13,"integrity":"sha512-xHYeNvxe36kL0hr6JM7ac6hHoBp3OXmYpZpDuIsoNG1az0hXRsCb9muZnGkFYbyuKRVrUA6XzePrUqEOIaqvZg==","signatures":[{"sig":"MEUCIQDLsR1rnstzEaJYSzJ44doAOnJhPOClfNr4BFhvWjOHMgIgSAlQErDiFIcm/78YKPwJ1CgDrjahf92Sk9lh/QqIIJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/PDTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSWw/+MSKwrQNA6owN0J2Zmb5anMF/Nbk6XrJVtxFKC/lwylo3XKV7\r\n8bbTlfYYMqf58H0/dHctzpHMWN7rd3yJQaiR64TSuDjjxqtb0XxcYq9w3IpQ\r\nYfJ8ZAzYdF8NPf48Pz6Od4k28JU/CmS4y6V7KT9iInyzl8pMc7jkjAe4mllD\r\nbR5fnNq01zhSHOuYwDct+9EjNLUrEeFEoIEm+X0h84aAwlwaYMKYbKcqTZ87\r\nwJEAx2JZwMKRjB/ejurE2t2vnSc6RlMP+K3ne0vQnQr0aajg/fKrRcfxWMMR\r\nYrXTdnT5SC2tWne7J20mY/K5FpwGce65HvkCJdlLND2HrHXPMobID9VFSy2P\r\nBf1pYFNz1DaBUGHub+d6LsyyMnINVDySaIht9SuahqWq9UUUd99bi9sBtZ5t\r\nxbOL40Bui2/RVtMmkfVllyrUylo1ULGuxXSYcSuKPd1TkdQrM0WCsqJRnISB\r\nbZeoauyEe+joS0oc7rOLHRYxPgOO+jvZdFjgvVlS42p2QYcd8iAyp24NXMFa\r\nf8cqzKvDvxKoWl3LmMSQ7Y8uNZxmxVHdNbrKUanFSHJDNiVFR7czkV1v4p5H\r\n061Q4tWrMdpzc3Zz/FpGWFgV8/lk9MR65xrBlzkbIwNJFDnVM9PsXIYntypu\r\nPPTyedhhYy+Gn7WGim4HwwZGh5TojAR7w4I=\r\n=92iU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"86c988d321eecbf29bbb6cc63f7dfa18cda02d4f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.901c83e77.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.901c83e77.0_1677521107064_0.997659294855205","host":"s3://npm-registry-packages"}},"15.0.0-canary.5cb8e2174.0":{"name":"@material/auto-init","version":"15.0.0-canary.5cb8e2174.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5cb8e2174.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"02fa238ef1bef1d9b144f6f0dc7b4673a70778d0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5cb8e2174.0.tgz","fileCount":13,"integrity":"sha512-Z7Ml1SG/AaYrc3LK2QXbqYeXEmg0yuLGv5zyOORLMSnOWYKdpHDzIwJdOu28OjeYfrbvw+QnxUsy8y83ktqtpA==","signatures":[{"sig":"MEUCIEKqEdjb8VugB2eRVrXQIC1pC5ulMaxoxOG7nf3URydBAiEAhOsF36uq8a2AoqiTqcHzNNbAfnivFqoGIjIUIAIWjoY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/36eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFbhAAgqjI0Rdv6lxXZadjoearHGJsy6zF43iCh+rKSdA4prfnHoLh\r\n7u8KmSHcSaQJuFURHw0LWtZ/iOD8B7P3VBGkXwYpkgDorJoybwaHpVJpl0H5\r\n1k69pY8lZhfVtyQKqsvPybXGkdef/8rmOkUG3BRTS+wgXJnvv3TGVD0gE94h\r\nCWnuS4vjJUPmsYtFMqhDSbUHluE/UJuvOAD38FCI4nmYW4d4AEsHsfF8yRxJ\r\n9GQP4KXCFbM+pqp5XKQsXyKzBbwHchY4dbT1THs62g+EVo2PnAcObzF0i6yP\r\nNo3Q+MNz8qahcq+z1cQig2NqEi+fZwUSvC/MUx/T+c/ys7V9HWftk9iqvosz\r\nrg3exLVWpqDr/cHZumsXLZD3vJCXWYL/ocpI8aLAsn/n8x5Opd/B/97duEiq\r\nlYKLvCMTlvsNAwYJncmx/7i03uZ5azJhN/G7N6NhVHXFyI/BnQDYlsuJ87WJ\r\nLHr5cADGSR4LFJ/OTh/As0p07dGBZUu4ApN5Xw/4uo9AGNLnArA1t7eo4qxf\r\n5PKXw9MXkkOj5RnvICgC6AwLa8vydo7g5JfHtsqx24XaWyHgBT41P3Ie9r8d\r\ngkeWiFGkv0vD/fgdjXtwX0SCw8OC2zLXoYSV1WZEwlqGpys8+1ihGPae3cMA\r\njoXOdCDins5EkgOPqaDEflQ+1yHalNcCcGM=\r\n=n6G0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d57edaa5a3a3079c48ef7c804f0a642bbb682478","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5cb8e2174.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5cb8e2174.0_1677688478557_0.6974569704009248","host":"s3://npm-registry-packages"}},"15.0.0-canary.f32339937.0":{"name":"@material/auto-init","version":"15.0.0-canary.f32339937.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f32339937.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"528e0baf2867f71485bec45377e52eb2565cc21d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f32339937.0.tgz","fileCount":13,"integrity":"sha512-4R+ZkHmvvE+cKyDjt8n9l0DNqsqOmThiGtcZWiJj/+tbjNJqGP0rNktglLdE5pZqf3Bhc12tjFnoP1f16oLb1w==","signatures":[{"sig":"MEUCIQCK4A8l31TQKjtcvCWAUoQDa8v6o8gzb214re3lhL3tIwIgDdRGn3FevLddcQPOytFdO/9fdTxBS+rMV5dnbY/cv+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBgNeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZ/g//TtAk08lTUhtrsJJITBF3xL+Rwrzhni4QLq01ZphqyXd2hxaw\r\nN34hz6hZRVuMW78hs4ptmyO9+3kcixO6Ux/KJSK/FSyFHc3R2Fmja4nNGQbn\r\nrPwdWvpaHhOlCsi/0jLzglaHM0TZwaI4LndCEvD+AZPmW9TdlqkfDyI5373T\r\nPPAtoSEW5D6tOOFvNrL+LSbWdxkO95OFUYDv4wppBPgYJIx60s2Y/HwC7Lc7\r\n0SlSsleeX2zlo2oqFegwsJyuwZCe2vieKLmzswFbuG6TMkZOMGgQGj/bmItv\r\nsgycsmz4LtOJDnAe41T3ny7+G6ltpB9kIbotwC4FGIIw0BnICcHzHNUcwecp\r\nlGBSFtMj/FiEOZIHDp1O2lcSi1uR9apddR41VrrqkR8zptBaXT/be0j9YGyK\r\n1AI+gZ9vtPMXpeWvVfVWCe/64YCML9tceNacepQ9CuvZvvGj78qv6AVEnCbX\r\nHNWHww49uHoL64Jqz/tQPP3ZvPIzQl9/uqGMextKHYZeEqhDFco/qgDfTdLd\r\nrNOrrpitTEYrrT+XF2S7NaHVFYAvl5pUi9ucCDCCaGL/k8FT4SpbDuPZcWGv\r\nAtO+upWhcT+6hereOh/lISWVmJd6P9T8uWhrxeCr1PnKhsnpJwSfDpd1lyLd\r\nHyx5n9r9ewROpOgDs4rgv5cdm81GQZdbukM=\r\n=TnE0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b6c5103b89138f008c28f70d93e0d3faed285061","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f32339937.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f32339937.0_1678115678328_0.03457692159337333","host":"s3://npm-registry-packages"}},"15.0.0-canary.7644d63d5.0":{"name":"@material/auto-init","version":"15.0.0-canary.7644d63d5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7644d63d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"90f54521748fe1f014f37cb5648d7920ebecee51","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7644d63d5.0.tgz","fileCount":13,"integrity":"sha512-yZho2GTqaup3PM2sQxNihyHWbexDS00t6eGDykmcPqH6z9soYMpnnWJkGwOz5cACvRHeO1Nn605fPCt9HoWVJQ==","signatures":[{"sig":"MEYCIQCWh/CiQLhx+YtiRrxYtnRp+HL1bugzv0O280bfOtKA8wIhAKiIs1KSAwU/vlg2v6ygzf8V4FwdRYwtKnDHzueJ65qS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBmiZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQfw/+NcX5UQVXmU5Iner4bXVg6CYEbs6AfVK54jFqCWTG6u8xYj2W\r\nTbmmd/pUJ/pPTaw3hVRnDYyFx7pHSuPUR/XWQvV+sv4/W+IMTvJ6bf55cg+W\r\nq5INQ2+v9zZ7DJ+IlV+qJMWMOHsPesLfOaNoAMLk5u/flQ0gy5aYoZkB04HM\r\nHjLCMxZ0TW14CVG76sb+USzXyjH/Tx76Rukf7BqCSTVVIOk2IrhhbKaSb4I8\r\nb89L5ZZUKO7wgV8Hn0+BBGNolhriEiwS9WkYJG7lthiZ62MmYJX3x6iY9LD6\r\n7dQI7UifwHAToF0HTU07H6OrKmdtWw8xG058TEhCR3jUw8YAPc0w5hHpiQAy\r\nRdSkkl+ujivhzkAQeyIghT6+s79N9TdPI/tpv8uMi6KSwTjvNlh0p5RiwHM2\r\nxMmOk8ZtSCHuG0Sdu8gGcgcuSeZGKHdoQQZVogmXEoMCBMZNVwpzGD8kfjxN\r\nNTCLBQ3Sg/A/yHpJQoj+PFvpjrcTMLLZcwee2T7fG9bM2bdg0Mnjr34G94r8\r\ngk0UWj5LvNGIk6hLy4dG0/6jqrhvPVyZN0bgJpKcN2JweRIN9JPjXzalLyNL\r\nC24etGF5xeI0F9iT4roNmd2X66QWb8PGIH3PPoqGbC5x+MTAOZZccyiW7gYY\r\n4x5CioDQxY6zr4MgxIO6c2Kin6Jgrl/KdLE=\r\n=Q4TE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a0332d9af18b36becfa025c452efffd11be59943","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7644d63d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7644d63d5.0_1678141593630_0.2696341064066077","host":"s3://npm-registry-packages"}},"15.0.0-canary.d96330c08.0":{"name":"@material/auto-init","version":"15.0.0-canary.d96330c08.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d96330c08.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"be1dfbee33a9cdfe4e1c20f3a6021859437709b5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d96330c08.0.tgz","fileCount":13,"integrity":"sha512-MlSd3kQotiFiGnR0cMihIs9BZxy+lBNbQe6b9anQUE7H4Lp3KgFIRjh1o2qjjxn6g7oUZtcZHiKGSmZ+V8sJgQ==","signatures":[{"sig":"MEUCIDzqpac9hOZTzPNEgUe7LVhk68SMUOj5mE5SBRa6AXViAiEAmp7OlDQ5q3w1eaMGQu/kGCkvXKBu/HoiH/YerUEK1tk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCHREACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKGw/5AWRD+6n3mKRfmNXU6QHZ3xdBu/r/wuTVWHJiYSuPjNZhG9ER\r\n5QSMrtQc4/1laKknnSbDNMER/m+aQTgeuX6k6qmlyBTwT4uOQOIPIpMhYD83\r\n2i7fH0jgzfZ7W73Zjrol7wfnqw6nhSGjL3yxNt+PIaq3MSTJa5cG/wacP0ef\r\nfZpf3TiV817ayfTOl9JlERm8okxERQs+41LI5NHZOa9EyS1mmgyJ5o6pLNwg\r\nEOwnZLH8nxV1qx0YABqHIiG/4NZtm7zJ18Vs6+I4KqddVQaRzo8X4ME7RiEN\r\n5JqIEcH3Swv7mF2z4knZ+jjakUw+ipNy4MHPa9bVVvHXi1fytPcftNYO8wCd\r\ngE4MzocpnsG81MxVaRxiK97NgMWta7s/HlXm2VgLNMIoXSipWEoio+dz4XHe\r\n0H0/a8rMG/5mORbL1xJUGkiURJuU2TvzpQrQ2s4Mf/zOPzRw/ZeECBQPkIEg\r\nUbJeXZmp3TPhmTePqyqjwqcu7qJ6nbareuKCioav+lpl4uOU26/TwHgO/QTw\r\nB3fba/XCMBBFSvpL0NsVvDCdUHWJIJ2nf9Rs3K7+V9F5NfehiFtVB4HTrZTx\r\nZ1vZdhvRSffaqgz2vEJHqHhqRakadE8DCIEcXCfDa9cWCszfhJAQ1TjScat0\r\nQIFzrmE3P7LggQj19HL5UCuwJ192iaKsBGg=\r\n=CG9e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6a6d53aa84a0c0a10bb15c3cfb596881140bddb2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d96330c08.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d96330c08.0_1678275652148_0.49834159488995144","host":"s3://npm-registry-packages"}},"15.0.0-canary.c99cae77c.0":{"name":"@material/auto-init","version":"15.0.0-canary.c99cae77c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c99cae77c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5cf709b384a173310892f489042fc8c12b4f517c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c99cae77c.0.tgz","fileCount":13,"integrity":"sha512-TnzqehWPpHJL/AXesimO1/yx+qv5gEZ76Qf32Sme+OyqC2szS7Tw3osNLMRpi62wNfYxomo98jUVAOaCGuU5+g==","signatures":[{"sig":"MEQCIAUuEQhanNPSOcj5lEeQPbhO+kTQktxBA3bU/XVGIH5EAiAXrlDRdBa6FvOrxrDU8vLfo4cu3l6cZcOqFqc1uZwyEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCR1GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozlA//RwwY3SwwBC4U9DFfy/V7MnNr1joXkteQHrsKrOk8OjmFTSlT\r\n+MXt64bJzM1709aYKGYc4+ubckYOBtM8LjqqOa4xwGdAIUlNGujYFKJ/xCRV\r\nhwLWi2hnmXfTPw/u1PLEvsyZPyBXbJatQGN0H4t/W73sHhq2pyjGxx6gGlxF\r\nNDtecCAjThiGbIhzKUWnzxKfk3ZzC9b1PZHbOVR50t10qIQJQeeEleMQvODR\r\n8tal+UUn0/r9mo45mCQeAIPuqvghP8oUhF1x2s/E/JR74bNFScqv7gjiH4FV\r\nxl5WxIufbTT4gLYMPdBvUK2Huyir7pp4F185tBjd6KCapTAB0EhPfOEsRglu\r\nJjgp/rt+dm8+tjhwPTiM99qJ85SCV9BxEaM9+4FNxgVqHLMiw4kWvBVMNTw8\r\njfjLPGqyX7EAwhrq7fWXhb7BHfSDQp0Tgg0T9cEFKL4Ki43AzBPIwom28+WK\r\nUUWHHeIWci/FNpEvNydSUhostR4DOPDRjZTrRMVAioock8Ih9ubf3/WQiKrD\r\nLwHYR4olnmB+sYOFIuUHqBunn76eqTtB661aeHuolTffVDBJbmkAl2hDOR5Z\r\nNPoWrE1o9a8WVTuS3gB24NqDimgnWjoc1angjNw6GxyccDbPSn7XtHyOHVLt\r\nvAxlDXkYur4XN/aXy4VuKp7AoWtHjIAscYU=\r\n=+TyR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5b6a7c1a1c133381bad395ae040de00c64b62e42","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c99cae77c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c99cae77c.0_1678318918689_0.5584744500634367","host":"s3://npm-registry-packages"}},"15.0.0-canary.6023b1cd3.0":{"name":"@material/auto-init","version":"15.0.0-canary.6023b1cd3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6023b1cd3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e41bc8be80c34739a931277859d0789a67823d9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6023b1cd3.0.tgz","fileCount":13,"integrity":"sha512-foF2v66vHl10BOWkUK66XNzMKHQhQH5TGITpiluIQNr/x5nlqzkolZffyUOG0opsfoiC3Fle5NcgOZ5+igJ9NA==","signatures":[{"sig":"MEQCIAquLUipdVe0aUSE0Jcng8EnJQ9r2bvtpQIARBIA54vcAiBB0jm+cm6a3qdDBcF98h3jCUBt/SKmGCJ+5nNV1wJ81w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCexZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHdQ//bn6XLLVqTdclWuBPIUScOEAHDDG4tuEG12BZVyolc4Uh66Fl\r\n+JKqjrpAsa73u4pp8kSp+dqptQToUInH2DZLF8QkjUk0rZChROHhRVz3Ljr2\r\nmzJ688oWQ9eA6WUnBtjKKhSsh6C4lZkaiUIaSuDWRXPCsWHUND605ZqdNmhZ\r\ntnpR+5FRaEIkMJFj5TYPOSnrTHL/rB4jswXdxD+TSQfRLiUBDeU0wZOg/v6v\r\ngD6Q0/pH/mle2UUeRqtBj8+CXYgzreAXDS8KQ6zn1TloAtPxiJZviiNUqaBo\r\nUMI3mbHEGmf75B9RDPRYz/b40Sfs7qc+zfP+3jKE4bpYoyOiItzqCepOAauD\r\nSZ+DZGZmpRAjOC2dQ89oO6uFbFB9Tots0TBpQi8d/i0cmNn1cAQ2opjP06fk\r\nspVJtDkK3RjGj1maYWia3apPqvE8Jin61M+LEEvOGzEC/ijosoe8szWjMeXq\r\nu4n9OBQZJm2Fb0Q6glj8Cjb32dchgEAAx6fyXV0FiHARsF633hcnUJ+vDQbl\r\nCKwlrjfV4w0D2l4uW8b/0PCGfx19vPta2o+IE9xD7EZx+sFfyeZCUYim5hlo\r\nVZbsvBdm+hVv7lh7EpDI5OzMVFD3WpiBrZ04beAajVysUj+T5q0eTw4skyHh\r\nCEkhDkE55CIrQl9h7ExRcCpSR6Bx3kzHt50=\r\n=6Bnr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4d11f175faeacd8e5fe534611afbad84efceae77","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6023b1cd3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6023b1cd3.0_1678371928982_0.7395965823266344","host":"s3://npm-registry-packages"}},"15.0.0-canary.274610c77.0":{"name":"@material/auto-init","version":"15.0.0-canary.274610c77.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.274610c77.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d1a754c57fe8abd3d7e80a271cf6b69de51d8c2f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.274610c77.0.tgz","fileCount":13,"integrity":"sha512-cx5hmQro+HKgWBVS9dnaaM4VeLR0kjleToe9UaEtaJ/VdqbTLOdbSg0RFVBTU3u3jk8/b9V+8XCIEyZJIhfGzQ==","signatures":[{"sig":"MEQCIEW5zE4HFAsnZtmY2inTh+SdnCmi/i+Tx3nSjGgrkv6wAiAEubS5HLJW+iuyrnoKBebkkQEA9B6kSHFw3m3B5cijdw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCfPhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprXxAAj39pjvdM2sozO+02gxiXRXVhIrxgYCdPgUxLAQnCAMQJQ+nZ\r\ndY26scf/mB8plqFBOwedf9A2nWfq2zcnGJLWnOEO9BS+Q/5m4odVQdcl2/Tz\r\nrvTr0Exst8+KmL3OTerZra5n6Da7rt6V9g9alANsTPUWZ1pH/NxTCqtT2D3j\r\n4xjznx16onlhDqC6d6u1ZR/UsAfGS9NPn76X4rq2lLkrqRIy6CUNw8KPewPC\r\n/A8Xb8HscvARpOGSL9lIOs5+Vg9CQGE9zXBl0M3oVppCp6m97Wg3dW+2dhMl\r\n/IVo7qbysrJMsIfdsoQA5PYAMwnVnRBjfPB+YYALqPT2Mxa5Ez4n6vCFUccd\r\nBXIiaoseHvs6kvfPar7qZO0vs0L+UWLTiBhGw5fRP6//BgxrZYpYx1mPDB/H\r\n8V4gq5Y4m5CpPUqnfUFYTxRjE6oHV71T7SxrwGJE8mi6um3kXUynNxvKh1V6\r\nRV67RBZZYjVinyM8+Xtzm7DAO0dNQaxDaDrLgpnnp8vLPh//KKiS5LIHr4Ix\r\n6JmxX9a2KW3NKhx25PIn80Ith35nOC9sQAadVHIr7eya6RVYfyX0f2/SdZA3\r\nkPSHIN4t42KRfR0sb+FCdNPSqM0xHfg1/jAd64LMlQLCdZdAydHmybYZ1+3X\r\nDuV5x6PowcetxO0+Ni9NTq+srgoV8mv+Zyc=\r\n=XtOm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a2b02c682ee73deba431503de1a6f1fef211c10","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.274610c77.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.274610c77.0_1678373856871_0.09308403982304014","host":"s3://npm-registry-packages"}},"15.0.0-canary.a274583b9.0":{"name":"@material/auto-init","version":"15.0.0-canary.a274583b9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a274583b9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0b0212db1c46e263b27aaad4e4a7f89e1893a397","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a274583b9.0.tgz","fileCount":13,"integrity":"sha512-4K923wmuZCUbVtTl14rDFWitwSSz+pSGR4+3i6Wju1ZErYiVs8DAOERLoHiF0Wf8qtaj0HxIwF7O/G1b/KJ+7w==","signatures":[{"sig":"MEYCIQC23Y+X1AcTNRBmQiwDNdlTvopZGnJ07Obb8G9lIezraQIhAPmfzLjD4jHHY9RvGaN/1HCoj01xPV0MFKolT1jQmTpO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCjjPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAlA//SwdzgRbCk+Ix3P2DgZWtDRd9586uFWpCYuG+53R4AO2EGVMj\r\nGSotg4VqLXAs4l8nUh15z8QsdTICGzfcBhW4BlufRQzM/1nil9U4uGMLRq36\r\nWutOpxjTmOkxOYAz/7VgoALylwOVCHkYz1cpMeHUULuHsKsRuV6SXUnw4Ed8\r\nBXGhndppnRJwQXqJoLu8z5ybKHQKsm/XmXDo4fdgjcIA79ay3f654f5dcqf9\r\nvbU3LMWSIAKXFBKKu527mAxtG2IBYOVq3AD7XY8j04dh+hgYAUuFX3blR65s\r\n+zXOqgTMkLZT+RPawTQsQQpsWF3zkVaodghhtZENgSgCsUSXpOuojASLaIbN\r\n0qP6YoQX41hqQf2zQFPc0elIoN/JGDCi3T4bw91OTtfpBUzBPZXI+NO40reQ\r\nZeu39t8YGJbNb9KfrHVTmPt781A63TfGwPGz9+1ocKo5M7VQtYM7QzCG8t4I\r\neGcHQ9AsvIys9UN78FCtGeBZSWK6I8OU1r2ID6cKMNLJgxOL3UnMUOzJpFet\r\naFwnvNVLRUTtlkc6s4j9asANF/swiV5giQljU+76TBZtHUX0MNLNcEVDGQ8o\r\nYtbpuPyAbLFJy+eiD8BpdE4BxplqtDmcymGoS1rmtAMM3s9ZwiNXt+SIW3iU\r\nCoSbz3Sb6lbrfeOEDF5Ld3b+WTxaao5HlRk=\r\n=GU8r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7a7c8184214014c45d0ba8b4723714d1fe91f266","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a274583b9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a274583b9.0_1678391503013_0.7238244360600932","host":"s3://npm-registry-packages"}},"15.0.0-canary.da22ca960.0":{"name":"@material/auto-init","version":"15.0.0-canary.da22ca960.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.da22ca960.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b20b45a3262c79c8ce373b224b74f569f456f11f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.da22ca960.0.tgz","fileCount":13,"integrity":"sha512-tbKtUfY+/DHiVecp1UuOxBBT1lbq4nt2F+rmDYj+vMobWidRm+zpwh//uTW+xG5ctkQZWZFMvLdIrsVVVsbpRA==","signatures":[{"sig":"MEUCIQDW7q6k9eSndJXLLE86pyjVFivYcoY/i0AlhOxA4C1zPQIgRPJ+CrA91gc010qIgWK4kzDedamNCD/LpdgxUgeD9vA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCj7GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmozog//YrB9u1NThydmSkXRNI/JU/hE39xaMzj4QCIpDvqR8j6SK5GY\r\nI1mTRNNOBLM0dlfJ5OrFZHwI25g4wIy73YP+LGiZFGwGzBKc2lCFoTU9Yrwo\r\nfKqkqJnk7RMpbNt/NHGXzvgE92v5QZ8fKkFeGdnXkKvDfNxNsfMLV6VD8F6s\r\nVj8IePcXGnG3biTsrXL4T6LoO20ZiMdMlZKmQr/b2tc6LwphCS0TH4aHNkaB\r\nygKxCrmf+gBwdCqZZR7jdxfxQK6MZ6IdNOdmwmMk3v4cLtAnhEarsgE51Ao9\r\nJz6GYJYlNTsC1JPRBONXvwgugH6ddDRrPHBN6xjWEilkF49/j1r7EXOGc6aP\r\nwejAL5cj9ITEJZ/paef5pwwfNNzrusBvb5r0txLIS9FQ6/8Czhdn0uxJwXeT\r\nyENECwsghNJJ8XENFzn10Nfle8j+VVb28vAKCgwN1+34busl5EM0asrkUsqF\r\npS+538Qw7ml3wurXWKv9PoYi4LOTxnu+i8vHTkS4pk2CdcEB0ovs1SnWngZk\r\nCs+GoMCygs3DZhwPkfGxOtMsLDeJEh7h0K0kgPrzoRXs2CSRs9/n7N4yr+WF\r\nt7ShwM/FwxJj+32g91I2pS8LsoXwyMql3isjoqT6ugfD4pm5eSMTa3O9XoJy\r\nbfYaLxg3m+XmvcmWCyUuhEebqs34Fr36l4c=\r\n=RFgr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1b58f37865efc4ba8ba06e1190cef502dee9f902","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.da22ca960.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.da22ca960.0_1678393030205_0.08022180779311605","host":"s3://npm-registry-packages"}},"15.0.0-canary.304a94e8b.0":{"name":"@material/auto-init","version":"15.0.0-canary.304a94e8b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.304a94e8b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6ad0d4f398451338bbb3206fac08a645fd5d92eb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.304a94e8b.0.tgz","fileCount":13,"integrity":"sha512-XyWzkuOpi+kdLPMNFbLrkB655onwxiFU5vBYPchFpyJSJDZZtcRZRRphy4BnIe+G2p33T8kj9XTFWzsQ3JMe8Q==","signatures":[{"sig":"MEUCIQC1/nVFNtvYppjotjeYiMknOi1MLARcH3ICXeKW0qPBagIgcglUdp3l1IGwC121CiGtYke7cL4xGEYVdgbGDpKQcEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCkUUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOJg/+JObOzjKV7nzAoU/LAUekp2ZCaZaBxQ92imUA7w2uoHVK6Aai\r\ntMPzrC90kJm6lJp4lof4DXjzEJPEcUm59j3+9vqJNbtksT19P/y1bOQ2FNe/\r\nhCx89bu7InM6LoVy/14KniO7ZCBHdyn//HK7Bv4m1HPHSo43dje/wQcLL4VL\r\n3Dum6WiklgCisJgCo9vUHwm3+0aBSpQg2QQEOVYlb9WGzw14qmd+zMfeQfs1\r\nytwMIS1DE1V3uU6b4PZRDqmmsnJrg5gLCagwkYtNbuatHCVI88k2yssWczPD\r\nevUKC0/CrzY+ceiJk4dKCS2JkIXFrjdqgdq9lROBv+LHYl/uw2uKKEyAwKwk\r\n+cC/60cpipeI/5xedrJn+iUn3/2Fibo0guvIePi+L746zCAzuptZgZi2gTs1\r\n9fvEMWQ69h5AZW8hprhTRJpwnWKH9YNhjYww3vCU4PVlmbAvJStDsQrTGU3S\r\nwbcBdWZVzBGZkWemWrCmLEbZ2faDcanjGi1hXPFjTrNWJjdjNIrh7sauxWNv\r\njS4XWeJMf1eoZCxhEyw05gku4KACNsjv9HdfVYg7Dba7n1OU5GAwQs8Iu1hj\r\ndg5XFoLK/nfc5nSUfNCUPHvezvltuVsFx0wqfpYZrpzNgmMm6QuWuECaeft+\r\n+s9i3ZGedYNcOA+KcCRhDQSW/sTE2uAtYME=\r\n=yCSM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e7550e10d6a01c606a6dd78c58c4ee6e44c3f062","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.304a94e8b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.304a94e8b.0_1678394643933_0.9089586698248766","host":"s3://npm-registry-packages"}},"15.0.0-canary.6c265915c.0":{"name":"@material/auto-init","version":"15.0.0-canary.6c265915c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6c265915c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e4d991b8ff2a4d9b8356943db044c6a8c113963","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6c265915c.0.tgz","fileCount":13,"integrity":"sha512-P6bB9NUnHMW0dlXjBmL0X3JrwFml1PObj6ZwsmFTqqJd3mXpQw4TQbIMfpjVEA5irYTvusf5QQ5fRKoU2VDdBg==","signatures":[{"sig":"MEQCIAza4F0Qh+PRJ7oSn7TKZg84bxXdYxJgAN/SarRnyxh5AiAz06nR6OwzQubRak7PhyWxU2SfLTSl7d/pCW/IqhrTag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkClOvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouzA/9GrbCTlsbwk4sU5x3cLxbDvJxLJ2/Q5pXOu0aeAr0m/VOK0hU\r\nZAd/I6gAr5J6Jm0uJ0FQL3K/hATwfIb3N++MR99R1uFzflA8SLEM/2f8U8Tv\r\nMytRc7vqBRvpZvbk7KrmflzF9lxMG7nEHBSjJajaYQNP51M9tg/cYhNx2FkL\r\nZAQSEiF/ymNGmqD9ExPxjFj1YMBvy0gI8Wu6q1vKo8lv6bGqA0t/8TbNwJgZ\r\n3sanK9I1yX46nbNjvM2DCJHWfe3P00ZSi1Gc/7Xff87rtJMNqK2vGagPmMHQ\r\nYHEgbMBMeZy2XpENI+gixZzlT/uxskiTwmB2CnKX+f5Ym4RE+pKdNopXA1KC\r\n5IG+uPbk9G1mvlhwBz8qyXWZNLhyVLIiiJ33iDcPTsxxDfKWEo+fmId0YaUg\r\nIG4Fj6TKjhTlHE/IlYATu8zpIYTt/4RRMVFBmdojkP1c6pfcu6YF6WupfSw4\r\n1Y8cFbBHQGdvFxgdObtNXXkI765jA0NRYmX5J2OBSY6Pvdwhl8PgjlXAB9hI\r\nPJwI4Ex9hkFasoi2u1WOdIRGeCrag0S6zert4xKiMCtuwI30YtPDFXfSMZaz\r\nrZLX930N5QvFKPmGhSpJLTznQihtjS3n33ChH19x+hx8C9zrVbyJP8fYkJP/\r\no3j5YeqA1y220ICOd+leNoCMyedEkKXwO80=\r\n=L14V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2226d2e658d88eace91ac63729977eb6bd7a9af9","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6c265915c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6c265915c.0_1678398383414_0.256242172847553","host":"s3://npm-registry-packages"}},"15.0.0-canary.de5224633.0":{"name":"@material/auto-init","version":"15.0.0-canary.de5224633.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.de5224633.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6f64ecebcbefe7395e8d027e762b64431aa8cfdb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.de5224633.0.tgz","fileCount":13,"integrity":"sha512-ROuk+GuTfjHqEFGgACkkKCqljkZi0SzAm/mZdqVi1TNjyuC6ZUEwenxMgx7dMjHVFHny+WBpCglDeL3tVpfCJg==","signatures":[{"sig":"MEQCIAZIeneNnY2cf8gr41TbSlyYL2p5WmpS4ZJa83Hj2Dx9AiBLFdigFJUrUmZkukGD7G9wlaM6dhJue7ouV+/Viw3mTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCnHMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4tQ/+NEoYi5l3iejswTcA2aVaAPNxCVut8re2utD5HV+Zg3kDKI4E\r\nO+hMCF9BH0uUHWctfDJGRDDB8UtkplziLWU70OEs8lqQn74RkQJ4eRnSAQxl\r\nnDqhaCel8ZDvzMoSH0pIW95zctMYazxShzR4n3viZa0T1RgvTYqHVLjQor9x\r\nYuPnBctN6yx9f0aqyT8LUPb6cNOYvx1o6gDtX0laRF9VYMMCjPPS034diNSw\r\nhw2iOI8qPhJ0J7FcVkvKNYmnAiq0Ici6O2gcxhfFTEwJrtfqs/Ad18VcavYZ\r\neh5hWTWRjYQ3htDzXpmaa16k2ij50dj+mDN9HWPW90tNpNL/BZd9xi1dbE9M\r\nIbWtlrYbcOXN8vYOoq4pNP1ZBY3r6U+1hgYwH/O0dsImNbyOU7hogOpVM0kN\r\n45V9bcUp81n30Vvbcs/nRJZ7DXgb259QqKNcxlMbavyM5MMXa5gfVR4XHbRp\r\nAzUKTnhvVAa8S7wCZdsIFRkCvVD9LZzyiK4X7/xg782xE+7dOIkWxlDPQT0D\r\nGWyPLp5zBbHdHvV5D8/HvOOhV/vJDivSb9nfa8lsrmp+kJkUCdcU4DIMo29C\r\niKnBa4sS1Hco0qaUKVwOd2KYDgCFcZnmBpvBlPFYtQMEOuZBl94RkJ8cRLsR\r\nGuQG7Hz2wubO4ayYydL1jGb2YV8aTztjn9s=\r\n=cXl4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"994c620135276cf7948cc54b286c6c306c3ac01b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.de5224633.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.de5224633.0_1678406092188_0.920384207506348","host":"s3://npm-registry-packages"}},"15.0.0-canary.8879557e6.0":{"name":"@material/auto-init","version":"15.0.0-canary.8879557e6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8879557e6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b3d0c2ab3245cb16591c11a5f62c17b80e42f905","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8879557e6.0.tgz","fileCount":13,"integrity":"sha512-TcSPrrqL/pQYrE45mteTWn7AmxXemyZp+8Gy6Hdy0bzQNfVSukNi3n+1CkHUwPKEueCeC5gNnWLO4+V24viYyw==","signatures":[{"sig":"MEUCIQDvvLVzlD7UrH9KJ5iNLiwTnJzgUrgQxjbg3sS9XuOOwwIgQ3o6BfOoySH82FuAXeTyfZgAYFufu1RGQRQy0KJfpio=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCzmDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmovjw//W51eiNkBg5szBufbYCa3Mr/NKxyyu9NcbiaJQPKz177Ovljz\r\nUXeWmd9PPLUSeZ55GMCQWRZ/+JO8svPhrCjzdMfE6D753PWPCAxOt3MXinCd\r\nLQjBxBw95xMOKMbGI2MMfi4cbABGkIlGAKCtCyXCW6OzV9NPhzd1Sj/uBahx\r\nanRuxNw9YnitLBk6vfycoSQjtsBmZZfpEn7sGvvcqm9Jskyrg4pDiGqIjBIh\r\n1paEeE+3Wt1QTZc3J6lSMB/GGWYcqx8ZImO+r+XiVjomLEnzOKxW4TvMu+tG\r\n+68L+oTcLmdgjrakbKsHe0j+4m2e9TTESdVRMBxsMyv5t2qnSz/K8UvrDohX\r\nRYcth/7sWpQgMc3Rgu2o34dMqVvjRww5DQdiy3J0n6m+Su3qiNpfBVCro0BW\r\n5EfrtiIWDJhwjMyQR4s9aR7isbMPuwrrKry4S2GSKF3jwxSVvs1f2RUDZ5bg\r\n9fixsuMuD9xBjXn0FoFiAwy31+Q7y+7wCVzn3Nkpjy1PuCOfdg9nbdIt2G2f\r\nkZUEHM3/TUVDrQolR0LAk6jdJj+S1SohPfTeVYxK1HlX2Xm4hdFp6a2HMYNr\r\nfnleC0Nk3LQqYSAo+jmeqYq+gMRFEpO88Vh6ZkTBgsYsoTKPXYFk4TCVbTlz\r\nwxcch4FBdgzXL/bRNo+K+IVQEJl+x7RZ+uY=\r\n=WyM2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"28f7c223e2bb4a686b970a425d14b1d1edd70546","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8879557e6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8879557e6.0_1678457219085_0.5504108635847964","host":"s3://npm-registry-packages"}},"15.0.0-canary.23073a303.0":{"name":"@material/auto-init","version":"15.0.0-canary.23073a303.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.23073a303.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95790d8d8c94d27d37c0f40009d91faa8f51efbc","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.23073a303.0.tgz","fileCount":13,"integrity":"sha512-MuEZlX1IXAyObKe5fjECR4OyEiIRVuoPOywjbj+IICiNeFw9i79BQ3YpZJOUUDUeZKgTpIc5TMJxJSMqIj/MMw==","signatures":[{"sig":"MEYCIQD5ZmyiemiSvCNoatYQIu6IyJYyAbbkIMUFS/k5FAVYCgIhAMs+5AQMdI+C49dm/YgcDak3fY91i+fz7GBK9hThnXnq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCzshACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpE7w//QGKJksDnRTNXS/5GQtZRuHvtlk1lkMfAze25z9fFEN4ai6DC\r\nUI/DcvpA5t1bAVdY67F2HCuk20aOhMybgUADUA9HXxWNQV1gW2qPPAUe+XQz\r\nweazso8Ug6M+OatwPHpj3kdD93vFEzPVvqrXaAKNHhZHlI5ROYH5OLH1KTOl\r\ncYb69i/KfcX0dyDl9tL+Sm2JQ9ddNSNnSsdy6DzyDQEt7PvkSy6+wVPaanWl\r\n3D07rmUHMJ+6CKRKW7LPOsc+QWa+QjSSci2jA/UZDvEkerUbDhJKun+VTjjH\r\nzoFl6HYDfXPg1S1qVlnAeKXuV7HBNmb8ES2rp0bS1TzvFr8gdk2CzQ7UI4dM\r\nRBdzh264JjmmtwaASXGTSDFDIJKscegu8TVCDjoca9Hf2lVVdG9k4/P1dDsc\r\nw5rnltJw2vG8rKVPLL7+Ffhn8OjKXPSyzM5wxpn1SVw8sImWXhM96AAepM0N\r\nCgqGUQzJZqwZ3nsZRHGhbWRGS+5cC/bht/pJbe0Tdzz5mVN/upyyGFwIUP+X\r\nb8Q976PPg5kM9iRHwgYfghyIhsyuhHSs9uGS+FNi3hbQTrnaS0amDxQyj3RE\r\n/L1MyWsnc5RTf+MhaipwTj0Nb4znZ5dNIftZuPxlnjAvpJcEoPU4QXtFYnDa\r\nVh5awyuAFi/LbbUZWOldkedlIXinsFUH0RU=\r\n=sVHD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2d7826e2ebf1c1fde12f47b603e66ec0df229a8f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.23073a303.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.23073a303.0_1678457632810_0.33277172888593753","host":"s3://npm-registry-packages"}},"15.0.0-canary.51c7d4014.0":{"name":"@material/auto-init","version":"15.0.0-canary.51c7d4014.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.51c7d4014.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"21072893956333a5ad6b30509c04ecff4a917f62","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.51c7d4014.0.tgz","fileCount":13,"integrity":"sha512-FCawccNYXfxHBVq6tpWYmlux4SKsUe+5xsPzyjIHdMd27NX5a2h2Lp7LatnDK43sv45uuU4kc5/BS6YOdZi1xA==","signatures":[{"sig":"MEYCIQCLoMZRkAn1pFyXZ9r3YzGyT5t57C9xqg/eyyjKkWYWiAIhAPXwuS1QZm809LgyKCW06RhRjwMjg4jfSV8aITooGnTF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC17kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrS+A/6AzUIvRperkczVoElonutPM9RhdDZIhRPf7IdxPltqvecgoxS\r\nmRT6zz0S++W89CMCahYKN2X7TDCIWBvTiVrLRD59sdEw/KuVsJVHnBHRnWUV\r\nw3KLROxZ7qQUc35POJphDvYdQsY4+RUb3KLQqogBOHE5Gt0ZTxx5jaRlTqYn\r\nLeCAkWDUP07xPnKI3Od8kchtVCrthKbJq+8aSUgby9/05NecI4OkAF9LR9J9\r\nLyBD0puXR9EOW9BPk7gYHKVre4kr7uhF9UeemVLnBQmAHxbhitrDsvrxOQLb\r\nUAIkggkrJJpyvccLXfPIXlsU7W/YnL/JgmCw4eU3RPZGjC2meweltq77RjOv\r\nQHcISvbKSl8oDE4iDBbPpE5ILQjMc4Wdc4hot9S/orpI5xh+dyoWNxe/QQVZ\r\nE5YyVC5NrxsMwGcXLjtIvgRtg6qUvtaGeDuRhR/8/m6cDzDXbkuVFTMfNpqH\r\nudSU9h5yAlq5MRBGxTn17yRKlnhU2KjLeGUxMoPCeXsZMIdsH2sg28znOex/\r\njlmxTavxtoaPX0yCC1N+DeLPHtG8Iy1nmhcBUKX9ogVGKWP1Oy7dNF2jzFlH\r\nzQBTWKbGowvP6EUo2N2RD/TuwKm8X/9hMTC/NFJH5DbrzI1wJS19oUrUnzV8\r\nO+pXs4Dd2Ewn9+ghmt4+2EYjfyIT1V6oAD4=\r\n=d/Y3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0485e6059d69163f12d83408c09b1d41f6cb8dba","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.51c7d4014.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.51c7d4014.0_1678466787915_0.6884122613170838","host":"s3://npm-registry-packages"}},"15.0.0-canary.1175a5be0.0":{"name":"@material/auto-init","version":"15.0.0-canary.1175a5be0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1175a5be0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"60ec14a32807bb6cc1f272fbd722259dbe2898f7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1175a5be0.0.tgz","fileCount":13,"integrity":"sha512-rHmc/ZzubR8GGH+0mf/+2zwY2Q0i/rex0sgtTiDIb6UoQ/IWbhsfHEtyuw5AsPCHRZCkQoBlwY7h+cdUlha0vg==","signatures":[{"sig":"MEUCIBGn7wH9OERRdjiUMgQlAtXEos4zS7LtIFyU4frIl3IoAiEAiZEZ/Wwvz9iOPiObC57m3oiXcQCjjcLTakQSsTwvI5M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC5dMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSDQ//YtX2MfXbAH936LEolBSebBlRZXJ4gNTaQL9BCpekeZhpRgoM\r\n7CLeRpcvOBW4K/258RbV7qmElWHVWPN+nFNwJEhgB7j8UBJa+Yfhnr1UGkot\r\nrE/+m5hROCfZ5fCMeEY+WCVhZvwEY+eyFEuagMjep53Hy8ydFAy40r/cr3UI\r\net3pUTObcYUJJsWXRz0s8tE8JgnN16Dt4L0uz4xzLrlzARSw1QHxGEALg2Gi\r\nfxdKJ08C4XErwZyz+DgO8qW3Ss/DD8WN0n2iqH5tVvJIVHNUlWegeO0UZmRQ\r\nuF3eOQ4Kh9Rc0O3ZdBfnDSL+LXxl0CifzHZ63I/J4ZDr4JViDmI6NTqV2YeN\r\n7is0idCVoEUAP2IBVn3awp6lqbnNdKBNOqpUkrKYj4pboNJUL+qv7IqSpW5P\r\nq0fYJ2GkwSaeK8J+bvxnxnfzgJkIVQTFcDRF6Rh3GTBigk9TRD7EeQI76U/Z\r\n0bZkCGxHd1XG60vybZCfnCMpEX0PemoXpHa+XD5aMHspgSLupiMwXAjC0g2F\r\n7nwF/d36JceYGjeIUdEM2NwcbiPNLAqqBkZnJ2YGBsCgI6kGqUHC0j3lud3a\r\nsMKR9Ds8BTI+314Mv//ciD/+cm62qZBj7k+GWqZRAgFFA2Ghwu8CBwni3o6Z\r\nBOdNsOiqXYkod94+EbC9uUVciMMNfCBnvNM=\r\n=OkpF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1fcae3e4ba7c60c6a51ee8e61b01e26a324b1ab2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1175a5be0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1175a5be0.0_1678481227908_0.7733330307569473","host":"s3://npm-registry-packages"}},"15.0.0-canary.7adf3af80.0":{"name":"@material/auto-init","version":"15.0.0-canary.7adf3af80.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7adf3af80.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"60e046bd5384deed88ef1251fa3d16bfee5dc37b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7adf3af80.0.tgz","fileCount":13,"integrity":"sha512-fb+cB3Il3HYSBxCLUdMc/RcrCK/MlIZmchGWTzAYAcnegotf7m70EvpH4qWU+SV0A57Q/9WIMG58qS8v5OGksg==","signatures":[{"sig":"MEUCIBaEqbcmQPOjj0mhpl5BoZN/1SxmWj0dboc1pN8TS2D6AiEA25g1mwYttriurWt8/fvSt1RaN4CuSwRywA77U6EeLfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC9gwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3iBAAoI3vMOoHQ9abB9v6r86N1um1E+5tCCFOsUr8Yhigx2oi9gcs\r\n91WfNwzqhP0Engn/d+NQ3soG4MOH4q+AaDT68RSrR1dEvpLX++Zr7oHw4zj7\r\ndOKwWm1qQaz0OwSmPO2coI6z3qFN3RFBfIqMb+nFUSor9djQVr3hOAup/nRx\r\nAnqqn3R4CywavwnGKaFJGlOWTI4F5iWHEFfu8LraxuNLGhjIo1QeB8SXRoMK\r\nq+APllRFz/etdnNAowRTQbo66kZwAGypbXGdowyqU0iS9oN6JD5ldkpCRTam\r\nX+J9jchcOQt0TL+BvItAYDtgLWeFSNiTgogARA4CSab8h0xQ83Dq8o3Wmd6+\r\nhynZwacq4IbKOm68x9tB/yiYzbTslCrpGnHrGB1bWk+AIVpIRSkRaiMJywPr\r\nonwQeIrtZehCqBIPAQy1Ow+FBXbjLGRmmbLnfWWxvJ1w1vR8Kva7aAD/NOr/\r\nG7AE5+G0230UPX6kBtmjp4XpdIstTdA7/L8pfzNQ0B/dPpJtaJSGIASY7tT0\r\nFKriPCBoUaQuNI+WLCllndRiL0H7lzFk5fPjpqnznxnodXUADaNM+1Snfvev\r\nOAsVe+AVHFpYQJ+AXFsPTduDGaLfdX72mhPfCt1gCxPq1sKGyz67BlKoIabO\r\nqppTGGOFqvWKvJGMaUg7rFEuRJAXW86xldQ=\r\n=cRdv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"57b0835838a903c8ac3ba6c8edf79add958481d7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7adf3af80.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7adf3af80.0_1678497840454_0.7539085103706189","host":"s3://npm-registry-packages"}},"15.0.0-canary.82554d770.0":{"name":"@material/auto-init","version":"15.0.0-canary.82554d770.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.82554d770.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8073a5625ba843e615494789982f8069cd2b941f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.82554d770.0.tgz","fileCount":13,"integrity":"sha512-CNnmwbhid1FwXlZz9werCJwkHKsRDt9/I65eruDXBVuJVN8pZocSDEPUya642SQXuKXia/ePO7FJwvrmWrAh/w==","signatures":[{"sig":"MEUCIQC9lFpaDQtRqBzwOe9VNY5OxN8l4BuVvtaRty/AmSs6iQIgBG3Qtaw5809imZYYukKRp9zTJ73zBAl+uyRu3vthIME=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC9sXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLsg/8CqIFsv+iSfUbpmve72ELqNPTvupM0JbYNpJNahJUyyaU2ZbC\r\ngK6zTJGpnsFUqJ/6Fs631dCFHyWhYUDwoqBJJy2ppBN1hFrFvkWV1hqx9Fvv\r\ny2ejqBFjkcrWaVpI6ZOWfpO3vITXxjTtE3pfC5OrF+kbTQUqXbkPiawzLxiN\r\nWev/e93BtReXW1hOO2iEenvttNkho02YFVCZgVD7NfOyAc82B6QdHi+PzTYU\r\njexw6Uto5AYn6+NETuT7TeZRRT0f58O0cW+ASb5FVW9lz4p7yApz3PWpb9Y6\r\nRc26VyIYto147B7r8eT5UosUFzPPATMjXJmmr461p0Qdk+D+s6o0yyiT8v1E\r\nFmGnbw05SARlBmIF7HLUCZv7x+X0tY3xk0PUAr01yJ2Ip+K6SidiE4y4jfPa\r\nwsMnMs3mHhJhxWZ2hfoXmRitmysx3q01tMVT2mE2J4UEy/dz87JDEy6AMPxt\r\n4Qk3c8UxcTu6cvoKuiberEwrAB/YPkDsIbv94YojOL5H813UWI4isAgY5+ux\r\nZThTxBSV4CGRWJ7EJ3zSgCRipGoAMUOXjopnyCPRsDOA1iU/X1amRGSQSV7p\r\npzSeX/MsE6bln2Bde/lp378hgL05EWjlCuZ08Gcjff3Kyp5r9tXtGYiGLkHA\r\nKi7FAoLxlqts11xYrxCua/TsRkJee9VI0DQ=\r\n=VLkG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"500cec655918e97ee1edc3c86ebccdac24a28f56","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.82554d770.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.82554d770.0_1678498582955_0.042746120221572426","host":"s3://npm-registry-packages"}},"15.0.0-canary.93fc524b7.0":{"name":"@material/auto-init","version":"15.0.0-canary.93fc524b7.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.93fc524b7.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b719de54bbd4367c05783fbeec7778101c8f6769","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.93fc524b7.0.tgz","fileCount":13,"integrity":"sha512-W/NdBTP2kDvUNI5J+dDK7PQMp/75AlSF/dPLF98e+TnToGZvnDbQOWPNhjWn3xHxgbMu8genme9jsU0jm7611Q==","signatures":[{"sig":"MEYCIQCyqF1K/JMN81pmiwOxdnlfrJab3r0L3GcUvmJK5lMANAIhAN4IeJusNCzddJtu8/yV3mgThTgiGjeaC6QCw4PDSPWl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDuDKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRvA//VU3n72FNQdO0D7Qmg44uJRkHYo5OZLMijwraWcVH/zdT26MI\r\nKAIiX0bR0/yOpoJJFe/nXvCRy68VZLEk7l+9eMyqsjewMjMNhLlAnYwwrFY7\r\nxQl7ldZV+wEaXUQo24JtnNjH/pVapNmaKH7TLngzMYWD5hoZndD9lLtVZWOY\r\n95fwWVmSYRQmEEJI7LXFvxj6+1zFXdly5m7+Yl/UjDVV5A4e2AASAfXmh2Kh\r\ngSs7tq037pCUiAysqoK0FOzZBOKUxGP8BbtabuFtj7ry/SDCOawUZLHpAl1C\r\nq0PkAiT2rc1obR2/caH9O18qyDWsNRfeLJwRPwPRiXPlTpEiprKeTLySHKDs\r\nGMqs021u5FTxwiBDqWMJuSBkaz5xcT6O5QYVccVMydCXnx+uetSDY7IWrKA8\r\noo98kxbYbzpM77KrrApIeOEjpAjWRvFzO+uaqVuJ7WUJjOtm4DgRxRCqz6FH\r\nd2562K0V9vmrkuCTBjyRGznsriFUb6LUtJ5bcnIoDC6K8VNCyy8RpxLNm4AO\r\nE3IYBfaUoed2cNTcs+E6M3HUyVaYjt89Jv3rePOHznWuBpaxL+XBVFMFRaKo\r\nqZSf2GpV+P9Bs4wrooW0niGZwTP9JDZvdQNPfCywIlUDxM59DXojtoEMmwUT\r\n6afE5RC5VLND45BiWaQh/LLxgQP1+1tjX4s=\r\n=HLBf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"338daa93529c874da1af6eeb4fafb935e014e096","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.93fc524b7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.93fc524b7.0_1678696649876_0.1406730509846672","host":"s3://npm-registry-packages"}},"15.0.0-canary.50be0fbae.0":{"name":"@material/auto-init","version":"15.0.0-canary.50be0fbae.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.50be0fbae.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ca3b978a304c80eb95120f5b735379829d325af6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.50be0fbae.0.tgz","fileCount":13,"integrity":"sha512-wcDpg3VPXAwrnRPOwPJAsxNJKRltl5TeHla2MsXNQVRUBc8BGBa9jRIqq1wSINB84av1g0p5+evy86XbwOLdgA==","signatures":[{"sig":"MEUCIQDDUhJnzskIdIl1DRkeZya6lAOEIVS8yiFf8C7cPjCncwIgRjPCk+LyhEFiIDiQ4zTAnMeH3VpGnTdgCFImfTYLevg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD2CyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmruFw/9E5s7E5s3Woei284RtXrKH1YBbzGIivaGhrWtYEt3J29O9Q3N\r\nnnFnuJcKhOGNEdL3S/l9BAYCN1ikBZE7ye16/zFa0KDevfNAQ55YW9pbBR60\r\nqbRmYA0swTV7Fn8tdYYxniBkw7P420tvorlP8wXvQEiXrvvO7l269ZywLlzQ\r\nUXx6YIwtTJiUhepnShAnal8Dp8lv8fgqZ8f80LMYM4OolNKG3aTETAxvC9c1\r\nkbl6ied4lENbsEoyWHyx+EQhSH2C5X1iVNo2URRJSrHWA3VW8SC+esIZyxe7\r\nNin9r5BPkVBpqQ59DUjqP5PXCpD5p1VavoNFmdMVg2tipAE/TrnEeB/amUKU\r\nvV2LGqS5NyJXslpfR4Wo1ZOuwBXSLMdG+SIHQW5CBbDpb+XONRuTkkygdXy9\r\nrcaUcseCVjFVw30mG57Il44o4hQspDI4q05YL3mOahA6/WnHodr6onmF+Gws\r\nFHkkwvGBq3giimr5ul7Am71A4sDxJEDL85DVUFd6ljg5OrIQINGBiFueaRGF\r\nM269EJYvQhkfRt8hxTAWekwkNOtRGLgGm6E/9WdF5GR9q6si67cBDaNvvvjJ\r\n24P2RBA6OnzbLxsgwXZGahAwGTVwsPID+QVAUwtnMmduq+6RD5jZI7ElEjW2\r\ncJGQmVvJTIMOxcuS2uHYzyqx1wWOcmqOCSA=\r\n=dyU9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"405d98c2882461cee8d47ab1b16a4666ccf7129c","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.50be0fbae.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.50be0fbae.0_1678729394030_0.12764105992950658","host":"s3://npm-registry-packages"}},"15.0.0-canary.6b5ffccd9.0":{"name":"@material/auto-init","version":"15.0.0-canary.6b5ffccd9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6b5ffccd9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"05b91433f72d0b9d8a0aefecc0a470aa3bac2562","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6b5ffccd9.0.tgz","fileCount":13,"integrity":"sha512-o1lDkBfdE2MF87OXMdhA2gC3AoY1DT9y1Nc19jvkfyqI4/NYe8oOTAJd7KusytHERsb31rx1i48LBvLeQAutXw==","signatures":[{"sig":"MEYCIQDSoQiRhvKne4Dy2CmkG5rvKZck6hSRCJad0iXcSOUnqgIhAP4QFFmEu1Neypgg5L3AllD9PtX1l+cvb6qSbvdIh6+d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD2F4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSDA/+JRT9U7LL+3CoEDmlbXCgVF5Yqty3p3U3N4Wv1sE8g79/HOs8\r\nhNbknBbCs53vOo/WjHkYi36WOzHgMqtn78rxPe5ov9SglVXNs1ZE10otni2W\r\nFmnUUWk1Ia2HzHVAgg3LaUDWZVPTqwymJPAe3/wm9ElQ+mx6sLkqaSwHpnv6\r\n2giI3k302jjKdXj4NTAH3JCeG5eeuz+yWYxxoo6es0ZmV8BqjXGXmQb3oOdm\r\nQPejxkJzZNf5vWozbGppFyCaZZdR2ldU9xKw+kb6YM9eQZya4j/HAxPXGSRM\r\nrtSUTC9vN01WUuNpeBBpxIHlfkOaRvCVTHS1gq28aB05YnHkbC2/iZ3pLLpg\r\niy9UXV8XFDsv8bjZiWHOd9ticvoy5wMzApFXoun0+iM4eu1hNE5nO1aAq0Xo\r\n5AIdJ5iu5vhTsQrnZNoitXVbZxHKgVgJ3kXJyvITuW3m2zU4z3qsHwiX/NIa\r\nEas3odqy7SD8U6K6V65Wnwyzyo4KpabP+2DaI8JuM/QZVF0NN8gH6RAYNJn1\r\nbjXmTiof+JOq4FjNC/xI4zZMbiO4hjxzPh7QaClZ+ge+xQ6G3R2QIndqD3+T\r\nF+DkGvOhEv06vCtVZHXZ7fU081EUulJiFTcxqMTy9QxGyEOAX3NI3Ukzqq8i\r\niTk35EAy2BDiSoqOKPYdz8Rw66EWy1WCnxI=\r\n=lXcy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"d30761453fd80caeae042d8999af672f9c3eaa28","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6b5ffccd9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6b5ffccd9.0_1678729592152_0.6186668388358163","host":"s3://npm-registry-packages"}},"15.0.0-canary.1c8013f4e.0":{"name":"@material/auto-init","version":"15.0.0-canary.1c8013f4e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1c8013f4e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f1e81dd3af727db9a1b10618b6744e11476beca1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1c8013f4e.0.tgz","fileCount":13,"integrity":"sha512-HzYfC9gB3LHlr33eofhdL17cPauQaZRoGRyfrXuvMBr4oy/wrW0gFc0Lo0Cigv3aPZ04CBX6a4ASgtqgWMkslA==","signatures":[{"sig":"MEUCIAWFq+k1zkE4Lvn5PvZ6kCHCjjCHKmXPoiwqOis9IImdAiEA0fL2rOYk4bxeTBFWNI3r4ApycS6MnmstUOiBFGnAVIA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD2TWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTOw//Y/4owsqy4gHNl0JV0iUO4/TJXwWrucjuGNwywOz+Q9jAeFlM\r\nvXKhqRATrJapByBq2jqtypAKs6euRo0OScJqjzTZRuPt/siHAGykxNT30OzP\r\nhU6wughykjx+s2txCBsdCW+mO/0ANXolIb02fCGqnSgJTW6YlYoLWcc6fR3k\r\n4v2YkOCxBs2vkHXztZtpOaDjY/l4ZcrJ3TltcUdV8Di+EZ13y1pz9VTqbghV\r\nB437KiGDc5muML2JABfITdS7k5QRs7FISpIg0VlVTz9KUctkuRh04GB9kjwi\r\nyFBVj3FWWPPjwVKe59c1L8d6H9Uwt/kbMFtG43OFm6LNpDjMfbgOdt1jPGM7\r\nUtzg5EToHMMVCpQkGWqj22q81VEONa/wsNdoq0Ga2RIJU6OsLp9Q6tUVoDEi\r\nQUGXvo4dDRxHKIS2luUVuRqSqz+b/eC1FzAMIK4uoN4ESfnVl/lLS/4W/C/1\r\n64ki7rVvs6SuQxTUJXggaE+Mm5QtocJcAVsOPJ8t88Q2JQ/ciSfcIxoOOP0S\r\naQFJxnxuHLIRacjNANw/sMpJYI99bubqRiC5czzowRMKKpxiNBjqeC5ZUj0c\r\nmXX5FeSWsivNsiFieM4l3kppjagbHCU5Z3hUG6J5AgAHlJc8/+2/A0GEwlbf\r\nlYA7gWQMWn3wiw1F3LWc1WZus1lrk982QCs=\r\n=IH95\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ce86f06ff0c2637e8cfa4965aa614efa6bb86046","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1c8013f4e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1c8013f4e.0_1678730454742_0.8421364123603035","host":"s3://npm-registry-packages"}},"15.0.0-canary.112715df5.0":{"name":"@material/auto-init","version":"15.0.0-canary.112715df5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.112715df5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b8f8a7aa1f7f0d7acb4468b275c26996a304e162","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.112715df5.0.tgz","fileCount":13,"integrity":"sha512-FDbj/GTTpuoO5IzX+nSEZs5qXX9GGt6YTfpFhgQHYS4YK08Rckoxd6rtEA+Wx0rmZBVyqTU1n04ghGjSvdabWg==","signatures":[{"sig":"MEUCIQDgaKlREBxaSdE2pL0rpYtQtwZMgo3PHUaUABjDodZJJgIgYqY32oITBnAdJ7LslT02XXDvC/qbkF8sdEYH6cpdumE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD22VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr09BAApDwHRbhAjvtGzkijidnfVlVVf9ZK6IWki43fGPmcwXeYHOgi\r\n2GfvCxI9aB/cSCwax8yRBIjlfItFjtMOwLmovdoiaye/SiVriD8sMGA9dgR7\r\nIvvfiUEs5Drrz9A4PDV7/qS+gUf2mvx5WWRnCI49TsTUlMOX6wEpkWg0xm++\r\nqDUzDSNU2W2XG1OHnirkde5k97HHlAZ7/sF+/J9KjgsnonH64GC06bdch2ju\r\nOxkEf356bQ8aFCFh5iQ8ZZoIgkIPJRiBvo5coLToyXNb0n9rcnmUT4i1pBSp\r\nX76/pbiP2kBBGQ9t9x7metveyiV2sJ6zk6ZGXbkzwoemdYbiwl1ykaeRSY5W\r\nPrWY+WsNw0wdDZMem2AD4R/GsyOQ93lD5ErV0ZS+9UaVbIsdZilflioqwrXY\r\nDKq4wCjQZLXhRfUeD5qZagDMUcgc5vXoOww6hzTrULfSHAt+GW9rWbPejBdB\r\ns2BpTuMcIfPpqM1YFiNWSq4Hxz/j7wSlgnhgsJ3KkDLSvAWMEcNaggSzrNdm\r\npQiWQRpD2WW10NbAOaQ4gfN4dNlhUpPUdNRg17I+uV6j5vQUh8F1A/pfbbEu\r\nJOifWWh/8wjSIOcBAazmRs3AErBgEZJUs4GiQAjOnHYMBLCEwwhFMEOhdnya\r\nF+8JIkVTjXXKqKU5MFs5J5rbSXH0On4zz0E=\r\n=Ngn1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3894873450b9dff1b92031fcd1d00ed1ec3ba9ce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.112715df5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.112715df5.0_1678732693279_0.9524244547376781","host":"s3://npm-registry-packages"}},"15.0.0-canary.d250911f2.0":{"name":"@material/auto-init","version":"15.0.0-canary.d250911f2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d250911f2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5e47f7c18d7fdfd242eb761945693883f34c0153","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d250911f2.0.tgz","fileCount":13,"integrity":"sha512-0p8/r45hFx2HuwPXutDDP0lfe910fgUpu7egHfw59nWIR3AVktiJBEVJuLN4E+4oA52KLwgHAMJ849aPHB2HYg==","signatures":[{"sig":"MEQCICgtf1wv566nGncumx8GDSGJOEUkgbtG3m//vs5BKrtCAiAMC573U2Fj2DKiHVzoUyQm1Xb3e8hMMySu2NsFjk15MQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD3nXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRUA//WKM9KBDNM6oQZRdKnqasAmxOMJv7K6U7pGf2bViTNUP53vCB\r\nJ9mf0/INs2vITGwbtPysGB7xovyxD4rJdKvVW93BrOVnrktvSIf9Gd/ki2pm\r\nVaFlIp5UVt41CXPKxb2NR030S+8yJghh2dXtSKYYQu83jZsK+2ZW2ojK7Abb\r\nrby2w4KzeiD8E2bnp04zsTfj5kUSRef43wDie6JOqWH4W89J8pCTBHBpGVlw\r\nCcBAlxWMxbjZgiOmo5eQkiRzFJkO5A84MVyTuyMwbHa3FFNGHGGdl/7cJ6Hx\r\nskDT7pcbWG9puVFFg1eGESpcskcfXx0ONXcB5joGtk6VcU1x3R/Q0F1hSJgG\r\nlIcg4l78DeBSmiuAf3DK0qOy3e6+Z/JgD9vo2WEj57HOHV67z7yyyUrv8sap\r\nkFZlO8rF/us71lr+w05DhfhqJqEpDqdW1XJbJh6LoiS8PWR4O6GAUu8KctET\r\nFv+OeMMYmm1wsnTtpkwOeBgloLdzAmNjPyIBvqslmSnl+EAG4gupjm0gXvlF\r\nbKlcO70nYmylVKby3R+L7if73neaBVes/aLXjMmWj9OaUMnyCtHqHSzM8TnJ\r\n+9i1Cw1lw0+VrTr63qRqC3yVasvFznQ5tSk+TvzD7JYXMfFxqaVuqKo8TrKL\r\nZ8+Lo0VGVm1ZvHkdW+vqwqKZsooWoZONr7A=\r\n=PzOA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7b4ac246b31922fb4beb9ed168dba262e499c271","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d250911f2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d250911f2.0_1678735831187_0.8591627968566469","host":"s3://npm-registry-packages"}},"15.0.0-canary.7cd925c12.0":{"name":"@material/auto-init","version":"15.0.0-canary.7cd925c12.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7cd925c12.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ba2a7586c93c1c35fc9c3f3cc2ea138f533b695d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7cd925c12.0.tgz","fileCount":13,"integrity":"sha512-QDUSvF3812uPjng8N2sxRDleAqG+6lYELimbC8hbKP2ae3ik3dHG+c23HYeY04SHVeWQFu/loAUExp6zusTaSg==","signatures":[{"sig":"MEUCIQDgHUD1Hy8bksr9siIYc6QhRaDD2okfJckbaEW4h6kl7wIgWoMTUzVlVavE+YlkjCMJyqIl1NkqjVDtSKfe64fPBWk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD3uZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrVg/9HCIbUcSUz/wMDLQVqv11cAxPUBE51Qz3vpSyZw1C/JpSbpnA\r\n2+ZxZtBA/f+frV445Kh9qO++6qnv260HYbQiiMY3LvRXbyI8t1IOaz+Is7qq\r\njGImoHy/GyBG/0aLZoOPxPDdlzOGwN5PY2z+/GeQlPJScbuWKE1PF1XlQ9tf\r\n/G/jQUw2gUoc3H61dgwaoN29ddTlrbnk8/7dYT0LDz2+VtHUDKhXy7Uq3x5c\r\nXYAhFaUcbgC3ovI466IDHs+LWn/c4Esge/SZFlHtq9niJW3IAczioCmwvsgS\r\narxGlh0uIItsTbk6BepizF+H692x95ayVXfnYrLlLMt2Jkxh1Ig/0ZY4a4Hl\r\nSzRemvS/ylW9nKrn/J99In1hcdh2Lr8PjWx5kgji0+x/avodqXjaZE4AGgsB\r\nBWgLSKkuXBKJerhX9deBy+IePO/vysoIdw9p3D2pws8BIGD87XkUYD+daFo4\r\nJdY9DBPS6oybbHM1YbVTCkj2RrcsW9t5AtGslMDil/PJV1s12sYAOkEfT1aX\r\nmaovSvnb0feuz/COwlzR3eGuhLRyN1W7dWKl2kLFpfhiBk74C22Nlb+rkX6q\r\nH4ZYgkiTCs3JtUpNjFWMFOCnK/v2B8eG/dTk9wHJ1HD/iazblucBn9Ha9/Km\r\nHSymQBFxdaAMFI7mlG3nfc86b/L3ObtCmzI=\r\n=s6SL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"96310a5c80e3e92695b6d6e2933e9b0c82e58a20","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7cd925c12.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7cd925c12.0_1678736280798_0.2881363202476046","host":"s3://npm-registry-packages"}},"15.0.0-canary.b2ddacf73.0":{"name":"@material/auto-init","version":"15.0.0-canary.b2ddacf73.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b2ddacf73.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2df318e5bcf8637df62082f66f99efad24fd33a4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b2ddacf73.0.tgz","fileCount":13,"integrity":"sha512-cwfQNEI+sj5bUqs4Y1di3oH2HTGgCxTHIWRhp+zOWzHNvsTJIWNJasdouI9OwGu2GftHvUHgBF1WOHJu8R4/5w==","signatures":[{"sig":"MEUCIQCMSkEOmZep9ysd694jfv4qaeeOb8Pr8lm+nkxagQremAIgJJ5cN7531KQLZ4A4AkE5qvk7wkvivafmkUU7p0hlCRg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD3ydACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLTg/+I8qx30QXeBtsGDC641JeYHjlvuoiQBxqMEeXBv3WIZvBlTi1\r\nOcBmx/T+Y3agnKcKQtdqbsCvtMPgsfpF+Bhfhm+BjV8ViFcHCYBsvJ5JLpWe\r\nG+l1D252WoWT/MVRJXNSoY+ukHfaY3sbq4VzaPzmUgeIlOtwtdt4ycgZUNcc\r\nHh8/Dmx8h/HOEmMUBPj3tli8QmcuvFlKjL7nXur7XVFnef6aNRWteWx++QWi\r\n6Rduc2KwELIzqbdaobts88UPVma1zUc83PUo6IaatSFNCYQfQPUpHiZYx71n\r\n/wm8T1MnvgaNf0mFTT1y7C/KhqCjHjEYOfAsiaw5km8Uw3r4jkW8v7ZMGaaw\r\nTRQKI+pAN89QPXkhdHZTA7jPn+ytJQl/S28/DTbYtBRnPeSdwWs8EwgNrDdJ\r\n6eydsHEDd8vcIzQj8Lk6HHEDjcPYWiK6Y53PSpDPP+g4iWmyk0dCAK8CrpLO\r\nhe6UGWNSxHkk4ugCPICD/q/YcFYYSFKkDvXaWnQJXGy0FaUK0a+j+WPqTWTl\r\nkZVxLgvOW+RTwt+hkDHYMrJXVvjUOcYgr7LBrJB0u0wTlTQyRkXP0oLGpn6C\r\nQQBDjGAv/Yf7WIJOaZaisTC35da+Si3oq9iohrcg9UXz/wZSD5hFsZhAJ3ax\r\nqMKgpz8HcG0+MkrP7f7xurkUxinFiJqj1LE=\r\n=PkOD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"860a6f0b439760b894931fa6cb354412764bd21f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b2ddacf73.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b2ddacf73.0_1678736541315_0.743393711387788","host":"s3://npm-registry-packages"}},"15.0.0-canary.989ae2ecc.0":{"name":"@material/auto-init","version":"15.0.0-canary.989ae2ecc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.989ae2ecc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"352e1e91b1de68441043514348fa93967c880484","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.989ae2ecc.0.tgz","fileCount":13,"integrity":"sha512-CsRCXV/X8sXzrjCSWbHs2JIqwb8VH4Ag0zl8ZuMpCKoXA9p82gj+8QXsBOdCCxodZy9jk4j1QXV7MuhWS5IGtA==","signatures":[{"sig":"MEUCIQDGZ6SgvFIYnK83Jq5iUw4OK9sHwlSZyYpjlmBnn86n+gIgRetfSRqUUo19lvG0qH3MCI+lz4tZu1ojAEEPggmn/Qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD37LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3yg/9H6AeiDZMcZIFBuw2g6EYomTRi3oiCwcBcNKcLHDR9Qulmz4m\r\nhFOxLYj49X+AgUL1lckhPUOtZcLxPsfK5gh1CcqycVcueUBYPw1DfB7kjvXA\r\n5xZBKVPdXJn6vpMAhG77MSOb+XKMyzt+LuyYnmccNtulWwW5hyFYoSVtGbrE\r\nYnNdrSqZyiP6z+BUSglE4iBMYcEHgTyWv0qm8JQLknoyPOQGxE2QO3TOg4MC\r\nEd9V0vsuJRws0/OEuS92Wcz1d0TuC6nM/6KK4Vn57jvfxnUYGJfslTWKtOP4\r\nMb28D0ZuV2OLzJ1X+9HHdB/9oVemDXpZrGOYpNborkPwmk35V/oDLZiGWbWP\r\nGVxGLO2pKHAPA3v8cEyUlHLRjw2FsqYY3EC0QqSb1bVPn+zDynWPTDz9UP5w\r\nWUyh9jrqHYQWJicNll+YLQO22kSEid1fGhe6HvXq6bZx0jGHUBORG2S/dWCw\r\n7G1TN572gVC7EaAckM6SbmXSW4S13T4FafsZancg3knFxIo+yI1Z95csX4Ql\r\n5YjKxH1Y87FD5kCamTGqR0WVWPzCbgTxjEGMwlkYPp39MNfIheTkbi4KAN8p\r\ng0tF9DqsgflURP/Wa8LeshKZ9TA3Ad5+pYd7DtRzxgTMrlQ18LwVOd7QeXF4\r\nlyeHLALq+k+tcVtX8k08el5EorVXA3yKumg=\r\n=16Ei\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"52e0f05ff74ddff1d986b27e08df13644c056b63","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.989ae2ecc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.989ae2ecc.0_1678737099157_0.736032509112118","host":"s3://npm-registry-packages"}},"15.0.0-canary.89c66483a.0":{"name":"@material/auto-init","version":"15.0.0-canary.89c66483a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.89c66483a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8cccab9d05b6505f2dfb789a7342ebcf7e5b742a","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.89c66483a.0.tgz","fileCount":13,"integrity":"sha512-GIjYhJRCde8ZTcssTKFxeuTeKbBpakLkLmuV/8ONH2s/p13DxJdX5yPbYmVSx46+VlbLcJJdeLY+Ayuu0ogCyA==","signatures":[{"sig":"MEUCIBQQdLKdMx4PIacb7YjdxG+1y2823ubGklIzAYIPxXDyAiEAhEalMRQj7ZIec5DQM9ipElPFyUxtQ++ScH3+0TsAUfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD4RfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMug/9EJTQpILu9/WRNdyintg8tkv7Ul2grRXosNicWSLv7W3lTWAa\r\nQmz3JORFor1QAdFB8SjBgKSV/nXYRL/IUmYB7E9Si06g/GdGK+0GPzxNKLvq\r\nZo5nOhIFFaDogkDbG8Z+8fOuxf+Qj83NplH/X+CsAb51eZb6AdNi1c+5HH5z\r\nTFj+isDYczf0XK96+edUXJN32zs/O/FxZxDVwmHnAfIhgKeHsNpPGqGeV/DU\r\noQDPpu7Lu10eG/tJmXKJtH96bT/znrVWyxVwRKXwJjyhhy52rxn+cEQimb46\r\nOyX7OutQ2SQCUoLN8tOeAbUFPdyxyvgXfZIun9kJ/fqkttmw0fbpwoejK0DW\r\nGQukvDxfKpfE1bQANg/wt4XwMIy0BlPTSgGbRUbJml/GF4sC9aah/sLEq9GK\r\nJHHPwoLPmwKOeAf4012zg3//AP1n6J7HjniF8tNI9+tiHsYDGFerZ8w0DSxl\r\noFdkd+Dl2jSEZCCDchbfvOehL+HqKctZBGNVMC9XaxAt/RctvfbdbGTJuWJS\r\nH3hExvvC3ICGMl0eIWCDQcHFeU08V1mjhR98nQDjLThkFPIpx1x5JQ+extZw\r\nSjwmEvzXd1GtgJpu9BPiaF9vgHk9OG0xq6J4ZblaV5UmuC7LYH/PsAo0cwGU\r\nF+nE73BNalxR5Sk2sFaKPRxs2rP6fnD6c4Q=\r\n=PxZC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1e255ddead4716271020e03e9b0b302eacbc4153","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.89c66483a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.89c66483a.0_1678738527300_0.5728384119761287","host":"s3://npm-registry-packages"}},"15.0.0-canary.6a85742c2.0":{"name":"@material/auto-init","version":"15.0.0-canary.6a85742c2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6a85742c2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"15f969dc6873b8828f634b04f58e3463dc919439","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6a85742c2.0.tgz","fileCount":13,"integrity":"sha512-nITkdTUsLa2KXLF2YE9ULvhKldYbPqQJ46wve7M+IKxgYVDqpwujUbMnktNZZvfjwBxl6juMddXO7WOhavlY1w==","signatures":[{"sig":"MEUCIQD8VJOPv7J4Lk6Nc4CkxSFMvDZDM6ENUSrHMYs/B1d9fAIgZgZjdwUuNaNR2gQt49IBUA1t/DolUJYYgeNcbm6xSOQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD+ACACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjWA//d6rCUQfErPA4xcULbYtxHkW1dTH6+/FvvNGJ8k4o8Nrsn2ii\r\nWCuckc409l4MjAogPEwvVjloBQ8D8sWCAnQTRG6MDf2wdfv6eld5LletWxaw\r\nGh0Jkf73+2XPiflg3bwWdExAEOwJi6abw/HCxPJtoTJTAeRhAb178GETAuNt\r\nMzS7lCF00ah112jhBs/52dbxEwpCYLh7qe5vgcuBfH9I0eSqCuw/BYrTtddA\r\nKdWzys8WKYNMjIGNg4s1zHL3U9i22eWM70QzPDOvzLKHb5tqGwBU3QVs6Sex\r\n5JwcFrXbdZQ9Df5P8qjzIMj4eHRjqnap3Qt/7S0AM3HbUKpi/fClR19sGyRl\r\nwy/aoarrJm5ddA6a1D8YlN2KmQ4ZVqyF0imWqhcuCHj8vLZaRmT3d2cO/ftq\r\nWTeaOEzMoX46v/NcFBzRxAFfyNY58v84uUjntiaqK8ZUYJZtHsIk6hdLH41H\r\nl6ddEn9stG1LuCNcYEtap456Yrqao5tMRGDLlSBLtcUJjdJGxNi0/VBhKxfl\r\nTtmKIXg0l0mUstcIfBz5jWKrVDN5NAe/jhPAl9TM6u8rLflMXiMmDSyMq12V\r\nN4gAhE+bbHFzSo2h8X4m1nEc4wxJbj7Xl0Do40DvZ3FW1qXCywvcwuglkwPJ\r\nfz9IDd74s2CQlACDzE6B5cFA2fhPLYg0mAM=\r\n=+2Sy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2a15aaa59054337e585758eb160d9cab97224a2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6a85742c2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6a85742c2.0_1678761986167_0.6115995456068475","host":"s3://npm-registry-packages"}},"15.0.0-canary.bb6cd78d5.0":{"name":"@material/auto-init","version":"15.0.0-canary.bb6cd78d5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bb6cd78d5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"01e698427af6e2b13cb7b14f515609bd05ed11ed","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bb6cd78d5.0.tgz","fileCount":13,"integrity":"sha512-JVDxyz3/iW5tzsrXvei05VLOhsYjheYMKEmhmnfRTtnQpEluWMFvipOz1gIWeGafz3c3GzBIs1R8ON/I6s91gA==","signatures":[{"sig":"MEUCIQDURck9laYe6PjHR2VTr7yqjvHY7qa3/G7hmq25+OlsJAIgE846msioWeeZ7oH/fVonf00n0X/VhN7GHVnEh88EZAQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkELnRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmritw//ZAjb1zhYLLhsyaEe6BIz28FQCuk+QXvEbI0blbe9B/wgnFuZ\r\nUaNCopTlMgU09/YBpNJYMNWyRgwUJoyz7N7cjuvkgqHK+SOeHDwJBpTkJ1TL\r\nruTH1lYQo9+wMNF8O3ZTScYV1h/OeNsY4vdhyexZdkiwVPTuh5o3X61nnlEj\r\nerhXe5G8i7PIn35DXLnojz7gba8K3Jf5xRjcaS5k2Csv+7D3JEUn5CXEourT\r\njXRjbVeOVxOj9bz1AjyTKJi4JMIAoAs8VVaQ/ZQUy89B97Tpo/l79/IwDQoe\r\nGe8NZofsqdiurfpNxzVFEPJBa8CfiNOR0p7TR/rJXeq0YSyhVMIDJXauEnqM\r\nr8yiXA4CVN3WSTOcalLTtVt4OvPuGD0d0Ia6E7h3ve5v+MJtbITmynBMSHLu\r\nzcd4L9Hk+/c7lyvj5CH6ZCvRkp/TMhKz4/Ze0SkBSVGL1smfbkjiEF8PgVaq\r\nBvn2Lqva58nPuGyqkEgdn9veOxqs9C25dcNxQOmJCqym0chPt92JEklgK1ms\r\nHnZ8gczZpbqQA1gsEKHPXEPyEn738Ky/haOT36qpObvsyKe5iFvQlj72Z8oY\r\nGoODIN+nePr0DLfwHp0Te9QoCBN7k4fHGhtfoHSd1gqT9vweIKY1id9JxtTj\r\nDtl0Y1DMxNJDK5qUdJkZzlQ2i1ZZQYQ2iMo=\r\n=7LZY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fe016d599b297e4e276ef5b37b829b25f0607b93","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bb6cd78d5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bb6cd78d5.0_1678817745546_0.02897943874388531","host":"s3://npm-registry-packages"}},"15.0.0-canary.5f94aa37d.0":{"name":"@material/auto-init","version":"15.0.0-canary.5f94aa37d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5f94aa37d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1990f228b43cf369d7e614195b885df5e2170098","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5f94aa37d.0.tgz","fileCount":13,"integrity":"sha512-o57dn5FtgVfalbOK/1tbLjo1uH1DISZwQNX2EFFQcmcsQM2QmIr2LdbCkXv4G4xUefCS6qS52mqgnYwrL5iyrw==","signatures":[{"sig":"MEQCIDt2aIqfKTAdf3m1bqXFLPArjNIrQwvW1dC5lF6eIyqhAiBgOoY+nWI4uhKzSWc6D0/2/UxB0YmsgZ0QhatYnYvasQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkELqiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8FxAAmdIwZ+VX0HHGCzMakUyM/hjchBl2EET2D4kVydT9f739+vNR\r\nyVydSFdNSFRw36z32Md+52kAImoXZsyrQTY3ll4BnRMYbrHvVnZD8l0thMwl\r\nX6SaJInSdK0a4rdx8a410vIjnflXUfW331HyTIWGQ+I3KO8gBls46SZNXA1K\r\nehtE2oDIskXD08yiSb8mH5i92uVQNa7EyYtqJLO9mFlglKPadzDZhdd1azMz\r\nCDpjxKVs/zJ8CNzJlZ5XOQpeHwHrOsr/EtOQo2udFUzmFhGia78emupd97Mi\r\naOAIITmRMriPk9yO9/hO4dhpZSBe2eayBTOLPh/q8BQtCl8SXCi3MbG9BWt7\r\n5+KXNEQlKcYXzun7fq6/0lWqnIRIyq4vhujJff6YJQfoOb/iLGQjuux5W8aW\r\nfoGi+a/IYspthQSJ4lMs6IUOqPIVUrgpQnG8ypRUqwicHePgIRndfwvDV/ul\r\nVOWR+DVovbeD7vExLhc+yQ4PyqPlnmsxrcn7QVeALzJMcnG9w9mBfT5LHcWy\r\nDiG2Pv5RwwUsiixzhgz1+dK2A41KgkzeTWB1cN2xqCniyF3ApQPmIGw30/vd\r\n/csjCf8lUKes7v/prHw3/26bJJYWrFKc2QIBXrFSG8YcZnaVrtZJpoIRRQb6\r\nMrHCipvWjioqGJ3IXklpAMhaEeKyhnda9gg=\r\n=s8pV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"95db647ce856eab6b1eba2fb1794f3b0dbc3dd08","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5f94aa37d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5f94aa37d.0_1678817953840_0.5711164153035309","host":"s3://npm-registry-packages"}},"15.0.0-canary.1bd317240.0":{"name":"@material/auto-init","version":"15.0.0-canary.1bd317240.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1bd317240.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d60cbbbc189ae83f8563428defa73348ac592c9f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1bd317240.0.tgz","fileCount":13,"integrity":"sha512-kUr5/ZvGgfwza28BZJulEak3ynga8Lxb3r03+DOcSMJQ3S+LqLmvntvvJPwy1Vc6uVsgX0spd28bIJPFXMEQvQ==","signatures":[{"sig":"MEUCIHZYMtsbwHqAjnUudFGgsP71bJHdbadGqgbsBi+/0t7oAiEAiVH459RESA83PeypU/WcP0C0YC4rp6m3i0YeMxpAvXQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkELuEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWgw/9GMGaBTCIMBb/NqmsaYXs4E64wgLiwd6Ftww5KnLYYpU/SPcE\r\nd33j0ZTiezK4RMwnNq8py3cIPPohQ1QPgX12zeLdzmnh6DDrEtsPU5j8qnRS\r\nrEr4K0qCxvn/kVH2xT7P4yQlkbbv+Rgkn0Ue1RQyVPYjSQ/uP2eizxjZ9eLN\r\nMvdf1QhTI39hgjEAVz9CAvUVdEIYIkJaaEA7rZFOl0XPIhVjqzMD+HyX5Du3\r\nZiAhxBHHGV2VDt/aLorUGWyXPRhh/wW9lEi1FONXgQOdKRDyxBFhBLrnHpv+\r\nSYDH+MmrUIbi5FYu3LW0JAMaaznT9nZkmyZX7M3DVc9Y/q+y4pQ+0WF3ISky\r\n17Xflg7mXcp2Y0b7n0c4pwaC9aLmH3ELjQWf10IhlFPPXSB0KQmyREpuffQl\r\n7xPBRn5DtN6i5rXbEd9sJs/fau/uMQFPoZcTyT0n9tTJmdMScjOTvbTiY3jp\r\nOXxDYC4jSa0jP3Cl4fRdUB5ORzXeg59FeUwCT/3zXV15bsLCFCKqCgc+6gAw\r\nlPtafwj09Ofmixk+EvGwi3MtIspYlLIvtFLPawQVURSfodb/vwMx4CtbRoii\r\n9auUFax4ZsyIMxa9HAKALr7pbBI4DmOxmGpc/vD8NZt2gjTFGdPIPCr+XrfN\r\ne4gunVAFF7OBxWfK5AB1OZ5Px63uy7O+8fY=\r\n=nroz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eef3d63106c71dffbe823b04d07e86a84dfd4d42","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1bd317240.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1bd317240.0_1678818180156_0.15796456981074303","host":"s3://npm-registry-packages"}},"15.0.0-canary.d441d2a2a.0":{"name":"@material/auto-init","version":"15.0.0-canary.d441d2a2a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d441d2a2a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c4a844c5a5ba8c93db5f139cc78eb8cc94f8ab5f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d441d2a2a.0.tgz","fileCount":13,"integrity":"sha512-MnGwwU5zwv5/C71vjqpQVMIfAPw/JoY3iJkXu3oEP//XeYldfAE36eP+EAFmcbRg1545oKY4Ujl5eXwFUVCciw==","signatures":[{"sig":"MEUCIQDwTY2bK6hRms4J60PmC8+Nhxwt2j7S9BwAANytPxwa+QIgZMIAwdGT2vKDdaQ9kQE7rkYbU8/gDMUQEoLNIRtfclA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkELweACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhOQ//UHAzUwicDbe5DPlrwdlUcJIoohyK0WitO81T8MYSXKb02cNy\r\nNZ9qoeXG8uq1It0FEWleg8OLTSpWWvwCMjuR5XJQtzmXuESxqJkLA5NDb8/O\r\nAvYPB46THckTWGoP1DO6JbjkrVGGmgqq1z+boRogOT4RtU8pSGXVywCkZdEg\r\nzzpCMvz7XA3J3n/TBoQH2sbxSNpnQFuy16zjWx1FgDUhzSPMB75S7DH4DtqF\r\nX8ocQfKT4ttjZCdoovuDXzA+jRLWeRIzHs/rj4xQIi8zZZR5g2RqMZDAot+A\r\nDeSkQlY462onqWZiOYb9WkQ1cnwmvcup+i3NDF2eqs0LhHa/eHYAGJypRBqp\r\nc02M/FUuHrIHQnCXVT8ryAg0H5p4tQUmnsiIj4yjBUSBk9NUGEV9Xd2vb6JM\r\nJ2DkSLetu9XyGhY+UHRG3cWhV6s6TkbrzUHheiCklU5ooyq3JRBxvqU8KQPI\r\nEm1VCNguHbXZ6ZW7DbwMV3WB3n7bsC49EKxwEx4evSXuS0j6DNP6Z0iF9w4J\r\ntH9gg5NKeKDE3lLgdCGWP9hijB2HkpTY+znuhU/B+BjO73IpImM8Ct3yPbyn\r\nxRlSBIZoX5zF1esblgrR67NtuN62u/EaHsZCVBM8EZbZyH8GWM/Uzxw/+Fl5\r\nz9kihcFQJ6L3jawT2DReq3skR/OK4dC/Ht8=\r\n=Hcnx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3a1d95c90b2fe34c5c04e44571f94badd66748b2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d441d2a2a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d441d2a2a.0_1678818334397_0.45047652881797084","host":"s3://npm-registry-packages"}},"15.0.0-canary.fff4066c6.0":{"name":"@material/auto-init","version":"15.0.0-canary.fff4066c6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.fff4066c6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b35b62c2fc416f1a80e520dc01983953ff0f0ee8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.fff4066c6.0.tgz","fileCount":13,"integrity":"sha512-zyZHLMdpTv7ZVWWh0XH2GJfqOcrX3aV1rHo6KTJi4xo+j6DepuAt+mzqojDRZajsIuxot/QUHOp0JeBE63R7rQ==","signatures":[{"sig":"MEYCIQD6pchQJgm2KR6O+QMcKzm/GS/mNWoIwbxystWBgh5tFAIhAI069uqA9nzl3Trfs10QOuty0CbHWd1LqT82HRIgoFHS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkELxAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnIhAAlxtKYZI9p0GG0qwIjeUiYlqjfg0k3NMsYvFbuf9aB0gn0uFC\r\nauKebjY9hNxIai3BRzq5NrljbTqaedbc4dm7AoeYkrQIzhrkLsL5+DnPWlc7\r\nUQL6mXVuRwJ+VXQuqBbgI8GBNO5JUs36tIOCQXWBCiWW2Lll4au7NJy3G2wK\r\nX7hwdko3RfziJ5GO7SvbmaDWgbFmfWFP2kAbbYQdeCNJh8OvcSb76Oux/NCZ\r\nrLDM2Yh8KeOSapgUVF1MsRG+dIoh22+OhZb+3ocm1sCuRQ//IJ/3N6MhxN1q\r\nzWvQOdRGP/eLm+32Fo5HiWTvV1sK9XtGbGVf3yjFZklW8smdsBzUGmgJ4skq\r\nFzPoYDkpRKmWvFV5upuO0kHICOpP9R7YDEbMfP/wJw/vsb0rx9FhDcVcMSCR\r\ni0jqG6fKzb13AhbamtslyoV0nZaPWOl5z8cgqbdEFd6Arw1UTGWPhnIVgnAd\r\n9h7k9/p/JaIJz7PZiO9MsQh1oRSawIdPFtBB/Js7cGOeFblzBoxH5FmY+c17\r\nZzM2PjkgBoPZm7wbL6ibmVh7d3jm5y8m5IvEpIO2jko8nQg7uQ/FnPXxhBu2\r\nM13g2wBGF9vaP9RV8Wt194doccgFkZbEF5xF97H2JnN5oC/YJFLcnwGC4IhD\r\nL9TwrcWnfbHeCCM+l4keeQNUw7mZlL72Mas=\r\n=Xnkj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9d24b185ab8c87061ad27f4e7791690a12e10135","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.fff4066c6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.fff4066c6.0_1678818368483_0.5279868663666343","host":"s3://npm-registry-packages"}},"15.0.0-canary.87809c710.0":{"name":"@material/auto-init","version":"15.0.0-canary.87809c710.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.87809c710.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"551124efb0af555808c40e2b5fdeab00d37ba7eb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.87809c710.0.tgz","fileCount":13,"integrity":"sha512-e3qxYUIse3ny19CGqHWt425rmNP3OkqBC8jPgVjSPW1lafAfW6i4kf312KlE0hS1aASrSss84IKVHQs6fzZX2Q==","signatures":[{"sig":"MEYCIQDCkaYFFm87YyN6BCpY7U0FRIdEYmRhofpYajXVrSoDvgIhANjRXDsgJwJCrqpuU4EWKBio5vdOHFL4FtkkraENpd80","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEMASACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjxA//bu322Od+cY49Q3+N/8fiKpHTqATBfsl2Umh9CRV4GZVcNlzs\r\nfpskFKIZsovL4mKW7CPOIN13F0/xJ+TRTTTg8flRoiWVdRZfY5BdZSr+AxRB\r\nR1oXzRCM+yQXPGVw7Y/7upCqGmpYYb08dYZ6JhsJGViK7cniOmua9h2DNFhp\r\nxtFZZUBQ/VEANqJoH1rI70bcu8gT3TUH5Syah/4yDtVLYpah0U+dBXfgdd9Q\r\n96a35VJskUbVMowltFEWv+rQwdlCBLyU5iOW0jimEkWgoW8bHFiSzwGJyAHw\r\nGVyyw7VQFIG7gnAn0m1eii06Oh9pd4k7pYhO3by1mfCjFjTRQ0pUgRJ1Uctq\r\n3JiLrBpbiSa/JOqLDLVCJy1wZN6Mbi27UnBrKy07E9HQ33+7OlsyaCrbPNAI\r\n2RbczVsNp5iEJ2GuM38uhvmjYfxjkGyAsxXA4u1kfhuhH3G8DVNWwDGr7+EQ\r\nHUA37xKf8pG7OyMqJNPpiJ3KOrtb1jRC04sKgfs1DtEBB/LnTe/KPlOjeMRh\r\noalkcGVApMm7lTNW5rBmVn/jfxoOn5XHl+gc+HYN1IBXWi3bAqTZfp4hT2bz\r\nsoN2QO3xy1Vav5kzVHyzl/UCT6nB2lP85YeCTm9bt4ruuHAHwBXo2pFI165F\r\nUrJANNcvjg8I4W7SSb40cMfZBfmBvn0PepU=\r\n=bfI7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ac65d4def7491c4e414883c6cab7e075c7374b4e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.87809c710.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.87809c710.0_1678819346024_0.6872449158137541","host":"s3://npm-registry-packages"}},"15.0.0-canary.48d30012d.0":{"name":"@material/auto-init","version":"15.0.0-canary.48d30012d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.48d30012d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"072cebabb9ed3c8d1e4db164c8502009ab3e2706","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.48d30012d.0.tgz","fileCount":13,"integrity":"sha512-BtEEQCGaVe8uRiPt2CdW4MgvDS0CBRk4yf3XBuy4BwTW2ODKRTUliQJc4/ySY6JVKH6A7I1aDh4z2pUq3NxItg==","signatures":[{"sig":"MEYCIQCEWzEMlEpF6s2T4HfKkcrHT3w2asR866LMVb7iqo6+awIhAMRJqG/kyst4jP+0IHFOJTvgcHrkI6GadXZlXrBAsyZ1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEMEbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpI3g/8DvEAQT2ABjrmqaxJ1CZ8KeTX4Jk/5xCIlEcUSyadXl0tEszS\r\nC6qQz/BLlzuWC1xeyXxzncUV4ggM+t1beuT65yTGBQsPzmJlhM6Ez/j1seej\r\noirOsswZk1aarT5biJJCovWr3VMyXWXYA9fpeGrmB93yg38SUi8n4No5OC4J\r\nys2+Bnw6rqH8HyqJoWta6z0DzH/IckSOWKA7cOLI8CEtE7dAOJk85b4cH7mh\r\nDbrH/3wUV03SelB6/7PAVlQFGHLaEueu2KCVj1EW01nmhAWHVIxZq6WQGAi0\r\nQH1KtgswRxcxfjWDmtz4S99dxJ/Ko4I8a4WkJF6ptOs/LxppdEO8gswakVyf\r\n3JL631cV8XwGjqTbj2MBMCAqirpafoIrX0yhgurVuUGwnUod5JmSns6/LjM1\r\nJmOpUHmBEB9bfEDiXWDp5lWH09ThBJ9j6qqRUQnoFExByKYEEQFz4bTgdMMj\r\n+HIl4DtCFMCHPQGLfdM2+U4iL15NmRT5/Cc7ccjiVqI+3eRo5FtdjuiIOuVC\r\nzDD2Gszn4zpHQtStBfvxANEYXnXQtX+eQQuWE2TebFIgzBc38CMKM7rPTqTg\r\nrgdsZnh3ZQ1BO/c1EvY1aSHaFI1/bhJM0hzRr9vjvLJpSf34MurhqfNRruO+\r\nG7KOmexg2mC5AEKXv5PKFI1nJImLnQm1UP8=\r\n=Lucu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"f2e4b43d20ea58b52a223d31b8dcd3f813d1babf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.48d30012d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.48d30012d.0_1678819610807_0.5131339509924406","host":"s3://npm-registry-packages"}},"15.0.0-canary.419b23cc6.0":{"name":"@material/auto-init","version":"15.0.0-canary.419b23cc6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.419b23cc6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"207c5cfdda0d1996daecd32460e739106da46da6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.419b23cc6.0.tgz","fileCount":13,"integrity":"sha512-7+T44m+ACvucqnOnes+VDHCCuUHivia0LFxIbmjosjiyXbRxapXlCMVNRZ+AvCVKifdN+XznvQrpa6ExVeVP7A==","signatures":[{"sig":"MEYCIQCuWVXgMeig7ZAj5lusB4O3F9xN1u/rQfeB8/dWCGgcPwIhANsaPOkuBCkG0+1MXZTdzPaE9CYoS8M/qJXs2K+unvK/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEMOrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWVg//Yr+px+bsgLKWib2sUGYAbzqQwfXOIPGax24Z6nQVCIbI7lFG\r\nIHvAtd/42OPEa/qOWiC8qZBcLdBMilTPk4ETMdDXVquXjBNUOhnrf3W5BEOa\r\niACEiFb0k44mf01+JlxOPG8Rzp3ojElbJ0Yu+dtEhkWMd6eUQDDMV9Kaitaw\r\nqa8ORzsEYCpZB0E2JMtNDZfRLrTsyM9WMPw9onusX3VD70iTAuMc19jTA+gn\r\nJM5Q0zlIAwVOHbhwwR4DoclwExcVexDKu7/mCn+enu2lGGeXBlUQCJeg16a5\r\nVGNshqyrASixTVEDmQnx/1EpLaAz/bOwPOdbCdTN1S7AqHwa+wnX7kEGNSM1\r\nq3FbWQQALsP+kr43asQJdhU8wc2wOsz3FNO7stkmof6V/kqNwOEnATlwgqYX\r\nUyX16UeZU6Cc0gYAWkycT2b7TwrW1IfLbn0l/SFvHA1aQUSUSLWlxNttfII0\r\nyBUAiF+nLWIDYdGCT6r7/dlNgvPDPpPhwMjD34dA8H6OMRqZUnfFknf1ULiD\r\nI+4e3VrBTtIHFmBMx8k+DPR2QNkfDWWbCdXmp6j9ywETymSNd2UFUp+stGuC\r\nH2MDfzJ2TJc3p0iK7wRA0HQSFfGHYOjgZj+wmZDO0GSqYahmzppjEcMrYC9V\r\nIZH/0xqzaex6SteBLLYMH6WET+gO9dEVR4o=\r\n=c78p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3b1188210d22a02ba5ae948779bf92655e47aac3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.419b23cc6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.419b23cc6.0_1678820266786_0.8173182208304819","host":"s3://npm-registry-packages"}},"15.0.0-canary.bf86521f4.0":{"name":"@material/auto-init","version":"15.0.0-canary.bf86521f4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bf86521f4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bdc2ee29146bc64270028e150d25855e5591a477","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bf86521f4.0.tgz","fileCount":13,"integrity":"sha512-8jLbSNtYjFbGU7O19QGa4Cko0WfC7BrDzdUljLn+fGR3o/RnIRtzWgzbRfnuTsJRHII4g9n2+DNdEWLZ6+T+HA==","signatures":[{"sig":"MEUCIBRc7ff7SwF3Vg4vNKAp20l9/CFWjOI7VXJrSaafc8KDAiEA4W1PHGR091sSU0xaAp6xHXsGQ8b3lKTGlayXDjcRN8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEP9bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZng/+NHoPpmY9OpvUZDCdTU7PBrhkB4rjLoWxHh05n9Z2gICKBBud\r\n4PH3+oCDsLr28A1Ehx8WveL36GhX1X1nkZ/A3StDcPpkLp9eX4K8cse7nxZa\r\nOOdT/4q3H31Rq1dBwCGG2CrFMCEusu9IGhabgJ6osHy7FwVYvZQrVXA/N34Z\r\nwm9CisSPZZdqNzeeO2Vy0OWf4QZxmxtKlJKBeDlcjmGzWQcOrwwbne9u+XbV\r\nKerL/O2+pY8gAfqs5WvoW3gqaCxQxQaqCodYn2X4XteiPO9u2g3JO9dKrWMf\r\nsckFpoK9sfqpy4Ps3JenDmReiYW9XsXwUKt1qvjTDJ6CgH12u1LFWMhsHsuC\r\nEwFEkck6sb2wAT451QoaK7smja9FhmI0uAyUQqbNxH3RTUxEol7+dlrAMjaB\r\nKAdr7epniM6VyqdY32K5rhc8ZilPuaueX2lt62TuZSND9+ZA0QZAwRoMon9o\r\nsKU4YsjKP4gJHQznk+20b5TVZysvbzBpgGxOQrDL/DNH3G5jaeYLkrhgqUtz\r\npriLmjBIeXc3haCKkNaU6MrjhVjl2NdUGM9hZuR8lMg2Uuexl9kPon4n61we\r\ni4JQ2yN2jHpVgl3J9CVHXkoUlWFh0rPHjw3HtaePchLuTFvVGne0NnN0UH7+\r\nSmZMUuAEih4v72eCTdvD/ZQhW6JQSthbvek=\r\n=RIcw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8f5c1bf1449cde9c918f51bd033762d247655b49","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bf86521f4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bf86521f4.0_1678835546732_0.5784611569005924","host":"s3://npm-registry-packages"}},"15.0.0-canary.11f3d280e.0":{"name":"@material/auto-init","version":"15.0.0-canary.11f3d280e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.11f3d280e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4872050bb383a70c699d6d578f2c7e051dcc606f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.11f3d280e.0.tgz","fileCount":13,"integrity":"sha512-pPEyOiorkOjmNHTxAsC6FujWSGtFEh2BuDhhnRuqTrsFzD3F1gp+H/YcFNfym/1V+YRosi9UefxWo3W4Qw0rdQ==","signatures":[{"sig":"MEUCIQCbWcaZnRkEmeAApPWSplp5ep9bss4PM0YwatK5VoAdMgIgNxDu1Sm7Ooww3DxhuK4bQKKMqmfa/+mg4KOkR3m53lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEQzsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+7xAAlbMGalqAxPJBNm4zCitnknWogHR6tZj5dBrPYTr+cV83+LOi\r\nv+fUJXxPUN1AojxEVfRvJnXVYfaiY4lrQO+N0v+A7U4DdW3dvR2hlsfrQppd\r\nEHkvlr60klOIISHLi2/VbrDG1Vy82Ma4/eqTvFX0AOYpwf15QGIz81aW4R73\r\n+hbcYOKdENJhSXYEpKGMxgjkyzQlLFmhDgoGwF+/mPJoVi4/eT7iSHH7rxVd\r\nr605zyI/4GMjdJGGBZ2PnglM4pYm3tu6z9G24wId1DKpFCkB9C4RLakTWOUT\r\n56kSk3TE53BYHW1PANO17AsvEV0SycAd77347YY3r857cYKWYBqzsnNuqhgF\r\n8sVW7Sqqz++CxOdSXH8jb3jITnkIC6TjCU6gGFMPiyAgUZeWog4QomIOwVJz\r\nw+IXDp8UeMoLMmZaNbU9ALYzHXkMJ9cXbuWHaRIYiFY7A9EDgKPWrLlY81oF\r\n+shOCInsKFpaX4r3OE9laSp49SYXxpsy/SsLjW6/VXlBubQj9Kg480BDwRq9\r\nJ4fggevisB3T4+VtegCpDBorbgkjiPZRZ0MdxD8V6YGiTa/QNV3WfIuVsuD5\r\nB8F9cWqGoYAqb5j6taALYCrSq1DWdiyDUkK6svK8MgPV2SjBMYRH5+6dJ5xM\r\nzsfO1OBVeinWL8GZVXe3D4zcdjv1qI77z9Y=\r\n=8Kk4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8e5a0971e8b535be016fdfe963b22dbcf1353e53","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.11f3d280e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.11f3d280e.0_1678839020516_0.0992663095022468","host":"s3://npm-registry-packages"}},"15.0.0-canary.b281a409a.0":{"name":"@material/auto-init","version":"15.0.0-canary.b281a409a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b281a409a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8b02034f444aa9d6978a9de7943ed2b9dd8aa89f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b281a409a.0.tgz","fileCount":13,"integrity":"sha512-La5nCiT7neuT/fVJ6gGnP0NhI/e1bvXdyDC/fKbLul1nYdQ2Wk5HYYHxoj/+mV1m4e50EdHDWGak0FGmPRhKLg==","signatures":[{"sig":"MEUCIQDjPibgUsGNQqttI13lCC0UM1FZTLtCkOqDrMVfYcSsTgIgUYjSuryJPz7XtZeS+COjPVa1a68rA7YaOP+yzJyVZXY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGc/KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpL2g/7B0Gpk0xH9dPAcAM1aMZe4SkBbIrofZpspJwvOgwYMIzhoYVZ\r\nXsOtYUFK0GAIBpUe9e6ZgOqbaeBJsq0QcPnD5LO1coBNO0hQWZL8uxWRhDJw\r\nEyr5/MkaRu6QpYa9Uuilz7ObBfuiqb93WluM33ZUpIeGPaI6HuLEf69L1PfB\r\nZNLJ3zIp1kuKTc0TtObbUObrlJ3hfPl7fZCBMy9TBgwqmuHP8jxZQDBx6I/W\r\nW8LwNXRXDS1CHShecd8zdyCFFgriiXTZmKzC6vanUBlBXYKxa65OQe3Wln9m\r\nJVQk5eMCn/1yBme1B03+NCdMUGIYPOG09LLmepdsOhpaYKy9/TI7zavOp8oJ\r\n2BtNigSNvER9MqhenZye+Pc3UntSAGj7G2YWihPQ5jOTQ/3TTE/15eg4ERs3\r\nOC3XGQ3OdJ9cGdvjF/6MGFeGe/Wyemnb95jctxndikPGim0MqBtQ0Q/B1DDk\r\n+F2+wHo6nk/W0PptvpOgmOZ2/johemG1fOSTIhzmiNm15Oj/MYPykNr7Zcq0\r\n5fP7VbjgM2iVMNkkH8W5yEa6ydd0mJowozhKU2zqrRuyhJhp9teuS619d98k\r\nZOd8kdPzLTXqGaJtnBo8eLMteDv19caki667qoTkX6mLI8EmOrxJMGu4hYJT\r\nvM/Ih+E4AldPbcc6VjK1ELA/RKziOfIMotM=\r\n=ckal\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b924c47aadd36bf60d7c29e466ab3899ae4085d6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b281a409a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b281a409a.0_1679413194499_0.38814865422701694","host":"s3://npm-registry-packages"}},"15.0.0-canary.39e473690.0":{"name":"@material/auto-init","version":"15.0.0-canary.39e473690.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.39e473690.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a494150c2a3500501fb690904062db2288f5250","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.39e473690.0.tgz","fileCount":13,"integrity":"sha512-KiHmVIqBQDrCZK95DXXAhuOxjmtSaIHX8H2+KRIx3sKIg/ji2QqUl0wi/M/Jorf5o6Zar/r/t+M76Dl3xf1vrQ==","signatures":[{"sig":"MEUCIG8f5Nx9VuSgLcGc/pRzy2virSXEl/kou8aHAz6bTcl/AiEA0WRluA/uAFFDvqTyFLfIgFhr+ksPCc/DvNU5ONZCFq8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGe5YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdGQ//cDPGaGrXzPrAbYGfa1m35EIDFjFGB6HIrrgC26+8i+lyzLJS\r\nZqUqOfV/xdC5acihBT+Zt09Rj7dz3D7FPQM9JnmK5sRYULFIpY+YPRRYAwQr\r\nTeyjOClBs7IMRc+cfTeTK8WyeugStHvB+NJnmMAXVpxXnlxJdKrXqWfjyFc9\r\nuSznVLxYGf2ptQBeB5v7bIB8nvMvY8EBArqxv21yUKpy1++trVcWDZcuS47+\r\nY2wjf4spg/X/+O9eO/xurl+KaIcXDoUgPJ+io6lXkfTTSJsr7l3kRmRpIYM7\r\nhOSsXDBKmf2nVEtBxMitIsFLuyWyspsvMoYmAdu4SE5k51o6xepu1qxDHT4t\r\nbc/YNiDZZGZQ03zhOucUc8sZVyYI50Gg7q+XH8jcbxalO56QR5LIh4VbpitW\r\nRV/1lZI2zArxfWJMLoqaiSyEOCdEYBvD5Taz6gUZSQwBS/ZuZi43N0ukD9r7\r\nJaEGwmtnbPih2p27NUgH3Q0O12tTLvyqVrzg1gfgrBLDi012OBFo/k1jvY3w\r\nFt1u0lEYtSYDVQ2LpI7L4f7mBmPxGnoVG+zSqK530LJzZBsj53gKl1HzIJkn\r\nluHbSoSTSn95qdhrAoEXqGr/KtvRFLmY6bRw4PUxw3gnGNKBYxKhL2H1MvQm\r\ndeKe3rsYGaOtwbSegeRc+Q6PVNL2LS8nk70=\r\n=tw9V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"2d372eedef7c583c60aff8d4cd51f8de971cb93d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.39e473690.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.39e473690.0_1679421016387_0.2298661825413415","host":"s3://npm-registry-packages"}},"15.0.0-canary.cedffb44c.0":{"name":"@material/auto-init","version":"15.0.0-canary.cedffb44c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cedffb44c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ae45c88b79040d907dff1055f526ae60094ab081","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cedffb44c.0.tgz","fileCount":13,"integrity":"sha512-GvAmbX68D50UtpI3KtpwHI2GTob9iy7ekSeN9Tsp0/G65Eqf0Sj/RnfCAi62i9Y2CueklgBUM0NBnv6hIuxIgw==","signatures":[{"sig":"MEUCIDGmKP3qr2HdXPWgjBhAYAMxO5wWNjTWuvAFYxA/c0DhAiEAk6upVem0qnspJ3SVGB+uHM53V39S4bUB52Ai368O7rY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGe/+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+2w/7B1qto5VdLCj3CoOMdm+kwUWqzss6S30D+CRnyxo+QbHWwgZw\r\nkyBhfYa3VqGlWDbWLpw5gZ+TRDa5dzad/1rYNIzDcuhwf4V8jDElUCCdRLXk\r\n78MDwAgxYN8Fkd5pG70D8FaKR0rwlrUIbMk1ZzKOjWiJIkUP6wFi++0i05yX\r\nNQ0vUEgDiTp5UCwnRe2I6NYcEDTbmQe82x56Oo0+F2cwDNw46DbnKahRVIL4\r\nPO6M96hHzOpbx1LId9M3uKfjbsqFM57xMcnUms0cnebu0j2jl6MzrQX5xRPC\r\nYZAb9k4Me8S1L77fTWJ0KFfiwQrX4nupaFjDrOtddtUoqVijx3ZuvNU5EUYg\r\ngHQ/00bJi1KdJwEK0PGi160A/Pmb678cSgh9lpxOwhcrIie67quVpi8B0fmv\r\nn60ZlNwoW199F7Kee+4KOzeMm8/zWX4Bz00Dl17BraTyzFxnrjFkFUtTDX5S\r\ndapqL+A10sPW90ltUXbqqw4Hf+FfI3jHEJxos8IRXidD0Kl0xCf9bHw/1MtQ\r\nNkDbAALss2BkrJq2SBUzrIKfpHAFF67eEmdArBN5DoygIeTdXZ9/QVRg0oNH\r\na4JsRKdsy1r6wOhAOl9I/XPU/vI4Qe5tYbRezRcvlf9CSJsRMRL17WT/krHo\r\nl7L801hPLZNKPKCc5jdZqB37ae3KWj+MjDU=\r\n=3YoY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"37783644942291b0c5d41f7499a79b5f61bfcbfa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cedffb44c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cedffb44c.0_1679421438023_0.4833846908311066","host":"s3://npm-registry-packages"}},"15.0.0-canary.36a4cba99.0":{"name":"@material/auto-init","version":"15.0.0-canary.36a4cba99.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.36a4cba99.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d0aaa3c3af713368475706177843a2b013caf8c2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.36a4cba99.0.tgz","fileCount":13,"integrity":"sha512-0VUKHfsSK/p+8/6nLrRvnXW5PYbHM/SUUbS7eGx/6Pgkhpk0Oz6IIRyeJ8Uw0IZ9UNOfgvEnCYoM2LSU5u+IdA==","signatures":[{"sig":"MEYCIQDpvZCSWvzcLf/uScQwdFjQZxXW9l9KV6AC/JFe/TVWZwIhAL8lthaxXapEc6ZSUxIDODXv8Qs6JjTcdvLIsG+TdAa5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIyiQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKSg/+LkQWzhP1NFessTrRmTcE8IwR28xIpi+K55lewVfsot7pN+Uo\r\nVwMZLOLxeAeWRj3XiAoKgYRn5MGGBfya3phSCBXlb8TrzVF4WVP0eyu8Ncmq\r\nN4/qMVgL68GSii7uerOADuLAoLk2Lwp020Uw1jBQVo8T4MbH7P91vvtdXFkb\r\nWZLYc2vdMmwRyhtdtQtKCL6twAxyo+XiTR4iFy7S2mCPcZ9FGirAf+i/LSCg\r\nN1IZ+34zbgdBiw3N4ePvlypbaJip5YFbKBeGJS7QFrQD3XPMiiTg5ISEsoaI\r\nCl6qWWFlTQTZ84Gr4oU87KAAd2LsP3T+Pax8nQFphasA4XKvZZKt0nWPRSCl\r\nsWQpG3G7vLoTcdJPLcrfvWZgNUKSF/K8Y3uXCfmsYh+nv0Sw5UJvK//JsWFE\r\nJrs8JADn/OLEey24jBDVdSo03RwTNZfg82GMpMAq+oQsis3wkGhcCJEq2Cx7\r\nCjj6vTUHnagsYYWx0qmD2vCDHDMZliE9e5FeNEb0kFLRYLOp+uJKkxIYQqPH\r\n6IQOklKt93u6BQM2P7rIFgUL2geK3obyTQFuzYShYu9KnmvXgXYsPT/R+H4R\r\nEtgDN1VYfQ/AaD7Q7JTXcQgeZHY+RdkiPNHiLmn5I+n/vXhO4MZ1EWrq9DXS\r\n8XVxWWYLSFZNtm84pnFQGJpKg/wq6kTTK9s=\r\n=3vmj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9895102e50a9e7eda73e0b0039246bc56c79a7bf","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.36a4cba99.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.36a4cba99.0_1680025743978_0.49300399274564954","host":"s3://npm-registry-packages"}},"15.0.0-canary.ed7e82ded.0":{"name":"@material/auto-init","version":"15.0.0-canary.ed7e82ded.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ed7e82ded.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3e09c54cc30c7f096fe66e21d2a74a2e657a8456","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ed7e82ded.0.tgz","fileCount":13,"integrity":"sha512-LT6MfUdbBM3d0HmWBCQ4DgbM57hIdTOCv9XfRv7RwyvJRNToSlfJNihaTP0mt0ACh9aOJfIKncomrK5R27dH/g==","signatures":[{"sig":"MEYCIQDMuEELR5BUF+LySJ7czZQtGfixY8KnG+BWlTsIo3fMOgIhAMqwj+xrptUtDBQlbWoN+Qzev4MocHE+QfTM5jcB5C2U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI08fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoojw/+NpSo2fEBCwiwUIXhjFbyRKqB5n7OLyCRe3TXjX30Ve361m4y\r\nl/0JVyghxnRiugR7wIZIaJ++C6OLe7Et6xhPfcunYwbWUEBOHrwQkcrQZclO\r\nIIYKL26eCQWFtNCOtR4KRWgaL1HXtOlfvjovlXWn+tQrug9EA7whsCMGW4VC\r\nVAX4Gz3gr0lteo+7ojdlP7th0D7XN4M7B4ijpSSPwS4x5HDCp0KyOcFcht54\r\n1ChCUgtghjqtLS6UuqDQlQt9NRB4rrUf+7josyPPg7as2G7bQWr5F6vvmv88\r\nFjzcOIMPmnbmzO+kiws3ClFDzaHJPRI/O7Fp+NS4HbXlIn4gM4j7uDe29sXT\r\n+cDHi810orFxnTeygqoD+3EUPdYNx4pYBf3Dx6kYiRhW9+tgEqfZz2SWQ2LV\r\n0M3/HexNbNfCx80Ve6GDIsektW9amMcvRaKxkIXs4EP40c9GxLp++XFeFQq0\r\nZpMcZWyDYQ3N94aqkBZqDT/HlYpIOR3+2Pgyn1qwGZAkm5pnS3YCi6w9A9mK\r\nGoLrFncP8pvF4bL7B9uL1G5Cy/G6g6tvL0rP+2eyE1PKsdW4PqBYqtPtZn8J\r\nuYZPM1nbP2D7w/Ja6viS8NJm+nBnoMrjxV2J1xmA7rx7oCdUjofzjB1XBokX\r\nT++6YrtHl9SCehx2shMBE3jWWYP1thzwbRc=\r\n=bPMf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"037c17ed14cf732acefb4bf7cb0a6c61f643b991","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ed7e82ded.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ed7e82ded.0_1680035615416_0.9398658024343585","host":"s3://npm-registry-packages"}},"15.0.0-canary.55093ee1e.0":{"name":"@material/auto-init","version":"15.0.0-canary.55093ee1e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.55093ee1e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0e42ba0f61da53190acfeb2f1272c2886495809d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.55093ee1e.0.tgz","fileCount":13,"integrity":"sha512-lmw6uKAyoeZdZaDD8n7tdXy66hfMz/BuZZAbFDeMWwTy1Qr558ft3XbhKhP3A8s6BIXzKRgrQB8wVEo4x75VSA==","signatures":[{"sig":"MEUCIFeW3jqb7CQjI4pgw8R9WEJ9NUtWKluiaxYvtPyjIIWIAiEAnKC2SJMswaBT7FP4tVzVihllam0TlJoFsN2cjKN9slE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJIdoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonIBAAkYy9QAA8yx/8rpw91k5edAlayA++IW07bllSgQPJwnWLYHZg\r\n/ev4F2ZS/mDuEuouNjOur7YDLfw/3qOES2ZfcZJEboKqpjOJVUxfoAlrUAD3\r\nb2PZTwROJF3LfYC24LmWWJk5udAccQcWQkySFglaO5IqayI11lly88QQ6yad\r\n2e9JeFLd1lhUNY3kUWK+oWsuvO76jFGV1IhgvdIudSk2fcfL+Cm/L3fgGmuV\r\n5xohPWthhL1eshMcPPDmcTaZgqfdZwCXngWKfWvs4wgyg8zZckWYd2YeQqtP\r\nHqoMMA2rdZQuspkzH7eUMFqVhMxhxX8inOHiwhyMXsFv9d2XBmP4w7403Rpn\r\ncaPXjF6hanjSNiEEOEcD0fcVwzLgcwBpQPRIPTshGRmVZlUTmrAljA34l3xe\r\nDXmPEum08ShwzMnJ33IgZa0EHBHcPXA8L0YjPOazyu5D6SsTSY/8XrEWzCeT\r\nr44eDJrfRvaoGlIYEiSbmzlABFDWxJRmcKmtm958NXsjE86IScUOLMumWtoz\r\nj9c+Z4hzmmwcIx7rf5fpyOysq0DYBQBd5HdvWMCN0gQ5EA/dRjsQiUQoJNXt\r\nfc+QWmSoqabr5h4FV3qddLTs/QJZjeND4LpSUtZY+VV7V7SLLpU9dCckcGvr\r\nG0dWE8UJcsop/Z5WEHS2Bksx6vSFoiyVM+c=\r\n=L3nI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"98de61151738b5091fc2b0e261c18efce05e87b8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.55093ee1e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.55093ee1e.0_1680115559824_0.5321623280189456","host":"s3://npm-registry-packages"}},"15.0.0-canary.0c53abc81.0":{"name":"@material/auto-init","version":"15.0.0-canary.0c53abc81.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0c53abc81.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"47662856133b7da2c519fdaebaff789538b0b65f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0c53abc81.0.tgz","fileCount":13,"integrity":"sha512-o22aC7fBMsEOJ/yKFENSDq9oXmstjP6SVrbbL4kPKCsUmOuJMz6IPEdCeEXCwaVRZ2tEsNhBWRDiWcUR+kv9fQ==","signatures":[{"sig":"MEQCIHxFtFSXLM6I1Hl4iu8C+j5NjS0QaoGZ9hlhup18sk4YAiByglN9+rGDV7LmnqtZb8/YF9bepjJTZwbvCRzTDhIKsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkL3R9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfYw/8DrHRlp24p+PeD/NZV1xjx2z3aTsiXZsXehS1o6RaO8qq2gti\r\n6AqiN3iA+nw86XNZ/1+MPVUddk7BSsCJaUWkLObHDfgC6B3ATqgBK8UwbowB\r\nhIiMb1y6S6Gnyuachsb8gMj9MwH6KP3IppvKMHHy0koIM+Rfvh2ErSl0uErn\r\nWRo0rSCdbzF9MTECP0DWoLIN17D3/WOq4z9Ccs0TTfkp66s08EYR8s0K8qo5\r\n9z3oEjRJECh4F7Wis4hO7YgOK0KP62YlGqjCgjGx6GUrUHs8n0XLu1l3SYN4\r\nCdKIdmykS9YodiR+A4gB/mWz4lZqXDk4VwVUYzArwkf/i/v0qeCFuxWlpBlV\r\nyiy4TSdvaLQsVjGZ+OXWK9cExPRHBqV9N/b4zwmZTX/Il0HgUyN/LxjMsCiG\r\nGrRdBDFTifLa95oNsv3nzosxzONlBQeaIVEPw9MpgcQw4N+z4rLl9gVOUsau\r\n4Xygb50z1tH02NCIs1MYpwRV0whd4nlW9yuuY3qHvY8mH6KCmeYj5hUcb19V\r\n+y1JaDxfvyEqZoHF+I2XV01LrSPoF6NGBNTfaJl1fSXonv2fHYFOjfXjzjPV\r\nBfY9eQYwlzJrG3RgBq7pK3zHEGi5ORWYUNnDssHls+eMqZFjIGST86hgObOI\r\njwoDtT6XsjzXuwxZlF6iG2vzAvCEch5X4kM=\r\n=69Yd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f7be5b2317c28dc06c5b0bf4a8cd44df591750d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0c53abc81.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0c53abc81.0_1680831613419_0.5740167761385015","host":"s3://npm-registry-packages"}},"15.0.0-canary.51311e69e.0":{"name":"@material/auto-init","version":"15.0.0-canary.51311e69e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.51311e69e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e2b2a196902968b9b419ff288ea58f889e5568d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.51311e69e.0.tgz","fileCount":13,"integrity":"sha512-s0QfbltqnjVRlKfn0tnAgVmMZVWM+bUgBkBDptL8DIFXNVoRDDfPbbn9b63+pH+mnXD67n0Z1wg9/9FgK0AmCg==","signatures":[{"sig":"MEYCIQDaRqpJ11hd7Smv8qzRdJz9AJXkm+OrgYK4i7XAtm887QIhAKG4Sc5Ah3AGvk50j6vZ6X27eORCw3H09dTUJbfgyfg+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMFu7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz/hAAk4P5EPmep6p+X9+G6rBx8uh7Z2ESdcKwh6NoWcFbLP0Tk1rx\r\nBQDZeIJSDpfF8UplOhM+0SCWtb1QG2bqaYcMAC+93YmmULkvcsuH+n7uSCnO\r\n12hzQsS4mE3ReOggFSBbmrlKHs3FOuV75y63nafLiL4F66kdgqgzqmvUdsdA\r\n+rlUQW//LU0rAFCp+6f1xH0rxlWGX3Z3l50UFeVkJ5sp2oMZkAWlArKYFpUb\r\nWxYl5ycBXNOAsKqxy3gTDdeM8q+PfHMNDV829GcuzPOAmzvtfSHfo9UgNOiO\r\nVlnNd6KX5FIScz7h22qRnLogeTU3wGd6M4faSmBc3k1nyDyL/lgr23vpAig3\r\nNLe6tdLG8tPVvLKek69pg4qCftsYXFgGP1pw9lpGrswzuHbTyih+fNMXiTgl\r\n24dZn2A69AR9ce18/IC87HA4UvAB640hdRBUHDJV6WL1lf0JTKIsS6hxbZiH\r\nB5uVe07cXCPNq7tjw5TZn1wXb6F4ur+yzeNgjoaqhnZ4mXKDZFxk+KlJRwLD\r\ngv9YLRUah8s6WFvKWpqb4PlggjOotESywk72VQAYurQ57526GVQ22o8tTLR9\r\nRTt/RMqJTUpgZ0dzf0H+M4490KGl3bLRk7vbIH54BJaelOB9IvyUgGVZi3gE\r\nq5LeAKsMtgSm1YEpL4lS/eUEWjyimUhAXss=\r\n=OQZT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"20cdc4f9c3bc9046fb111c8b65ba3e9609585dce","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.51311e69e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.51311e69e.0_1680890811221_0.7037712441794284","host":"s3://npm-registry-packages"}},"15.0.0-canary.113b1a38e.0":{"name":"@material/auto-init","version":"15.0.0-canary.113b1a38e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.113b1a38e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d167d000ca07d6d3057ae32f262b483150c0d7bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.113b1a38e.0.tgz","fileCount":13,"integrity":"sha512-NWb+3oYgkmzSd8asmUMwHIwuhBN7q+8vV/nNeMSgciYl7QAh3Rg+dpCpzXolnMnWaEQlaBb1VY5M7E+sIn+PpQ==","signatures":[{"sig":"MEQCIGyhDuKq3ht+zJuVnT+jC963vlEhzclsgLbS3nfc5puhAiACebow3dGAzPCuwzqXdus/3VSP9mjFkmPCGwlQRlcBXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNIUwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPVw/+NODW9KAR/FWY8MuAg1BUeJilIhpzZ8liezIUiUFvj4i1xBpS\r\n+GN81JCLfzYsfh+eFKnwmwC+27K1bn20GVbNRhsIHVtYgYZQkExiT//qPWu0\r\nXGtj8uJa2ImoetuVBavf6LoiY6hC91+jnrpMwFSXKICRjfyYQNhtqsnDHzVR\r\nVHvReYXg8iiJRvejaeXjBi8Q7IW13C1H4dcK2sRw5cueKBPQqbqhadjbfaQ1\r\n3EMUfdTO861HE84u740CMs0GM3M/I26sQ5cFaipeucsA4zsGF8eAIC9kO4HR\r\nvPLmMG/1iMS9eW+yh+rD3OsXt6ynFj4rMdTe/bKWuolb7SEl/DxrydSj0SEf\r\niE6Sw7hzUF8f/BniLOCVPi1EOxpEfUw5IeohEgqxTEo+egI7kt11nE8ZhF5w\r\nKowNwk2ocFGayIN2INKXqdczJmsTgavVacye1Yrs7Qw7We2gBjtBPnhDtVXo\r\nsBMkl2/S3Ehvnk9+WMj5JNh8uZflQ/9JykQJXt6E2Ymmdc1ofayrfvOwrnNH\r\nHtZu191Gb6vbNLSlm/A3Mj6UK+xHACsJkD7gWfudsG/svxlqdAml1nNMdkdm\r\nAoTI8P+Jiz6SZ0xrAlzxkq/oL822PiPTEdYTdX/LWbnnp6bczX9N7ob+flkq\r\nq3JFCU/cGqkJqTCMet9HwJRCmOU1je7UeCA=\r\n=VN7F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3613349b6481f716239e1a73c710c0d5fe44df72","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.113b1a38e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.113b1a38e.0_1681163568215_0.47898452423060656","host":"s3://npm-registry-packages"}},"15.0.0-canary.ea2191426.0":{"name":"@material/auto-init","version":"15.0.0-canary.ea2191426.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ea2191426.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"61007370f7c0dfadafb7613a87af8f00ef390aaa","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ea2191426.0.tgz","fileCount":13,"integrity":"sha512-SZwCuYIA+HeduDRBDSjupeu866rl/Vzoh+DpLE7lCuExhFvaf5JRFNhulFAU67NZTD9ZyYrer5/1cxUVJLWcBg==","signatures":[{"sig":"MEUCIQC7v9Z7H8dm9sWYlEDqYCOR2QTRnZO8NOFizWcyKZnxHwIgenAuDqsTCU46yJMG4CJgXFfm79QYdnJB3ye0cpQuJsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNdcgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLcA/9FjTxFY3cK6ohP55so+RKVzt5YtCLvO6T1sTV1b3gBMzoG2cO\r\nzUK2tUx/R8szUYcCHQ3uN7PtZM/XO05xllJmv9uABu6UBRp/pimlKpL9vlZp\r\nQGy8/D+D0l3dQWXgm4k03gDM953O67JVwr+pPL5fjKWZiXTDlSUwlRYTexOY\r\ntmYXXEvWQ8VBfV4AQqNQPSjCAvkHaZlmP8TWWkpOwV7XovZrKMXtpWze4hpD\r\n3ZEQnuDJ4Kssv0+kcc1PelMsR25OFf2kQHM+P6Z/ZpSUiMKhUuCUq0ptp7UH\r\nJUmvqr9nvRCLNOKLzqzCWCbpDWQr+eJrkDTpgNv3wFR3gRBdcuX3TLmf8URU\r\nOLn3l4mqG6KYMnJYDGI38w478yvN5lq8T2b2QgyKljHgGbRvduzHJErdRjFn\r\nFWcKzKfz+VZz3AQAlqzWnHOcjE36z2PspJKsNwGrdQ0PvEmXN8MPmY+QkR0N\r\nUk5jpREDBT6TnPx7Ff8/gTjhAuI+DSaLso1pYoVmN2Cbc4ffR38V4DbA5JIV\r\n7TIgzaNJaK3+XRLl+JjP2wWkWnHBX7aWFnWgjzNXWfwBUNxB3pVZ9IW0600r\r\nYGjFY6p/p/noWoNPA3jmkncZCs7p3mEiEr9qxp0AH+6IpnBJhR1JEDmwCW3N\r\nCaYiuSPUVE/q7LJravbO3VyxJW/EKPw/qRY=\r\n=H1c7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8723a8c5fa13530d57b1651464ec28e9ed1d4bb2","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ea2191426.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ea2191426.0_1681250080630_0.34853339946249684","host":"s3://npm-registry-packages"}},"15.0.0-canary.5a5c38538.0":{"name":"@material/auto-init","version":"15.0.0-canary.5a5c38538.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5a5c38538.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aaae02be895901e3c8f33c689ac3cb0fe192f451","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5a5c38538.0.tgz","fileCount":13,"integrity":"sha512-8BfeSb3OY3KclhiVmfd7jc5PEjOGXev0L1ExE1gkv/VCf/xZTUluDSRXHKW7S/Yai8lsyFn0vs3rqRYUv3CumQ==","signatures":[{"sig":"MEYCIQC7FBeXLVniLNvrR+zOcZkOLeMuoIB2j9imk4KexEzE7wIhANQGJY3azPg5tnLgatKij4vdreizV4s7UnQTjQkIDo+T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNd9DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpN1w/6A2/hnLBvCDwksAHepuC4bHCM7Y/0L6ENvtuci4pYY3wwizdG\r\nmds2B/lbVP4sOg//TTBGEOa3xD8fH+mR+OEQNtr+6A5O4OrN1UOau5ewUH9b\r\nhei27khWo1EFLQidjAkDscPlmVcEtxE/PWU8F4kXOWZ7xXJ5fK5xOGa5L4C7\r\niTpOFzBtD6vGqPC+IgfecFGQ9q1smKPpBXkKdu4wXQkolR+Tp/yaAJDQuh66\r\nxeuSWOzMak6hN01AuoDcYD051kXSFMbEaRx80gXPJrTeCr1VGkwZWeVB5pym\r\nupLQFFV+vyb6trWRM2Be1oK0PBuTSc2HJmZcM3EwQKllHVrRMAOkQO4vwbXq\r\nRyyUnYPoKEZaYkOSsG9+hHCLtYYFgyeXVTz/Re6OxduJDY14ud4U7Gpde9sk\r\nTVl8NlNNirgR/hr/S8h+hJv2PyMY68JYYe8cqhxisL41bG9zx5IfTIN3AZFk\r\nN9CoFru2kUhBWeiSLZBlWgmTZYHg6sAYNi074O+OkMCsHcLvWFRQMnR+2Hly\r\ngot8ntvUm0LC938NaAJoVeXUMgRF769OYuLbRLHCSIMC+IKh0jkONyb9LFmK\r\nnOWJX25DvPQd+MKf0EMVkbzcs5BrCmfZwIln8wArIprvMKjMzXk6bK7ggGt2\r\nu6janT3GMsaGs/If/A3G4jlYmNABEYOOrjE=\r\n=EP0b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b05f00c0040fd0d1250297d4fa4236a5b6b00b9a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5a5c38538.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5a5c38538.0_1681252163565_0.7937089690004742","host":"s3://npm-registry-packages"}},"15.0.0-canary.e4b5ea7eb.0":{"name":"@material/auto-init","version":"15.0.0-canary.e4b5ea7eb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e4b5ea7eb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5070fa0470b65381565bc8a1dd9f7ea41f108b05","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e4b5ea7eb.0.tgz","fileCount":13,"integrity":"sha512-lCp3VO1SNsYp1MBEjJjyh4KDxX2l6QsrgZQ5YNBncsCji5TLqjqmffbIQl7K2IL2Qgq81Gm06xyOB8XufEiE5Q==","signatures":[{"sig":"MEUCIASuRt1cX5grrKhM5sXLFpRBCQIIl52j9g/vkUXuaTcaAiEAuqeepMXxWrT5+5HkZyANcqR0N+Tsy8KCQfrpulDAEiM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNecrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEjRAAhJ4RnLEnREuSaYaDFxEOz8EEKbtP23rcUdtlIISesvgT+sN+\r\nrj26qonj9nteZwRCJz2keAHBjUIig1+dbD35mck9k1j29+Ple/RMPCYrxA5t\r\nE+XN7+b1vre2H3gVS/3JWw9jDvfi94M9M/Z0z1gNEDzXdvE7X9isnxYIyrXv\r\nD9suLun3qI7WbgsISKYMvwJYO+KqxuXt+AQ8ADdzrtTeKupnVhAjj5MaJuw1\r\nIDLidDFQbIN1MJhZHU1ZFQGaTYAkZOIq3Yi3G2x75Z01Ep3NpWikA6ansZSs\r\n0w1R2u7FbkXftUg3MfXc1oGJ8uZ0pxCGhEFxiX60SAqHFxM2Nw9lFq+EG1QX\r\nQ/i9KtPnB1ePfAtmvrwSuxaY1hQgBbkBmy7QjJ21OKeuRvs9rGGmZQ++mg4/\r\nq0H+sftAXqzqXX61NZFE4ASxwIQT60EyV+0WAb3Rg96bOgf05SOsviPvbMZf\r\n4jYSiEZGbEei63+8ysMecNwP28u6wsKc0DGhI0HSmsOxJQYgxouDwC0T4H8c\r\nDfa9LtbEfUiiuIBRioSxAiRJlV8pU65pxZAsRA7N7N7B+fmOhyeYpax+I5BE\r\nDDMg9dHXRRbQmaCrjiw4H+SrGR1DWbQNbU+k19/EVszl3ol2VhejCqNbEQrd\r\n5wXAzg1XasBVwp20MmiJqYSOxO4o/lrzgcA=\r\n=DRhN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cfe1a97277f39a7f96340673857504470245556e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e4b5ea7eb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e4b5ea7eb.0_1681254186985_0.324654577593845","host":"s3://npm-registry-packages"}},"15.0.0-canary.a094dd9c1.0":{"name":"@material/auto-init","version":"15.0.0-canary.a094dd9c1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a094dd9c1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b42f62a0221c302fc82540b4df473277aa3f77d6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a094dd9c1.0.tgz","fileCount":13,"integrity":"sha512-v9AScuGP1xZEb+aHJuRnhOZfI0i/HUoYbumRakLljYnceAs7TgegG3hvTwh3tbszzI0DYns3g2MOHR934Lh4EA==","signatures":[{"sig":"MEQCIGuppt3/IxQAqaVhzXGUTSyG91EpPTeLLP/EXLO81/bBAiAZLCpHZ6yHvHQ1xjmM9Nd/WEtGi+nWdr5aGEI5dXWgWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOdaaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBZBAAgOrFk5mP3BYbzqE9beQFiWgyXts29MqvbCp2QkSKSJe5sbt4\r\n1F4BXdEK9f2cZ9h0xaV0mv3ZTVDLGZfi4D+i3mSV6a8GIGNoASAbDh37pfbT\r\ngqMPhcfK98GKZVtx227wzPidg4QCzFv0cnLt792I6SDgrlpghXvl1NADLNUj\r\nqFTPbfUvndrkAx/Bc+S5BKgHDz94WMMWhTz9nz4ICO6kJOExpin9Q/ekhTSd\r\n0Amc9bcj5KqsxJnn/6DKB46MD8UWcMMjNWyd/GFJ+/tIRCcNxWmhA7N/+ZZq\r\nJ/qZPEVhXFjVSMBfbfpwB2q0lXMhM9+AyjrOQxHlojMSKvvyKNHJsai80Q6f\r\nrRfGPzXVkthU6Qt4XqP/cGXMvRT3MI6zR0l3BOecEjjh0wU+ksnMOTa4t1FT\r\nIVLDOBrajPLg8JG/TWthWxAcYB1U4jp/d9n4Fsd4rJ4tpdhK+ZKIs2luym1W\r\n9+QEIE4n24E1ODtAwZU6d6rsmqHmdJYajTvQHQ+o3jmwsLF2S5l16tk9cRBK\r\niAV467+ngCibvJVYWxjUYWlwBJzVb8FRopaWERoNKrd7ewSD5fq5puApR4Cb\r\nKXtdwIj9p4j+VBJ8FVv/UEn/UB7mUVRsU1HSomn+l9H06rLud0dEJIVv6Qm6\r\nnGAv8aMs7x4bcCMdIh3P9CWEUvcGpFOk19M=\r\n=qc9N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"aa5164e66f4afe6547ceeadc8a793bb4f489ff5f","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a094dd9c1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a094dd9c1.0_1681512089940_0.5385248499653379","host":"s3://npm-registry-packages"}},"15.0.0-canary.f771b091c.0":{"name":"@material/auto-init","version":"15.0.0-canary.f771b091c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f771b091c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8addeb9d1bb4fa67ca64c84a8cbb1b86d41adce9","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f771b091c.0.tgz","fileCount":13,"integrity":"sha512-h/SSX70J/1Gs0cEonZ+nUzB6J3XSnS9sIa8vTM9OFCRbFYoG6QMqk+9zeYm+zP7CR1ct7JVWsvaAIAOBiav1pQ==","signatures":[{"sig":"MEQCIHEtRGsNXWMuM8HxgIw9KgMi0DE3WBf6cyw3mvrgYEn8AiAoH4q59i+NngOtthy4RP7MzpfzQRKLi/Z46FZ4A6Fxow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPWeZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbZg/9FzQDEmd9A0v5vWZIGfNJEXt9uIlv/iZE8Hdb4JI5KE1qbmbl\r\n1qS6qzJTEmjfjDMCmW2AZ8dxIs1CrMz9nRJTUo5TVd9ht1Uk3/lWH/SDTRfV\r\nalqtFxLoCMWea61RZr84537qQ1lrIhlV0xCBTqetpR8dKZXhZ94jOvBWpVw1\r\ngoVP1f2bNR1NreLNT//iwGalURGktISqdpCpQhafoi2KH3owyMtFfPQG/quj\r\n8xyTuoLyKMWi+oIcsQLHTDtuniRZKZadUbgzBx2Wic9pTHt9ExNgCethJ4zM\r\nbNObx8x44BXf1quz86szPsb1VgKCns2Iq+aRQSq0gcJw4/zwbzBSWsOU0Cy3\r\n/OjFHpzh4+y51sp2yVr+E2S9bUzPFgQv8WtpjaKMp33THCUxMR7YDEvHrLQx\r\nCF8aUOVx2ze0OvRjE7JX2l19b0gdPHXuSIw1PEKXo3Z5AGYu/fhOGQin81wc\r\nvK+YluZ/JQ8XL9pycut2qO+fVThF2Ze+/rYHDit5YAbpTEJlbx0Dtbf5CUPE\r\nDK7t2H1elHozK10pQ0PcRtcM5YpN+9T+oyNkjesPyxOSQuLqjipQymCYx/QR\r\nV0FxuFPGZnUOvRnF6uc0Gmkd3rHynNJAULiSsl/ageyIrm3sLQNfs9oHedcE\r\nPb6T8hitZZvsUMJdh6FvT5CUTJ49VF7hKh0=\r\n=b9Q0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"de0e292c8ebcab887041fc4a59b3c0172f4d4310","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f771b091c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f771b091c.0_1681745817366_0.7335066625009008","host":"s3://npm-registry-packages"}},"15.0.0-canary.79b1b612b.0":{"name":"@material/auto-init","version":"15.0.0-canary.79b1b612b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.79b1b612b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"25fd8e660f9b38b390f2a41938de1471b17720e1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.79b1b612b.0.tgz","fileCount":13,"integrity":"sha512-Q/lqJjog/0YADiDmsgVnej0pAO2q4DBRXUvoyDPMqFXMKBIxxeauB18ERgBjtMOk/9We0Tcvq4AULcicfozhBA==","signatures":[{"sig":"MEUCIQDULL4jgfToF2QGurMTV10vgyGUZmmwyzQ2mhY2VV9F7wIgMCnJJKxwc+NyJEApYgIUre6xY9Cm8gEpr7HwOuvZFJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQHuTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMyw//XHWLAotIEr5nGdCeyYFcaAsd/yUfg/s7CaufcG8xY0Kb8oyX\r\nYgBrlqq+SCYS0YNhqxCXkqaFAq4ZU5wOeb4h7d8X30l/hxwC9gRI1YuJuDoJ\r\nvLNqUruX1ilj4SdOpicNbt0U2nTEhwJqDcE8/a5vNaHB3SowMnH34fBZQ/DH\r\nVeMC/ZZ8NW8W8zkF5bGe0UIq0lmMqR1ZvCiLHXsbSdkom81F8ig2pI9/DMxc\r\nQ70NrkLDZzChS3wc9dyM/gaVXQjMgOpjamrerJdaM20C5mAHphH1thMR0ml9\r\nKLA/441DF/7LVSjVQCL/E8HsQ2j8KCHpNFq9KPEm0+YR83dkXZ4oZeQRrfeW\r\nEQF9nMRmUwjErmEhYkTraf8+F5yGG8dDw6vwOrgbSZTFr0x6aqtZRnlN55IR\r\nf4UXrU9KdbngnaDrbqtL/tZyXcIZRLHHea7NLSlTisY42OLtfCvs+76Xj8ev\r\nFIXmvqsxlKM4JB/2TmOCil9e0fHHM3cwvz8wNKhSFUtjApG41z5chX7bQhYA\r\n69ZgMHbsbokPeJKJhjcbvzDpUic/hOmUzH/RfyfM4ClFSkpm7LpZlJpSR9vH\r\nJZrNq+TnnlOtf2LbKazvv185Bbf1iW6IR5ExDvx4fyat5QVM+JNEEE5TaPjk\r\n7WrZ7IWxxhWfnLX5E2sUJ9d5qSlgQgamBx8=\r\n=JiP+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c8248a1b49ee37b1782b19aaa49b5626c914916a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.79b1b612b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.79b1b612b.0_1681947539617_0.7783443828297567","host":"s3://npm-registry-packages"}},"15.0.0-canary.6f50071e5.0":{"name":"@material/auto-init","version":"15.0.0-canary.6f50071e5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6f50071e5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0e90749065cb89e7603dcb54ed4f43c419831875","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6f50071e5.0.tgz","fileCount":13,"integrity":"sha512-cBB+ebAMQY74DHlQkY3Q1e/HS9JIdAaUbZJIjHfAFgp9ctQuWYOkmOCKAYS7jWTtgYLR9YH3s5P5bXr1eqySNQ==","signatures":[{"sig":"MEUCIQCKQW8nZYbBCI7DfYji/4QFEIRy6lHG29lO9C2RUr4RogIgMhBPORWtVM4al6qJDEb3QlRg+LD1jy3Eari6qNM/NRw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQX2aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrj6A/+MlmUjVv7n2QsU1XvEewclVbzDYWqJElx9W51rcRsytyumkLX\r\nPljZx6UWMNFqu6nZN1J3Plfjy+HbJx46zJQpsi2Xd1P8EWQSMkkJZcXEBj98\r\nv69fj6GffESQvLgp2sKRh/NAlzRk5Xa/oNuP2NegcBzTZid4RBQXTy4rvn/F\r\nHkrz40kvqSwuTg5NPrUraa56MTmZnteALw+tb3xTRq9rY3jMUQ8UnUp9zuzL\r\nGyof9wjoGemKvuEcBAWGgODtirloI7pjE6sgq21avp4RcMcvcvuhR0jEcTNU\r\nYyHj7O+czzO0zbPOLqoxHOetDMZhXNtK57h35GQPZpRnuwFoCXrXDxxAVBIV\r\npeRav9UJbXUg4Eq/7LU5Fcpiy+sVoSuhV+T5JWqAz29OBTfRjkKGn8tOxIYv\r\nKqdHeR1MH5UYp/Bu7yvDJNLpmviLYzyZYCgthyKzeF6L6y4jthum6DK5siB5\r\nkXIJPZVZg4k5hrCcnQS5x6gqnN4RVgcHgjn+LMBNeStrI6uFht19vtX5DDVT\r\nZAzJC+OYxisU+yG75NPaspNc7Fmapba0Z53txJpEGJTAAYCjm0aGiR6iKXcQ\r\nf+XVTl/86g+LVZPSPr3j6AAAbDcvnqPDWJDb+ClSm4lephpgg8qKjXkGpwEB\r\nT7n+L8xDWi4TsNWayTDxFTkSYj+v3sEmb4s=\r\n=/1sk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a5eb7e7a96b7f207546983c0f79d6fdf23f5228","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6f50071e5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6f50071e5.0_1682013594446_0.879512850166899","host":"s3://npm-registry-packages"}},"15.0.0-canary.ef754381c.0":{"name":"@material/auto-init","version":"15.0.0-canary.ef754381c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ef754381c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"65752778b302116da84108fb9cf0ad29dcb60a72","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ef754381c.0.tgz","fileCount":13,"integrity":"sha512-CKodcI/B/AplDka3KmWK8V23hHdJjTKpYm7wfS8guHuerTwjXY8IqhVma2yDAA/NlH7U/YkoT3lVLaLeL7W7uA==","signatures":[{"sig":"MEUCIQCeBX9QG7w3tVanQG378nBX596KkPhgCEg86dpK1nhvzgIgfs5p48bk2/kpK5bL+LF8Q2YN/CsG13dRPYELFEfp2kc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRut2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpu9Q/8CmZ5kVdLDybvsIMmRsvF1pRG6oISP1QK/RwUbt94DEZZ9W0c\r\nxX8TV5Fo7hNlm5UbcMZUPfGc5rAqZ2W647y4hgRzabOrGoXT0w5J+BCV+W6H\r\nQfjwsn3GApsMpGLBQeziri/g98gaMCtgLVaiCAz2UfcFu4fzvWgN+gqjXP4Z\r\ntPBJvTUONlkUTzQeBp9M2jO3KCcKqY8m26IDejApQqYf0MwAdPH1r3pLr1XS\r\nzSqjyZ5KZveVBPUKn2oWqZxtv2J7RLia9N0ApahKf7b9xGbY/8B67PUjFFEB\r\nPru21pZCIAd393yF/JMrDwU8e8j/gOsu63L4SmkROJboqYuPgUaFJZEWJU0E\r\np3IuDAsvJQPsIFfObA/BhsQ6xHvlkEUqLzaTfC/aCPMFrMZXmfwSpkYzgJvB\r\nieYBZLbzJMVGhusuviDlAkrrtTrKJJtu2W1oXUSNyv8DYU6bbhAMLS9/Tm6L\r\nDEoJBgJCfo5Rjn4u5lbYyPi+CpMHMSj/5YwjuDTg6BfnrRhLIoRolNBE04sy\r\no2/Ifxs24pTOQNXiMON49K7z5dw5i3ZJaYqGQVttMybQI0ZlnMWsqr7BtI4Z\r\nr3kJwG01osn1j9y72NUU9Y4qMB3LB6TquNJgXagD+tqFzI6eBuz/Aj0VQSae\r\nL+q7JoglLBFLRL2pLCF75JSogvVpF0xiZuY=\r\n=ScQf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"998bb9432e40056ce6ec836100d9a46f72ace249","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ef754381c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ef754381c.0_1682369398477_0.672431077927722","host":"s3://npm-registry-packages"}},"15.0.0-canary.69ebf61ea.0":{"name":"@material/auto-init","version":"15.0.0-canary.69ebf61ea.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.69ebf61ea.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"891759f76776c785e75a539ab63fe185f16a8eea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.69ebf61ea.0.tgz","fileCount":13,"integrity":"sha512-rRgfehmhZd6CAF24CTDEtpvYqrzipbeiQ49O6geK0qV2uNyKNANjs6On1++uO149Ft6XCQJeSuAG73V2OIolaw==","signatures":[{"sig":"MEUCID5rLtNIqTfYzn5y0pCT6IvCHbP8e6Nx6u8NSfzg5gvkAiEArNP9AZIVFAKig+J8vJP8OzctTDpXq/+wt5h3E6e8zaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSq7IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyZQ//ZCbEVvX28bpN/127fE27ngDNfRS6PNjE9b984jgogxxW8TdD\r\nSS8fJS0mZbWCz/3+gRPXjcmISKEhrX9wK5+6MDPtzqfeEp/t0BfomComdSv8\r\n6Y6E6vuoZpLHMdvp/hDH5ZWhY9WafPASkLCmocqqWJgFEgNoyy08TCVL9dMw\r\nlvK9696Y8Nml0b5P3TrdX4hyKKitBlOiuSPkowA9GFP6J2M7SyslTFo2GSAe\r\n2jXXWsvvpc5uy6bb1KKAIQgx2P8zYntQpladDgQrjP/G7kZ6baAxK8+WJ2Oh\r\n+rSn/oMIuumfKJL9N/Jp1ZCWDnDK7u6JDlxQsjIn+J1Mck0hJxrYYIvaD8wJ\r\nEEU7+6acfvWumuaDRQXyVCRaPBYbv9LtX1gjtAkrXzDjcHbyoWiAVSYG3Zt1\r\nkBDWzPPBDB0KJiv+2ayFzzSYAdaGCzMBph7HgzpDwicAS+xKyhGcG1s6lTFx\r\nTrrHqAEnBU77RUlM4p+fkx31ccebAEcv9+ZoKEbw5Jxh7MVNafsvJCS1+iyu\r\nuvsq0VPeW8NIZ4TFvWivJjRpS3WYYSPJDVn8kid4UnHodbCPT+5oiIR0Ou7M\r\nLEAzy8ZS+7/DUN49d1SVu/x5fIENdVGiDteSU/AQ9V/2PEGzXknM+I1wVflH\r\nyyFwY42Vj42+P4tyYreGy4ksfRE/spx5vrk=\r\n=9WS7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e68ad025642429a51f137e9f3fc853364faf0622","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.69ebf61ea.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.69ebf61ea.0_1682616008470_0.12084084441560239","host":"s3://npm-registry-packages"}},"15.0.0-canary.b90be86de.0":{"name":"@material/auto-init","version":"15.0.0-canary.b90be86de.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b90be86de.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9ccc015f6b5a0269f32d43087c982fbc9bb63a38","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b90be86de.0.tgz","fileCount":13,"integrity":"sha512-rNBWqrHZ6pRizneYQwMd8x8Zsv40sK4LzHvZGyY+/e+S6Zjb/WZmWahKHx3C7HWGm54SPTuLZDOef359dGFqPw==","signatures":[{"sig":"MEQCIAe4LmSlev20beCJ5l8bOjlxSOZiAeheGiQx2FNGynA+AiA3mUFF5g5FFR0SFqtfaQFZIdh0uS4pDsb4oHJZNHprPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTGLVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrpyA//cKQ7s9+F4GHqKWqrHgogdRVbkbNJ5N4dCr0zSfYU2PsDYdqu\r\nLLH2q4CzMX0nkmNyk7zWAc2e7vvbQC0WE6lp1aa7rWpmoOKpb3UTTEHyOFCl\r\n6M4HQUpuF1+VZbPTID4G5BB2Ka47kdbF51xerYlESRc7GXiZ9tnfty7PgGb2\r\nQHYnz7je52tHAcxaqQ6ld+vd0WIy87IqbkYCb9cmlncCHItbudEKi2aLRYbx\r\n29RPMF3e2FD19hEKL9C1w+RU9/fyZcuSzCjOFoFQNrKFIPJPveWSu89i6lcU\r\n4S4k6gC6t5NbH+uuZfGYqyN3SSGdxJbeVIAt/6ojrFXhvZxWBXNc/b1NPaH7\r\nLEEamoszjGlyCqPMG9WrHZ9r3UG0KyjsE+BYxTsocBi3ODptCLJElduLrtTD\r\nBLcjSW7LBuOu/Uauw8+djqOwXdrTS2EjS6EXyqGO9xbvi3R48HMLUStA8o8A\r\n0GMIopn0RCKO/YhIVyXptLZlY8BIEqpFq7bSGHwBioS60mZZca9oherzM9+d\r\nVfzLJjaV4+V5fb1w4YWjR4ZFljcPzV7mpgDXbHVy1PnhccPvjYTC2CbC1/8L\r\nJ5jlNdpV7Szj1KiHiP/+wNS4h8oC0cx4ZfZP2uEktQUOSIt0S31bE7hq3wr5\r\nBmVVNo3H/EIWtbyNHu8QsIM4BHDyfUe1TTY=\r\n=Fr7Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"903a4c00d6c4501b4eae8ac0007164ef4a97ce0e","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b90be86de.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b90be86de.0_1682727637058_0.24088807200881623","host":"s3://npm-registry-packages"}},"15.0.0-canary.51f9c0c28.0":{"name":"@material/auto-init","version":"15.0.0-canary.51f9c0c28.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.51f9c0c28.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"101270b357a4aa623bed5e9a605dd92fe120d137","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.51f9c0c28.0.tgz","fileCount":13,"integrity":"sha512-U75Y3Pm0OfKi2b8UUsWn+X7s+LGutqisOtgFytPJ1Su4UcB8Mh3nr/4+MOdb3DT0Z1bNdq+43JhEjTi9oijibg==","signatures":[{"sig":"MEUCIDqRzX+kAiA8AOP3X6LXwayGR0OX2S+KkBJICxSZdUapAiEAmOKHRWYgvoazMCpEHmFIavkIvoRAQSb3eWgisppA4SU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTGUhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrA6w//UugJj0P2l5P8wzOvVgDBqnbwdzRIxEFlMj2+SibrDxKmYl0A\r\n0neTQEqw7DkGXaOGD5lUrjAPCWsYi+MhzTKbJswwwqLlKsWvvlVIOBG3S53U\r\nyfL8VZ1WDlz35LnLl6jNbN16iDzvqLt0xGkrHQe8z9yrYo2ZqqDgg4HMU6wk\r\nkm07bKf/1ufk4GJqM5khKA95wgTrQdK/9VMPf2nVZquhgVs/7DZlc39WIXFc\r\nFTXi21IXRLS0tTREdWvL6gEjKojdBwmytyPl04Bs7iuEG31yfDX4guFcnCWE\r\nk8X0LHqgTzev3ix7sKhF4+QxxruVJ/CoujZVrUEQOadxkjb+VdX2DSaO65vj\r\nOsmca9/Ug8zEk3bZHQrX/abZX1fBSr2QkJRiSRax79fWWJQZWzO84EP4IyZQ\r\nmEjSDqaqjsQzFSUXR3W1xQQ86lxhKTcmLZ3sqebsVQYybcJtvzvcf50NNumd\r\nBqsYbQ60tEZ/Qo0Us+sGy6oRf7WuJykY6kiBWhQD3SeEEnfP8MAsufq9hHZn\r\n8ZCgZmCJztFwdloXRRw9dsdSsHMIkO+/QdBqwLMD+w1FgRAom2fePQ/wKMSr\r\nOcv1x1LJj5nAOPw/gpU80o9/Dd1UKpUEwPdHC0rxJxMd1Rl4iXCukr1JObXh\r\nm3ca9iCW/mBfTgkhtSPJBHFrLXZ3X7vG9ro=\r\n=Z1iJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"87662f1719363ac8e600f73ed8a7795c25d8add6","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.51f9c0c28.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.51f9c0c28.0_1682728225443_0.016810643863117924","host":"s3://npm-registry-packages"}},"15.0.0-canary.4e840d685.0":{"name":"@material/auto-init","version":"15.0.0-canary.4e840d685.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4e840d685.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f69cb88e67583dd99ffaab723f3f56ec07950e33","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4e840d685.0.tgz","fileCount":13,"integrity":"sha512-F/WYLKq1b0vchEFxlQxt6nFed9dUzUhLOCSF5LP+n0/cru6GPuNwnpz56Xjm0jkPNzcD+kXstrK2WYANakVN3g==","signatures":[{"sig":"MEUCIA3A036D0LSj/S1vHs7XVkh7UqEsvknX01a+UYHGyfOEAiEA2VNq/jJUbjJCJ8pbZR1cjCBxfqBONb+8iTbZbrsc6fc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"feb1f9f53257b520aff6dfe5dd1a15e319e73a40","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4e840d685.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4e840d685.0_1683041543828_0.8440220626746577","host":"s3://npm-registry-packages"}},"15.0.0-canary.10b8563e4.0":{"name":"@material/auto-init","version":"15.0.0-canary.10b8563e4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.10b8563e4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a8b7a4572b6cc1342ecea2d723597effa873a96b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.10b8563e4.0.tgz","fileCount":13,"integrity":"sha512-m32/Ue0iReTHbXm3d/6mK4oZv8gUQqBE+k47KjOkfgBkteIyofVls2FPfB/P8TnEFEktselywAIVqoTA2FcHVQ==","signatures":[{"sig":"MEQCIHbUdHEb3m11zl9XqDCU/XSozwJk67UZEA7+9rN3VA3GAiBugZ7B1Bq6Y90GyD+HnNTwu4uPFMz/VF4ToK8wSIaHBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUZ+HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX3RAAkNmv+W6f8h4toYc8VDUwbKVFUc3UP1rv2las2IRCXGOXFqcG\r\nXb9GN4VRVOPFezF9E3I5vuqq1TkJFyC+b0jYVZwCe6UyCQ3wrkzQKPYJL7xY\r\n4JR9iLLpBsyX9BEVHAy27D4vXaJPPdGLJ0jFBOLv1m6aHd5qosfPr+j0OEPT\r\nqN4HWNH3vtqHLOUI73yyqDYefpKpC+lmWVg02ltxA46M/KL5c4Zn2sHLbUPx\r\nUhcmgTAv38gDHDe+CWtc8M9tyfx5l7vM5L+PMaiS6KZKp3Hp9Nb9aCF5BOas\r\nk5zHrYl6ghEWM7Kh/Qhp3IEK/WtX22zg9/ofuVpJCPmtH0WP3mrJPHLm1V2A\r\nE2Z/6Oeh+Ad0asSDIn4DLr/SNZnSwsaKGp/zsNoK/+uW6AbuNVFEA46bIitV\r\nq6yYLElw+chBVjG177CUk8VIPb4HGAMAEbeHyiRXkqNfVPdqSxigvJK7nqgU\r\nUDa5IdGOvF/wpLtaXzmQnBJlYlFTwW0UWIXxXuz3pkOO/t7TZJUERzTuf9jX\r\n7sRWxBQv0EUEf63k2qvQsZS6FSf7wNLCQvoClWMCyMgGXu32fQY7CzOYJp3b\r\n6nkLr2V/zEhHWm77utYKr7pCHPbSDWS2Gr5bHbaL9FD0x879DU+zCg1uerKR\r\ns/WdyBOoKURDqB1EyjDZU9sgPFVhlMcBr00=\r\n=Yth0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5f71dcbe45f5245c72c0fabae0162af558c5c395","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.10b8563e4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.10b8563e4.0_1683070855225_0.40507117702380513","host":"s3://npm-registry-packages"}},"15.0.0-canary.736b7fda4.0":{"name":"@material/auto-init","version":"15.0.0-canary.736b7fda4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.736b7fda4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"69bf258a2801aa91811ebbad56931e5436087645","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.736b7fda4.0.tgz","fileCount":13,"integrity":"sha512-J1N17VUO0FzCGV7vakImYDnuWNH6eyI4D39vHhDe50pLOMltWme5FKuTxMO1867PdkmeVidC8ooGCWUKAanXkA==","signatures":[{"sig":"MEQCICNQb5H1bK3NmrUipyjDVtJdNElLZ7/FpEADoO3Ghv0OAiBczgJ1WakCcwn7TX1LiYhHjH2FGL71d6Cb19fRb7RtEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUnjlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLiw//da8elGtkoyLXzZ5Tyalgi4klhibI4K7vYFFNKcbVN7XcYzFM\r\n7+cipc80mhWvVyXfXeF2pPmeEkOqjplcZoNVQjU7mTEzas4Lqf4zSJvwU/7N\r\nCDodAIFO2MjbVL94GHobhTowwJqYCblNK7cv4IajE7T0yQi3F4SAfhlf0OPL\r\nWSmnd4OLW6qK2/RAoVte9lRoD8b6pC2QdcNFQAjmICfmq0xqJslboeuoX7aE\r\nP+3liwbBuaovk0+mlGp/l3LjZU8NvyjkxpBHJIQI2GQSmB8ergZcfngZ+nw9\r\nLxG0WEQRtV39iKvDrf/j9v157dE2t+UzzvYM90LTQ/vHpSbfSruhsfK8d8Vw\r\nrvW8GVeDR/lhnBnMch4HX4JDCJ/BX73RAIgCry0WHlMqFJ95DHhCpPb56Lni\r\nVGA9oNf+CwZAmiEzEPCqmZLDCY/a2GHEFirN8qVGf5PnQBKnehcNrc20Cpsm\r\npEQkTHtEt1IGUC2DP1d/qNRTWULbM9HA1DR/ybeverTWW3PBnsBU3NxFez+a\r\n/O2xx7VUF1MSrHoE7dHAqiL1hwKmjrh6pykwHtKRrQNDWFCar2idjvwVcPjs\r\n/sqsmcasMaBk9irsV88acpE3VerGcoV+hG9BjfiJOWi9IJ1PgtZDecu9fqmU\r\nHQIcLTOWNXL4XumlMy4nymPAtKnBhvw0RhU=\r\n=XH2H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"b9ef54594aa8f93612aed085460f035d0aba61bd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.736b7fda4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.736b7fda4.0_1683126501628_0.14349291029546274","host":"s3://npm-registry-packages"}},"15.0.0-canary.0e533c5a1.0":{"name":"@material/auto-init","version":"15.0.0-canary.0e533c5a1.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0e533c5a1.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6d7b58fe9ecb6df83b61e04c4e749ed6efac1dca","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0e533c5a1.0.tgz","fileCount":13,"integrity":"sha512-KBAnl/WRw2d0SvO6JbaRC+Lxl6jM7DYW8Il3mi9j0epq1gUfe98jViQWXWC8TdLlPOcQh+19/JS0O2Rf8BucWA==","signatures":[{"sig":"MEUCIQDzv13g7JeN2/LS922czKwbi4gZtpnpZYO2bih5acTStwIgSNyOEXdWiyirC+pP2FUd3aw6JREl3L/48JZhzY10xjU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6b9b4497cc6457c9e92ab3abdaad626c73e610a4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0e533c5a1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0e533c5a1.0_1683305712599_0.0981091832071852","host":"s3://npm-registry-packages"}},"15.0.0-canary.5f01c15a2.0":{"name":"@material/auto-init","version":"15.0.0-canary.5f01c15a2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5f01c15a2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"56a4fc94361d7a532021b3df7339cb21d978e1c0","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5f01c15a2.0.tgz","fileCount":13,"integrity":"sha512-AftRT3PbXHfOlUf06HIuSUexot6dLcpG9o6VLeI4A2QKxtwtLIkIddOLETdIBJ3wccTqxgoytk3Blt7IK8/4ig==","signatures":[{"sig":"MEQCIGO7W/kYvmr2g9vZA1xN4K5ySTK8cyE7EAnH+VItdja4AiAPaKG63y/rOQ+e23vEc856W+njnh8+OeWM0bcPe2J8rQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7bb1c5dfc575b36654ae046d1f4ab3b27e8c8f9d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5f01c15a2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5f01c15a2.0_1683307518854_0.17309896272448788","host":"s3://npm-registry-packages"}},"15.0.0-canary.3b5b55e31.0":{"name":"@material/auto-init","version":"15.0.0-canary.3b5b55e31.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3b5b55e31.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a77b9c01eac0ca2ffaa4cb0ead96dc3ee5b96859","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3b5b55e31.0.tgz","fileCount":13,"integrity":"sha512-s/04P52RsebfLmm0ivlvbW3XcVobZGs2vZM+/HHTX312f9lR9m2gNo3oxWnJKfpLrvzY6zo4NvC9Xb6ZBqvnag==","signatures":[{"sig":"MEYCIQD/6F2m5ca82uGldE5vwX7k+itv/ykWIeVOYNQosV0c7QIhALcHg4QkUpv/T2ZhqbboBBUTqkwuDxudRFBdkP9ytceJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"c262d9ee39655e869886d1584551a096ae56dabc","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3b5b55e31.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3b5b55e31.0_1683311874449_0.8027271135156662","host":"s3://npm-registry-packages"}},"15.0.0-canary.d0788120f.0":{"name":"@material/auto-init","version":"15.0.0-canary.d0788120f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d0788120f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"da35eeedeb7f8a15bfe6e3d2e6ab8fac2296b3e5","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d0788120f.0.tgz","fileCount":13,"integrity":"sha512-qhJ9Ju3D0BTodisOGimRrrOk1ONG5KHSY8sJ6lAmXRZ+ZomVKa+qETTISL47LVJZPaiWdtUzq4VKtYauc+3OOA==","signatures":[{"sig":"MEQCIGq0K0NsoMNXVXh2EhWbU+XeqWCHfWEy9ZEah2nXmWDKAiAbT81ojSarjJS3TmCC8ZRPXKyA0cIy/yT7H5LAXn9ZdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7eccbee262206623b89c40dadb4e11abe30d5e45","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d0788120f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d0788120f.0_1683620522706_0.6259230223987498","host":"s3://npm-registry-packages"}},"15.0.0-canary.f52358dd0.0":{"name":"@material/auto-init","version":"15.0.0-canary.f52358dd0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f52358dd0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e0c6eff98c071acc7076c96240a56d708b83a317","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f52358dd0.0.tgz","fileCount":13,"integrity":"sha512-0i1hgVwjc7z7pxI6tr4DjhGvpfcljUB32zn+XMpF92H4zhSRpMTzSe7DmT3QfX58UMpuShRgUe6RN9WkU7T2GA==","signatures":[{"sig":"MEYCIQDlfiUI6o9VHYkDoWTKjZd+OeVmH8jBFNWK2FO2/mrnIAIhANHiSESmAW0vzJsHpmciegon1QLJd3HwSIwhwWES5bFv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a4baf07a9736a6e1fa40001f7198ae1865d67392","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f52358dd0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f52358dd0.0_1683901760415_0.30665282184405207","host":"s3://npm-registry-packages"}},"15.0.0-canary.d3c3fbaa3.0":{"name":"@material/auto-init","version":"15.0.0-canary.d3c3fbaa3.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d3c3fbaa3.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9b0903fe3416d648407343a90bcfb96ae21837f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d3c3fbaa3.0.tgz","fileCount":13,"integrity":"sha512-OCYaB93IXWSqvNbHJhZGll6BgelWh6ucjpoMYrgfH7XoTBXT/SVURtOjo12gE7jiuJPhhLa+4grM6uzHebST5A==","signatures":[{"sig":"MEUCIHBvtPYXNT2ag194DgQB6YLMOXX8UYjCKaBD6V+4zRV3AiEA2jpp5ssFCbg2QFC+CtpKwZq3PtdmYjaww5Q24KQDR9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3b7f31c254605439f8fef56301c46f7bcbf3a9fe","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d3c3fbaa3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d3c3fbaa3.0_1683914363614_0.6937272045596807","host":"s3://npm-registry-packages"}},"15.0.0-canary.576d3d2c8.0":{"name":"@material/auto-init","version":"15.0.0-canary.576d3d2c8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.576d3d2c8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"71ab411255890d9c1763a3b381efde07596c5caf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.576d3d2c8.0.tgz","fileCount":13,"integrity":"sha512-MWH+0YdPr8a4FsJEkQC6nJ57WmPIqm3kS1WbROkSoxb/eZGECJCA6ajpWfgQtfjjKBrV217mRpen80Uf6fY9Kg==","signatures":[{"sig":"MEYCIQDmhHU/GZsiCzlrKw7L+HbiH21gCEJRnRf7hAPTh4JBJwIhAJhl0YtXrOOuw3baqSOcL0jQ9G7oV6LWHzzRx15pciDo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6ace19a21b6654f14cad48fc007198859874c910","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.576d3d2c8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.576d3d2c8.0_1684202340828_0.5550122657872045","host":"s3://npm-registry-packages"}},"15.0.0-canary.19bb36a46.0":{"name":"@material/auto-init","version":"15.0.0-canary.19bb36a46.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.19bb36a46.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"aaa2e3b73588af6547bc3436d04b467eadf098f8","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.19bb36a46.0.tgz","fileCount":13,"integrity":"sha512-GS9+juI4JduFhxYshQjH8/kEqN+POQdYb2NAkCUYGmscmY+lBkKO1lLkKm8mVliROArLTcs8xa1UntIaVzh4Wg==","signatures":[{"sig":"MEUCIBjleZ3GIk3kV16cf87+yf/sOg9F5Y2/W1OCKIjy3Vf3AiEArQ7BvqaswamlCG6Jv26anzyuTIp6hSFSkxnXoectKUQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"75157be315eeaa02f70ed69f97e44a7d40d53e42","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.19bb36a46.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.19bb36a46.0_1684266780965_0.2525867314086607","host":"s3://npm-registry-packages"}},"15.0.0-canary.aa5ac7fe5.0":{"name":"@material/auto-init","version":"15.0.0-canary.aa5ac7fe5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.aa5ac7fe5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7a4bfdfc5e26f0da47ece3e5cab8079841c0ff65","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.aa5ac7fe5.0.tgz","fileCount":13,"integrity":"sha512-/9fT86uZrOL/o1W7wpLkfwZEB4i16iZIQd+OWWsWoaORJ9dv0dQuL+o+65rOGuEU/ZjiLSfYKGK306LS1GXePw==","signatures":[{"sig":"MEUCIHP+MKsKgJ6C2CM2X5jRdRiz0qs/3y85eB4E9oyvyGUPAiEA0Iyj6H6zjJBUuLoOv5D5aN5EVl50BBSsWFgaCg1ZP/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"83e86542dd6facc8ffe487d31111412ee18b5bde","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.aa5ac7fe5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.aa5ac7fe5.0_1684776261746_0.9574933360419378","host":"s3://npm-registry-packages"}},"15.0.0-canary.90291f2e2.0":{"name":"@material/auto-init","version":"15.0.0-canary.90291f2e2.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.90291f2e2.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"77b24d23321048933ab4c26636df8c7743425c95","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.90291f2e2.0.tgz","fileCount":13,"integrity":"sha512-ZslBlje2LajaL5d7JCxUoWCKOBOsZYT33CamqPoDeY0Cjl77t3O+8B9YPHF8libytI8j9lrrDrTItQr53PHeHw==","signatures":[{"sig":"MEUCIGGgAErVcJ0sQRN7y7YfCkjItb/8L4S3qPQ4X90daop7AiEApqTOSNK/4A686xT58QBAkajSiSsYPFRROeKIKE9qp3c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a1c306471717b15ae8f0b481703ed1b46162df25","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.90291f2e2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.90291f2e2.0_1684863699370_0.1087945216751689","host":"s3://npm-registry-packages"}},"15.0.0-canary.446734f27.0":{"name":"@material/auto-init","version":"15.0.0-canary.446734f27.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.446734f27.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"461998934b65eb63904092ec0a58eb15cea9c378","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.446734f27.0.tgz","fileCount":13,"integrity":"sha512-QxuKXTbMpRDdw/cwu7NgYD1dYuwxEtmG+WPP4W01Buhc0j9rJkpVWGSMX2eW1bbkmoHLKo5G+r+nqyMQgrJ8GQ==","signatures":[{"sig":"MEUCIQDodwJU1Jq3/jpWo/RqmQ6v9nPW9XciPCnOtEyPQx5j/gIgJeSFJQu8M5kw89EEuEi+2hZNjrFkG5ZxvrTBz4V64l4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a2536a849aada5f06aa85deaa7be06f44f620023","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.446734f27.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.446734f27.0_1685483228690_0.7421690223702437","host":"s3://npm-registry-packages"}},"15.0.0-canary.19de312d8.0":{"name":"@material/auto-init","version":"15.0.0-canary.19de312d8.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.19de312d8.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1fde5df09d4376f0919cc474446623ac96099afb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.19de312d8.0.tgz","fileCount":13,"integrity":"sha512-jf31vkpGT41Uxdvu7a77OIhaUd3sDpn/zgZSuAtB8lEfCMm6hZICqVfhD+vQLJ1U6VC7YQUM304VnwkLkVKMAA==","signatures":[{"sig":"MEYCIQD1LJ5dJbPZJybCpV87yWxQ0HU4ZfoKB81H709PraST1wIhAMwe08PTegZrMWdn3cYb4VpFzjuTxXSWv+NdUMd3c3N0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"dc3811573a34ccafa5c09bcf14574bfb95373958","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.19de312d8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.19de312d8.0_1686071819966_0.5645858416215339","host":"s3://npm-registry-packages"}},"15.0.0-canary.6081d829b.0":{"name":"@material/auto-init","version":"15.0.0-canary.6081d829b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6081d829b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2a177957740a643fb7125074215b2f0c54f8cd43","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6081d829b.0.tgz","fileCount":13,"integrity":"sha512-+ivN9p3ZxgFXCV/N9GpL4NwqoPJA0XNhfx+1/jal3pjOf/G4NMk+vP3annB75RzisSY/idtSVwKveXmnnqC+jA==","signatures":[{"sig":"MEUCIQC1JSe/Xg+c/ADWsLoWhkPqcIrxw8fgQo5xm5alh/9rpwIgBji8N973ajXTkDTTpH5NZr8xSaNEM778iMofrC0xl4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"033569cc4deafe32dad2bf8cbd1de8789bc85668","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6081d829b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6081d829b.0_1686100381209_0.6989505777738239","host":"s3://npm-registry-packages"}},"15.0.0-canary.b26c34a68.0":{"name":"@material/auto-init","version":"15.0.0-canary.b26c34a68.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b26c34a68.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"4f95cc83b66160b6a10493d6bd85fc36b05085d2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b26c34a68.0.tgz","fileCount":13,"integrity":"sha512-O469iTqNpXpa4yyXpaKget+QqGxIkSD8WPHxobJiw/g9QHbYjhuqWy0OR1w7QXVZJEsg3BEN0hZRjvXwTvXi/A==","signatures":[{"sig":"MEYCIQDhdJbfq1rDrmr6++Y97iv1ekeYTat3b3aSLzH3/BEEOwIhAPc0lvD/6BpDyKvknkKsM0xcNqvEicVAqWYl9t1ad3Co","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"28919516866e588c52e4e6358c3c4d2523993b74","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b26c34a68.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b26c34a68.0_1686168955105_0.4498412766043789","host":"s3://npm-registry-packages"}},"15.0.0-canary.4fe911371.0":{"name":"@material/auto-init","version":"15.0.0-canary.4fe911371.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4fe911371.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"e42af0c0025073333b229f1bf044afccfac60995","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4fe911371.0.tgz","fileCount":13,"integrity":"sha512-avMZ/UDAltL1nEeEfIaKopm4O/ih0oiQuBWoza5Ngu8rplwtlGc5p7ThY/ZcLMaE0ZAQ5DqpSgAZxoWIsIoVYQ==","signatures":[{"sig":"MEQCIAViT6lb6moyYnJXOl4mD5/K9Ob+xMqJomFsCg7eGhYhAiBVBLTjwmRTNf92cXLuue/961kp/d8rZxEeS02DXgqfNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"a9de53a24d5e0f79f94310f061cdf2ab718df7f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4fe911371.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4fe911371.0_1686179088512_0.6567063252549583","host":"s3://npm-registry-packages"}},"15.0.0-canary.a9ff9866f.0":{"name":"@material/auto-init","version":"15.0.0-canary.a9ff9866f.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a9ff9866f.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"bc418a041dccc93f07205bbf97f8365cd2e63298","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a9ff9866f.0.tgz","fileCount":13,"integrity":"sha512-MzlRYzeQ/5Ve5ufNBNXUiG2bDVGFEo0QGF60wchZFI0XT8m7CHjExOj2iT7JAsJKv0gSXDzp3mbVHsM++VaNWA==","signatures":[{"sig":"MEYCIQCagzhJHvQgCOz7gezfcve91G6xFW2SStmYLllw+CDq3AIhAPGbpR9kIolJLoCnUxvbZUTf1Ot12Og0LQYVtgz1/UM4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5bed0ec6cdad0c38b52e8ac98994b2809d9c8f50","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a9ff9866f.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a9ff9866f.0_1686656233888_0.8433348189496148","host":"s3://npm-registry-packages"}},"15.0.0-canary.b994146f6.0":{"name":"@material/auto-init","version":"15.0.0-canary.b994146f6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b994146f6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2081616bec5a896e8fe630803ef91db1406c81cb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b994146f6.0.tgz","fileCount":13,"integrity":"sha512-8nLe/XeueJg5yyYx5e4UxWQXpTDyUhibKfyroGwnRKc8pdpOCOulHSOj/fIVGJAIbxkEJoebwMadWUNCjUhc9A==","signatures":[{"sig":"MEYCIQCRLp/r8wCb7XeASuFBAWCS0hB9mwKbnG+Xh5X9+tbtPQIhALbydwdhPxkyA4o9dZZhVg0zrC/t1C00QicXvxE4+y9N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e537228a5d88e4fb9c651aa15b1d56bd81bc63bd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b994146f6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b994146f6.0_1686776549974_0.35039708669130354","host":"s3://npm-registry-packages"}},"15.0.0-canary.1fb4b1a06.0":{"name":"@material/auto-init","version":"15.0.0-canary.1fb4b1a06.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1fb4b1a06.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8953f732400b2452352943bf06b916061b7c00bf","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1fb4b1a06.0.tgz","fileCount":13,"integrity":"sha512-dJBlxHopV+hLnraRI/kIpfT1ZrfoFpgfS83bv+83bMeAKBF50URkHocSVxnVJ0rXw5jiODxW1JpopTpmZOxTwg==","signatures":[{"sig":"MEUCIDNH//nlkeJzsWLAM4QsOi8cX18UkWLD6y/E6R9VytlsAiEAxuq4sxao0csy3CUNi+8tlp9UPy9uzSslXL73RaHiiw4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1d1b86822f3fc9f22a5fdfc1c381d5a4ae983829","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1fb4b1a06.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1fb4b1a06.0_1687892154776_0.5821142140723361","host":"s3://npm-registry-packages"}},"15.0.0-canary.c64a2776e.0":{"name":"@material/auto-init","version":"15.0.0-canary.c64a2776e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c64a2776e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"934eaa8e0deca62d6647082b228b144d6dd025af","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c64a2776e.0.tgz","fileCount":13,"integrity":"sha512-ad5ZlUUd1tH3X9N+0gbAeB+KQEWjU8BIyNgRS3ddtkKvUvpusEpLTRDPkIfE4LXMzHx1JNx0ATxYb/C7VhSpPw==","signatures":[{"sig":"MEYCIQCTXr6Amq65/MkhAbSm5HeRM+i305KLgxq3uhvBHEhgbQIhALtmHs+BxYsI+WRa0pXdiUaunCtGXXw8YhYPsbVK19Bq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"271b0c446646af573f67960820b6b2a86a9bda88","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c64a2776e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c64a2776e.0_1687896922569_0.31962456509015125","host":"s3://npm-registry-packages"}},"15.0.0-canary.b05d9eb7c.0":{"name":"@material/auto-init","version":"15.0.0-canary.b05d9eb7c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.b05d9eb7c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"372494b00cad4283d56bba53e9ca591afec95639","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.b05d9eb7c.0.tgz","fileCount":13,"integrity":"sha512-W5cPOz7gIWJpUMJ2MRCXSE9yO95mS50XLmWr27BUmzl4KWj/jcs3K7TAnehUN/QlB5MiOzAphdK+pBac7jblFw==","signatures":[{"sig":"MEUCIQCe0zuZ/rFuZ+yaocoM4snBND9Lw3Ga49bKYDStNCqSPQIgR3/5LuihU1c41XNQsAeh9XFYHEAR1VCJMDLS33Vx2dA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"854245f23fe0f7b3dd1163ecefd940b26718c134","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.b05d9eb7c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.b05d9eb7c.0_1688055759400_0.06315733122757572","host":"s3://npm-registry-packages"}},"15.0.0-canary.2a9697dc5.0":{"name":"@material/auto-init","version":"15.0.0-canary.2a9697dc5.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2a9697dc5.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d2bc22da9f877e0214a63d5247239cb9264aa4d7","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2a9697dc5.0.tgz","fileCount":13,"integrity":"sha512-akob2rUoJ16P3KTGF0tZxdBPpOox7Z5zpUOa8C5uR5R+Zrr/pOdR5o3FjwtNif0DSa+YbJkkbIBiCh+brzPAAQ==","signatures":[{"sig":"MEYCIQCo3PAA0FeSKwQIywkDBhHbn1rFzTYoRB9EOb6neuorHwIhALAPsb/oeQELPrsHCM8WDmPzr8GdD/REE3SLCy2HPR8S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"fad1e5223c83a5b7a83a6ef81f7ebdc83a85672a","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2a9697dc5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2a9697dc5.0_1688163173700_0.7243224198299092","host":"s3://npm-registry-packages"}},"15.0.0-canary.0c52adeab.0":{"name":"@material/auto-init","version":"15.0.0-canary.0c52adeab.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0c52adeab.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"efaddcfa6da2969faf805f5e3ff13764ca72cd8c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0c52adeab.0.tgz","fileCount":13,"integrity":"sha512-/cjTXa80+NyQzLIYxxj2omV8s6YWGwsFv6VBRY8WD3an03WpLtUn4rSIDump38IwF+R6UdsDXD5mQmYWunpjmQ==","signatures":[{"sig":"MEQCIAfGZEz2dpbqZrfJgFsvsGujGsshamfe+WrwNOrGNMb/AiAsjrZEAYgkNkuDErACO/fXuiPejm80Z09BoR08dJOzTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"972024dd57885ff944ec073de0cd956353bfa7e3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0c52adeab.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0c52adeab.0_1688574279347_0.8426930736527609","host":"s3://npm-registry-packages"}},"15.0.0-canary.83355c322.0":{"name":"@material/auto-init","version":"15.0.0-canary.83355c322.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.83355c322.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5acc1cbc9b269a280491b92cb1fac8dc9493e9a3","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.83355c322.0.tgz","fileCount":13,"integrity":"sha512-+Gr7WcUyR7nXBCLNE87IzJv14yxKLc2QBmzNx8cs8+f0NKT9gepUd629aq+jo4gFjRftuz+jXfzpGnpgb4wEgA==","signatures":[{"sig":"MEUCIAzfY/+NBI8i014WvpdK2llefzjb4/Zjk2L7pXB2tLSFAiEAl1h7Q7KWOo93h1Lz8+JE6XhduCO5sKmuG7JW0BSCyVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"173401c2dd65fb3babae5b8e998c0a0032ff819d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.83355c322.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.83355c322.0_1689001443229_0.951856510369752","host":"s3://npm-registry-packages"}},"15.0.0-canary.bc9ae6c9c.0":{"name":"@material/auto-init","version":"15.0.0-canary.bc9ae6c9c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.bc9ae6c9c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9536732573cbe3db9613683496884592387c1e7b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.bc9ae6c9c.0.tgz","fileCount":13,"integrity":"sha512-uxzDq7q3c0Bu1pAsMugc1Ik9ftQYQqZY+5e2ybNplT8gTImJhNt4M2mMiMHbMANk2l3UgICmUyRSomgPBWCPIA==","signatures":[{"sig":"MEUCIQCMcU8Uw0iqkUSNYovXctqqLEEs88dB0zl16aygMEWVKQIgCVTYT5uku5QnxZyRE64TDhU9mc+Zpx8zvXjApM4i5bA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"9f0b9b80c267d99daa258e635481fecc4cbf0acd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.bc9ae6c9c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.bc9ae6c9c.0_1691097492118_0.9151126762367319","host":"s3://npm-registry-packages"}},"15.0.0-canary.3c44cd956.0":{"name":"@material/auto-init","version":"15.0.0-canary.3c44cd956.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.3c44cd956.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"95baa7ea5ee67d5b30b71f8fa78b2d3e4c2aae97","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.3c44cd956.0.tgz","fileCount":13,"integrity":"sha512-xdRLd1S4IyOIsOCojiWSE01H2wySVP+3N4vAaaRQZUbaX64IswJRhJ3qdQNRJVFnDaZ08gAEL5yv72j9cCTGaw==","signatures":[{"sig":"MEUCIEzLTcKsmjdKjNqo0Ivw+ekb5eNrR1kfqR1VgRr+oqbaAiEA7bOadbcUFK8qFafImxRR+sKzHhZ5t+Nk4zmMsiIpx7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6e39da189328fcabc7040a629e312efe5f7cea80","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.3c44cd956.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.3c44cd956.0_1691430356566_0.06466190959990525","host":"s3://npm-registry-packages"}},"15.0.0-canary.02702296e.0":{"name":"@material/auto-init","version":"15.0.0-canary.02702296e.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.02702296e.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2347eabd0d07749a03dd7366ccccbf8df799c365","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.02702296e.0.tgz","fileCount":13,"integrity":"sha512-9NM/NnSpStsj/MnkCRmm2V1/MTfIeR3opGaazinDiox5oJdQLzJfgVMg0bvaxzbYHTMDDxH+T3F5VuBHySQKMg==","signatures":[{"sig":"MEYCIQC44IToEYjiVco+M4yIrTYX0foOqggHwyNYO30vKurmHQIhAIUy3DswawMDDcLjXQpSoEW2R19Zq83QYkT7Xh0e4hQB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"22335673bc742932498b2538321ed9dcfd692879","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.02702296e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.02702296e.0_1692965021862_0.9480838592007692","host":"s3://npm-registry-packages"}},"15.0.0-canary.872b65832.0":{"name":"@material/auto-init","version":"15.0.0-canary.872b65832.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.872b65832.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"39884ca32656eeb95c0cf2c86fbcfbb1c46f949c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.872b65832.0.tgz","fileCount":13,"integrity":"sha512-WxHpG3cepzm8RBr66VMc4aetvOQWom3Q+jz/57frf5G6dNbC+FZ1qHR7Rol165f5VCi5Is1LvNjaHh6WsJZibQ==","signatures":[{"sig":"MEYCIQDzEg/I/909/uhbowBGED0vu9rMpG+LuInW40nHVRXCqQIhAKmiJe9BhFK8LIciA0ul7Ej3vttpk2y/XyVtPOKunT7n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"be0901c091f812355b2d192c49bd051d8daf7a98","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.872b65832.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.872b65832.0_1693397508350_0.15087410749266628","host":"s3://npm-registry-packages"}},"15.0.0-canary.89b2e4122.0":{"name":"@material/auto-init","version":"15.0.0-canary.89b2e4122.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.89b2e4122.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"894ec4481cf38171aad8881db505720ca8d8a376","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.89b2e4122.0.tgz","fileCount":13,"integrity":"sha512-kLWzXlYLmCU+2x2ZcGYdhN4k080KBZ60TP+hU2VhZLvdV5x0lMCXbHh+J3WbN2mxhocEXS0rqCYBJud2kxVJ4g==","signatures":[{"sig":"MEQCIHvCdf0r7sXttII6ozRqbWSkbXRekBxLbZaEgL/uq1KEAiAxdKueQDT/ERHi6jXnstwPmuM93xdlQ/ppM2WPxk2MRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"68bd55db9489546e515443239f477836e16db19b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.89b2e4122.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.89b2e4122.0_1693497932540_0.40153135350473335","host":"s3://npm-registry-packages"}},"15.0.0-canary.7a3942e7a.0":{"name":"@material/auto-init","version":"15.0.0-canary.7a3942e7a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7a3942e7a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d788a724183696374d5987c20a5af5f275e6b6f4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7a3942e7a.0.tgz","fileCount":13,"integrity":"sha512-7zsIhd86L1YaISktx1RI1UFS4+EzcvWFgIK4oDjFpLL6xrRdZlZOhOgXYsXw5U9XdZmc87wrpe7hu+7KZwgImg==","signatures":[{"sig":"MEUCIQCZ1jFFJHCRxckUrJsSB3HlRRmc1/lYf8NbREdTQ8z4pQIgQ/l+DTIcXmLJGRvN7OVcf2C/44jFMrzZoYJz7EyDB+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e61dc0a16a5b376c778548e5a6cecb56f5c5704d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7a3942e7a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7a3942e7a.0_1693507094300_0.419507201203263","host":"s3://npm-registry-packages"}},"15.0.0-canary.54feb3020.0":{"name":"@material/auto-init","version":"15.0.0-canary.54feb3020.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.54feb3020.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8e4bfbb4421d563ba682f344c6e38e9d32a476f2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.54feb3020.0.tgz","fileCount":13,"integrity":"sha512-atVH1ysiyXWL6K0mZXUgykqLE5qkD/WFagb9s9bdoVAnXzvZXyr4/iEODKRrTKoRbCSuaPXsBZDYy58qUCtq0Q==","signatures":[{"sig":"MEYCIQCO9uME0dVdHLnGrxek1AQ8ZpTEfDA/yaFJ9nAHWlQWUgIhAMzCdsmpIuHe0hRMpBjG0aX57qXqwCr1m3H/kCl0p9Yd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"5dc5cb94463af21f898ddd58cc4d9e4fbf803222","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.54feb3020.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.54feb3020.0_1694466225564_0.6543365113077553","host":"s3://npm-registry-packages"}},"15.0.0-canary.6cda3ce8d.0":{"name":"@material/auto-init","version":"15.0.0-canary.6cda3ce8d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.6cda3ce8d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"6eb8173b8370397e195dc59c646cdb8812fd623f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.6cda3ce8d.0.tgz","fileCount":13,"integrity":"sha512-wpkDbnSHQQyqfKMq+HUKTstZbVgW/cKTVt3Alpf4zc/TLAacgo93EKiwECJ4IRqM25fl8s0YFdHtDUvt2hQshg==","signatures":[{"sig":"MEYCIQDvdK7Iks0exk54OLiOMtLBfWVksd49mJMx+drN6pMaRgIhAMR0si7+rwh5jclP5KaGZSUWpD8y7pg5C/FOWSNyIjXX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"adb36c6339e7bf37fe1e8ca96526a9673ca602e7","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.6cda3ce8d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.6cda3ce8d.0_1694483030499_0.2663300815576155","host":"s3://npm-registry-packages"}},"15.0.0-canary.205b20b36.0":{"name":"@material/auto-init","version":"15.0.0-canary.205b20b36.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.205b20b36.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"225dddccd459c35586db061a504258d6b6c13b07","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.205b20b36.0.tgz","fileCount":13,"integrity":"sha512-o99hIFFeNnUH5Z9wNFoTzHN6FhUSKpww8IodbDoEgw8n0jyX+7r5923wPfuyLK/3MeJw9LBx7G0enKnRr+4j5g==","signatures":[{"sig":"MEUCIDtnPYkpZRf1Cg0IQFkgMug3C4/c+7ZrzUGYvRcakxHRAiEA33HfUQrKeLIqvDV2F5mfM8+fAUTCJKcromK8LQgiukg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"00fdcf619c34c502844acb0f2485e99595aa138d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.205b20b36.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.205b20b36.0_1694625297497_0.5254164858642931","host":"s3://npm-registry-packages"}},"15.0.0-canary.22bf82024.0":{"name":"@material/auto-init","version":"15.0.0-canary.22bf82024.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.22bf82024.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"cfcb902fa1009dccc73721eed4eb1b6bdfe58537","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.22bf82024.0.tgz","fileCount":13,"integrity":"sha512-77KulJzTC+g1mKDnlb2JWGth2QJ7mIpMRiNKzZyzQVdHlu3bbYdmoi2qZL454UJcHbh7wKsswIo2Yt2qv92jog==","signatures":[{"sig":"MEQCICPM/tXcq6TSZZ72UXmZQuXBoc3NtvYFrEcjAqdt7eDBAiB1+GLDO0XHxugXqliWRSN242f5KpUAEE+4ITAzebwK2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49991},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"eda4fad2a8a727b69db60b828bd92df7a8956143","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.22bf82024.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.22bf82024.0_1695028247727_0.1901953181147451","host":"s3://npm-registry-packages"}},"15.0.0-canary.a246a4439.0":{"name":"@material/auto-init","version":"15.0.0-canary.a246a4439.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a246a4439.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b5235074cd8ec08a2c28f2b2be1a452a173c4e98","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a246a4439.0.tgz","fileCount":13,"integrity":"sha512-0QfmjT5elQ10hCxToVgq/WaC3301tVH1sJaO3O2yocVzr7s6iWm8/zch16V5hcHzQHbtcT3Rf4y1ZzmdNys2Iw==","signatures":[{"sig":"MEUCIQDYUPKuPJcWbpyzBnQnzh+yssJ0zak7V3U6YjesiyO8GQIgQ1VrjiZ7izSYTYlcmfkoHb6bCRHgeykYIkMcKvpbg3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"40201df8b7e53b61aead4acdfa34b48fb1d155b8","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a246a4439.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a246a4439.0_1695059067871_0.11373419072988677","host":"s3://npm-registry-packages"}},"15.0.0-canary.d153db62b.0":{"name":"@material/auto-init","version":"15.0.0-canary.d153db62b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d153db62b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"27f798690b3533adebc650481163609ac46a511b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d153db62b.0.tgz","fileCount":13,"integrity":"sha512-fPgnWnKVGkbQ0hW0Hn+/cnypX2vo45QltLtGZov9JavI3HjElPd8FplTNFhhp1QTiAR459yjweaAtcwPD1laMw==","signatures":[{"sig":"MEUCIQDfVLQs8OEgDtilM++UFcP0N/e8nOufkMrjTn+R/JSeTQIgG/gpSBqRm0dgB8WBjnWMLJ9+K3tuQMZYSh/NFgEpz8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4ca05c144c691cd06cd5926fe0bc54818e462202","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d153db62b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d153db62b.0_1695150774065_0.38108992361539307","host":"s3://npm-registry-packages"}},"15.0.0-canary.2528c1c3b.0":{"name":"@material/auto-init","version":"15.0.0-canary.2528c1c3b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2528c1c3b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9860d9aa0cff8d25a51e51b24258d8c5138544f6","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2528c1c3b.0.tgz","fileCount":13,"integrity":"sha512-KnHLTpFgmNYEMjlusKImT7Df2X9KDTThvh3/R0M53eHWRkaoJuDKtr9uPGKeVjnwgOtWwhinZ+suzT1hSK71gw==","signatures":[{"sig":"MEUCIQDW2V7PQbLO805kOktTrJFKZhiVHDl2dks9WM7/xDxVnwIgYQhFgMbuJ1GEd0kY09E5SgbpbXxakXnfiCwmxhWknBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"98b5b57bd5356f48610a254e8c4acff388d5fb7b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2528c1c3b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2528c1c3b.0_1695233106439_0.2637054355109314","host":"s3://npm-registry-packages"}},"15.0.0-canary.1728a6dcf.0":{"name":"@material/auto-init","version":"15.0.0-canary.1728a6dcf.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.1728a6dcf.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"708dfcee338f1ed817058ba8c3fa3678639524b1","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.1728a6dcf.0.tgz","fileCount":13,"integrity":"sha512-KFynTDUZ8Swh6rVIi+elyfuzcX+EwYiMth4A9ZQyrtiZPc9DwqI5J+Ec1xaRz8gMvs+oLYLHochT9rq4iqwcbg==","signatures":[{"sig":"MEUCIQCMZUZtZ/n6W6z3fSsqOknS49EsO/hXckLr2ub87+0CcwIgIuOPnHT2u3YBLHXRodhu5Fonf6Ucab2nkyeQaNX9axM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"3828aedf4f344a948780a69956ca4f069cef3daa","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.1728a6dcf.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.1728a6dcf.0_1695691309130_0.8088247805306288","host":"s3://npm-registry-packages"}},"15.0.0-canary.ebb636f3d.0":{"name":"@material/auto-init","version":"15.0.0-canary.ebb636f3d.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.ebb636f3d.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"520c2149844cf616f8930456686a0b1a80317154","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.ebb636f3d.0.tgz","fileCount":13,"integrity":"sha512-hSzgVJ7lh0kSMWx21J/lnf9AjVAUIwVTxopTtlgkwFND59fUAlqS0DPne+s1j4M/tkN5zalmy1w1NntwYRhNfQ==","signatures":[{"sig":"MEUCIHGjWAxy2uCfGubyfcg/61Phx9hccIMKgUYDhec4U+R/AiEA4YMazSjSEAdaubFI5z/H4ki9CGSpWC+rtKiU0H66YzA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"6f62607a00dd885ebbe422b247dc4acc1ded22cb","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.ebb636f3d.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.ebb636f3d.0_1696016601567_0.22421040861910324","host":"s3://npm-registry-packages"}},"15.0.0-canary.c0d21ecc9.0":{"name":"@material/auto-init","version":"15.0.0-canary.c0d21ecc9.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c0d21ecc9.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1dc05e493abaac86981e6db8cda8669e981f6c16","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c0d21ecc9.0.tgz","fileCount":13,"integrity":"sha512-i+aFnDk4+VnnHONg44EdVYa4MoZ+Ijx/mRZeypt57duQd2gv5xvP2nUEbV2iBIu5hX0nXQByPSOtrPqfCntsbg==","signatures":[{"sig":"MEUCIAK/Rc3oBynyZ6ul9usKfIdo+am3nAFZiXIjuAc4UnC0AiEAtCdQkaqDV1PhHj6hjJ8B1pUsfkYQcZOXtF21CuQFCP8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0a932ea790a12d359ce4ec7c5c4c7aec7edf565d","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c0d21ecc9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c0d21ecc9.0_1696880140486_0.006005968719047461","host":"s3://npm-registry-packages"}},"15.0.0-canary.127a44b28.0":{"name":"@material/auto-init","version":"15.0.0-canary.127a44b28.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.127a44b28.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"0737fd2fe646e8996f7a31d9f2d5d1874aaa226c","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.127a44b28.0.tgz","fileCount":13,"integrity":"sha512-7bC+6lFRCVOe+/HbF+0dyaLfDXOts764YvyTvfkTd3W9sF6605W/skYbJ11P/ZsR4DYKX1dBTM+CKFPXFPDR2w==","signatures":[{"sig":"MEUCIEOBJF8SXEuuixt/hRoBCRUCiKjU5kkAB62iQS7XjvWVAiEAjuSsfDEDcz5/2HoqIfMQT9z8VXuKV6ukLEzcO85AIEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"88d1fc2c5354e751ea3ab567d26bb1886ee152d3","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.127a44b28.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.127a44b28.0_1697140720943_0.0376703252194015","host":"s3://npm-registry-packages"}},"15.0.0-canary.0ad128337.0":{"name":"@material/auto-init","version":"15.0.0-canary.0ad128337.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.0ad128337.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"7e6fd4170301fe7d444dc811fc1387ef503efcfd","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.0ad128337.0.tgz","fileCount":13,"integrity":"sha512-1ARB+np0/HGFguL/tgd7U6VJQH5tls8Ow/ljn2apTsH32/UGh3vaoOfBA5VI93+wVKxvBG2f2sfn2dBIN+YAEw==","signatures":[{"sig":"MEUCIDHqUCoDzdJH6QYDPv7FMqVk4gYLsNp3Xk+1nLY2K+FgAiEAzab7eNMRnTTsSyQeL4I9ueNVqhSHPPjcEv4EXfwESBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"bb76f531b61a52aae34c7a1efa45824fd32e49f4","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.0ad128337.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.0ad128337.0_1697741431333_0.6594866041118777","host":"s3://npm-registry-packages"}},"15.0.0-canary.9cec94097.0":{"name":"@material/auto-init","version":"15.0.0-canary.9cec94097.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.9cec94097.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"336a28976b9d9dec5d865de448da906b3bd2fa50","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.9cec94097.0.tgz","fileCount":13,"integrity":"sha512-wjfpOXJPvsIMGBHq+f6axFuLtr1CLETr4s7zLDteASzJy3KETID441V2RWx31AvnA1UqT72PVsyufd78SE54MA==","signatures":[{"sig":"MEUCIG58yzqrhEGrDPPMJWqb2/nvbpM3NQThTWFhhw5Z9LlcAiEAvv1yOyw0nWA5+IZVGh8q7xK8wH+InNmS5h/ch/FHLs8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1a8019402daf97efb72456551503dfb3fa31466b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.9cec94097.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.9cec94097.0_1697756895641_0.15500493687356132","host":"s3://npm-registry-packages"}},"15.0.0-canary.c51a0bbcc.0":{"name":"@material/auto-init","version":"15.0.0-canary.c51a0bbcc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c51a0bbcc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a5c22e715ba3564ba40a41eb812563244b23f985","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c51a0bbcc.0.tgz","fileCount":13,"integrity":"sha512-kEEyW5o7lhhbJ9ICKVdOwr96GoGvDaM4Utg+iMJi2QIHujfxOMPuLzDohHx7VApsbwus0JQ0uk/1Hsi1ghU1rw==","signatures":[{"sig":"MEQCIEQ7PwFSxR3ruyr/4BBHZIxDgi+FHzdJYIoL2X4MTUc8AiBFmJeXlxdqpOGR8kD1pWwNLNMYAtzIAWDHXsvTdZx3LQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e65c7fe6dcc6d6069f00d4d2f8c55e61710d046b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c51a0bbcc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c51a0bbcc.0_1700081883128_0.7138317489619606","host":"s3://npm-registry-packages"}},"15.0.0-canary.d76666ad4.0":{"name":"@material/auto-init","version":"15.0.0-canary.d76666ad4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.d76666ad4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"458c4eedc1cf3091518e0b368c42e6db885efb97","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.d76666ad4.0.tgz","fileCount":13,"integrity":"sha512-uVxPvcCtGnNd2pXVEZCwLwjPrfqdbgax2lTF5A3aShwYnHb1UtrHnIP5+4Qd7uJsqWx0aWEZHMhr3SC7K2uB5Q==","signatures":[{"sig":"MEUCIQDJeMvtzIxj/tY1mVcAyd7PG0ozK/CJgv1sXjm07fz5pQIgSiMiDPOe2FIKLYDSjfMf9AmOc8z3fDv9nVOccyyCwiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"8fc3640e389fda0098b42091a9a1ab8653fc6470","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.d76666ad4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.d76666ad4.0_1701123146197_0.9530859881413329","host":"s3://npm-registry-packages"}},"15.0.0-canary.8656bf0e0.0":{"name":"@material/auto-init","version":"15.0.0-canary.8656bf0e0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.8656bf0e0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"b18093f5dde50557c761298c994320615c8c9ac2","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.8656bf0e0.0.tgz","fileCount":13,"integrity":"sha512-gzthZz34Q+ukovei07aEbmOGrqWOPcuMGkJnsDL6Ox3XryXkZG4lO54Eu+HGjSLxSBpOFZBUIEJ28lnp0q/nWg==","signatures":[{"sig":"MEYCIQChZ/9iULitIi9NTg2RT44AufW6G/GBEtYjyvyGibXsBwIhAIyVXQe3VBPYMjUPithPFt/sJyhtbNkJtoa0LcOdmd9V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"36cab37e468233da3044a10c1df388f634163cc1","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.8656bf0e0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.8656bf0e0.0_1702415875559_0.5115377303072182","host":"s3://npm-registry-packages"}},"15.0.0-canary.7f224ddd4.0":{"name":"@material/auto-init","version":"15.0.0-canary.7f224ddd4.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.7f224ddd4.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9d1b6ed5d27e0c4c037a0cdc14e73729282d718d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.7f224ddd4.0.tgz","fileCount":13,"integrity":"sha512-t7ZGpRJ3ec0QDUO0nJu/SMgLW7qcuG2KqIsEYD1Ej8qhI2xpdR2ydSDQOkVEitXmKoGol1oq4nYSBjTlB65GqA==","signatures":[{"sig":"MEUCIEkb9jt8CntV9fDNPG8vEMR1eH4NafwmgFdm+KbAbgpDAiEA7dtgTe2hYrWOwWfORUuTSpDe47ulpJ0iQswfDKF6BIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff8ff3ce455054f1532d1ae0983f40634a524886","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.7f224ddd4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.7f224ddd4.0_1703743704689_0.9510029459585569","host":"s3://npm-registry-packages"}},"15.0.0-canary.a0b8a90c0.0":{"name":"@material/auto-init","version":"15.0.0-canary.a0b8a90c0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.a0b8a90c0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"3a50b5cb99553744a7b0791c56307e1e9491da57","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.a0b8a90c0.0.tgz","fileCount":13,"integrity":"sha512-0mDcrAp4iKmYGv23zGygGc0l84Z4zQ0NIAYfNrA678+6T70gqQcLKLoAGrR3aeAxY4L+WHfmzm5kXbP9QlAF6g==","signatures":[{"sig":"MEUCIQD2M42z790u5DIXgm9UjgflNnpmDjcxunYzYFsxrtKrdwIgH9C4ucgCYCW9vAEba0anQlWxIrsB76Vndkc+jmE9xxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"85d5965379b080c9f852ecbbd95031e363636dfd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.a0b8a90c0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.a0b8a90c0.0_1707333526331_0.5857652085950202","host":"s3://npm-registry-packages"}},"15.0.0-canary.e50b478eb.0":{"name":"@material/auto-init","version":"15.0.0-canary.e50b478eb.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.e50b478eb.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"9486e026362f4cc841a725617341c7422b5f785f","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.e50b478eb.0.tgz","fileCount":13,"integrity":"sha512-WBAXdGA6sqOEKIq4i4n3pzcCu4CJzzjRulaumkvFCxsbBok+hwM5cshWvR5QjtC3cHZ/V9cGO/2BDLGr5cd/FQ==","signatures":[{"sig":"MEQCIGnpdfkJoHin3cg4M2XYkUjQ5cJixH8TEeOOKda9JN40AiAlrTOUeXuaPRzamuHs220in3YJoelnNgiC4dUVdLSHww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"4691455eaee76f99b18be70913c9fefb7cf3c2ae","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.e50b478eb.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.e50b478eb.0_1707415631725_0.3433549444054178","host":"s3://npm-registry-packages"}},"15.0.0-canary.c43b3438b.0":{"name":"@material/auto-init","version":"15.0.0-canary.c43b3438b.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.c43b3438b.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"dce0ffd6dd83666a972af879eb864f5411a772ea","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.c43b3438b.0.tgz","fileCount":13,"integrity":"sha512-D3H6ttyY8JcwGIGNiIYLwZEf6qnmD5G5VzxVmc0aB3H0YiiD7yGm7V575sIMAt1b/MgpBRDFi2UjGLu71v8Jog==","signatures":[{"sig":"MEYCIQDqB61ipQonD7RyvMUOdi7XVlqTOmdZuGmxQ3U1qO+XIgIhAPOt5Dc6m02nWylJG9llJpzi2PqCt4NEYCYytNBbRuFx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"e69adcf897de97b302f026f07bbc2571b1a488ca","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.c43b3438b.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.c43b3438b.0_1708719406354_0.18412613928658872","host":"s3://npm-registry-packages"}},"15.0.0-canary.819498d8c.0":{"name":"@material/auto-init","version":"15.0.0-canary.819498d8c.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.819498d8c.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"93f2854631b3c155983fbb7a02ca6b1dc435214b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.819498d8c.0.tgz","fileCount":13,"integrity":"sha512-dcfmFY6p8Z9cnH9iGRYc5RQ2/RlL3qTWxyXd5rNjQQB4dDmaAx1ol1LCb0zHno8VGWdUIFmf0NMbOrUZXDmsWQ==","signatures":[{"sig":"MEQCIHIlruG8rmpZU5BDrQ0nW8lN8z4iJ8npWTXaCqIScdGUAiBryMwhXPsG+bx+/ShITvFc6SkaFASCI5vj+ZM35n4L/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"886876a8252aacefe1942b13ba9251af9204bcdd","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.819498d8c.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.819498d8c.0_1710515633838_0.7244640738344048","host":"s3://npm-registry-packages"}},"15.0.0-canary.453a6248a.0":{"name":"@material/auto-init","version":"15.0.0-canary.453a6248a.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.453a6248a.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"287815a448946948b13df0bfc61b42034932680b","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.453a6248a.0.tgz","fileCount":13,"integrity":"sha512-yv9C1nb4mPM5yX09OkWqca2pDjLjX9q5gv/k5mkJNqaDAOE9NIlae7NQ7e92Qa4anX8ImTYANykYNnsrhdGmHg==","signatures":[{"sig":"MEQCIDx1jyGj0ROB3H9e9JCAShAs7hpGNmA138kd6uO/6iTPAiAUpQH6opVhOs1+zBwur7PD5AV2J7CMb1pVexRJ8MZeUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1eea6443d63f2bc64fe8f6f86664b54266c41244","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.453a6248a.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.453a6248a.0_1711386768389_0.9955902031712516","host":"s3://npm-registry-packages"}},"15.0.0-canary.68edc03c6.0":{"name":"@material/auto-init","version":"15.0.0-canary.68edc03c6.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.68edc03c6.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"89ff511ef5a5fc518cba44c22dccdcbe09af0176","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.68edc03c6.0.tgz","fileCount":13,"integrity":"sha512-ujaDLSbjY1NZ1Htqt29ib4EpSoKlZI3IGN8UQFmMvoO59bw0Ey8XK4Uyafivm6p3QWSe6eG3gHOKFFpulfnJ3g==","signatures":[{"sig":"MEQCICgIC00Vca4RG9YceyMHDLKItD/Dj3K6sdmzheYfScRwAiBvIH48yR3M8z6tGyP+SeEWa87n2rBwXetOrz1QPU0UAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"04046ad51f4d581f93e797ec929d219422dd0235","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.68edc03c6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.68edc03c6.0_1712603091213_0.6982468141288629","host":"s3://npm-registry-packages"}},"15.0.0-canary.5bebc0064.0":{"name":"@material/auto-init","version":"15.0.0-canary.5bebc0064.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.5bebc0064.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c6c0e3048d55bd0a2abd1f0e48a9d208dc6eb378","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.5bebc0064.0.tgz","fileCount":13,"integrity":"sha512-E2RGuCyS222Yv/8fX1Ok3EeHOt7PzMkHcsKLfl/fAkhLq7TrALjAR5a1ZOIb2a2QOJuAoAc/4k4aM0lI2dGDSA==","signatures":[{"sig":"MEUCIQCM4PalUvNNv4h2fhvR3Mkuhyo8Nr0iQmUGWEoBAdTxoQIgLntiN/5l45GBXGfIVQVa+J6Ra6MdqgjTiGPTOdwQlCo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"ff39e65972de013a29dd14429e111139bc616366","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.5bebc0064.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.5bebc0064.0_1712871545210_0.812779562925275","host":"s3://npm-registry-packages"}},"15.0.0-canary.311f29a60.0":{"name":"@material/auto-init","version":"15.0.0-canary.311f29a60.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.311f29a60.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1a75b34bb41b4dfd7a0db282e15374b1cee3db52","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.311f29a60.0.tgz","fileCount":13,"integrity":"sha512-rHi1gmnZzL5tg2CJPPXZ4yQ2Q6r4+lsA4ANl/30jsz974KSA3i+SY2hebp5XlmRr8HiKqmn6m2j7iAGVJpkbMQ==","signatures":[{"sig":"MEUCIHEPM350OsBO3djLrmBPNUyOfFU0qzWxCwPbhYoRCDleAiEAgK+pcH+Jzsf+dXmPxjXw/1ciHr28wjqRbCQSJEwzLkA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"7bc0264e163e842f0f96c1dbf7a468c022db1497","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.311f29a60.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.311f29a60.0_1713895123891_0.9862241166486607","host":"s3://npm-registry-packages"}},"15.0.0-canary.65c10a622.0":{"name":"@material/auto-init","version":"15.0.0-canary.65c10a622.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.65c10a622.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"5851d7d55650e28943e778875a6d56cfa86ba2ba","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.65c10a622.0.tgz","fileCount":13,"integrity":"sha512-qTtpGoUaBgFXRNwM+QCjxXMbBflKWriQmZ1Uy7g00YUcCvsVu5wYwRizLclHJuJTp0mjz9YZWrm0GTsTnp7Vkg==","signatures":[{"sig":"MEQCIFXkryx+XaE+bS012jclVbOBTsbXnLViu512MaFH92ovAiAH2iPllCuEAlo3waS4R7raOnvsJ0H97Vu25JWtbmc3YQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"1f3126503c812250084b65b6edbb26f25ef4a174","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.65c10a622.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.65c10a622.0_1714070867921_0.9747958826529828","host":"s3://npm-registry-packages"}},"15.0.0-canary.4b35cb7d0.0":{"name":"@material/auto-init","version":"15.0.0-canary.4b35cb7d0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.4b35cb7d0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"84f27db0024ee32f91905f32a3416426265e8c67","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.4b35cb7d0.0.tgz","fileCount":13,"integrity":"sha512-GZrjRZmnjivmeNWjFLDDh2FABZg+iitkQRtFOYAX3kUWy10mbrtONx6MaHHtWHzlIEFOvjeVH4WNghUHVxj1Rg==","signatures":[{"sig":"MEUCIQDRIAdco4omVJuFB1F+DAIQD88kbDNqS4vV/Sg5d4WIGgIgO/tBDZKoHWKwwi2d+6EqXU5dFnK5sy148w2IXMI8Lms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"cba29aaa21c1bc2b1f1a02e5ddfa4a5110d9ef63","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.4b35cb7d0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.4b35cb7d0.0_1714651313216_0.40385082318491294","host":"s3://npm-registry-packages"}},"15.0.0-canary.f80ac92b0.0":{"name":"@material/auto-init","version":"15.0.0-canary.f80ac92b0.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.f80ac92b0.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"d2014d315bab4811566dcd038ce44d8c3c4f3d03","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.f80ac92b0.0.tgz","fileCount":13,"integrity":"sha512-DEnGNOGy71u62uXm6hRTPRiyDSiVCY/pIkxNj/Y/YD5M0QQ04iHqoF2xWJWUm24S0H9r7bD4bRhzVujV1FsOUw==","signatures":[{"sig":"MEQCIBboJMh5fU8Ed9QrMG2fn6nyOBLftJsF6fINFHAWQZ24AiBV7S6XRDRQMpv2BkxT5Y3nOqYhP5TraZ7WicNh36UdiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"514a3afe9efc5bcebf1ace1e335357184ee1a9e0","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.f80ac92b0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.f80ac92b0.0_1714651939443_0.05791325419349569","host":"s3://npm-registry-packages"}},"15.0.0-canary.2f5b899bc.0":{"name":"@material/auto-init","version":"15.0.0-canary.2f5b899bc.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.2f5b899bc.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"8e4f2ff56484776692f5fe3c1f5aaf00f51deb2d","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.2f5b899bc.0.tgz","fileCount":13,"integrity":"sha512-kQGosz0gb6a7xDh8IjIRBHv88STSHHNJGqrZRZcSS9o7+zYy96Ge2I21ohFlaIGDvMU0y+MmloIM1eeQ66d+RQ==","signatures":[{"sig":"MEUCIQDe2zn6wBj4LkRciW6MZFHjgFK7RUe+TyUQEiDszMZn+gIgXu3D87hNein4mXyNpBnrpyfSUJ91Sby067jVUgj9urk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"751553ca74ad43074c963487257a8862de87844b","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.2f5b899bc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.2f5b899bc.0_1716213228100_0.10623309616130028","host":"s3://npm-registry-packages"}},"15.0.0-canary.cfec83c74.0":{"name":"@material/auto-init","version":"15.0.0-canary.cfec83c74.0","license":"MIT","_id":"@material/auto-init@15.0.0-canary.cfec83c74.0","maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"50e1f69e2077a8d32b2d75735ec8d21e9993cdcb","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.cfec83c74.0.tgz","fileCount":13,"integrity":"sha512-TFBRF+YkmVI9199mlkiLol7oofLp491B4MvsH77gcMcyAX3+SGs3+p2RnZrU+PxB344h0GCMSNPpJ0yGzb9wZw==","signatures":[{"sig":"MEUCIE734dwYyiSRssb9l+bTl8vQQ9BrbEvqP2AM1QeQ0spjAiEA0iVcdvhIje+vD8G57HhOkqZiStdErC6dmhIFrRCTeJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50059},"main":"dist/mdc.autoInit.js","module":"index.js","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","gitHead":"0ec8b129344ebbe45f00b6ad892b682b054ea892","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"tslib":"^2.1.0","@material/base":"15.0.0-canary.cfec83c74.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/auto-init_15.0.0-canary.cfec83c74.0_1716231359550_0.08909991131908002","host":"s3://npm-registry-packages"}},"15.0.0-canary.423edc3dc.0":{"name":"@material/auto-init","description":"Declarative, easy-to-use auto-initialization for Material Components for the web","version":"15.0.0-canary.423edc3dc.0","main":"dist/mdc.autoInit.js","module":"index.js","sideEffects":false,"license":"MIT","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web.git","directory":"packages/mdc-auto-init"},"dependencies":{"@material/base":"15.0.0-canary.423edc3dc.0","tslib":"^2.1.0"},"gitHead":"19b2c5a95782b4928b3aecb29a1075c42aee53e5","readme":"<!--docs:\ntitle: \"Auto Init\"\nlayout: detail\nsection: components\nexcerpt: \"Utilities for declarative, DOM-based initialization of components on simple web sites.\"\npath: /catalog/auto-init/\n-->\n\n# Auto Init\n\n`mdc-auto-init` is a utility package that provides declarative, DOM-based method of initialization\nfor MDC Web components on simple web sites. Note that for more advanced use-cases and complex sites,\nmanual instantiation of components will give you more flexibility. However, `mdc-auto-init` is great\nfor static websites, prototypes, and other use-cases where simplicity and convenience is most\nappropriate.\n\n## Installation\n\n```\nnpm install @material/auto-init\n```\n\n## Usage\n\n### Using as part of `material-components-web`\n\nIf you are using mdc-auto-init as part of the [material-components-web](../material-components-web)\npackage, simply write the necessary DOM needed for a component, and attach a `data-mdc-auto-init`\nattribute to the root element with its value set to the component's JavaScript class name (e.g.,\n`MDCTextField`). Then, after writing the markup, simply insert a script tag that calls\n`mdc.autoInit()`. Make sure you call `mdc.autoInit()` after all scripts are loaded so it works\nproperly.\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n\n<!-- at the bottom of the page -->\n<script type=\"text/javascript\">\n  window.mdc.autoInit();\n</script>\n```\n\nThis will attach an [MDCTextField](../mdc-textfield) instance to the root `<div>` element.\n\n#### Accessing the component instance\n\nWhen `mdc-auto-init` attaches a component to an element, it assign that instance to the element\nusing a property whose name is the value of `data-mdc-auto-init`. For example, given\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\">\n  <span class=\"mdc-text-field__ripple\"></span>\n  <input class=\"mdc-text-field__input\" type=\"text\" aria-labelledby=\"label\">\n  <span id=\"label\" class=\"mdc-floating-label\">Input Label</span>\n  <span class=\"mdc-line-ripple\"></span>\n</label>\n```\n\nOnce `mdc.autoInit()` is called, you can access the component instance via an `MDCTextField`\nproperty on that element.\n\n```js\ndocument.querySelector<HTMLElement>('.mdc-text-field').MDCTextField.disabled = true;\n```\n\n#### Calling subsequent `mdc.autoInit()`\n\nIf you decide to add new components into the DOM after the initial `mdc.autoInit()`, you can make subsequent calls to `mdc.autoInit()`. This will not reinitialize existing components. This works since mdc-auto-init will add the `data-mdc-auto-init-state=\"initialized\"` attribute, which tracks if the component has already been initialized. After calling `mdc.autoInit()` your component will then look like:\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"MDCTextField\" data-mdc-auto-init-state=\"initialized\">\n  ...\n</label>\n```\n\n### Using as a standalone module\n\n#### Registering Components\n\nIf you are using `mdc-auto-init` outside of `material-components-web`, you must manually provide a\nmapping between `data-mdc-auto-init` attribute values and the components which they map to. This can\nbe achieved via `mdcAutoInit.register`.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('MDCTextField', MDCTextField);\n```\n\n`mdcAutoInit.register()` tells `mdc-auto-init` that when it comes across an element with a\n`data-mdc-auto-init` attribute set to `\"MDCTextField\"`, it should initialize an `MDCTextField`\ninstance on that element. The `material-components-web` package does this for all components for\nconvenience.\n\nAlso note that a component can be mapped to any string, not necessarily the name of its constructor.\n\n```js\nimport mdcAutoInit from '@material/auto-init';\nimport {MDCTextField} from '@material/textfield';\n\nmdcAutoInit.register('My amazing text field!!!', MDCTextField);\n```\n\n```html\n<label class=\"mdc-text-field mdc-text-field--filled\" data-mdc-auto-init=\"My amazing text field!!!\">\n  <!-- ... -->\n</label>\n<script>window.mdc.autoInit();</script>\n```\n\n### De-registering components\n\nAny component can be deregistered by calling `mdcAutoInit.deregister` with the name used to register\nthe component.\n\n```js\nmdcAutoInit.deregister('MDCTextField');\n```\n\nThis will simply remove the name -> component mapping. It will _not_ affect any already-instantiated\ncomponents on the page.\n\nTo unregister all name -> component mappings, you can use `mdcAutoInit.deregisterAll()`.\n\n## How `mdc-auto-init` works\n\n`mdc-auto-init` maintains a registry object which maps string identifiers, or **names**, to\ncomponent constructors. When the default exported function - `mdcAutoInit()` - is called,\n`mdc-auto-init` queries the DOM for all elements with a `data-mdc-auto-init` attribute. For each\nelement returned, the following steps are taken:\n\n1. If the `data-mdc-auto-init` attribute does not have a value associated with it, throw an error\n2. If the value of `data-mdc-auto-init` cannot be found in the registry, throw an error\n3. If the element has an existing property whose name is the value of `data-mdc-auto-init`, it is\n   assumed to have already been initialized. Therefore it is skipped, and a warning will be logged\n   to the console (this behavior can be overridden).\n4. Let `Ctor` be the component constructor associated with the given name in the register\n5. Let `instance` be the result of calling `Ctor.attachTo()` and passing in the element as an\n   argument.\n6. Create a non-writable, non-enumerable property on the node whose name is the value of\n   `data-mdc-auto-init` and whose value is `instance`.\n\n### Initializing only a certain part of the page\n\nBy default, `mdc-auto-init` will query the entire document to figure out which components to\ninitialize. To override this behavior, you can pass in an optional `root` first argument specifying\nthe root node whose children will be queried for instantiation.\n\n```html\n<div id=\"mdc-section\">\n  <!-- MDC Web Components, etc. -->\n</div>\n<script>window.mdc.autoInit(document.getElementById('mdc-section'));</script>\n```\n\nIn the above example, only elements within `<div id=\"mdc-section\">` will be queried.\n\n### Calling autoInit() multiple times\n\nBy default, `mdc-auto-init` only expects to be called once, at page-load time. However, there may be\ncertain scenarios where one may want to use `mdc-auto-init` and may still need to call it multiple\ntimes, such as on a Wordpress site that contains an infinitely-scrolling list of new blog post\nelements containing MDC Web components. `mdcAutoInit()` takes an optional second argument which is the\nfunction used to warn users when a component is initialized multiple times. By default, this is just\n`console.warn()`. However, to skip over already-initialized components without logging a\nwarning, you could simply pass in a nop.\n\n```html\n<script>window.mdc.autoInit(/* root */ document, () => {});</script>\n```\n\nThis will suppress any warnings about already initialized elements.\n\n### Events\n\n#### MDCAutoInit:End\nTriggered when initialization of all components is complete.\n\n`document.addEventListener(\"MDCAutoInit:End\", () => {...});`\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"homepage":"https://github.com/material-components/material-components-web#readme","_id":"@material/auto-init@15.0.0-canary.423edc3dc.0","_nodeVersion":"14.21.3","_npmVersion":"lerna/3.20.2/node@v14.21.3+x64 (linux)","dist":{"integrity":"sha512-Skn0trUMhGtUV6sh1zlthjtvri6LjX0olmPvjdHkIZpPjTQiAsdWehxqPAz5/c4oqDMUm2ZVucKm7nqcW3EyvA==","shasum":"923baea2102b8e3395a226413808e0605139c1b4","tarball":"https://registry.npmjs.org/@material/auto-init/-/auto-init-15.0.0-canary.423edc3dc.0.tgz","fileCount":13,"unpackedSize":50059,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC32gjx5y2AU/JXymVNthNIfvwcWhbJDbOTp+FZA66XowIhALoIK96unH0ttZ0Bd/CXq4tOSuPXIb4TJzsz2/deWPvh"}]},"_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auto-init_15.0.0-canary.423edc3dc.0_1719425495074_0.02989484942607068"},"_hasShrinkwrap":false}},"time":{"created":"2016-12-15T17:42:53.864Z","modified":"2024-06-26T18:11:35.694Z","0.1.0":"2016-12-15T17:42:53.864Z","0.1.1":"2016-12-15T17:49:35.709Z","0.1.2":"2017-05-15T16:25:56.738Z","0.1.3":"2017-08-07T20:48:24.064Z","0.1.4":"2017-08-24T14:46:42.072Z","0.2.0":"2017-09-18T18:35:34.447Z","0.24.0":"2017-10-30T19:11:17.415Z","0.25.0":"2017-11-13T20:02:18.886Z","0.29.0":"2018-01-22T18:30:54.139Z","0.30.0":"2018-02-05T22:02:09.495Z","0.32.0":"2018-03-05T22:08:39.853Z","0.34.0":"2018-04-02T21:51:49.247Z","0.35.0":"2018-04-23T22:39:56.311Z","0.38.0":"2018-07-30T17:06:05.175Z","0.39.0":"2018-08-27T17:39:56.052Z","0.41.0":"2018-10-29T20:21:32.006Z","1.0.0-0":"2019-02-27T23:59:14.890Z","1.0.0-1":"2019-03-04T23:33:08.769Z","1.0.0":"2019-03-06T21:07:54.208Z","2.3.0":"2019-05-28T21:23:34.882Z","3.0.0-alpha.0":"2019-06-12T04:06:33.321Z","3.0.0-alpha.1":"2019-06-12T19:01:57.292Z","3.0.0":"2019-06-25T22:27:47.681Z","3.1.0":"2019-07-22T22:02:21.324Z","4.0.0-alpha.0":"2019-08-07T21:09:11.838Z","4.0.0-canary.0":"2019-09-05T04:37:36.981Z","4.0.0-canary.1":"2019-09-09T20:20:33.921Z","4.0.0-canary.79d881baf.0":"2019-09-13T02:21:18.771Z","4.0.0-canary.e851d4f40.0":"2019-09-13T04:07:00.794Z","4.0.0-canary.905884690.0":"2019-09-16T23:48:00.378Z","4.0.0-canary.199534d61.0":"2019-09-27T18:57:30.841Z","4.0.0-canary.22d7ad2fb.0":"2019-10-15T18:57:01.460Z","4.0.0-canary.735147131.0":"2019-10-16T01:23:24.056Z","4.0.0-canary.062ade5c0.0":"2019-10-17T01:01:19.588Z","4.0.0-canary.774ad4f8.0":"2019-10-17T04:04:06.173Z","4.0.0-canary.5916d18c.0":"2019-10-18T20:08:14.714Z","4.0.0-canary.d4141c95.0":"2019-10-24T01:37:58.274Z","4.0.0-canary.2b878b3e.0":"2019-10-25T02:10:24.037Z","4.0.0-canary.b06c0efe.0":"2019-10-26T01:34:51.475Z","4.0.0-canary.01628efa.0":"2019-10-29T00:02:41.628Z","4.0.0-canary.b5c6d66b.0":"2019-10-29T17:56:21.802Z","4.0.0-canary.cdf858ea.0":"2019-11-01T17:58:33.487Z","4.0.0-canary.719b57e1.0":"2019-11-01T20:01:13.453Z","4.0.0-canary.97cbbdc2.0":"2019-11-01T20:28:49.906Z","4.0.0-canary.8e36b3b7.0":"2019-11-01T21:00:51.600Z","4.0.0-canary.62d3a09b.0":"2019-11-01T21:10:26.915Z","4.0.0":"2019-11-02T18:11:29.738Z","5.0.0-canary.b5eb51e94.0":"2019-11-07T18:33:20.760Z","5.0.0-canary.58500806e.0":"2019-11-08T15:35:22.314Z","5.0.0-canary.66299b646.0":"2019-11-08T20:33:24.924Z","5.0.0-canary.821871e04.0":"2019-11-08T21:27:54.164Z","5.0.0-canary.491fddc31.0":"2019-11-08T22:06:54.648Z","5.0.0-canary.b0cecf145.0":"2019-11-09T18:42:07.296Z","5.0.0-canary.afe0dd1bc.0":"2019-11-11T15:37:25.355Z","5.0.0-canary.b4cfdc40b.0":"2019-11-14T15:58:08.830Z","5.0.0-canary.525989b5d.0":"2019-11-14T23:30:31.868Z","5.0.0-canary.7084b403a.0":"2019-11-15T01:05:37.841Z","5.0.0-canary.3cbee6dac.0":"2019-11-15T22:32:29.780Z","5.0.0-canary.591a6ad44.0":"2019-11-18T23:48:12.208Z","5.0.0-canary.5729943ba.0":"2019-11-20T05:19:03.259Z","5.0.0-canary.e89750dc7.0":"2019-11-27T02:09:27.852Z","5.0.0-canary.3e560b33a.0":"2019-11-27T02:10:10.657Z","5.0.0-canary.7fd17ce5e.0":"2019-11-27T02:10:24.814Z","5.0.0-canary.ec729683b.0":"2019-11-27T15:54:30.904Z","5.0.0-canary.b8bc4a26e.0":"2019-11-27T19:16:28.167Z","5.0.0-canary.f978109c3.0":"2019-12-02T17:07:04.149Z","5.0.0-canary.ad9dfe706.0":"2019-12-03T23:17:41.184Z","5.0.0-canary.5e45d77f3.0":"2019-12-03T23:18:50.412Z","5.0.0-canary.d10e8cdf3.0":"2019-12-03T23:19:43.870Z","5.0.0-canary.a5dbd8a2a.0":"2019-12-03T23:54:39.718Z","5.0.0-canary.ba879b68b.0":"2019-12-04T20:22:21.531Z","5.0.0-canary.aa0eba489.0":"2019-12-06T01:58:50.571Z","5.0.0-canary.cb7b71a86.0":"2019-12-06T23:55:37.331Z","5.0.0-canary.50f110a6c.0":"2019-12-10T16:59:15.611Z","5.0.0-canary.878a08b7c.0":"2019-12-11T20:15:59.792Z","5.0.0-canary.397905b4e.0":"2019-12-12T02:46:56.025Z","5.0.0-canary.1fbf5bd1d.0":"2019-12-12T18:58:56.744Z","5.0.0-canary.b723dfa78.0":"2019-12-12T20:09:25.069Z","5.0.0-canary.1c494e567.0":"2019-12-12T23:36:25.145Z","5.0.0-canary.c9e98a125.0":"2019-12-17T18:09:23.280Z","5.0.0-canary.5ffe8f7e3.0":"2019-12-17T22:32:59.252Z","5.0.0-canary.47949b08e.0":"2019-12-18T17:40:14.708Z","5.0.0-canary.b240bcc1b.0":"2019-12-18T19:16:23.582Z","5.0.0-canary.391674a26.0":"2019-12-18T19:16:34.291Z","5.0.0-canary.c4837746c.0":"2019-12-18T19:34:30.442Z","5.0.0-canary.e41a70425.0":"2019-12-18T23:19:46.311Z","5.0.0-canary.bac43eb43.0":"2019-12-18T23:23:36.822Z","5.0.0-canary.2e491de55.0":"2019-12-19T10:49:22.117Z","5.0.0-canary.ae101c144.0":"2019-12-19T16:24:23.646Z","5.0.0-canary.a51c31f26.0":"2019-12-19T17:13:57.720Z","5.0.0-canary.21fc4e13b.0":"2019-12-19T21:26:47.968Z","5.0.0-canary.d2ae6e17d.0":"2019-12-19T22:23:51.886Z","5.0.0-canary.ba30399ad.0":"2019-12-20T01:09:21.261Z","5.0.0-canary.a08ccec35.0":"2019-12-20T23:26:26.034Z","5.0.0-canary.a2f75105e.0":"2019-12-23T19:47:16.108Z","5.0.0-canary.c054a24c7.0":"2019-12-23T21:49:37.816Z","5.0.0-canary.c6808c51c.0":"2019-12-23T21:54:19.703Z","5.0.0-canary.7bce9cf77.0":"2019-12-26T18:45:12.781Z","5.0.0-canary.c92f038c3.0":"2019-12-30T22:02:51.248Z","5.0.0-canary.1f1ac7558.0":"2020-01-02T20:53:54.380Z","5.0.0-canary.ec26e799c.0":"2020-01-02T21:42:02.465Z","5.0.0-canary.0a40ced40.0":"2020-01-03T17:09:01.173Z","5.0.0-canary.3adf84899.0":"2020-01-03T18:22:01.770Z","5.0.0-canary.0d42ee650.0":"2020-01-03T21:36:39.303Z","5.0.0-canary.7be9e4a04.0":"2020-01-06T17:03:59.842Z","5.0.0-canary.847dd1ada.0":"2020-01-06T19:25:53.002Z","5.0.0-canary.39df7e5df.0":"2020-01-07T00:55:07.298Z","5.0.0-canary.f1a2581ab.0":"2020-01-07T14:59:11.029Z","5.0.0-canary.7c7ddf347.0":"2020-01-07T15:15:13.869Z","5.0.0-canary.a1c84d4b5.0":"2020-01-07T18:09:38.567Z","5.0.0-canary.ec9f16578.0":"2020-01-07T19:39:09.331Z","5.0.0-canary.b602226ce.0":"2020-01-07T20:14:52.552Z","5.0.0-canary.b2d2dc08c.0":"2020-01-07T21:25:35.874Z","5.0.0-canary.61f2d7580.0":"2020-01-07T21:39:17.034Z","5.0.0-canary.d1be53a2e.0":"2020-01-07T22:16:26.941Z","5.0.0-canary.9b0d06e32.0":"2020-01-07T22:18:56.502Z","5.0.0-canary.730c807a0.0":"2020-01-07T22:20:33.219Z","5.0.0-canary.2213152cd.0":"2020-01-08T17:21:47.051Z","5.0.0-canary.5750f7169.0":"2020-01-08T17:56:22.227Z","5.0.0-canary.f7abc7a43.0":"2020-01-08T18:27:18.552Z","5.0.0-canary.bf7b4a061.0":"2020-01-08T18:41:06.739Z","5.0.0-canary.784fa7903.0":"2020-01-08T19:09:54.653Z","5.0.0-canary.823c050ba.0":"2020-01-08T20:10:21.226Z","5.0.0-canary.70c708dee.0":"2020-01-08T20:21:34.657Z","5.0.0-canary.5ed9d13d0.0":"2020-01-08T21:42:14.293Z","5.0.0-canary.4819cc7e5.0":"2020-01-08T21:57:47.328Z","5.0.0-canary.fe3ffd2c3.0":"2020-01-08T22:15:48.301Z","5.0.0-canary.c0e850090.0":"2020-01-08T22:22:50.190Z","5.0.0-canary.615f86f38.0":"2020-01-08T22:39:35.631Z","5.0.0-canary.1eb032637.0":"2020-01-08T22:59:33.902Z","5.0.0-canary.5bc5ebfea.0":"2020-01-08T23:00:23.241Z","5.0.0-canary.1112b8def.0":"2020-01-09T22:09:41.543Z","5.0.0-canary.aab102017.0":"2020-01-10T00:11:53.855Z","5.0.0-canary.426913342.0":"2020-01-10T01:43:46.775Z","5.0.0-canary.d4ea9a706.0":"2020-01-10T17:24:52.103Z","5.0.0-canary.7d4ee2996.0":"2020-01-10T17:56:22.058Z","5.0.0-canary.981ec9b6f.0":"2020-01-10T19:26:14.187Z","5.0.0-canary.737da83fc.0":"2020-01-10T21:18:22.565Z","5.0.0-canary.aca8e6c18.0":"2020-01-13T19:31:05.623Z","5.0.0-canary.c38d84e21.0":"2020-01-13T22:13:02.900Z","5.0.0-canary.a4db5fbad.0":"2020-01-14T02:14:59.801Z","5.0.0-canary.faa9af310.0":"2020-01-14T16:52:15.240Z","5.0.0-canary.60354c577.0":"2020-01-14T22:45:32.134Z","5.0.0-canary.d07c78daa.0":"2020-01-14T23:38:08.662Z","5.0.0-canary.8ddd5c6dc.0":"2020-01-15T01:42:39.776Z","5.0.0-canary.a9511d870.0":"2020-01-15T19:09:49.395Z","5.0.0-canary.5d4b82bac.0":"2020-01-15T22:47:17.230Z","5.0.0-canary.7c8583c4c.0":"2020-01-15T22:47:31.298Z","5.0.0-canary.57d0186e4.0":"2020-01-16T18:17:06.617Z","5.0.0-canary.071a6ab70.0":"2020-01-16T18:23:27.324Z","5.0.0-canary.22e0cb618.0":"2020-01-16T18:46:35.651Z","5.0.0-canary.f16f15b8f.0":"2020-01-17T00:06:27.702Z","5.0.0-canary.aa8e43e9a.0":"2020-01-17T00:36:18.336Z","5.0.0-canary.fe1f3ca07.0":"2020-01-17T00:59:46.970Z","5.0.0-canary.d405af26b.0":"2020-01-17T18:16:38.763Z","5.0.0-canary.6e857aae2.0":"2020-01-17T18:20:22.292Z","5.0.0-canary.e2e764f7c.0":"2020-01-17T18:35:33.013Z","5.0.0-canary.7ef986a87.0":"2020-01-17T19:30:21.559Z","5.0.0-canary.29402e2d4.0":"2020-01-17T20:39:15.440Z","5.0.0-canary.2b3ec563c.0":"2020-01-17T23:11:03.647Z","5.0.0-canary.e8a993677.0":"2020-01-21T16:49:10.195Z","5.0.0-canary.cd4903304.0":"2020-01-21T21:36:58.052Z","5.0.0-canary.7e4b04b25.0":"2020-01-21T22:45:24.695Z","5.0.0-canary.ebc296937.0":"2020-01-21T23:44:26.740Z","5.0.0-canary.cf33f113d.0":"2020-01-22T01:22:03.305Z","5.0.0-canary.e1d5f1be5.0":"2020-01-22T16:55:03.645Z","5.0.0-canary.6b6a4ff92.0":"2020-01-22T17:57:06.947Z","5.0.0-canary.6092f71ee.0":"2020-01-22T21:16:28.729Z","5.0.0-canary.d8d95020f.0":"2020-01-22T23:09:04.407Z","5.0.0-canary.b7facc628.0":"2020-01-23T18:12:01.485Z","5.0.0-canary.63f357dbf.0":"2020-01-23T21:54:52.146Z","5.0.0-canary.f2426d26e.0":"2020-01-23T23:54:51.356Z","5.0.0-canary.7f5e0c23f.0":"2020-01-24T16:47:09.654Z","5.0.0-canary.3fc3ab520.0":"2020-01-24T17:20:22.319Z","5.0.0-canary.80a4d326f.0":"2020-01-24T20:45:18.821Z","5.0.0-canary.ef7de4def.0":"2020-01-24T21:31:32.916Z","5.0.0-canary.93e2288b6.0":"2020-01-28T16:54:49.588Z","5.0.0-canary.34ef15f67.0":"2020-01-28T17:23:34.907Z","5.0.0-canary.d3d176ba5.0":"2020-01-28T17:28:58.483Z","5.0.0-canary.32c1df133.0":"2020-01-28T19:42:54.876Z","5.0.0-canary.f3adce86f.0":"2020-01-28T21:48:24.923Z","5.0.0-canary.a4423f890.0":"2020-01-29T21:09:02.947Z","5.0.0-canary.9351f167d.0":"2020-01-29T21:55:03.013Z","5.0.0-canary.29b89dbc1.0":"2020-01-29T22:16:20.988Z","5.0.0-canary.45985457b.0":"2020-01-29T23:32:17.639Z","5.0.0-canary.a1a0deb3e.0":"2020-01-30T17:36:43.060Z","5.0.0-canary.181486643.0":"2020-01-30T20:55:27.450Z","5.0.0-canary.3a85313ac.0":"2020-01-31T16:22:40.856Z","5.0.0-canary.b6c7f624b.0":"2020-01-31T17:02:29.936Z","5.0.0-canary.b3f70ebde.0":"2020-01-31T20:09:43.888Z","5.0.0-canary.3e782d8f8.0":"2020-02-02T01:12:16.618Z","5.0.0-canary.535398572.0":"2020-02-03T18:11:37.169Z","5.0.0-canary.5ff33802c.0":"2020-02-04T18:03:17.354Z","5.0.0-canary.1eb29491c.0":"2020-02-04T20:59:53.747Z","5.0.0-canary.4c7154b26.0":"2020-02-05T16:02:14.675Z","5.0.0-canary.ab5f49a2c.0":"2020-02-05T23:32:38.344Z","5.0.0-canary.c541ebe15.0":"2020-02-06T22:29:19.583Z","5.0.0-canary.98f7faa05.0":"2020-02-07T19:20:45.818Z","5.0.0-canary.b4727e43a.0":"2020-02-07T19:55:03.861Z","5.0.0-canary.91d9d5a65.0":"2020-02-07T22:58:32.691Z","5.0.0-canary.d5c006ed1.0":"2020-02-10T16:48:04.014Z","5.0.0-canary.559f1a570.0":"2020-02-10T17:24:09.460Z","5.0.0-canary.ad3bbf782.0":"2020-02-10T19:10:54.101Z","5.0.0-canary.570d8e49c.0":"2020-02-10T20:42:52.921Z","5.0.0-canary.48b06b89a.0":"2020-02-11T18:42:37.284Z","5.0.0-canary.612443dfb.0":"2020-02-11T19:48:15.083Z","5.0.0-canary.8c11ea2a3.0":"2020-02-12T08:50:56.062Z","5.0.0-canary.b2f3d311e.0":"2020-02-13T21:43:06.508Z","5.0.0-canary.4f488d0ee.0":"2020-02-13T23:05:40.667Z","6.0.0-canary.fe79de07d.0":"2020-02-13T23:22:58.139Z","5.0.0":"2020-02-14T00:08:22.576Z","6.0.0-canary.5e313b1f2.0":"2020-02-14T23:47:31.183Z","6.0.0-canary.6a56f387c.0":"2020-02-18T19:43:00.464Z","6.0.0-canary.bdfd52632.0":"2020-02-19T20:22:00.530Z","6.0.0-canary.ad2e4376a.0":"2020-02-20T23:15:31.493Z","6.0.0-canary.765caef18.0":"2020-02-21T17:32:22.356Z","6.0.0-canary.949562303.0":"2020-02-21T20:36:58.906Z","6.0.0-canary.7ec96974e.0":"2020-02-24T18:57:29.794Z","6.0.0-canary.265ecbad5.0":"2020-02-25T21:00:14.559Z","5.1.0":"2020-02-25T21:37:18.121Z","6.0.0-canary.2cf87456f.0":"2020-02-25T21:38:04.242Z","6.0.0-canary.781434a92.0":"2020-02-25T23:27:27.287Z","6.0.0-canary.d6f60c98b.0":"2020-02-28T22:02:59.478Z","6.0.0-canary.69edc6e28.0":"2020-02-28T22:11:43.213Z","6.0.0-canary.9372e4939.0":"2020-03-03T19:09:05.735Z","6.0.0-canary.9cf5e9842.0":"2020-03-03T23:25:05.540Z","6.0.0-canary.3657f8863.0":"2020-03-04T17:43:34.840Z","6.0.0-canary.98b843417.0":"2020-03-05T18:30:26.503Z","6.0.0-canary.17b9699c4.0":"2020-03-05T19:21:43.619Z","6.0.0-canary.6ee035572.0":"2020-03-09T16:45:55.545Z","6.0.0-canary.bd33cb56b.0":"2020-03-09T17:21:18.882Z","6.0.0-canary.9ebee4ceb.0":"2020-03-09T21:13:09.918Z","6.0.0-canary.26c049afa.0":"2020-03-10T17:01:49.457Z","6.0.0-canary.a731fd0a4.0":"2020-03-10T20:31:35.297Z","6.0.0-canary.1db5c9fc8.0":"2020-03-10T20:35:48.303Z","6.0.0-canary.4971637f4.0":"2020-03-10T22:57:36.278Z","6.0.0-canary.1ae8130ce.0":"2020-03-10T23:04:53.730Z","6.0.0-canary.8639c2690.0":"2020-03-11T06:32:41.546Z","6.0.0-canary.d5808057f.0":"2020-03-11T16:24:58.944Z","6.0.0-canary.b3f58203d.0":"2020-03-11T19:37:25.905Z","6.0.0-canary.bec065920.0":"2020-03-12T20:19:37.307Z","6.0.0-canary.776291ef0.0":"2020-03-17T19:20:06.229Z","6.0.0-canary.ece19f3dd.0":"2020-03-17T22:00:44.529Z","6.0.0-canary.4dc45af6c.0":"2020-03-18T01:47:26.172Z","6.0.0-canary.6b48781bf.0":"2020-03-18T15:34:11.596Z","6.0.0-canary.a88c8e4dc.0":"2020-03-19T17:35:21.271Z","6.0.0-canary.cafe18860.0":"2020-03-20T14:53:00.330Z","6.0.0-canary.35a32aaea.0":"2020-03-20T19:58:32.729Z","6.0.0-canary.e75deb854.0":"2020-03-20T22:14:34.752Z","6.0.0-canary.2cc6966f6.0":"2020-03-24T18:42:52.938Z","6.0.0-canary.8707953b6.0":"2020-03-24T18:46:33.799Z","6.0.0-canary.10af6cf39.0":"2020-03-25T18:17:51.057Z","6.0.0-canary.7d8f9c8d7.0":"2020-03-27T18:04:19.504Z","6.0.0-canary.d6315efe2.0":"2020-03-27T19:55:51.697Z","6.0.0-canary.a3016368d.0":"2020-03-27T21:19:01.920Z","6.0.0-canary.4b45b6620.0":"2020-03-31T15:55:44.289Z","6.0.0-canary.e84b9c8.0":"2020-04-01T16:55:24.565Z","6.0.0-canary.e33c49e.0":"2020-04-02T00:08:57.214Z","6.0.0-canary.f1f8e60.0":"2020-04-02T19:13:12.756Z","6.0.0-canary.1e17c49b3.0":"2020-04-03T18:03:26.169Z","6.0.0-canary.6a40ef217.0":"2020-04-03T19:24:05.264Z","6.0.0-canary.5f24faacb.0":"2020-04-08T15:35:33.309Z","6.0.0-canary.82fa986b9.0":"2020-04-08T15:41:08.273Z","6.0.0-canary.9930d9cc5.0":"2020-04-08T19:31:56.622Z","6.0.0-canary.6601d24af.0":"2020-04-09T00:29:26.649Z","6.0.0-canary.05f5e1583.0":"2020-04-09T00:46:42.118Z","6.0.0-canary.bce00e186.0":"2020-04-09T15:22:06.544Z","6.0.0-canary.927fa902c.0":"2020-04-09T18:45:58.915Z","6.0.0-canary.eb28b6ecc.0":"2020-04-10T19:30:32.998Z","6.0.0-canary.816a43b42.0":"2020-04-10T20:52:13.893Z","6.0.0-canary.008c4d319.0":"2020-04-13T16:33:25.203Z","6.0.0-canary.cbb3f28ca.0":"2020-04-14T05:05:30.609Z","6.0.0-canary.f172b0f90.0":"2020-04-14T23:09:56.608Z","6.0.0-canary.c02642273.0":"2020-04-15T16:16:52.013Z","6.0.0-canary.8a299b568.0":"2020-04-15T22:42:54.213Z","6.0.0-canary.490fbdc09.0":"2020-04-16T05:59:21.043Z","6.0.0-canary.f838c6e55.0":"2020-04-16T14:26:09.432Z","6.0.0-canary.ce6cb7024.0":"2020-04-16T17:18:40.259Z","6.0.0-canary.0ab62a65b.0":"2020-04-16T18:53:50.732Z","6.0.0-canary.ca61b656f.0":"2020-04-16T19:59:34.061Z","6.0.0-canary.45a6615e3.0":"2020-04-16T20:32:30.369Z","6.0.0-canary.4b04cdb0f.0":"2020-04-17T17:40:34.977Z","6.0.0-canary.b273afa93.0":"2020-04-17T23:02:29.972Z","6.0.0-canary.b70bc601e.0":"2020-04-17T23:21:06.646Z","6.0.0-canary.c4b4bba96.0":"2020-04-18T00:17:21.238Z","6.0.0-canary.6c1ebc721.0":"2020-04-20T19:57:52.629Z","6.0.0-canary.9cff4318f.0":"2020-04-20T20:55:24.388Z","6.0.0-canary.7b4482402.0":"2020-04-20T22:19:48.204Z","6.0.0-canary.deda86d8c.0":"2020-04-21T01:14:21.362Z","6.0.0-canary.d10412cb2.0":"2020-04-21T18:17:51.790Z","6.0.0-canary.c141801d5.0":"2020-04-21T19:41:27.796Z","6.0.0-canary.28d10a96e.0":"2020-04-22T22:06:41.281Z","7.0.0-canary.8540808be.0":"2020-04-23T17:25:22.755Z","6.0.0":"2020-04-23T17:25:53.336Z","7.0.0-canary.2673adb74.0":"2020-04-23T22:45:06.463Z","7.0.0-canary.b10d0d7f1.0":"2020-04-24T00:20:38.233Z","7.0.0-canary.3bd8c1bac.0":"2020-04-24T21:05:34.098Z","7.0.0-canary.b83c8dc22.0":"2020-04-24T21:18:21.665Z","7.0.0-canary.1b3dd846d.0":"2020-04-25T00:43:28.946Z","7.0.0-canary.29debfea7.0":"2020-04-27T12:31:34.572Z","7.0.0-canary.28d32f8e0.0":"2020-04-27T14:06:09.297Z","7.0.0-canary.af71cfdd6.0":"2020-04-28T23:16:59.539Z","7.0.0-canary.99d2fc961.0":"2020-04-29T10:43:17.195Z","7.0.0-canary.0e052b24f.0":"2020-04-30T01:28:57.317Z","7.0.0-canary.ff4bc632a.0":"2020-04-30T08:27:10.657Z","7.0.0-canary.b0f83d2fd.0":"2020-04-30T14:32:06.421Z","7.0.0-canary.e59906a57.0":"2020-05-01T15:41:48.336Z","7.0.0-canary.c02712b59.0":"2020-05-01T18:25:16.861Z","7.0.0-canary.15d65448e.0":"2020-05-01T19:22:03.229Z","7.0.0-canary.142b1549e.0":"2020-05-01T22:35:18.479Z","7.0.0-canary.524b7b812.0":"2020-05-03T20:47:05.477Z","7.0.0-canary.bd8ca9678.0":"2020-05-04T17:18:31.068Z","7.0.0-canary.2553e86fe.0":"2020-05-04T17:30:31.190Z","7.0.0-canary.03dec929e.0":"2020-05-04T23:33:07.865Z","7.0.0-canary.d92d8c93e.0":"2020-05-05T16:58:21.846Z","7.0.0-canary.09f591967.0":"2020-05-05T21:03:40.076Z","7.0.0-canary.3846ce311.0":"2020-05-06T14:08:52.866Z","7.0.0-canary.ed7f32463.0":"2020-05-06T16:06:28.966Z","7.0.0-canary.8135cc085.0":"2020-05-06T19:54:35.366Z","7.0.0-canary.deb212de4.0":"2020-05-06T22:18:10.335Z","7.0.0-canary.f83e00898.0":"2020-05-07T16:48:56.974Z","7.0.0-canary.047e6b337.0":"2020-05-08T18:37:52.836Z","7.0.0-canary.119e21426.0":"2020-05-08T20:21:49.634Z","7.0.0-canary.2f052d824.0":"2020-05-08T21:06:37.933Z","7.0.0-canary.e84444387.0":"2020-05-08T21:31:00.794Z","7.0.0-canary.893eb1876.0":"2020-05-11T14:12:25.387Z","7.0.0-canary.a5aeb3001.0":"2020-05-11T14:28:16.101Z","7.0.0-canary.610c68d97.0":"2020-05-11T19:31:49.857Z","7.0.0-canary.ed52af767.0":"2020-05-11T20:26:40.928Z","7.0.0-canary.058cfd23c.0":"2020-05-11T21:24:33.923Z","7.0.0-canary.0a371b4fe.0":"2020-05-12T23:17:31.933Z","7.0.0-canary.2139200b3.0":"2020-05-13T14:46:39.659Z","7.0.0-canary.744d751a0.0":"2020-05-14T04:42:13.394Z","7.0.0-canary.ad0c0c103.0":"2020-05-14T14:50:50.961Z","7.0.0-canary.fd8f8f2b7.0":"2020-05-18T17:53:06.345Z","7.0.0-canary.730920fbb.0":"2020-05-18T19:43:28.815Z","7.0.0-canary.bcdad99bb.0":"2020-05-19T03:17:28.615Z","7.0.0-canary.4497b86ed.0":"2020-05-19T03:50:15.811Z","7.0.0-canary.2e60575da.0":"2020-05-19T16:08:41.055Z","7.0.0-canary.e3eacefcc.0":"2020-05-19T17:37:33.925Z","7.0.0-canary.b065a4d2b.0":"2020-05-20T14:35:52.189Z","7.0.0-canary.4ebce8d78.0":"2020-05-20T20:49:51.844Z","7.0.0-canary.b0fdca492.0":"2020-05-20T23:02:16.182Z","7.0.0-canary.c67667e8e.0":"2020-05-21T14:11:57.023Z","7.0.0-canary.62b5f37db.0":"2020-05-21T16:40:39.151Z","7.0.0-canary.2e218dbf8.0":"2020-05-21T17:01:31.216Z","7.0.0-canary.7fd792bb9.0":"2020-05-21T17:14:03.841Z","7.0.0-canary.a66493cd8.0":"2020-05-21T17:17:33.528Z","7.0.0-canary.da05f66e1.0":"2020-05-21T17:19:22.825Z","7.0.0-canary.740860e78.0":"2020-05-21T17:26:07.060Z","7.0.0-canary.5cea2610f.0":"2020-05-21T17:28:08.002Z","7.0.0-canary.cf7747ef7.0":"2020-05-21T17:28:26.487Z","7.0.0-canary.862d0d7bc.0":"2020-05-21T17:31:08.779Z","7.0.0-canary.0008c8a91.0":"2020-05-21T19:32:35.339Z","7.0.0-canary.541638fa2.0":"2020-05-21T19:47:31.272Z","7.0.0-canary.6167cd075.0":"2020-05-21T20:20:29.370Z","7.0.0-canary.863ac1b0f.0":"2020-05-21T20:59:06.373Z","7.0.0-canary.d30a214ac.0":"2020-05-21T21:03:18.134Z","7.0.0-canary.62abbc8d7.0":"2020-05-21T21:28:06.573Z","7.0.0-canary.49bf31d5c.0":"2020-05-21T21:31:22.727Z","7.0.0-canary.8e17857d0.0":"2020-05-21T21:32:18.276Z","7.0.0-canary.c113fc942.0":"2020-05-21T22:45:50.098Z","7.0.0-canary.912d9021d.0":"2020-05-26T18:44:43.627Z","7.0.0-canary.68a2af131.0":"2020-05-26T19:06:50.355Z","7.0.0-canary.01de07011.0":"2020-05-26T19:52:05.367Z","7.0.0-canary.51d4535fe.0":"2020-05-26T21:34:10.898Z","7.0.0-canary.b86d826b7.0":"2020-05-26T22:13:03.415Z","7.0.0-canary.d91794c7e.0":"2020-05-26T23:54:23.636Z","7.0.0-canary.8c6d7e076.0":"2020-05-27T18:58:49.921Z","7.0.0-canary.5b5f62f93.0":"2020-05-27T19:15:47.511Z","7.0.0-canary.d9972abb1.0":"2020-05-27T20:20:15.648Z","7.0.0-canary.6556eda2b.0":"2020-05-27T20:29:26.044Z","7.0.0-canary.32aa23641.0":"2020-05-27T21:37:38.073Z","7.0.0-canary.654934dfa.0":"2020-05-28T00:36:18.347Z","7.0.0-canary.41910b8b8.0":"2020-05-28T00:50:46.090Z","7.0.0-canary.d66d22bf9.0":"2020-05-28T19:54:41.076Z","7.0.0-canary.8904f3cbe.0":"2020-05-29T16:49:46.183Z","7.0.0-canary.51512a4ac.0":"2020-05-29T19:14:33.011Z","7.0.0-canary.0743288fb.0":"2020-05-29T20:04:29.377Z","7.0.0-canary.06ef147b5.0":"2020-05-29T20:40:06.611Z","7.0.0-canary.8073a20a9.0":"2020-05-29T23:24:56.853Z","7.0.0-canary.72ff42330.0":"2020-06-01T16:43:17.245Z","7.0.0-canary.9ea52070f.0":"2020-06-01T16:48:30.062Z","7.0.0-canary.d86ad3b60.0":"2020-06-01T17:48:17.363Z","7.0.0-canary.b9776b1d0.0":"2020-06-01T18:25:11.593Z","7.0.0-canary.ba6f7c294.0":"2020-06-02T17:02:06.102Z","7.0.0-canary.cf3b664ab.0":"2020-06-02T18:22:56.128Z","7.0.0-canary.4ba3c9a31.0":"2020-06-02T23:51:43.660Z","7.0.0-canary.388b042c7.0":"2020-06-03T13:45:57.282Z","7.0.0-canary.cca1ca84d.0":"2020-06-03T16:02:06.064Z","7.0.0-canary.9b0b5f2e0.0":"2020-06-03T18:56:56.993Z","7.0.0-canary.0a7895f4d.0":"2020-06-03T21:08:28.134Z","7.0.0-canary.7461aad68.0":"2020-06-03T22:11:41.460Z","7.0.0-canary.a0dc2b5c4.0":"2020-06-04T21:13:15.522Z","7.0.0-canary.2b420c5b3.0":"2020-06-08T16:13:54.949Z","7.0.0-canary.8fa22aacc.0":"2020-06-08T18:04:00.738Z","7.0.0-canary.21c4e4ed8.0":"2020-06-08T18:43:41.164Z","7.0.0-canary.dfde46516.0":"2020-06-08T19:41:11.262Z","7.0.0-canary.05cc5c206.0":"2020-06-08T20:56:10.207Z","7.0.0-canary.3ee488f1c.0":"2020-06-09T14:53:21.332Z","7.0.0-canary.b83d720ee.0":"2020-06-09T17:25:42.991Z","7.0.0-canary.afb1c11a9.0":"2020-06-09T20:15:53.811Z","7.0.0-canary.39e6f71e2.0":"2020-06-09T23:39:01.543Z","7.0.0-canary.d4c66dc7d.0":"2020-06-11T17:45:21.488Z","7.0.0-canary.be4a19f9f.0":"2020-06-12T06:07:37.436Z","7.0.0-canary.a6ac8f629.0":"2020-06-15T21:30:07.251Z","7.0.0-canary.9833dc287.0":"2020-06-16T19:48:43.770Z","7.0.0-canary.3aa33998e.0":"2020-06-16T20:20:27.483Z","7.0.0-canary.d2b54d183.0":"2020-06-18T01:15:08.219Z","7.0.0-canary.f2a488e95.0":"2020-06-18T15:03:33.919Z","7.0.0-canary.bd8d1aafa.0":"2020-06-18T15:15:43.941Z","7.0.0-canary.1321eb968.0":"2020-06-19T19:20:46.528Z","7.0.0-canary.db5cc0382.0":"2020-06-19T19:27:09.963Z","7.0.0-canary.6ac9bf031.0":"2020-06-19T19:47:33.623Z","7.0.0-canary.c21b5c367.0":"2020-06-19T20:09:49.530Z","7.0.0-canary.bfdd7fd39.0":"2020-06-19T20:19:21.333Z","7.0.0-canary.10b505785.0":"2020-06-19T20:20:46.860Z","7.0.0-canary.6483d3f44.0":"2020-06-19T20:36:58.082Z","7.0.0-canary.30a74e921.0":"2020-06-19T20:39:15.312Z","7.0.0-canary.c20727498.0":"2020-06-19T20:42:08.322Z","7.0.0-canary.4e360ae94.0":"2020-06-19T20:58:53.750Z","7.0.0-canary.8550fa53b.0":"2020-06-19T21:01:06.663Z","7.0.0-canary.93ade142e.0":"2020-06-19T21:02:16.660Z","7.0.0-canary.a0032f5bb.0":"2020-06-19T21:27:15.775Z","7.0.0-canary.3f342e721.0":"2020-06-19T21:29:18.265Z","7.0.0-canary.ff89457cc.0":"2020-06-19T21:30:42.033Z","7.0.0-canary.4a1855cf8.0":"2020-06-19T21:33:25.351Z","7.0.0-canary.8602f1b4d.0":"2020-06-22T17:23:00.231Z","7.0.0-canary.69f9f0982.0":"2020-06-22T21:13:47.647Z","7.0.0-canary.369a293f0.0":"2020-06-22T21:16:00.715Z","7.0.0-canary.f1432b5c6.0":"2020-06-22T21:24:40.535Z","7.0.0-canary.4757a16b4.0":"2020-06-22T21:52:41.365Z","7.0.0-canary.f8f472762.0":"2020-06-22T21:56:46.911Z","7.0.0-canary.7e4d55c34.0":"2020-06-22T22:28:43.113Z","7.0.0-canary.bd1dbc91f.0":"2020-06-23T14:27:21.171Z","7.0.0-canary.31523bc62.0":"2020-06-23T14:32:43.632Z","7.0.0-canary.a96b6d4d6.0":"2020-06-23T14:39:18.506Z","7.0.0-canary.ef3a09533.0":"2020-06-23T14:47:24.339Z","7.0.0-canary.080965f39.0":"2020-06-23T15:16:55.191Z","7.0.0-canary.1bd67b65d.0":"2020-06-23T15:59:17.766Z","7.0.0-canary.18ca31248.0":"2020-06-23T18:24:06.547Z","7.0.0-canary.39cf00836.0":"2020-06-23T18:47:16.243Z","7.0.0-canary.1bfda9e05.0":"2020-06-23T18:59:44.953Z","7.0.0-canary.08731bd95.0":"2020-06-23T19:02:21.689Z","7.0.0":"2020-06-23T19:10:05.110Z","8.0.0-canary.a3212b209.0":"2020-06-23T19:10:56.993Z","8.0.0-canary.15e81fe98.0":"2020-06-23T19:39:55.875Z","8.0.0-canary.004c9d392.0":"2020-06-23T22:55:20.887Z","8.0.0-canary.03bde00f5.0":"2020-06-24T00:31:00.064Z","8.0.0-canary.599b8c319.0":"2020-06-24T14:55:35.519Z","8.0.0-canary.87e3be418.0":"2020-06-24T17:52:38.465Z","8.0.0-canary.035cf2a6f.0":"2020-06-24T18:38:02.576Z","8.0.0-canary.2fed2c12f.0":"2020-06-25T20:00:08.236Z","8.0.0-canary.38197b443.0":"2020-06-25T21:21:54.386Z","8.0.0-canary.69a35e80c.0":"2020-06-26T17:38:05.606Z","8.0.0-canary.df7154fb3.0":"2020-06-26T18:16:05.928Z","8.0.0-canary.d5618602a.0":"2020-06-26T21:47:37.639Z","8.0.0-canary.e590b376b.0":"2020-06-26T23:22:55.913Z","8.0.0-canary.0c9d6bd2d.0":"2020-06-29T17:14:42.190Z","8.0.0-canary.c1fec4246.0":"2020-06-29T17:29:48.253Z","8.0.0-canary.c678a9d34.0":"2020-06-29T17:51:05.658Z","8.0.0-canary.521afaf6e.0":"2020-06-30T15:04:45.166Z","8.0.0-canary.a2ad48839.0":"2020-06-30T19:13:40.182Z","8.0.0-canary.ec2385881.0":"2020-06-30T21:46:15.645Z","8.0.0-canary.610c26c4a.0":"2020-07-01T14:55:25.680Z","8.0.0-canary.e2ea4a99e.0":"2020-07-01T19:26:28.544Z","8.0.0-canary.a78ceb112.0":"2020-07-01T19:38:15.587Z","8.0.0-canary.b0c456d33.0":"2020-07-06T22:40:30.325Z","8.0.0-canary.2e5711e04.0":"2020-07-08T16:47:16.300Z","8.0.0-canary.811fc5d24.0":"2020-07-08T17:15:09.385Z","8.0.0-canary.6ed717ddd.0":"2020-07-08T19:43:23.082Z","8.0.0-canary.d850de590.0":"2020-07-09T18:04:48.424Z","8.0.0-canary.e07a70841.0":"2020-07-09T18:34:38.815Z","8.0.0-canary.37947ed6c.0":"2020-07-09T20:35:16.435Z","8.0.0-canary.5d443afec.0":"2020-07-09T20:51:07.987Z","8.0.0-canary.9ac1ed914.0":"2020-07-09T21:20:02.341Z","8.0.0-canary.1e7cb6198.0":"2020-07-09T22:11:36.636Z","8.0.0-canary.843f636c0.0":"2020-07-10T17:41:59.484Z","8.0.0-canary.b2edaeead.0":"2020-07-10T18:06:32.009Z","8.0.0-canary.5dac1f624.0":"2020-07-13T16:33:38.682Z","8.0.0-canary.4497acef8.0":"2020-07-14T14:19:18.268Z","8.0.0-canary.e6e23019d.0":"2020-07-14T20:09:47.078Z","8.0.0-canary.d548d7a92.0":"2020-07-14T21:12:24.756Z","8.0.0-canary.58ce529cc.0":"2020-07-14T21:14:21.583Z","8.0.0-canary.a0f1202dc.0":"2020-07-14T21:33:29.439Z","8.0.0-canary.ad4df58c1.0":"2020-07-15T00:08:43.736Z","8.0.0-canary.01db89053.0":"2020-07-16T16:38:23.173Z","8.0.0-canary.fb5a4cdeb.0":"2020-07-20T19:19:21.338Z","8.0.0-canary.8df0f517c.0":"2020-07-20T23:54:59.690Z","8.0.0-canary.abcdbcfeb.0":"2020-07-21T00:49:29.260Z","8.0.0-canary.7bd5075de.0":"2020-07-21T18:46:30.608Z","8.0.0-canary.405a29a20.0":"2020-07-22T22:22:33.364Z","8.0.0-canary.f3693ac4c.0":"2020-07-22T22:32:57.393Z","8.0.0-canary.12a109680.0":"2020-07-22T23:02:49.202Z","8.0.0-canary.bbd06696e.0":"2020-07-22T23:52:14.310Z","8.0.0-canary.4951e7651.0":"2020-07-23T01:48:48.645Z","8.0.0-canary.75deebbef.0":"2020-07-23T17:45:09.180Z","8.0.0-canary.95aff33ee.0":"2020-07-23T18:46:44.510Z","8.0.0-canary.9d9f47473.0":"2020-07-23T19:58:00.429Z","8.0.0-canary.00dfbf6be.0":"2020-07-23T20:58:51.202Z","8.0.0-canary.b87e522d2.0":"2020-07-23T21:23:03.107Z","8.0.0-canary.5b3e150e5.0":"2020-07-24T01:23:13.212Z","8.0.0-canary.f0ae11786.0":"2020-07-24T01:43:01.474Z","8.0.0-canary.fb4ee66c0.0":"2020-07-24T02:10:07.822Z","8.0.0-canary.5511e0aeb.0":"2020-07-24T16:56:14.848Z","8.0.0-canary.8388a9bf6.0":"2020-07-24T20:12:24.462Z","8.0.0-canary.ac405eae1.0":"2020-07-27T15:05:42.645Z","8.0.0-canary.75553837c.0":"2020-07-27T15:11:40.901Z","8.0.0-canary.b96fbfc7a.0":"2020-07-27T15:37:13.565Z","8.0.0-canary.61f1a8d85.0":"2020-07-27T15:46:25.337Z","8.0.0-canary.81dc33377.0":"2020-07-27T15:58:28.545Z","8.0.0-canary.ffd9ede58.0":"2020-07-27T16:31:37.729Z","8.0.0-canary.52dc55acf.0":"2020-07-27T17:07:50.034Z","8.0.0-canary.d4274ff05.0":"2020-07-27T19:50:47.908Z","8.0.0-canary.b82d0696d.0":"2020-07-27T19:57:22.147Z","8.0.0-canary.c2852000d.0":"2020-07-27T20:57:34.517Z","8.0.0-canary.f86f83f54.0":"2020-07-27T21:53:25.136Z","8.0.0-canary.41eb1684c.0":"2020-07-28T17:49:36.468Z","8.0.0-canary.9e2f6c450.0":"2020-07-28T22:38:32.184Z","8.0.0-canary.e6950b55a.0":"2020-07-28T22:51:31.288Z","8.0.0-canary.5e51ee38e.0":"2020-07-28T23:15:15.504Z","8.0.0-canary.a3898ffcf.0":"2020-07-29T00:35:42.754Z","8.0.0-canary.bc5cc6c96.0":"2020-07-29T00:48:32.421Z","8.0.0-canary.9bdeaf928.0":"2020-07-29T01:19:51.488Z","8.0.0-canary.fde2c1f9d.0":"2020-07-29T01:34:19.929Z","8.0.0-canary.6b3876d5d.0":"2020-07-29T01:38:05.280Z","8.0.0-canary.30ce17873.0":"2020-07-29T17:13:59.736Z","8.0.0-canary.f6bb43bf0.0":"2020-07-29T18:24:29.952Z","8.0.0-canary.6af75f6ab.0":"2020-07-30T00:00:42.698Z","8.0.0-canary.42d7a65aa.0":"2020-07-30T00:09:35.432Z","8.0.0-canary.85abdabb7.0":"2020-07-30T00:14:39.594Z","8.0.0-canary.49fb20ca3.0":"2020-07-30T01:26:55.604Z","8.0.0-canary.962d4abbb.0":"2020-07-30T16:09:34.668Z","8.0.0-canary.2fcee40cb.0":"2020-07-30T17:20:52.629Z","8.0.0-canary.bd5987f5a.0":"2020-07-30T17:45:30.715Z","8.0.0-canary.005e86a9b.0":"2020-07-30T17:59:06.465Z","8.0.0-canary.e309c7c68.0":"2020-07-30T18:07:53.935Z","8.0.0-canary.935a51cc0.0":"2020-07-30T18:19:39.852Z","8.0.0-canary.74839da7b.0":"2020-07-30T18:30:36.440Z","8.0.0-canary.f041a48c9.0":"2020-07-30T22:58:41.942Z","8.0.0-canary.fbb1381e1.0":"2020-07-31T15:49:42.442Z","8.0.0-canary.7f61d5785.0":"2020-07-31T17:22:21.199Z","8.0.0-canary.e1bc84d10.0":"2020-08-03T17:50:02.853Z","8.0.0-canary.096a7a066.0":"2020-08-03T17:52:57.214Z","8.0.0-canary.aa3a3e5a4.0":"2020-08-03T17:53:14.223Z","8.0.0-canary.5903d39af.0":"2020-08-03T17:53:24.375Z","8.0.0-canary.72258f898.0":"2020-08-04T01:16:36.772Z","8.0.0-canary.1b44b43c8.0":"2020-08-04T16:47:26.773Z","8.0.0-canary.e9d2e2f96.0":"2020-08-04T20:23:32.335Z","8.0.0-canary.b9dff0a19.0":"2020-08-05T03:47:59.904Z","8.0.0-canary.2bd09a706.0":"2020-08-05T03:53:06.279Z","8.0.0-canary.e0560522f.0":"2020-08-05T17:18:57.245Z","8.0.0-canary.08ca4d0ec.0":"2020-08-05T17:38:44.085Z","8.0.0-canary.08090126b.0":"2020-08-06T19:31:56.709Z","8.0.0-canary.e8bf5b2ac.0":"2020-08-06T21:49:15.502Z","8.0.0-canary.e3b746208.0":"2020-08-06T22:25:58.284Z","8.0.0-canary.96a640534.0":"2020-08-06T22:40:47.658Z","8.0.0-canary.9f9aac825.0":"2020-08-07T20:50:39.151Z","8.0.0-canary.fc65fd00b.0":"2020-08-10T15:19:38.717Z","8.0.0-canary.02e372c5f.0":"2020-08-10T15:47:42.225Z","8.0.0-canary.66669e3b6.0":"2020-08-10T15:51:50.510Z","8.0.0-canary.6d1ea9761.0":"2020-08-11T14:30:04.557Z","8.0.0-canary.79414bf9f.0":"2020-08-11T19:00:57.653Z","8.0.0-canary.85a5272df.0":"2020-08-11T20:07:25.494Z","8.0.0-canary.fda053eb8.0":"2020-08-12T20:03:21.952Z","8.0.0-canary.760873445.0":"2020-08-12T21:42:29.035Z","8.0.0-canary.2f4711a30.0":"2020-08-12T21:52:28.818Z","8.0.0-canary.2d72f3659.0":"2020-08-12T21:59:54.661Z","8.0.0-canary.1fee70a5e.0":"2020-08-12T23:27:56.735Z","8.0.0-canary.023f3fa34.0":"2020-08-13T01:11:35.217Z","8.0.0-canary.80f3a9e5d.0":"2020-08-13T01:28:12.197Z","8.0.0-canary.a1dcfe97c.0":"2020-08-13T08:48:55.387Z","8.0.0-canary.af332d5be.0":"2020-08-13T21:16:34.446Z","8.0.0-canary.7dd4567c4.0":"2020-08-14T00:50:07.469Z","8.0.0-canary.ff870005a.0":"2020-08-14T01:15:26.752Z","8.0.0-canary.150f427a0.0":"2020-08-14T13:28:28.863Z","8.0.0-canary.bcc58290a.0":"2020-08-14T23:21:46.237Z","8.0.0-canary.4f55400bb.0":"2020-08-17T16:37:42.034Z","8.0.0-canary.000d64815.0":"2020-08-17T17:03:31.352Z","8.0.0-canary.defa599a8.0":"2020-08-17T20:31:02.662Z","8.0.0-canary.66b8ed7e6.0":"2020-08-18T18:36:01.612Z","8.0.0-canary.e2b1033df.0":"2020-08-19T18:41:09.722Z","8.0.0-canary.2e8c3dd2e.0":"2020-08-19T19:23:10.501Z","8.0.0-canary.b2e80a5d9.0":"2020-08-19T22:20:11.894Z","8.0.0-canary.ff88df637.0":"2020-08-19T22:32:09.830Z","8.0.0-canary.32fb314cd.0":"2020-08-20T10:36:43.400Z","8.0.0-canary.546277d32.0":"2020-08-20T16:42:13.215Z","8.0.0-canary.da72839f4.0":"2020-08-20T17:59:05.920Z","8.0.0-canary.346069ccb.0":"2020-08-20T18:17:37.687Z","8.0.0-canary.e27c5802f.0":"2020-08-20T19:14:22.750Z","8.0.0-canary.f4532b9c8.0":"2020-08-20T19:56:59.874Z","8.0.0-canary.fbf73c2a6.0":"2020-08-20T21:05:32.781Z","8.0.0-canary.cf800124f.0":"2020-08-20T21:51:52.989Z","8.0.0-canary.95e4eeea7.0":"2020-08-20T23:28:07.163Z","8.0.0-canary.91ab1c62a.0":"2020-08-21T15:10:54.762Z","8.0.0-canary.58eaa9f02.0":"2020-08-21T19:59:37.372Z","8.0.0-canary.238216fc4.0":"2020-08-24T15:39:56.740Z","8.0.0-canary.a1c65593d.0":"2020-08-25T03:03:05.755Z","8.0.0-canary.708cc09c4.0":"2020-08-25T15:55:38.063Z","8.0.0-canary.19bea2ad3.0":"2020-08-26T18:48:32.574Z","8.0.0-canary.911014711.0":"2020-08-27T16:07:11.586Z","8.0.0-canary.d3387f54c.0":"2020-09-03T20:53:36.680Z","8.0.0-canary.2ccf996cc.0":"2020-09-03T20:53:57.525Z","8.0.0-canary.744bfe5d8.0":"2020-09-03T20:54:56.008Z","8.0.0-canary.78da96eaf.0":"2020-09-08T19:12:00.337Z","8.0.0-canary.b0ed593cc.0":"2020-09-09T06:15:14.594Z","8.0.0-canary.85a1fa9ea.0":"2020-09-10T21:09:44.033Z","8.0.0-canary.0bc41a9c7.0":"2020-09-11T17:48:53.443Z","8.0.0-canary.fc0eb5013.0":"2020-09-11T19:54:44.739Z","8.0.0-canary.319bf66de.0":"2020-09-11T23:09:26.871Z","8.0.0-canary.5bfc305ec.0":"2020-09-13T22:59:26.424Z","8.0.0-canary.83d83f131.0":"2020-09-14T00:31:57.324Z","8.0.0-canary.40d8e4726.0":"2020-09-14T23:26:41.320Z","8.0.0-canary.c25d70a31.0":"2020-09-15T02:26:53.308Z","8.0.0-canary.d52b165b5.0":"2020-09-15T14:53:31.992Z","8.0.0-canary.a831d4799.0":"2020-09-15T17:51:04.434Z","8.0.0-canary.a306aa488.0":"2020-09-17T00:57:43.592Z","8.0.0-canary.fd608ff66.0":"2020-09-17T14:24:54.018Z","8.0.0-canary.3e435ba57.0":"2020-09-17T14:42:11.695Z","8.0.0-canary.c250ec52a.0":"2020-09-17T20:09:44.175Z","8.0.0-canary.e34e411b1.0":"2020-09-17T20:17:11.880Z","8.0.0-canary.4e9343929.0":"2020-09-17T20:42:18.083Z","8.0.0-canary.4e5c350c2.0":"2020-09-21T21:13:23.118Z","8.0.0-canary.16c563ef7.0":"2020-09-22T19:45:25.919Z","8.0.0-canary.fd8af3d43.0":"2020-09-23T19:31:28.920Z","8.0.0-canary.d4cd83a85.0":"2020-09-25T00:34:19.603Z","8.0.0-canary.199aecdfb.0":"2020-09-25T15:50:29.021Z","8.0.0-canary.38ef4501f.0":"2020-09-30T18:23:31.408Z","8.0.0-canary.774dcfc8e.0":"2020-10-01T09:53:18.314Z","8.0.0-canary.0f60323a8.0":"2020-10-08T21:09:17.366Z","8.0.0-canary.d71622574.0":"2020-10-09T16:30:46.824Z","8.0.0-canary.7a9afaf4b.0":"2020-10-09T22:53:01.654Z","8.0.0-canary.8a39352c8.0":"2020-10-12T17:45:38.242Z","8.0.0-canary.790ca85fd.0":"2020-10-12T21:55:59.532Z","8.0.0-canary.174c0becf.0":"2020-10-14T02:15:00.598Z","8.0.0-canary.c71ebfa02.0":"2020-10-14T04:16:39.586Z","8.0.0-canary.2ab716cbd.0":"2020-10-16T00:03:30.886Z","8.0.0-canary.43c1c5e2f.0":"2020-10-19T14:07:19.205Z","8.0.0-canary.ccc64eea3.0":"2020-10-26T22:50:46.602Z","8.0.0-canary.a79cdd019.0":"2020-10-27T16:30:26.942Z","8.0.0-canary.596e98424.0":"2020-10-28T16:02:43.125Z","8.0.0-canary.05d5facc2.0":"2020-10-28T16:11:12.534Z","8.0.0-canary.291b3553d.0":"2020-10-28T17:44:08.277Z","8.0.0-canary.dbc449b09.0":"2020-10-28T18:11:51.000Z","8.0.0-canary.4794b25da.0":"2020-10-28T18:40:28.356Z","8.0.0-canary.c61db90a5.0":"2020-10-28T18:58:50.219Z","8.0.0-canary.6d9648ab2.0":"2020-10-29T20:31:39.696Z","8.0.0-canary.5511c5254.0":"2020-10-30T17:59:26.262Z","8.0.0-canary.bd6e302a4.0":"2020-11-02T17:03:59.880Z","9.0.0-canary.d6b5cd418.0":"2020-11-02T22:58:13.136Z","8.0.0":"2020-11-02T22:58:33.927Z","9.0.0-canary.fdf9a2634.0":"2020-11-03T23:20:31.809Z","9.0.0-canary.4a86f30a0.0":"2020-11-03T23:27:04.541Z","9.0.0-canary.fc8b045f1.0":"2020-11-03T23:36:24.737Z","9.0.0-canary.a0b2db26b.0":"2020-11-04T00:07:59.205Z","9.0.0-canary.419e03572.0":"2020-11-04T01:32:19.563Z","9.0.0-canary.a432ad542.0":"2020-11-06T01:45:15.270Z","9.0.0-canary.e2e8aef1e.0":"2020-11-06T02:04:34.281Z","9.0.0-canary.ec6b68b34.0":"2020-11-06T18:55:44.906Z","9.0.0-canary.b39094d14.0":"2020-11-06T21:15:17.582Z","9.0.0-canary.8648b8258.0":"2020-11-12T10:43:56.753Z","9.0.0-canary.240c5f74f.0":"2020-11-12T20:19:49.701Z","9.0.0-canary.6cf6ba4f4.0":"2020-11-16T18:49:10.781Z","9.0.0-canary.07f3e01b7.0":"2020-11-16T21:44:53.474Z","9.0.0-canary.23491cf85.0":"2020-11-17T00:16:30.827Z","9.0.0-canary.b659d4fc3.0":"2020-11-17T00:24:11.753Z","9.0.0-canary.d8a3aed67.0":"2020-11-17T15:26:21.002Z","9.0.0-canary.482ff9091.0":"2020-11-17T17:57:08.098Z","9.0.0-canary.99cfb6bd5.0":"2020-11-18T18:42:56.181Z","9.0.0-canary.b98d15d90.0":"2020-11-18T22:34:10.954Z","9.0.0-canary.30c11bfc2.0":"2020-11-19T01:25:15.111Z","9.0.0-canary.1b731d51b.0":"2020-11-19T18:51:28.027Z","9.0.0-canary.4ae94ff78.0":"2020-11-19T18:54:22.549Z","9.0.0-canary.7ad038e1d.0":"2020-11-19T19:17:36.588Z","9.0.0-canary.a41527604.0":"2020-11-19T19:59:07.955Z","9.0.0-canary.7b0e2b377.0":"2020-11-20T22:54:46.489Z","9.0.0-canary.c927a5d05.0":"2020-11-23T19:46:30.918Z","9.0.0-canary.b349b5185.0":"2020-11-24T17:07:53.347Z","9.0.0-canary.9083b7d61.0":"2020-11-24T21:14:49.962Z","9.0.0-canary.eff7b46ac.0":"2020-11-24T23:30:10.610Z","9.0.0-canary.ae27b44b0.0":"2020-11-25T15:31:53.947Z","9.0.0-canary.2fbba2554.0":"2020-11-30T17:39:34.210Z","9.0.0-canary.6d8574fe1.0":"2020-11-30T17:50:40.132Z","9.0.0-canary.fd22355f7.0":"2020-11-30T22:58:45.685Z","9.0.0-canary.c4ab98722.0":"2020-12-02T00:55:42.955Z","9.0.0-canary.977585650.0":"2020-12-02T14:41:08.773Z","9.0.0-canary.c7edfc7b6.0":"2020-12-02T14:48:45.541Z","9.0.0-canary.4f3347306.0":"2020-12-02T15:06:42.514Z","9.0.0-canary.37fbae10d.0":"2020-12-02T18:15:38.247Z","9.0.0-canary.11da3c0db.0":"2020-12-02T20:21:33.519Z","9.0.0-canary.489d4c219.0":"2020-12-03T15:28:52.310Z","9.0.0-canary.6557a69d9.0":"2020-12-03T15:40:43.385Z","9.0.0-canary.4ea1b7c69.0":"2020-12-03T15:57:23.324Z","9.0.0-canary.eaeb78ce3.0":"2020-12-03T17:00:29.260Z","9.0.0-canary.1c156d69d.0":"2020-12-03T20:43:53.332Z","9.0.0-canary.832668d33.0":"2020-12-04T18:04:56.470Z","9.0.0-canary.4321323e4.0":"2020-12-07T11:28:11.516Z","9.0.0-canary.2d5f32d41.0":"2020-12-07T16:41:02.328Z","9.0.0-canary.8239afc64.0":"2020-12-07T19:48:37.632Z","9.0.0-canary.6871336f1.0":"2020-12-08T16:00:38.317Z","9.0.0-canary.9f718da94.0":"2020-12-08T16:12:20.703Z","9.0.0-canary.1fccb1418.0":"2020-12-08T16:27:28.579Z","9.0.0-canary.afb68894e.0":"2020-12-08T16:31:21.915Z","9.0.0-canary.fd88d40c2.0":"2020-12-08T16:44:21.417Z","9.0.0-canary.ba9e3109c.0":"2020-12-08T19:04:29.404Z","9.0.0-canary.1085c3b2d.0":"2020-12-09T19:10:10.659Z","9.0.0-canary.c5dda809d.0":"2020-12-09T20:48:51.031Z","9.0.0-canary.f5f1bd86a.0":"2020-12-09T21:07:01.310Z","9.0.0-canary.00f38200f.0":"2020-12-11T15:42:59.615Z","9.0.0-canary.ac41a5729.0":"2020-12-11T16:27:03.896Z","9.0.0-canary.7fe0e4f05.0":"2020-12-11T17:04:32.315Z","9.0.0-canary.9244508bd.0":"2020-12-11T19:06:05.618Z","9.0.0-canary.384a8eeb1.0":"2020-12-16T17:01:02.324Z","9.0.0-canary.eabf9d5c2.0":"2020-12-16T18:26:41.960Z","9.0.0-canary.30fdfd06e.0":"2020-12-16T19:06:36.029Z","9.0.0-canary.9590a8f90.0":"2020-12-22T17:41:09.094Z","9.0.0-canary.f89d8b8f2.0":"2020-12-22T23:04:07.533Z","9.0.0-canary.fb194dd35.0":"2020-12-28T20:44:51.624Z","9.0.0-canary.64f36e287.0":"2020-12-28T21:07:42.465Z","9.0.0-canary.b7bbe7022.0":"2020-12-29T18:47:03.110Z","9.0.0":"2020-12-29T19:45:09.196Z","10.0.0-canary.555aecce5.0":"2020-12-29T19:45:20.119Z","10.0.0-canary.776c18681.0":"2020-12-30T00:39:20.975Z","10.0.0-canary.671d72d95.0":"2020-12-30T20:10:59.205Z","10.0.0-canary.b4f5a1c9e.0":"2020-12-30T21:45:39.892Z","10.0.0-canary.a94bd8deb.0":"2020-12-30T22:03:30.738Z","10.0.0-canary.5d128511b.0":"2020-12-30T22:08:54.562Z","10.0.0-canary.365c69360.0":"2021-01-05T17:47:23.189Z","10.0.0-canary.700a8261a.0":"2021-01-05T20:59:37.707Z","10.0.0-canary.766981c15.0":"2021-01-05T22:39:19.248Z","10.0.0-canary.b28c576d9.0":"2021-01-05T22:49:11.347Z","10.0.0-canary.968735356.0":"2021-01-06T15:49:47.657Z","10.0.0-canary.c5e18b020.0":"2021-01-06T19:43:17.465Z","10.0.0-canary.bcff8a66a.0":"2021-01-06T20:25:06.027Z","10.0.0-canary.79328c9ff.0":"2021-01-07T02:33:20.564Z","10.0.0-canary.121e1f303.0":"2021-01-07T23:18:57.455Z","10.0.0-canary.abdd10065.0":"2021-01-08T17:50:41.248Z","10.0.0-canary.089de519c.0":"2021-01-08T22:19:49.894Z","10.0.0-canary.163119837.0":"2021-01-08T23:44:16.647Z","10.0.0-canary.b8a1a58e4.0":"2021-01-11T16:23:15.635Z","10.0.0-canary.7584267ff.0":"2021-01-12T01:11:17.068Z","10.0.0-canary.251ac04c0.0":"2021-01-12T19:54:06.956Z","10.0.0-canary.772cc1068.0":"2021-01-14T00:05:54.776Z","10.0.0-canary.fe13dd130.0":"2021-01-14T01:09:22.709Z","10.0.0-canary.c7c5da28f.0":"2021-01-14T01:33:06.405Z","10.0.0-canary.b2faa116a.0":"2021-01-19T19:25:42.453Z","10.0.0-canary.0c95c9f7b.0":"2021-01-19T22:52:59.072Z","10.0.0-canary.5268222c4.0":"2021-01-20T19:18:14.303Z","10.0.0-canary.2ed2d829b.0":"2021-01-20T23:07:08.724Z","10.0.0-canary.df00c2b30.0":"2021-01-21T19:53:56.674Z","10.0.0-canary.fd61b0476.0":"2021-01-21T20:08:40.232Z","10.0.0-canary.3fb3a0265.0":"2021-01-22T00:03:53.144Z","10.0.0-canary.07deaec27.0":"2021-01-22T16:55:27.006Z","10.0.0-canary.d2959b16c.0":"2021-01-22T18:51:15.659Z","10.0.0-canary.75f3bfe7c.0":"2021-01-22T22:50:29.051Z","10.0.0-canary.b9adb7a0f.0":"2021-01-22T23:34:19.623Z","10.0.0-canary.d29ec2862.0":"2021-01-25T16:22:39.118Z","10.0.0-canary.96be07c68.0":"2021-01-26T00:09:00.479Z","10.0.0-canary.e383944e9.0":"2021-01-26T01:44:08.592Z","10.0.0-canary.623af861e.0":"2021-01-26T03:44:25.410Z","10.0.0-canary.6863fd43a.0":"2021-01-26T21:31:49.116Z","10.0.0-canary.ea55b87ca.0":"2021-01-26T23:44:52.348Z","10.0.0-canary.e902ff05f.0":"2021-01-27T00:03:06.055Z","10.0.0-canary.2c9fc538a.0":"2021-01-27T00:26:19.969Z","10.0.0-canary.6bf56aaa4.0":"2021-01-27T01:19:05.880Z","10.0.0-canary.994873795.0":"2021-01-27T14:50:06.187Z","10.0.0-canary.96878e1d0.0":"2021-01-27T18:01:08.469Z","10.0.0-canary.3c117cdcc.0":"2021-01-27T18:31:19.758Z","10.0.0-canary.b411e7033.0":"2021-01-27T22:02:35.604Z","10.0.0-canary.a9ac16b4a.0":"2021-01-27T23:02:29.344Z","10.0.0-canary.fec7b42ca.0":"2021-01-28T19:13:43.249Z","10.0.0-canary.8e66dbfee.0":"2021-02-01T23:19:29.607Z","10.0.0-canary.637d15da6.0":"2021-02-02T18:48:03.992Z","10.0.0-canary.fb793939e.0":"2021-02-02T23:41:34.977Z","10.0.0-canary.15a4d40dd.0":"2021-02-03T02:17:42.156Z","10.0.0-canary.7a003acf0.0":"2021-02-04T02:33:03.189Z","10.0.0-canary.05f249666.0":"2021-02-04T17:49:08.635Z","10.0.0-canary.1a3a39629.0":"2021-02-04T18:42:12.071Z","10.0.0-canary.8b1cdb1be.0":"2021-02-04T22:33:45.281Z","10.0.0-canary.8271f00f7.0":"2021-02-04T22:59:43.515Z","10.0.0-canary.533092a90.0":"2021-02-05T03:45:53.270Z","11.0.0-canary.633a9fc7a.0":"2021-02-05T16:16:21.826Z","10.0.0":"2021-02-05T16:17:38.910Z","11.0.0-canary.b5227247d.0":"2021-02-05T17:41:03.217Z","11.0.0-canary.95322b11e.0":"2021-02-05T23:30:46.215Z","11.0.0-canary.1f318ff0f.0":"2021-02-06T00:03:58.450Z","11.0.0-canary.ab12cf7a3.0":"2021-02-08T15:02:05.788Z","11.0.0-canary.98db2c5ec.0":"2021-02-08T15:33:03.119Z","11.0.0-canary.1f86b9f6d.0":"2021-02-08T17:16:10.455Z","11.0.0-canary.aac8f5d9a.0":"2021-02-08T17:59:16.563Z","11.0.0-canary.750e18fc7.0":"2021-02-08T21:40:23.571Z","11.0.0-canary.b62b1266d.0":"2021-02-09T21:51:33.127Z","11.0.0-canary.a6b3101fb.0":"2021-02-11T23:15:53.264Z","11.0.0-canary.ed88df700.0":"2021-02-12T00:05:41.844Z","11.0.0-canary.d30efe6b4.0":"2021-02-12T02:40:57.082Z","11.0.0-canary.0393bdc4b.0":"2021-02-12T04:29:48.950Z","11.0.0-canary.7cd26af4d.0":"2021-02-12T15:58:24.388Z","11.0.0-canary.71fe9a067.0":"2021-02-12T16:29:41.015Z","11.0.0-canary.0fd56a86b.0":"2021-02-13T00:10:48.286Z","11.0.0-canary.f19bbc4af.0":"2021-02-16T22:15:11.352Z","11.0.0-canary.f9cac96cc.0":"2021-02-17T16:08:37.072Z","11.0.0-canary.79ce0878b.0":"2021-02-17T19:23:55.438Z","11.0.0-canary.d6e507b5b.0":"2021-02-17T19:57:10.600Z","11.0.0-canary.f2658381b.0":"2021-02-17T22:43:38.568Z","11.0.0-canary.97c4d4035.0":"2021-02-18T02:34:04.364Z","11.0.0-canary.f5bb4648c.0":"2021-02-18T16:03:59.261Z","11.0.0-canary.302c7a960.0":"2021-02-18T18:36:38.352Z","11.0.0-canary.aa0aaf026.0":"2021-02-18T19:22:03.997Z","11.0.0-canary.07ff0c452.0":"2021-02-18T19:41:33.064Z","11.0.0-canary.bed7ecd3e.0":"2021-02-18T23:26:36.596Z","11.0.0-canary.06dead2d6.0":"2021-02-19T00:35:57.765Z","11.0.0-canary.cddb03553.0":"2021-02-19T03:12:12.878Z","11.0.0-canary.d6d8d0476.0":"2021-02-19T05:35:29.905Z","11.0.0-canary.0b4a4b2eb.0":"2021-02-19T15:44:39.379Z","11.0.0-canary.3201cae47.0":"2021-02-19T22:59:35.835Z","11.0.0-canary.f1b1fd5d3.0":"2021-02-22T19:48:23.032Z","11.0.0-canary.7899e0fe0.0":"2021-02-22T22:44:50.050Z","11.0.0-canary.f19c86d13.0":"2021-02-22T23:29:36.526Z","11.0.0-canary.60e892d79.0":"2021-02-23T01:12:34.612Z","11.0.0-canary.c96bfa495.0":"2021-02-23T19:31:46.207Z","11.0.0-canary.fa9b59f67.0":"2021-02-23T19:32:59.585Z","11.0.0-canary.869e3497c.0":"2021-02-23T19:33:37.703Z","11.0.0-canary.8ecd7c9a9.0":"2021-02-23T19:49:36.517Z","11.0.0-canary.9c85d505b.0":"2021-02-23T22:14:29.886Z","11.0.0-canary.9f2e85fb8.0":"2021-02-24T01:46:37.350Z","11.0.0-canary.19c4f29ef.0":"2021-02-25T19:21:19.292Z","11.0.0-canary.63df6e9bf.0":"2021-02-25T19:36:10.818Z","11.0.0-canary.981ad970a.0":"2021-02-26T00:06:16.993Z","11.0.0-canary.f9c9e39d6.0":"2021-02-26T18:37:49.614Z","11.0.0-canary.c97d7d881.0":"2021-03-01T20:52:09.657Z","11.0.0-canary.bf670dad7.0":"2021-03-03T00:19:51.229Z","11.0.0-canary.c7d98fcde.0":"2021-03-03T20:30:37.694Z","11.0.0-canary.4fef8bc1e.0":"2021-03-03T23:23:08.773Z","11.0.0-canary.afae3a3ec.0":"2021-03-03T23:41:19.673Z","11.0.0-canary.0a0b10f22.0":"2021-03-03T23:59:39.227Z","11.0.0-canary.6f678a91a.0":"2021-03-04T18:38:58.994Z","11.0.0-canary.f5f1b613c.0":"2021-03-04T20:48:20.300Z","11.0.0-canary.606e767ef.0":"2021-03-04T21:44:15.143Z","11.0.0-canary.f77a4dd1a.0":"2021-03-06T04:38:47.344Z","11.0.0-canary.2d6ba2c23.0":"2021-03-08T22:43:09.835Z","11.0.0-canary.7522dcaca.0":"2021-03-09T00:26:27.185Z","11.0.0-canary.5c0ab7401.0":"2021-03-09T22:51:21.990Z","11.0.0-canary.59010b6dc.0":"2021-03-10T16:55:53.233Z","11.0.0-canary.9e52f5544.0":"2021-03-10T23:23:58.935Z","11.0.0-canary.a678806f5.0":"2021-03-11T01:48:49.850Z","11.0.0-canary.b2d22df5b.0":"2021-03-11T17:01:34.071Z","11.0.0-canary.81911b707.0":"2021-03-11T18:22:04.705Z","11.0.0-canary.9eeb35c38.0":"2021-03-11T19:35:38.007Z","11.0.0-canary.12be3e95a.0":"2021-03-11T20:00:20.698Z","11.0.0-canary.e683bdf4a.0":"2021-03-11T20:07:31.793Z","11.0.0-canary.a07b6d486.0":"2021-03-11T20:31:50.231Z","11.0.0-canary.1e0653477.0":"2021-03-11T20:39:17.093Z","11.0.0-canary.148e8cfcc.0":"2021-03-11T22:43:08.427Z","11.0.0-canary.73a227194.0":"2021-03-12T00:22:38.779Z","11.0.0-canary.f8579b7ea.0":"2021-03-13T02:01:26.867Z","11.0.0-canary.d2a39d300.0":"2021-03-16T00:33:42.613Z","11.0.0-canary.7cf67823e.0":"2021-03-16T18:18:56.537Z","11.0.0-canary.67d780c79.0":"2021-03-16T19:46:37.312Z","11.0.0-canary.0f358ddae.0":"2021-03-16T22:11:03.680Z","11.0.0-canary.67eb0df80.0":"2021-03-16T22:38:21.464Z","11.0.0-canary.941ca3b3c.0":"2021-03-16T22:40:09.757Z","11.0.0-canary.3344d12ad.0":"2021-03-17T10:00:42.196Z","11.0.0-canary.6072ed604.0":"2021-03-17T22:58:20.778Z","11.0.0-canary.d3a6862af.0":"2021-03-18T16:18:36.734Z","11.0.0-canary.40dd242d5.0":"2021-03-18T21:16:00.577Z","11.0.0-canary.ec8f8465f.0":"2021-03-18T21:42:53.833Z","11.0.0-canary.da38969ec.0":"2021-03-18T22:16:39.654Z","11.0.0-canary.f5246264d.0":"2021-03-19T00:36:35.712Z","11.0.0-canary.03d34bbad.0":"2021-03-19T00:49:45.178Z","11.0.0-canary.cbc57c600.0":"2021-03-19T00:58:33.989Z","11.0.0-canary.d6c5bcf37.0":"2021-03-19T01:10:37.782Z","11.0.0-canary.fefc668d7.0":"2021-03-19T01:32:35.372Z","11.0.0-canary.faa7d3226.0":"2021-03-19T17:42:44.538Z","11.0.0-canary.c60449bc8.0":"2021-03-19T18:03:54.020Z","11.0.0-canary.5f0fc444a.0":"2021-03-19T18:36:30.042Z","11.0.0-canary.4567a750d.0":"2021-03-20T02:06:25.746Z","11.0.0-canary.0cde52f5a.0":"2021-03-23T00:01:40.376Z","11.0.0-canary.48f4b67fb.0":"2021-03-23T19:52:29.661Z","11.0.0-canary.0b8cff734.0":"2021-03-23T20:03:26.940Z","11.0.0-canary.8943b991f.0":"2021-03-23T20:28:21.965Z","11.0.0-canary.3955d8d3d.0":"2021-03-24T19:15:04.957Z","11.0.0-canary.23ea2d85e.0":"2021-03-25T17:31:08.531Z","11.0.0-canary.e3ec22f45.0":"2021-03-25T17:54:12.987Z","11.0.0-canary.4ceb42220.0":"2021-03-26T07:56:10.583Z","11.0.0-canary.dc9c84023.0":"2021-03-30T17:47:20.708Z","11.0.0-canary.56fc26962.0":"2021-03-31T00:19:50.827Z","11.0.0-canary.bc318250e.0":"2021-03-31T01:32:35.312Z","11.0.0-canary.edaee19aa.0":"2021-03-31T02:10:36.979Z","11.0.0-canary.24609b822.0":"2021-03-31T20:56:05.544Z","11.0.0-canary.b6cddc2b7.0":"2021-04-01T15:03:56.749Z","11.0.0-canary.94937c78c.0":"2021-04-01T20:59:38.705Z","11.0.0-canary.e7202cb57.0":"2021-04-01T22:46:14.834Z","11.0.0-canary.1f636b205.0":"2021-04-02T22:22:58.212Z","11.0.0-canary.94f50b260.0":"2021-04-05T15:03:56.330Z","11.0.0-canary.a4009b80a.0":"2021-04-05T21:59:23.789Z","11.0.0-canary.15604bd0d.0":"2021-04-05T22:41:09.691Z","11.0.0-canary.76da7876c.0":"2021-04-07T01:43:26.508Z","11.0.0-canary.6bcb6cbd2.0":"2021-04-07T18:52:50.517Z","11.0.0-canary.c91e8d141.0":"2021-04-07T18:56:47.143Z","11.0.0-canary.f77c50860.0":"2021-04-08T15:34:41.883Z","11.0.0-canary.367d88bdb.0":"2021-04-08T16:37:36.791Z","11.0.0-canary.0ec437d3b.0":"2021-04-08T19:34:26.406Z","11.0.0-canary.b2fa996a1.0":"2021-04-09T15:10:00.657Z","11.0.0-canary.24255c408.0":"2021-04-09T20:11:14.719Z","11.0.0-canary.7d6a4bb72.0":"2021-04-09T22:52:40.018Z","11.0.0-canary.352b295c1.0":"2021-04-12T18:14:36.129Z","11.0.0-canary.ab99b8064.0":"2021-04-13T14:42:23.688Z","11.0.0-canary.8f0a11e32.0":"2021-04-14T20:02:05.765Z","11.0.0-canary.f5c6db8fc.0":"2021-04-15T18:03:04.120Z","11.0.0-canary.3793a3143.0":"2021-04-15T18:30:14.299Z","11.0.0-canary.bc104bae7.0":"2021-04-15T19:45:12.733Z","12.0.0-canary.3f342c3f4.0":"2021-04-15T22:53:20.080Z","11.0.0":"2021-04-15T22:57:24.353Z","12.0.0-canary.2ebfc5374.0":"2021-04-16T20:44:00.834Z","12.0.0-canary.5631828e1.0":"2021-04-17T07:45:57.444Z","12.0.0-canary.bd685395b.0":"2021-04-19T18:40:25.127Z","12.0.0-canary.b52196498.0":"2021-04-19T19:56:59.563Z","12.0.0-canary.8ba3e298c.0":"2021-04-21T14:07:35.413Z","12.0.0-canary.c629eab71.0":"2021-04-21T19:55:59.321Z","12.0.0-canary.8ace3b810.0":"2021-04-21T20:36:55.546Z","12.0.0-canary.70beaf42d.0":"2021-04-21T20:48:33.550Z","12.0.0-canary.cad489689.0":"2021-04-22T16:48:26.881Z","12.0.0-canary.d928692b5.0":"2021-04-23T17:33:31.417Z","12.0.0-canary.8f68de8f3.0":"2021-04-23T18:12:00.935Z","12.0.0-canary.05753cf77.0":"2021-04-23T23:42:15.480Z","12.0.0-canary.ef43e6d96.0":"2021-04-23T23:48:33.921Z","12.0.0-canary.197f64fa2.0":"2021-04-26T17:08:40.835Z","12.0.0-canary.55ad2d7d8.0":"2021-04-27T01:18:55.097Z","12.0.0-canary.ec4ac5234.0":"2021-04-27T07:57:43.711Z","12.0.0-canary.b0579acdb.0":"2021-04-27T08:35:16.570Z","12.0.0-canary.81e2d4ff3.0":"2021-04-27T20:56:33.798Z","12.0.0-canary.c8edee52c.0":"2021-04-27T21:45:04.050Z","12.0.0-canary.f5b6110d6.0":"2021-04-27T22:06:35.152Z","12.0.0-canary.cee9b9e22.0":"2021-04-28T00:11:49.813Z","12.0.0-canary.96e83fca7.0":"2021-04-28T02:47:00.712Z","12.0.0-canary.4c497bd19.0":"2021-04-28T17:52:38.352Z","12.0.0-canary.105b15b96.0":"2021-04-28T21:43:48.168Z","12.0.0-canary.6e20259e3.0":"2021-04-28T21:48:22.335Z","12.0.0-canary.0f79a5d74.0":"2021-04-28T22:42:05.826Z","12.0.0-canary.84f3db9ed.0":"2021-04-29T14:16:48.924Z","12.0.0-canary.8fc29273c.0":"2021-04-29T21:22:28.031Z","12.0.0-canary.c50d20bab.0":"2021-04-29T23:00:57.310Z","12.0.0-canary.474836ad0.0":"2021-05-01T03:36:47.831Z","12.0.0-canary.f5ad92287.0":"2021-05-03T18:21:26.654Z","12.0.0-canary.af453daf8.0":"2021-05-03T18:52:31.192Z","12.0.0-canary.1f1918c24.0":"2021-05-03T19:21:38.307Z","12.0.0-canary.33148231f.0":"2021-05-03T19:37:56.510Z","12.0.0-canary.06b76fa74.0":"2021-05-03T19:45:01.420Z","12.0.0-canary.7c5000473.0":"2021-05-03T22:40:45.639Z","12.0.0-canary.de997644b.0":"2021-05-04T17:27:21.645Z","12.0.0-canary.d4d7f1cc2.0":"2021-05-04T17:54:03.390Z","12.0.0-canary.be999eb08.0":"2021-05-04T17:59:20.400Z","12.0.0-canary.eda1705fc.0":"2021-05-04T19:09:26.685Z","12.0.0-canary.718c90178.0":"2021-05-04T19:26:44.483Z","12.0.0-canary.0e3917299.0":"2021-05-04T19:29:34.821Z","12.0.0-canary.836b3c7db.0":"2021-05-04T20:32:55.618Z","12.0.0-canary.53d4e6d59.0":"2021-05-04T20:48:39.353Z","12.0.0-canary.18d147e27.0":"2021-05-04T20:57:12.288Z","12.0.0-canary.b9984794e.0":"2021-05-04T23:02:09.968Z","12.0.0-canary.b76f5fc9d.0":"2021-05-04T23:05:39.559Z","12.0.0-canary.055d4f10a.0":"2021-05-04T23:20:46.694Z","12.0.0-canary.5b6a46016.0":"2021-05-05T16:15:25.936Z","12.0.0-canary.33c9a737a.0":"2021-05-05T17:26:18.319Z","12.0.0-canary.9bc0effaf.0":"2021-05-05T20:59:05.819Z","12.0.0-canary.a1e0f2af5.0":"2021-05-05T21:40:03.436Z","12.0.0-canary.06930c96b.0":"2021-05-05T23:38:19.389Z","12.0.0-canary.03f525f9f.0":"2021-05-06T00:29:03.523Z","12.0.0-canary.e82ba2a26.0":"2021-05-06T15:55:20.081Z","12.0.0-canary.fc7c4e5ce.0":"2021-05-06T17:28:24.261Z","12.0.0-canary.65c04514d.0":"2021-05-06T18:42:18.119Z","12.0.0-canary.c97779ca6.0":"2021-05-06T21:41:58.387Z","12.0.0-canary.869d890d4.0":"2021-05-07T15:17:44.160Z","12.0.0-canary.ec22e1da9.0":"2021-05-10T18:22:40.277Z","12.0.0-nightly.7427449f0.0":"2021-05-10T18:44:48.457Z","12.0.0-canary.957cc3bf5.0":"2021-05-10T21:55:52.977Z","12.0.0-canary.88a33cd70.0":"2021-05-11T00:08:04.907Z","12.0.0-canary.d20dc6dba.0":"2021-05-11T00:23:49.685Z","12.0.0-canary.0ce2fdb02.0":"2021-05-11T00:57:44.231Z","12.0.0-canary.cb162da37.0":"2021-05-11T01:57:25.422Z","12.0.0-canary.573dc7ffd.0":"2021-05-11T02:16:26.975Z","12.0.0-canary.d5f6ad3fe.0":"2021-05-11T23:21:43.586Z","12.0.0-canary.25751d2ed.0":"2021-05-12T16:18:49.827Z","12.0.0-canary.a23ecb682.0":"2021-05-12T18:22:18.748Z","12.0.0-canary.33a954852.0":"2021-05-13T15:06:43.012Z","12.0.0-canary.a4484849b.0":"2021-05-13T15:30:03.170Z","12.0.0-canary.b4c3f513e.0":"2021-05-13T16:06:58.025Z","12.0.0-canary.1a8d06483.0":"2021-05-13T16:12:50.783Z","12.0.0-canary.8e6081836.0":"2021-05-14T21:39:49.405Z","12.0.0-canary.a2b0f4cee.0":"2021-05-14T21:53:00.650Z","12.0.0-canary.e8e39ad19.0":"2021-05-18T20:12:18.878Z","12.0.0-canary.4bb5eea2b.0":"2021-05-19T15:27:28.054Z","12.0.0-canary.ccce99cd6.0":"2021-05-20T00:55:58.212Z","12.0.0-canary.14767a8db.0":"2021-05-20T20:50:05.302Z","12.0.0-canary.22c6dcff9.0":"2021-05-24T15:17:44.889Z","12.0.0-canary.fadab3372.0":"2021-05-24T16:04:48.972Z","12.0.0-canary.caa73aeee.0":"2021-05-25T14:13:29.965Z","12.0.0-canary.ec31ae1ed.0":"2021-05-25T20:34:34.286Z","12.0.0-canary.8530d3514.0":"2021-05-27T16:03:58.751Z","12.0.0-canary.00b5899dc.0":"2021-06-01T22:44:46.597Z","12.0.0-canary.f1525ea3e.0":"2021-06-03T13:53:28.223Z","12.0.0-canary.464a00286.0":"2021-06-03T14:44:51.207Z","12.0.0-canary.474de7878.0":"2021-06-03T15:13:26.228Z","12.0.0-canary.b87ebf74d.0":"2021-06-03T17:45:33.050Z","12.0.0-canary.2daa49b35.0":"2021-06-04T16:13:19.286Z","12.0.0-canary.08db3d737.0":"2021-06-04T19:40:52.809Z","12.0.0-canary.5823407a7.0":"2021-06-08T00:47:23.180Z","12.0.0-canary.23b0c5e22.0":"2021-06-08T16:21:21.932Z","12.0.0-canary.2952c6a76.0":"2021-06-08T17:39:57.950Z","12.0.0-canary.f12425f88.0":"2021-06-10T01:05:01.953Z","12.0.0-canary.e543628c3.0":"2021-06-10T01:06:05.023Z","12.0.0-canary.e0c346286.0":"2021-06-10T16:35:00.321Z","12.0.0-canary.f43af5633.0":"2021-06-10T20:34:54.887Z","12.0.0-canary.8415ae585.0":"2021-06-11T16:04:54.844Z","12.0.0-canary.598fcccc8.0":"2021-06-11T21:45:36.443Z","12.0.0-canary.5d0605188.0":"2021-06-14T17:38:18.488Z","12.0.0-canary.f147a2271.0":"2021-06-14T19:17:14.789Z","12.0.0-canary.33579e00b.0":"2021-06-15T00:21:02.803Z","12.0.0-canary.a6909c0e6.0":"2021-06-15T18:29:18.819Z","12.0.0-canary.c18b5925b.0":"2021-06-15T21:02:39.897Z","12.0.0-canary.7ea2e830d.0":"2021-06-15T22:49:54.131Z","12.0.0-canary.271fff902.0":"2021-06-15T22:50:15.980Z","12.0.0-canary.d96f0a1e0.0":"2021-06-16T21:05:14.859Z","12.0.0-canary.a6183801a.0":"2021-06-16T22:04:29.839Z","12.0.0-canary.940550232.0":"2021-06-17T19:39:13.092Z","12.0.0-canary.f705e8048.0":"2021-06-18T15:23:33.046Z","12.0.0-canary.08d791f37.0":"2021-06-18T21:10:49.314Z","12.0.0-canary.e38d7440f.0":"2021-06-21T17:39:31.217Z","12.0.0-canary.75900a5a9.0":"2021-06-21T18:35:50.997Z","12.0.0-canary.33e6f50e9.0":"2021-06-23T00:11:05.743Z","12.0.0-canary.8c685301d.0":"2021-06-23T18:23:42.030Z","12.0.0-canary.8c7d994ae.0":"2021-06-23T19:26:34.621Z","12.0.0-canary.4ccd39bdd.0":"2021-06-24T16:13:57.337Z","12.0.0-canary.17553e9f8.0":"2021-06-28T22:51:35.504Z","12.0.0-canary.4c80072fd.0":"2021-06-29T18:39:59.558Z","12.0.0-canary.796811db7.0":"2021-07-01T00:02:29.576Z","12.0.0-canary.70e1efdca.0":"2021-07-01T17:05:33.627Z","12.0.0-canary.435866d32.0":"2021-07-02T18:20:22.409Z","12.0.0-canary.d0f9f3f2e.0":"2021-07-02T23:59:09.428Z","12.0.0-canary.adeac0549.0":"2021-07-08T15:08:18.859Z","12.0.0-canary.068fd5028.0":"2021-07-08T19:02:42.132Z","12.0.0-canary.5dfec7a14.0":"2021-07-12T20:03:22.024Z","12.0.0-canary.07a73750c.0":"2021-07-12T20:24:34.098Z","12.0.0-canary.3e4c6dca1.0":"2021-07-13T01:50:17.269Z","12.0.0-canary.ea77795b1.0":"2021-07-13T15:48:18.114Z","12.0.0-canary.15a179fad.0":"2021-07-13T18:08:15.433Z","12.0.0-canary.c73142a1b.0":"2021-07-13T18:43:21.996Z","12.0.0-canary.d923db73a.0":"2021-07-13T20:53:04.369Z","12.0.0-canary.22d29cbb4.0":"2021-07-13T22:49:34.928Z","12.0.0-canary.2749604bc.0":"2021-07-14T16:21:25.147Z","12.0.0-canary.e1703bed9.0":"2021-07-14T21:47:09.439Z","12.0.0-canary.de48eff0d.0":"2021-07-15T17:07:12.704Z","12.0.0-canary.4f060adc5.0":"2021-07-15T19:21:02.595Z","12.0.0-canary.bd25779b2.0":"2021-07-15T20:41:26.052Z","12.0.0-canary.9f68a932e.0":"2021-07-15T22:06:12.748Z","12.0.0-canary.4eecdeaf0.0":"2021-07-16T14:57:00.353Z","12.0.0-canary.7239684d4.0":"2021-07-16T15:58:12.674Z","12.0.0-canary.d5f1f7c72.0":"2021-07-16T16:13:05.621Z","12.0.0-canary.4d95812f9.0":"2021-07-16T19:42:17.996Z","12.0.0-canary.38d1846cc.0":"2021-07-19T18:41:00.969Z","12.0.0-canary.3f691eccf.0":"2021-07-20T16:07:51.946Z","12.0.0-canary.ebb5c73bb.0":"2021-07-20T16:55:59.058Z","12.0.0-nightly.778a0e8a.0":"2021-07-20T21:04:39.594Z","12.0.0-canary.791311bba.0":"2021-07-20T22:06:41.028Z","12.0.0-canary.85e9a6ac3.0":"2021-07-21T15:35:07.514Z","12.0.0-canary.6b0442278.0":"2021-07-21T18:49:01.430Z","12.0.0-canary.5f00e454a.0":"2021-07-22T17:05:31.408Z","12.0.0-canary.90e08fc6b.0":"2021-07-22T23:37:31.503Z","12.0.0-canary.cf5b9eb86.0":"2021-07-23T18:11:25.939Z","12.0.0-canary.3f36ac75c.0":"2021-07-23T18:31:26.193Z","12.0.0-canary.ea1e1b850.0":"2021-07-24T20:54:58.613Z","12.0.0-canary.22f390c43.0":"2021-07-27T18:59:02.924Z","12.0.0":"2021-07-27T19:49:02.203Z","13.0.0-canary.ae85f7eba.0":"2021-07-27T19:50:34.208Z","13.0.0-canary.5981207f7.0":"2021-07-27T23:17:21.787Z","13.0.0-canary.83bdd0222.0":"2021-07-28T17:24:56.591Z","13.0.0-canary.28656298a.0":"2021-07-29T18:12:17.549Z","13.0.0-canary.9e797daaf.0":"2021-07-29T18:34:32.447Z","13.0.0-canary.adb9f1ad8.0":"2021-07-30T19:04:04.238Z","13.0.0-canary.cc5377458.0":"2021-07-30T21:32:36.847Z","13.0.0-canary.a395972cf.0":"2021-08-03T21:22:31.849Z","13.0.0-canary.7c96e6b98.0":"2021-08-03T22:13:05.498Z","13.0.0-canary.a80c8b2c2.0":"2021-08-04T23:58:56.796Z","13.0.0-canary.3dd611091.0":"2021-08-05T03:55:29.468Z","13.0.0-canary.5dee37ff6.0":"2021-08-05T17:41:26.337Z","13.0.0-canary.bf405d22a.0":"2021-08-05T20:17:17.356Z","13.0.0-canary.b47dd37a6.0":"2021-08-05T20:49:08.014Z","13.0.0-canary.6c82b965b.0":"2021-08-06T16:14:02.555Z","13.0.0-canary.4ca11fe76.0":"2021-08-06T17:06:35.241Z","13.0.0-canary.510cf90f2.0":"2021-08-09T17:16:27.395Z","13.0.0-canary.17580ebf7.0":"2021-08-09T18:16:27.896Z","13.0.0-canary.7249a3060.0":"2021-08-09T18:20:45.355Z","13.0.0-canary.4c405863b.0":"2021-08-10T17:39:57.927Z","13.0.0-canary.f4241a42a.0":"2021-08-11T16:58:35.892Z","13.0.0-canary.0ad12ed3c.0":"2021-08-11T21:28:01.223Z","13.0.0-canary.077dcfcfe.0":"2021-08-12T17:54:32.298Z","13.0.0-canary.e3346766f.0":"2021-08-13T19:44:27.577Z","13.0.0-canary.2fb068fb0.0":"2021-08-13T19:47:44.363Z","13.0.0-canary.fb76c5069.0":"2021-08-16T20:07:21.140Z","13.0.0-canary.457d89aad.0":"2021-08-17T15:21:00.012Z","13.0.0-canary.0de2f2edc.0":"2021-08-17T20:53:26.841Z","13.0.0-canary.1f9259b9d.0":"2021-08-17T22:13:18.352Z","13.0.0-canary.3b9290351.0":"2021-08-18T05:22:34.445Z","13.0.0-canary.43d2eed2a.0":"2021-08-18T16:01:24.170Z","13.0.0-canary.0a9069300.0":"2021-08-19T16:16:50.716Z","13.0.0-canary.7da413ed8.0":"2021-08-20T15:47:48.550Z","13.0.0-canary.e1e69fd8e.0":"2021-08-20T19:31:33.228Z","13.0.0-canary.f5afc16df.0":"2021-08-20T20:25:52.150Z","13.0.0-canary.28d0d75bb.0":"2021-08-20T22:19:38.489Z","13.0.0-canary.21ece5360.0":"2021-08-20T23:43:28.693Z","13.0.0-canary.8de07c02a.0":"2021-08-23T15:25:51.590Z","13.0.0-canary.65aa63b0c.0":"2021-08-24T15:27:41.254Z","13.0.0-canary.15981e9d9.0":"2021-08-24T16:16:19.364Z","13.0.0-canary.fa7520f62.0":"2021-08-24T22:27:08.794Z","13.0.0-canary.ce25bc3ec.0":"2021-08-24T22:47:36.457Z","13.0.0-canary.12f5622e1.0":"2021-08-24T23:17:23.476Z","13.0.0-canary.d97f8f133.0":"2021-08-25T18:32:28.659Z","13.0.0-canary.d86fb6fac.0":"2021-08-25T18:53:05.908Z","13.0.0-canary.e8554dbbf.0":"2021-08-25T21:58:36.208Z","13.0.0-canary.877e3fb0d.0":"2021-08-26T15:37:15.559Z","13.0.0-canary.6236f3576.0":"2021-08-26T16:04:57.635Z","13.0.0-canary.1d19158a1.0":"2021-08-26T17:08:09.705Z","13.0.0-canary.6adc9e83f.0":"2021-08-30T22:43:34.234Z","13.0.0-canary.d082790f0.0":"2021-09-01T21:53:34.838Z","13.0.0-canary.e2c4f0196.0":"2021-09-02T02:10:25.784Z","13.0.0-canary.611db508e.0":"2021-09-02T03:14:09.557Z","13.0.0-canary.d4706933f.0":"2021-09-02T15:36:56.469Z","13.0.0-canary.c16fe03ce.0":"2021-09-02T17:44:00.621Z","13.0.0-canary.9203a958a.0":"2021-09-02T23:45:39.665Z","13.0.0-canary.fddd5ae93.0":"2021-09-03T07:29:10.086Z","13.0.0-canary.117599a8b.0":"2021-09-03T07:30:35.206Z","13.0.0-canary.e4180d07b.0":"2021-09-03T07:31:05.278Z","13.0.0-canary.42d175efc.0":"2021-09-03T15:42:06.372Z","13.0.0-canary.72464476c.0":"2021-09-07T15:33:21.400Z","13.0.0-canary.37d4db866.0":"2021-09-09T14:32:35.935Z","13.0.0-canary.6df682e74.0":"2021-09-09T15:42:24.881Z","13.0.0-canary.b49359c35.0":"2021-09-09T17:34:44.087Z","13.0.0-canary.470bd34e8.0":"2021-09-09T18:00:09.869Z","13.0.0-canary.d48a01771.0":"2021-09-09T18:09:31.924Z","13.0.0-canary.13db34b34.0":"2021-09-09T18:24:30.954Z","13.0.0-canary.864798678.0":"2021-09-09T18:35:58.713Z","13.0.0-canary.d04bda3fb.0":"2021-09-10T15:20:41.216Z","13.0.0-canary.5533f73d3.0":"2021-09-13T23:02:51.162Z","13.0.0-canary.08398f880.0":"2021-09-13T23:33:33.263Z","13.0.0-canary.818f4ee93.0":"2021-09-15T17:49:28.030Z","13.0.0-canary.8355e14dc.0":"2021-09-15T19:11:25.879Z","13.0.0-canary.d4e16a6c4.0":"2021-09-15T21:58:13.487Z","13.0.0-canary.65125b3a6.0":"2021-09-16T21:16:31.425Z","13.0.0-canary.80a583365.0":"2021-09-17T20:35:01.749Z","13.0.0-canary.83900936a.0":"2021-09-17T23:23:36.060Z","13.0.0-canary.860ad06a1.0":"2021-09-17T23:35:14.528Z","13.0.0-canary.3b8d4429e.0":"2021-09-20T17:46:47.496Z","13.0.0-canary.2da3606b9.0":"2021-09-20T19:36:59.449Z","13.0.0-canary.e8c598d1e.0":"2021-09-20T21:11:08.073Z","13.0.0-canary.1340ee9f7.0":"2021-09-22T17:57:10.364Z","13.0.0-canary.65084baff.0":"2021-09-23T21:24:40.956Z","13.0.0-canary.c79aa0cdd.0":"2021-09-24T13:40:56.142Z","13.0.0":"2021-09-24T19:45:06.566Z","14.0.0-canary.198431fcd.0":"2021-09-24T19:45:50.787Z","14.0.0-canary.9a02b6ef8.0":"2021-09-25T13:10:18.175Z","14.0.0-canary.758ce31d9.0":"2021-09-27T17:28:31.589Z","14.0.0-canary.86b50ef74.0":"2021-09-28T17:42:13.583Z","14.0.0-canary.b2fe3528b.0":"2021-09-29T22:56:07.429Z","14.0.0-canary.586e740dd.0":"2021-09-30T16:30:29.897Z","14.0.0-canary.2ac92d766.0":"2021-10-05T19:27:43.881Z","14.0.0-canary.353ca7e9f.0":"2021-10-08T18:46:10.180Z","14.0.0-canary.c78ff0429.0":"2021-10-11T17:21:18.821Z","14.0.0-canary.261f2db59.0":"2021-10-20T16:58:53.385Z","14.0.0-canary.9803d2dc1.0":"2021-10-20T19:21:07.682Z","14.0.0-canary.348665978.0":"2021-10-21T14:49:52.359Z","14.0.0-canary.b2b979a8a.0":"2021-10-28T15:11:24.746Z","14.0.0-canary.1af7c1c4a.0":"2021-10-28T17:52:02.249Z","14.0.0-canary.4afd353cd.0":"2021-10-29T15:00:49.529Z","14.0.0-canary.a986df922.0":"2021-10-29T21:34:19.059Z","14.0.0-canary.c3cdff07b.0":"2021-11-09T19:05:11.346Z","14.0.0-canary.468392606.0":"2021-11-11T19:39:22.121Z","14.0.0-canary.828f9803b.0":"2021-11-11T19:50:06.858Z","14.0.0-canary.8795cba87.0":"2021-11-11T19:56:03.489Z","14.0.0-canary.cd7f8cace.0":"2021-11-11T19:57:41.017Z","14.0.0-canary.207230eb8.0":"2021-11-11T22:23:35.706Z","14.0.0-canary.991fb99f7.0":"2021-11-11T22:35:41.889Z","14.0.0-canary.15db4f164.0":"2021-11-12T17:29:04.090Z","14.0.0-canary.8fcad5a3c.0":"2021-11-12T19:13:04.706Z","14.0.0-canary.f81fb1d23.0":"2021-11-12T22:39:31.807Z","14.0.0-canary.783f6fd5a.0":"2021-11-16T05:49:03.103Z","14.0.0-canary.d57ec74c7.0":"2021-11-16T16:15:23.966Z","14.0.0-canary.554c71829.0":"2021-11-16T16:18:16.776Z","14.0.0-canary.3ef470efe.0":"2021-11-16T16:23:10.821Z","14.0.0-canary.61a28b2b5.0":"2021-11-17T18:58:19.723Z","14.0.0-canary.fae6c652d.0":"2021-11-18T16:24:03.027Z","14.0.0-canary.978a3b5bb.0":"2021-11-19T19:38:06.354Z","14.0.0-canary.e6f43cf44.0":"2021-11-22T17:34:11.557Z","14.0.0-canary.39cf14bc3.0":"2021-11-22T23:03:32.433Z","14.0.0-canary.93134d453.0":"2021-11-23T15:37:49.350Z","14.0.0-canary.bbd11268f.0":"2021-11-23T22:31:16.134Z","14.0.0-canary.3db9c4d3d.0":"2021-11-24T15:36:22.758Z","14.0.0-canary.78305b6d5.0":"2021-11-24T19:49:42.357Z","14.0.0-canary.43d08ba77.0":"2021-11-30T22:55:08.055Z","14.0.0-canary.17a072535.0":"2021-12-02T18:04:17.256Z","14.0.0-canary.5d809696c.0":"2021-12-08T17:43:20.703Z","14.0.0-canary.b6510c8c1.0":"2021-12-08T18:05:22.541Z","14.0.0-canary.f460e23da.0":"2021-12-10T15:24:21.084Z","14.0.0-canary.7d8ea4624.0":"2021-12-10T19:28:16.239Z","14.0.0-canary.8fffcb5dd.0":"2021-12-14T08:54:00.311Z","14.0.0-canary.21e1cb9be.0":"2021-12-14T19:38:54.134Z","14.0.0-canary.ba78e8724.0":"2021-12-15T22:11:57.340Z","14.0.0-canary.e3e073c00.0":"2021-12-20T21:08:46.990Z","14.0.0-canary.3366a71d7.0":"2021-12-22T12:31:25.477Z","14.0.0-canary.c047f7c19.0":"2022-01-05T16:44:45.914Z","14.0.0-canary.05db65ec0.0":"2022-01-06T17:13:11.747Z","14.0.0-canary.6ca8b8f85.0":"2022-01-07T15:59:54.130Z","14.0.0-canary.173ee7a7a.0":"2022-01-10T16:53:10.506Z","14.0.0-canary.b704e4dfc.0":"2022-01-10T18:31:57.959Z","14.0.0-canary.c14e977ee.0":"2022-01-11T15:48:28.455Z","14.0.0-canary.b094eaa4e.0":"2022-01-14T18:41:22.925Z","14.0.0-canary.390220e42.0":"2022-01-17T16:45:02.180Z","14.0.0-canary.4b5391f8b.0":"2022-01-19T23:51:49.319Z","14.0.0-canary.cef6bc623.0":"2022-01-20T00:16:24.850Z","14.0.0-canary.0379179c4.0":"2022-01-20T18:53:26.707Z","14.0.0-canary.e62f3dabf.0":"2022-01-21T23:02:24.506Z","14.0.0-canary.3e20c1de8.0":"2022-01-25T15:30:35.374Z","14.0.0-canary.9f9d928b2.0":"2022-01-27T18:12:09.629Z","14.0.0-canary.a2bcb065c.0":"2022-01-28T19:36:08.212Z","14.0.0-canary.4e66fb2e1.0":"2022-01-28T19:40:28.150Z","14.0.0-canary.9736ddce9.0":"2022-01-29T09:48:55.830Z","14.0.0-canary.cc4ed13cc.0":"2022-02-04T18:21:42.462Z","14.0.0-canary.dcba26fe1.0":"2022-02-04T21:56:10.994Z","14.0.0-canary.ec54d9046.0":"2022-02-07T15:45:29.943Z","14.0.0-canary.ea9b5b463.0":"2022-02-09T17:52:35.541Z","14.0.0-canary.96ea061c1.0":"2022-02-09T18:58:17.947Z","14.0.0-canary.e00181e59.0":"2022-02-10T20:05:35.912Z","14.0.0-canary.037285f9b.0":"2022-02-11T18:28:27.306Z","14.0.0-canary.1aaa68dda.0":"2022-02-16T19:47:59.648Z","14.0.0-canary.ab4aba1af.0":"2022-02-17T18:15:32.373Z","14.0.0-canary.e58552c6e.0":"2022-02-18T18:03:21.702Z","14.0.0-canary.868793776.0":"2022-02-22T19:34:29.656Z","14.0.0-canary.fdc37a445.0":"2022-02-28T18:45:24.113Z","14.0.0-canary.43c7d87dc.0":"2022-03-01T15:32:22.634Z","14.0.0-canary.23043acd0.0":"2022-03-02T20:26:43.559Z","14.0.0-canary.6505e61c5.0":"2022-03-03T19:59:30.071Z","14.0.0-canary.16c166154.0":"2022-03-08T23:21:36.151Z","14.0.0-canary.bdf1d3771.0":"2022-03-14T14:27:38.618Z","14.0.0-canary.cf4292778.0":"2022-03-15T00:28:51.555Z","14.0.0-canary.bbd43e0e0.0":"2022-03-16T20:49:21.217Z","14.0.0-canary.1b6afad86.0":"2022-03-16T21:02:53.437Z","14.0.0-canary.bdf9d4af9.0":"2022-03-16T21:17:09.022Z","14.0.0-canary.32b391398.0":"2022-03-17T17:58:26.612Z","14.0.0-canary.ae8a6a3a3.0":"2022-03-18T16:38:28.876Z","14.0.0-canary.cbd9358a6.0":"2022-03-18T22:51:17.232Z","14.0.0-canary.dcfe49c98.0":"2022-03-21T18:43:20.166Z","14.0.0-canary.f31a833fa.0":"2022-03-23T00:49:56.616Z","14.0.0-canary.4b92e210a.0":"2022-03-24T20:17:49.795Z","14.0.0-canary.a657abb61.0":"2022-03-24T20:39:13.583Z","14.0.0-canary.443f63f50.0":"2022-03-25T23:03:51.984Z","14.0.0-canary.eb382f318.0":"2022-03-29T17:34:12.283Z","14.0.0-canary.344d52823.0":"2022-03-29T18:42:30.726Z","14.0.0-canary.4e372fb49.0":"2022-04-07T20:32:08.915Z","14.0.0-canary.3e30054fb.0":"2022-04-13T22:13:26.307Z","14.0.0-canary.8c4da223a.0":"2022-04-19T15:23:25.834Z","14.0.0-canary.7de8965cc.0":"2022-04-19T20:22:39.041Z","14.0.0-canary.641ed0851.0":"2022-04-20T16:04:49.850Z","14.0.0-canary.e88f83024.0":"2022-04-20T17:46:54.979Z","14.0.0-canary.7321d6254.0":"2022-04-20T20:10:27.159Z","14.0.0-canary.3ab956515.0":"2022-04-25T15:01:04.638Z","14.0.0-canary.53b3cad2f.0":"2022-04-27T12:44:30.111Z","14.0.0":"2022-04-28T16:55:02.267Z","15.0.0-canary.432c815e5.0":"2022-04-28T16:56:09.884Z","15.0.0-canary.a0f01f669.0":"2022-05-06T20:13:52.534Z","15.0.0-canary.276cb39a4.0":"2022-05-06T21:30:42.631Z","15.0.0-canary.4fe98ed70.0":"2022-05-06T21:55:17.168Z","15.0.0-canary.58b130a3d.0":"2022-05-06T21:57:35.279Z","15.0.0-canary.ae278a2fe.0":"2022-05-09T15:23:31.452Z","15.0.0-canary.bebf5bfdf.0":"2022-05-11T02:39:33.151Z","15.0.0-canary.e6072cd6a.0":"2022-05-11T20:17:41.700Z","15.0.0-canary.5b40eb988.0":"2022-05-12T02:43:26.293Z","15.0.0-canary.6a61d62f6.0":"2022-05-12T20:25:56.432Z","15.0.0-canary.05930a453.0":"2022-05-13T18:46:42.483Z","15.0.0-canary.c0a11ef0d.0":"2022-05-18T22:00:17.643Z","15.0.0-canary.2f9b268c0.0":"2022-05-20T19:31:54.003Z","15.0.0-canary.7741345b8.0":"2022-05-20T20:01:59.777Z","15.0.0-canary.f807e793f.0":"2022-05-20T22:20:53.009Z","15.0.0-canary.9f53d4a8a.0":"2022-05-23T14:56:49.646Z","15.0.0-canary.77cf00e37.0":"2022-05-31T17:38:45.377Z","15.0.0-canary.3c7b844c2.0":"2022-06-07T22:20:09.168Z","15.0.0-canary.df47894db.0":"2022-06-13T17:07:48.921Z","15.0.0-canary.b18a873dc.0":"2022-06-14T06:29:05.098Z","15.0.0-canary.ba9c29637.0":"2022-06-14T18:56:45.018Z","15.0.0-canary.9bfd12f01.0":"2022-06-22T19:21:47.859Z","15.0.0-canary.764de225d.0":"2022-06-29T16:26:23.365Z","15.0.0-canary.31e517cea.0":"2022-07-01T18:27:45.247Z","15.0.0-canary.9ea4e8e9c.0":"2022-07-01T22:54:21.238Z","15.0.0-canary.cd5bafabb.0":"2022-07-06T17:53:44.800Z","15.0.0-canary.a02fe49d3.0":"2022-07-06T18:50:26.292Z","15.0.0-canary.826a3d8be.0":"2022-07-06T19:30:23.314Z","15.0.0-canary.ef276aa93.0":"2022-07-07T17:01:58.917Z","15.0.0-canary.59cf61d6b.0":"2022-07-07T17:30:45.983Z","15.0.0-canary.8647092f7.0":"2022-07-07T20:38:00.739Z","15.0.0-canary.02ecd4d85.0":"2022-07-11T16:38:30.164Z","15.0.0-canary.63d3a146e.0":"2022-07-12T11:36:20.009Z","15.0.0-canary.88db01990.0":"2022-07-12T11:39:18.311Z","15.0.0-canary.6432d8fd7.0":"2022-07-14T07:28:12.563Z","15.0.0-canary.085f9b25c.0":"2022-07-14T16:34:19.578Z","15.0.0-canary.39f9424b3.0":"2022-07-14T17:04:36.261Z","15.0.0-canary.ae9fce587.0":"2022-07-14T18:07:32.127Z","15.0.0-canary.1ebddc343.0":"2022-07-15T08:48:43.069Z","15.0.0-canary.c5018840c.0":"2022-07-18T09:42:32.855Z","15.0.0-canary.551b40d18.0":"2022-07-18T10:00:15.145Z","15.0.0-canary.cf9f12371.0":"2022-07-18T10:04:20.851Z","15.0.0-canary.2797ff8b6.0":"2022-07-19T00:23:26.215Z","15.0.0-canary.110fafa17.0":"2022-07-20T07:46:02.835Z","15.0.0-canary.386ef1d2f.0":"2022-07-20T18:19:08.488Z","15.0.0-canary.c3924efef.0":"2022-07-20T18:28:27.949Z","15.0.0-canary.cf5c5907c.0":"2022-07-20T21:21:13.496Z","15.0.0-canary.0617e2319.0":"2022-07-20T21:39:22.323Z","15.0.0-canary.a743b7967.0":"2022-07-20T21:56:30.471Z","15.0.0-canary.69fd619d0.0":"2022-07-20T22:08:21.935Z","15.0.0-canary.2a6ddc1cf.0":"2022-07-29T16:03:57.376Z","15.0.0-canary.86efd56f6.0":"2022-08-02T14:44:54.503Z","15.0.0-canary.ccfc24d19.0":"2022-08-03T18:12:41.526Z","15.0.0-canary.e4570146f.0":"2022-08-03T18:39:59.880Z","15.0.0-canary.6683a36cb.0":"2022-08-03T19:19:57.471Z","15.0.0-canary.10196647d.0":"2022-08-03T21:53:06.262Z","15.0.0-canary.b20d3d73c.0":"2022-08-04T22:42:07.981Z","15.0.0-canary.47c0c6b1e.0":"2022-08-09T15:19:40.819Z","15.0.0-canary.0e3dc8e38.0":"2022-08-11T18:45:14.453Z","15.0.0-canary.d5a11f1c8.0":"2022-08-30T23:00:36.834Z","15.0.0-canary.bac992a95.0":"2022-09-01T07:04:54.822Z","15.0.0-canary.d25f3404c.0":"2022-09-01T09:43:44.388Z","15.0.0-canary.920d8a79e.0":"2022-09-01T20:20:15.075Z","15.0.0-canary.c363f267b.0":"2022-09-01T21:17:37.019Z","15.0.0-canary.a4eb4937a.0":"2022-09-06T18:19:08.681Z","15.0.0-canary.4299717da.0":"2022-09-07T16:14:59.560Z","15.0.0-canary.fa7d8d44b.0":"2022-09-07T19:18:06.146Z","15.0.0-canary.a40e3c768.0":"2022-09-09T20:03:16.730Z","15.0.0-canary.18cdc9a00.0":"2022-09-12T21:02:11.264Z","15.0.0-canary.7ab3cd3c8.0":"2022-09-13T22:38:30.563Z","15.0.0-canary.2860d244d.0":"2022-09-16T22:54:12.755Z","15.0.0-canary.e8726533c.0":"2022-09-20T20:17:00.476Z","15.0.0-canary.00d8de0aa.0":"2022-09-21T15:19:22.940Z","15.0.0-canary.271aedc30.0":"2022-09-21T15:35:10.998Z","15.0.0-canary.9f17ff2cb.0":"2022-09-21T18:07:35.192Z","15.0.0-canary.d3344c16f.0":"2022-09-22T09:23:40.628Z","15.0.0-canary.94f20ccb8.0":"2022-09-22T20:47:12.229Z","15.0.0-canary.81e4cb7b2.0":"2022-09-23T15:07:18.201Z","15.0.0-canary.aa85f9413.0":"2022-09-26T17:55:41.641Z","15.0.0-canary.7134a7752.0":"2022-09-26T21:56:54.812Z","15.0.0-canary.70b8ac16e.0":"2022-09-27T22:44:09.834Z","15.0.0-canary.c20d74405.0":"2022-09-27T23:30:30.407Z","15.0.0-canary.f033fc8d1.0":"2022-09-27T23:56:37.466Z","15.0.0-canary.8d7ae912a.0":"2022-09-28T07:55:22.280Z","15.0.0-canary.db414b864.0":"2022-09-28T14:51:49.134Z","15.0.0-canary.c0462d134.0":"2022-09-28T17:51:19.229Z","15.0.0-canary.28cc6791f.0":"2022-09-28T18:06:04.092Z","15.0.0-canary.a515a2d18.0":"2022-09-28T18:54:56.403Z","15.0.0-canary.ce9523167.0":"2022-09-29T20:30:27.012Z","15.0.0-canary.b2310f7dc.0":"2022-09-30T00:13:07.374Z","15.0.0-canary.a44241e54.0":"2022-09-30T08:20:22.660Z","15.0.0-canary.0ce81e115.0":"2022-09-30T18:17:26.503Z","15.0.0-canary.3cc30f6ad.0":"2022-10-04T17:18:24.011Z","15.0.0-canary.d9cf98e60.0":"2022-10-04T19:02:59.564Z","15.0.0-canary.d71935c8b.0":"2022-10-06T08:14:05.797Z","15.0.0-canary.49c56a25d.0":"2022-10-06T18:50:08.417Z","15.0.0-canary.07acddef3.0":"2022-10-07T21:36:49.653Z","15.0.0-canary.1c74eb2c0.0":"2022-10-07T21:54:15.999Z","15.0.0-canary.dadfb713e.0":"2022-10-08T05:05:07.356Z","15.0.0-canary.395f1ce61.0":"2022-10-08T05:07:06.563Z","15.0.0-canary.e741b5c82.0":"2022-10-10T17:37:18.616Z","15.0.0-canary.582f3cc1c.0":"2022-10-11T04:48:13.737Z","15.0.0-canary.b1a6e3e88.0":"2022-10-12T12:01:35.747Z","15.0.0-canary.c9b1a31e4.0":"2022-10-12T16:57:41.293Z","15.0.0-canary.13e9b0d1f.0":"2022-10-12T19:20:03.426Z","15.0.0-canary.1dc797e7f.0":"2022-10-14T09:40:43.108Z","15.0.0-canary.ed4009397.0":"2022-10-14T16:50:30.871Z","15.0.0-canary.95ef196bc.0":"2022-10-14T23:13:10.682Z","15.0.0-canary.13eea1b2d.0":"2022-10-17T03:50:48.682Z","15.0.0-canary.ef9b2babb.0":"2022-10-17T09:17:00.946Z","15.0.0-canary.cec7fb987.0":"2022-10-17T10:55:30.608Z","15.0.0-canary.4fff58b08.0":"2022-10-17T15:21:38.288Z","15.0.0-canary.587d8f871.0":"2022-10-17T15:56:20.521Z","15.0.0-canary.edf4b98d0.0":"2022-10-17T16:39:40.139Z","15.0.0-canary.024ac5f16.0":"2022-10-17T22:41:31.766Z","15.0.0-canary.c8bdf6144.0":"2022-10-18T18:22:31.953Z","15.0.0-canary.bacda4885.0":"2022-10-18T18:41:51.217Z","15.0.0-canary.92b2556cf.0":"2022-10-19T01:12:37.437Z","15.0.0-canary.cc804509a.0":"2022-10-19T01:16:26.770Z","15.0.0-canary.982bedae9.0":"2022-10-19T01:36:12.070Z","15.0.0-canary.ee40081f4.0":"2022-10-19T20:10:52.240Z","15.0.0-canary.98f1b54e2.0":"2022-10-20T22:55:57.241Z","15.0.0-canary.e74b7ba7e.0":"2022-10-21T17:05:00.007Z","15.0.0-canary.ab55c07d2.0":"2022-10-22T18:18:24.832Z","15.0.0-canary.fc539db34.0":"2022-10-24T18:58:21.818Z","15.0.0-canary.e340b04c5.0":"2022-10-25T23:44:14.647Z","15.0.0-canary.2c1a8f8fd.0":"2022-10-26T17:29:30.607Z","15.0.0-canary.ecfee946f.0":"2022-10-26T20:14:18.498Z","15.0.0-canary.73ca9dbb0.0":"2022-10-31T17:31:35.304Z","15.0.0-canary.357f2e5f1.0":"2022-10-31T18:48:24.881Z","15.0.0-canary.eb103d4b5.0":"2022-10-31T19:55:32.977Z","15.0.0-canary.af5f01223.0":"2022-11-01T18:36:02.899Z","15.0.0-canary.58733ef41.0":"2022-11-02T18:09:54.151Z","15.0.0-canary.909b48215.0":"2022-11-03T04:06:55.695Z","15.0.0-canary.7f17127d5.0":"2022-11-03T18:18:13.215Z","15.0.0-canary.da95e2a05.0":"2022-11-04T16:58:12.780Z","15.0.0-canary.4832e2750.0":"2022-11-04T20:56:12.730Z","15.0.0-canary.215506426.0":"2022-11-05T01:05:11.791Z","15.0.0-canary.4cf917476.0":"2022-11-05T18:03:14.813Z","15.0.0-canary.eef14bd32.0":"2022-11-06T17:23:47.095Z","15.0.0-canary.6faa29fe9.0":"2022-11-07T03:12:38.975Z","15.0.0-canary.9af09b967.0":"2022-11-07T18:26:45.987Z","15.0.0-canary.0f54fbb93.0":"2022-11-08T21:55:48.567Z","15.0.0-canary.a8d47f9fe.0":"2022-11-09T04:16:47.470Z","15.0.0-canary.66a1e75e6.0":"2022-11-09T09:34:44.776Z","15.0.0-canary.5e5c2afc0.0":"2022-11-09T11:52:25.425Z","15.0.0-canary.3e3f43359.0":"2022-11-09T20:02:01.651Z","15.0.0-canary.3f667fac6.0":"2022-11-09T22:05:08.283Z","15.0.0-canary.faa28c1c5.0":"2022-11-11T16:34:51.992Z","15.0.0-canary.a868c7866.0":"2022-11-11T16:35:39.168Z","15.0.0-canary.602fe8efa.0":"2022-11-11T17:11:00.235Z","15.0.0-canary.558c2be62.0":"2022-11-11T22:44:28.257Z","15.0.0-canary.b5c13a7a8.0":"2022-11-14T15:57:36.438Z","15.0.0-canary.a6e1c0702.0":"2022-11-14T17:26:10.887Z","15.0.0-canary.b6f8a06de.0":"2022-11-15T09:27:27.651Z","15.0.0-canary.0163f3ba5.0":"2022-11-15T18:01:04.913Z","15.0.0-canary.66c5cbb94.0":"2022-11-15T19:29:01.913Z","15.0.0-canary.b01136063.0":"2022-11-16T00:14:50.291Z","15.0.0-canary.01da0cabb.0":"2022-11-16T09:12:17.551Z","15.0.0-canary.4ac393164.0":"2022-11-16T16:14:17.820Z","15.0.0-canary.6048fb563.0":"2022-11-16T16:16:39.235Z","15.0.0-canary.3777b03cb.0":"2022-11-16T18:40:19.769Z","15.0.0-canary.f7f56fff7.0":"2022-11-16T19:55:06.375Z","15.0.0-canary.7c73f6134.0":"2022-11-16T19:58:39.088Z","15.0.0-canary.f1e037150.0":"2022-11-16T20:04:09.338Z","15.0.0-canary.40b18d043.0":"2022-11-16T22:57:52.403Z","15.0.0-canary.86bde5c06.0":"2022-11-16T23:08:07.658Z","15.0.0-canary.bb7751002.0":"2022-11-16T23:59:17.150Z","15.0.0-canary.63aca9af6.0":"2022-11-17T19:00:20.054Z","15.0.0-canary.56482dc2e.0":"2022-11-17T21:54:24.587Z","15.0.0-canary.953e689f3.0":"2022-11-17T22:03:51.779Z","15.0.0-canary.b5606a793.0":"2022-11-18T10:20:10.493Z","15.0.0-canary.8c5675942.0":"2022-11-18T15:15:17.189Z","15.0.0-canary.697fbdebd.0":"2022-11-18T16:59:43.344Z","15.0.0-canary.d58410453.0":"2022-11-18T19:24:02.123Z","15.0.0-canary.7971d6ad5.0":"2022-11-19T08:44:25.843Z","15.0.0-canary.a0ae73b0e.0":"2022-11-21T10:52:53.409Z","15.0.0-canary.96f472604.0":"2022-11-21T12:51:49.852Z","15.0.0-canary.18b8f31e1.0":"2022-11-21T16:01:29.775Z","15.0.0-canary.912f33ce4.0":"2022-11-21T17:53:06.450Z","15.0.0-canary.1e1b1c369.0":"2022-11-23T18:59:40.373Z","15.0.0-canary.a2ec49244.0":"2022-11-23T19:30:05.231Z","15.0.0-canary.a7458ba0b.0":"2022-11-23T20:15:36.288Z","15.0.0-canary.7c35e5036.0":"2022-11-24T08:38:30.647Z","15.0.0-canary.4356e05c5.0":"2022-11-24T09:55:54.030Z","15.0.0-canary.cb605f8af.0":"2022-11-24T10:14:30.505Z","15.0.0-canary.05fb07f9f.0":"2022-11-24T17:12:59.099Z","15.0.0-canary.a911b386b.0":"2022-11-28T16:46:30.885Z","15.0.0-canary.2aa8050b4.0":"2022-11-28T19:10:45.387Z","15.0.0-canary.323904a9f.0":"2022-11-29T15:33:01.295Z","15.0.0-canary.168a629a4.0":"2022-11-29T16:47:53.279Z","15.0.0-canary.65c411674.0":"2022-11-29T17:37:22.876Z","15.0.0-canary.a86d36fd2.0":"2022-11-30T02:13:21.309Z","15.0.0-canary.3a1f46c66.0":"2022-11-30T12:06:03.338Z","15.0.0-canary.32d8a9648.0":"2022-12-01T17:28:10.109Z","15.0.0-canary.03618ab70.0":"2022-12-01T20:53:42.736Z","15.0.0-canary.68aaed940.0":"2022-12-01T21:23:09.753Z","15.0.0-canary.f0a0bbc75.0":"2022-12-02T09:00:55.566Z","15.0.0-canary.dd99c8764.0":"2022-12-02T14:00:08.207Z","15.0.0-canary.fabdcca3a.0":"2022-12-02T15:05:55.538Z","15.0.0-canary.2d26722d2.0":"2022-12-02T16:25:38.910Z","15.0.0-canary.eaa0c3a86.0":"2022-12-02T17:41:43.565Z","15.0.0-canary.79a613bbd.0":"2022-12-06T14:24:49.428Z","15.0.0-canary.c871fe61e.0":"2022-12-07T07:51:10.337Z","15.0.0-canary.9eaee7936.0":"2022-12-07T20:02:02.394Z","15.0.0-canary.1d37bf601.0":"2022-12-07T20:40:28.515Z","15.0.0-canary.a5fe069d5.0":"2022-12-09T18:43:16.013Z","15.0.0-canary.ce8b5326f.0":"2022-12-09T23:29:59.510Z","15.0.0-canary.43f5323bc.0":"2022-12-12T16:45:25.484Z","15.0.0-canary.5490e32e7.0":"2022-12-12T17:01:18.359Z","15.0.0-canary.817002c29.0":"2022-12-13T21:53:10.631Z","15.0.0-canary.313a1326a.0":"2022-12-14T10:27:51.384Z","15.0.0-canary.a69c14e10.0":"2022-12-14T11:18:03.554Z","15.0.0-canary.f43e0ceb5.0":"2022-12-14T16:43:57.024Z","15.0.0-canary.34767110.0":"2022-12-14T17:19:22.754Z","15.0.0-canary.1f99f3c50.0":"2022-12-15T14:24:39.748Z","15.0.0-canary.cfd69490f.0":"2022-12-16T20:07:39.446Z","15.0.0-canary.94ad8d986.0":"2022-12-19T19:26:10.420Z","15.0.0-canary.604264203.0":"2022-12-21T21:39:59.109Z","15.0.0-canary.85bcff6af.0":"2022-12-22T10:24:17.937Z","15.0.0-canary.ece3e8d21.0":"2022-12-22T17:11:24.887Z","15.0.0-canary.278ad53d1.0":"2022-12-27T17:04:08.541Z","15.0.0-canary.a7d8389e1.0":"2022-12-27T19:02:53.093Z","15.0.0-canary.8175d5eff.0":"2022-12-28T01:50:47.465Z","15.0.0-canary.16abb41ed.0":"2022-12-28T19:37:39.595Z","15.0.0-canary.e21dcb86d.0":"2022-12-29T14:01:17.576Z","15.0.0-canary.20ab6f5a8.0":"2022-12-29T19:40:08.117Z","15.0.0-canary.b9806f623.0":"2022-12-29T23:05:04.480Z","15.0.0-canary.50c9f550e.0":"2023-01-03T15:46:57.259Z","15.0.0-canary.af490a848.0":"2023-01-03T15:56:05.954Z","15.0.0-canary.7cf487c98.0":"2023-01-03T17:37:51.118Z","15.0.0-canary.a52be2d5e.0":"2023-01-03T19:12:22.718Z","15.0.0-canary.e38ba17c5.0":"2023-01-03T22:31:41.145Z","15.0.0-canary.49041a6c3.0":"2023-01-04T15:16:44.853Z","15.0.0-canary.c492898c2.0":"2023-01-04T17:36:20.093Z","15.0.0-canary.d7a2277de.0":"2023-01-04T21:34:54.812Z","15.0.0-canary.fd95ca7ef.0":"2023-01-05T01:02:03.471Z","15.0.0-canary.1eb44faf9.0":"2023-01-05T09:08:28.695Z","15.0.0-canary.adcdb7db9.0":"2023-01-05T16:20:46.570Z","15.0.0-canary.067af7eff.0":"2023-01-06T23:15:23.457Z","15.0.0-canary.21d1196a7.0":"2023-01-09T10:42:07.445Z","15.0.0-canary.8d2d8d3c4.0":"2023-01-09T22:23:11.389Z","15.0.0-canary.f476fdece.0":"2023-01-10T16:13:41.712Z","15.0.0-canary.fc6ee6c32.0":"2023-01-10T16:27:11.902Z","15.0.0-canary.73537ab0f.0":"2023-01-10T18:10:47.520Z","15.0.0-canary.684e33d25.0":"2023-01-10T19:17:46.108Z","15.0.0-canary.0e89aab6b.0":"2023-01-11T16:16:29.371Z","15.0.0-canary.b0103d10a.0":"2023-01-11T19:11:31.729Z","15.0.0-canary.50e7a5312.0":"2023-01-11T20:53:16.778Z","15.0.0-canary.202823f54.0":"2023-01-11T21:34:55.867Z","15.0.0-canary.199fe2a2a.0":"2023-01-11T21:54:45.053Z","15.0.0-canary.8c0786d6f.0":"2023-01-12T14:35:21.926Z","15.0.0-canary.8a74f7c6d.0":"2023-01-17T19:23:45.322Z","15.0.0-canary.b4687fdc1.0":"2023-01-19T19:48:24.853Z","15.0.0-canary.b836b9892.0":"2023-01-24T22:38:25.279Z","15.0.0-canary.e8912fd37.0":"2023-01-26T18:28:56.611Z","15.0.0-canary.16fbd30ff.0":"2023-01-26T18:34:02.568Z","15.0.0-canary.033ae083a.0":"2023-01-26T19:26:01.339Z","15.0.0-canary.3a705fa1d.0":"2023-01-27T22:42:50.050Z","15.0.0-canary.d6bea2ff2.0":"2023-01-31T15:29:03.950Z","15.0.0-canary.0c94182c8.0":"2023-02-01T17:43:12.905Z","15.0.0-canary.15b221540.0":"2023-02-01T17:51:30.469Z","15.0.0-canary.eeebb8bba.0":"2023-02-01T18:21:19.205Z","15.0.0-canary.6a4b3f834.0":"2023-02-01T18:57:27.675Z","15.0.0-canary.b177b40e2.0":"2023-02-02T03:33:09.897Z","15.0.0-canary.d9f821042.0":"2023-02-02T17:36:43.189Z","15.0.0-canary.47c7deb19.0":"2023-02-03T09:08:06.183Z","15.0.0-canary.a16dbd1a6.0":"2023-02-04T06:13:42.882Z","15.0.0-canary.93416f87a.0":"2023-02-07T13:23:06.559Z","15.0.0-canary.49b8e7442.0":"2023-02-07T23:08:36.146Z","15.0.0-canary.de38de758.0":"2023-02-09T15:41:19.965Z","15.0.0-canary.4d62de70c.0":"2023-02-09T22:02:05.415Z","15.0.0-canary.6fcd8d418.0":"2023-02-13T11:49:00.077Z","15.0.0-canary.066d9439b.0":"2023-02-15T19:56:46.868Z","15.0.0-canary.7ab32468c.0":"2023-02-21T18:32:59.974Z","15.0.0-canary.fa27ba61d.0":"2023-02-27T16:18:14.725Z","15.0.0-canary.311ab4d4a.0":"2023-02-27T16:40:20.995Z","15.0.0-canary.901c83e77.0":"2023-02-27T18:05:07.277Z","15.0.0-canary.5cb8e2174.0":"2023-03-01T16:34:38.775Z","15.0.0-canary.f32339937.0":"2023-03-06T15:14:38.578Z","15.0.0-canary.7644d63d5.0":"2023-03-06T22:26:33.798Z","15.0.0-canary.d96330c08.0":"2023-03-08T11:40:52.279Z","15.0.0-canary.c99cae77c.0":"2023-03-08T23:41:58.944Z","15.0.0-canary.6023b1cd3.0":"2023-03-09T14:25:29.168Z","15.0.0-canary.274610c77.0":"2023-03-09T14:57:37.047Z","15.0.0-canary.a274583b9.0":"2023-03-09T19:51:43.163Z","15.0.0-canary.da22ca960.0":"2023-03-09T20:17:10.431Z","15.0.0-canary.304a94e8b.0":"2023-03-09T20:44:04.098Z","15.0.0-canary.6c265915c.0":"2023-03-09T21:46:23.570Z","15.0.0-canary.de5224633.0":"2023-03-09T23:54:52.362Z","15.0.0-canary.8879557e6.0":"2023-03-10T14:06:59.287Z","15.0.0-canary.23073a303.0":"2023-03-10T14:13:53.014Z","15.0.0-canary.51c7d4014.0":"2023-03-10T16:46:28.101Z","15.0.0-canary.1175a5be0.0":"2023-03-10T20:47:08.066Z","15.0.0-canary.7adf3af80.0":"2023-03-11T01:24:00.661Z","15.0.0-canary.82554d770.0":"2023-03-11T01:36:23.118Z","15.0.0-canary.93fc524b7.0":"2023-03-13T08:37:30.094Z","15.0.0-canary.50be0fbae.0":"2023-03-13T17:43:14.204Z","15.0.0-canary.6b5ffccd9.0":"2023-03-13T17:46:32.359Z","15.0.0-canary.1c8013f4e.0":"2023-03-13T18:00:54.913Z","15.0.0-canary.112715df5.0":"2023-03-13T18:38:13.451Z","15.0.0-canary.d250911f2.0":"2023-03-13T19:30:31.410Z","15.0.0-canary.7cd925c12.0":"2023-03-13T19:38:01.013Z","15.0.0-canary.b2ddacf73.0":"2023-03-13T19:42:21.521Z","15.0.0-canary.989ae2ecc.0":"2023-03-13T19:51:39.355Z","15.0.0-canary.89c66483a.0":"2023-03-13T20:15:27.441Z","15.0.0-canary.6a85742c2.0":"2023-03-14T02:46:26.465Z","15.0.0-canary.bb6cd78d5.0":"2023-03-14T18:15:45.691Z","15.0.0-canary.5f94aa37d.0":"2023-03-14T18:19:13.980Z","15.0.0-canary.1bd317240.0":"2023-03-14T18:23:00.328Z","15.0.0-canary.d441d2a2a.0":"2023-03-14T18:25:34.648Z","15.0.0-canary.fff4066c6.0":"2023-03-14T18:26:08.658Z","15.0.0-canary.87809c710.0":"2023-03-14T18:42:26.199Z","15.0.0-canary.48d30012d.0":"2023-03-14T18:46:51.065Z","15.0.0-canary.419b23cc6.0":"2023-03-14T18:57:46.989Z","15.0.0-canary.bf86521f4.0":"2023-03-14T23:12:26.960Z","15.0.0-canary.11f3d280e.0":"2023-03-15T00:10:20.813Z","15.0.0-canary.b281a409a.0":"2023-03-21T15:39:54.665Z","15.0.0-canary.39e473690.0":"2023-03-21T17:50:16.553Z","15.0.0-canary.cedffb44c.0":"2023-03-21T17:57:18.204Z","15.0.0-canary.36a4cba99.0":"2023-03-28T17:49:04.109Z","15.0.0-canary.ed7e82ded.0":"2023-03-28T20:33:35.594Z","15.0.0-canary.55093ee1e.0":"2023-03-29T18:45:59.981Z","15.0.0-canary.0c53abc81.0":"2023-04-07T01:40:13.546Z","15.0.0-canary.51311e69e.0":"2023-04-07T18:06:51.400Z","15.0.0-canary.113b1a38e.0":"2023-04-10T21:52:48.385Z","15.0.0-canary.ea2191426.0":"2023-04-11T21:54:40.796Z","15.0.0-canary.5a5c38538.0":"2023-04-11T22:29:23.748Z","15.0.0-canary.e4b5ea7eb.0":"2023-04-11T23:03:07.159Z","15.0.0-canary.a094dd9c1.0":"2023-04-14T22:41:30.068Z","15.0.0-canary.f771b091c.0":"2023-04-17T15:36:57.562Z","15.0.0-canary.79b1b612b.0":"2023-04-19T23:38:59.781Z","15.0.0-canary.6f50071e5.0":"2023-04-20T17:59:54.635Z","15.0.0-canary.ef754381c.0":"2023-04-24T20:49:58.717Z","15.0.0-canary.69ebf61ea.0":"2023-04-27T17:20:08.709Z","15.0.0-canary.b90be86de.0":"2023-04-29T00:20:37.301Z","15.0.0-canary.51f9c0c28.0":"2023-04-29T00:30:25.644Z","15.0.0-canary.4e840d685.0":"2023-05-02T15:32:24.023Z","15.0.0-canary.10b8563e4.0":"2023-05-02T23:40:55.410Z","15.0.0-canary.736b7fda4.0":"2023-05-03T15:08:21.858Z","15.0.0-canary.0e533c5a1.0":"2023-05-05T16:55:12.780Z","15.0.0-canary.5f01c15a2.0":"2023-05-05T17:25:19.038Z","15.0.0-canary.3b5b55e31.0":"2023-05-05T18:37:54.656Z","15.0.0-canary.d0788120f.0":"2023-05-09T08:22:03.060Z","15.0.0-canary.f52358dd0.0":"2023-05-12T14:29:20.633Z","15.0.0-canary.d3c3fbaa3.0":"2023-05-12T17:59:23.771Z","15.0.0-canary.576d3d2c8.0":"2023-05-16T01:59:01.014Z","15.0.0-canary.19bb36a46.0":"2023-05-16T19:53:01.154Z","15.0.0-canary.aa5ac7fe5.0":"2023-05-22T17:24:22.013Z","15.0.0-canary.90291f2e2.0":"2023-05-23T17:41:39.586Z","15.0.0-canary.446734f27.0":"2023-05-30T21:47:08.853Z","15.0.0-canary.19de312d8.0":"2023-06-06T17:17:00.278Z","15.0.0-canary.6081d829b.0":"2023-06-07T01:13:01.491Z","15.0.0-canary.b26c34a68.0":"2023-06-07T20:15:55.289Z","15.0.0-canary.4fe911371.0":"2023-06-07T23:04:48.776Z","15.0.0-canary.a9ff9866f.0":"2023-06-13T11:37:14.025Z","15.0.0-canary.b994146f6.0":"2023-06-14T21:02:30.185Z","15.0.0-canary.1fb4b1a06.0":"2023-06-27T18:55:55.006Z","15.0.0-canary.c64a2776e.0":"2023-06-27T20:15:22.886Z","15.0.0-canary.b05d9eb7c.0":"2023-06-29T16:22:39.572Z","15.0.0-canary.2a9697dc5.0":"2023-06-30T22:12:53.910Z","15.0.0-canary.0c52adeab.0":"2023-07-05T16:24:39.567Z","15.0.0-canary.83355c322.0":"2023-07-10T15:04:03.436Z","15.0.0-canary.bc9ae6c9c.0":"2023-08-03T21:18:12.300Z","15.0.0-canary.3c44cd956.0":"2023-08-07T17:45:56.781Z","15.0.0-canary.02702296e.0":"2023-08-25T12:03:42.057Z","15.0.0-canary.872b65832.0":"2023-08-30T12:11:48.627Z","15.0.0-canary.89b2e4122.0":"2023-08-31T16:05:32.802Z","15.0.0-canary.7a3942e7a.0":"2023-08-31T18:38:14.456Z","15.0.0-canary.54feb3020.0":"2023-09-11T21:03:45.721Z","15.0.0-canary.6cda3ce8d.0":"2023-09-12T01:43:50.715Z","15.0.0-canary.205b20b36.0":"2023-09-13T17:14:57.706Z","15.0.0-canary.22bf82024.0":"2023-09-18T09:10:48.062Z","15.0.0-canary.a246a4439.0":"2023-09-18T17:44:28.031Z","15.0.0-canary.d153db62b.0":"2023-09-19T19:12:54.261Z","15.0.0-canary.2528c1c3b.0":"2023-09-20T18:05:06.578Z","15.0.0-canary.1728a6dcf.0":"2023-09-26T01:21:49.277Z","15.0.0-canary.ebb636f3d.0":"2023-09-29T19:43:21.796Z","15.0.0-canary.c0d21ecc9.0":"2023-10-09T19:35:40.669Z","15.0.0-canary.127a44b28.0":"2023-10-12T19:58:41.195Z","15.0.0-canary.0ad128337.0":"2023-10-19T18:50:31.590Z","15.0.0-canary.9cec94097.0":"2023-10-19T23:08:15.920Z","15.0.0-canary.c51a0bbcc.0":"2023-11-15T20:58:03.334Z","15.0.0-canary.d76666ad4.0":"2023-11-27T22:12:26.399Z","15.0.0-canary.8656bf0e0.0":"2023-12-12T21:17:55.756Z","15.0.0-canary.7f224ddd4.0":"2023-12-28T06:08:24.845Z","15.0.0-canary.a0b8a90c0.0":"2024-02-07T19:18:46.531Z","15.0.0-canary.e50b478eb.0":"2024-02-08T18:07:11.896Z","15.0.0-canary.c43b3438b.0":"2024-02-23T20:16:46.573Z","15.0.0-canary.819498d8c.0":"2024-03-15T15:13:54.022Z","15.0.0-canary.453a6248a.0":"2024-03-25T17:12:48.537Z","15.0.0-canary.68edc03c6.0":"2024-04-08T19:04:51.471Z","15.0.0-canary.5bebc0064.0":"2024-04-11T21:39:05.401Z","15.0.0-canary.311f29a60.0":"2024-04-23T17:58:44.068Z","15.0.0-canary.65c10a622.0":"2024-04-25T18:47:48.052Z","15.0.0-canary.4b35cb7d0.0":"2024-05-02T12:01:53.402Z","15.0.0-canary.f80ac92b0.0":"2024-05-02T12:12:19.657Z","15.0.0-canary.2f5b899bc.0":"2024-05-20T13:53:48.262Z","15.0.0-canary.cfec83c74.0":"2024-05-20T18:55:59.732Z","15.0.0-canary.423edc3dc.0":"2024-06-26T18:11:35.235Z"},"maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"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":"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":"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"}],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-auto-init"},"license":"MIT","homepage":"https://github.com/material-components/material-components-web#readme","bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"readme":"","readmeFilename":""}